@epam/ai-dial-ui-kit 0.5.0-rc.1 → 0.5.0-rc.100

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.
Files changed (118) hide show
  1. package/README.md +3 -3
  2. package/dist/dial-ui-kit.cjs.js +62 -2
  3. package/dist/dial-ui-kit.es.js +47738 -5107
  4. package/dist/index.css +2 -2
  5. package/dist/src/components/Alert/Alert.d.ts +7 -3
  6. package/dist/src/components/Alert/constants.d.ts +7 -4
  7. package/dist/src/components/AutocompleteInput/AutocompleteInput.d.ts +10 -10
  8. package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +6 -6
  9. package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +8 -8
  10. package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +2 -2
  11. package/dist/src/components/Breadcrumb/constants.d.ts +10 -10
  12. package/dist/src/components/Button/Button.d.ts +10 -18
  13. package/dist/src/components/Checkbox/Checkbox.d.ts +3 -4
  14. package/dist/src/components/CloseButton/CloseButton.d.ts +5 -3
  15. package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +6 -6
  16. package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +3 -3
  17. package/dist/src/components/ConfirmationPopup/constants.d.ts +3 -3
  18. package/dist/src/components/DraggableItem/DraggableItem.d.ts +8 -8
  19. package/dist/src/components/DraggableItem/constants.d.ts +2 -2
  20. package/dist/src/components/Dropdown/Dropdown.d.ts +4 -2
  21. package/dist/src/components/Dropdown/constants.d.ts +7 -7
  22. package/dist/src/components/EllipsisTooltip/EllipsisTooltip.d.ts +6 -4
  23. package/dist/src/components/EllipsisTooltip/constants.d.ts +1 -1
  24. package/dist/src/components/Field/Field.d.ts +4 -6
  25. package/dist/src/components/FileIcon/FileIcon.d.ts +2 -2
  26. package/dist/src/components/FileManager/FileManager.d.ts +93 -11
  27. package/dist/src/components/FileManager/FileManagerContext.d.ts +61 -5
  28. package/dist/src/components/FileManager/FileManagerProvider.d.ts +1 -0
  29. package/dist/src/components/FileManager/components/ConflictResolutionPopup/ConflictResolutionPopup.d.ts +92 -0
  30. package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +4 -1
  31. package/dist/src/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.d.ts +56 -0
  32. package/dist/src/components/FileManager/components/DialFileManagerItemSummaryCell/DialFileManagerItemSummaryCell.test.d.ts +1 -0
  33. package/dist/src/components/FileManager/components/FileManagerBulkActionsToolbar/FileManagerBulkActionsToolbar.d.ts +5 -3
  34. package/dist/src/components/FileManager/components/FileManagerItemIcon/FileManagerItemIcon.d.ts +1 -1
  35. package/dist/src/components/FileManager/components/FileManagerItemName/FileManagerItemName.d.ts +2 -1
  36. package/dist/src/components/FileManager/components/FileManagerItemNameInput/FileManagerItemNameInput.d.ts +4 -2
  37. package/dist/src/components/FileManager/components/FileManagerNavigationPanel/FileManagerNavigationPanel.d.ts +13 -11
  38. package/dist/src/components/FileManager/components/FileManagerNavigationPanel/constants.d.ts +3 -3
  39. package/dist/src/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.d.ts +13 -13
  40. package/dist/src/components/FileManager/components/FileMetadataPopup/FileMetadataPopup.d.ts +50 -0
  41. package/dist/src/components/FileManager/components/FileMetadataPopup/constants.d.ts +6 -0
  42. package/dist/src/components/FileManager/components/FoldersTree/FoldersTree.d.ts +9 -1
  43. package/dist/src/components/FileManager/components/FoldersTree/hooks/use-expanded-paths.d.ts +13 -0
  44. package/dist/src/components/FileManager/constants.d.ts +15 -7
  45. package/dist/src/components/FileManager/hooks/__tests__/use-conflict-resolution.spec.d.ts +1 -0
  46. package/dist/src/components/FileManager/hooks/__tests__/use-file-upload.spec.d.ts +1 -0
  47. package/dist/src/components/FileManager/hooks/__tests__/use-trigger-view-rename.spec.d.ts +1 -0
  48. package/dist/src/components/FileManager/hooks/use-bulk-actions.d.ts +22 -0
  49. package/dist/src/components/FileManager/hooks/use-conflict-resolution.d.ts +26 -0
  50. package/dist/src/components/FileManager/hooks/use-file-clipboard.d.ts +18 -4
  51. package/dist/src/components/FileManager/hooks/use-file-delete.d.ts +3 -2
  52. package/dist/src/components/FileManager/hooks/use-file-download.d.ts +2 -1
  53. package/dist/src/components/FileManager/hooks/use-file-metadata.d.ts +10 -0
  54. package/dist/src/components/FileManager/hooks/use-file-upload.d.ts +43 -0
  55. package/dist/src/components/FileManager/hooks/use-folder-creation.d.ts +21 -0
  56. package/dist/src/components/FileManager/hooks/use-grid-actions-column.d.ts +10 -0
  57. package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +24 -0
  58. package/dist/src/components/FileManager/hooks/use-item-renaming.d.ts +11 -4
  59. package/dist/src/components/FileManager/hooks/use-new-actions.d.ts +16 -0
  60. package/dist/src/components/FileManager/hooks/use-tree-additional-buttons.d.ts +22 -0
  61. package/dist/src/components/FileManager/hooks/use-trigger-view-rename.d.ts +20 -0
  62. package/dist/src/components/FileManager/utils.d.ts +33 -0
  63. package/dist/src/components/FileName/FileName.d.ts +19 -5
  64. package/dist/src/components/FolderName/FolderName.d.ts +6 -3
  65. package/dist/src/components/FormItem/FormItem.d.ts +9 -9
  66. package/dist/src/components/FormItem/constants.d.ts +1 -1
  67. package/dist/src/components/FormPopup/FormPopup.d.ts +1 -1
  68. package/dist/src/components/FormPopup/constants.d.ts +1 -1
  69. package/dist/src/components/Grid/Grid.d.ts +23 -5
  70. package/dist/src/components/Grid/constants.d.ts +1 -1
  71. package/dist/src/components/Grid/hooks/use-grid-selection.d.ts +7 -4
  72. package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +3 -3
  73. package/dist/src/components/Grid/renderers/constants.d.ts +1 -1
  74. package/dist/src/components/Icon/Icon.d.ts +0 -1
  75. package/dist/src/components/Input/Input.d.ts +4 -4
  76. package/dist/src/components/InputField/InputField.d.ts +3 -3
  77. package/dist/src/components/InputPopup/InputPopup.d.ts +6 -6
  78. package/dist/src/components/Loader/Loader.d.ts +5 -5
  79. package/dist/src/components/Loader/constants.d.ts +2 -2
  80. package/dist/src/components/NoDataContent/NoDataContent.d.ts +6 -3
  81. package/dist/src/components/PasswordInput/PasswordInputField.d.ts +1 -1
  82. package/dist/src/components/Popup/Popup.d.ts +6 -6
  83. package/dist/src/components/Popup/constants.d.ts +3 -3
  84. package/dist/src/components/RadioButton/RadioButton.d.ts +6 -6
  85. package/dist/src/components/RadioGroup/RadioGroup.d.ts +20 -20
  86. package/dist/src/components/RadioGroup/constants.d.ts +3 -3
  87. package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +2 -2
  88. package/dist/src/components/RemoveButton/RemoveButton.d.ts +6 -8
  89. package/dist/src/components/ResizableContainer/ConditionalResizableContainer.d.ts +33 -0
  90. package/dist/src/components/ResizableContainer/ResizableContainer.d.ts +69 -0
  91. package/dist/src/components/ResizableContainer/components/ResizeHandle.d.ts +10 -0
  92. package/dist/src/components/ResizableContainer/components/ResizeIcon.d.ts +8 -0
  93. package/dist/src/components/Search/Search.d.ts +7 -4
  94. package/dist/src/components/Search/constants.d.ts +4 -4
  95. package/dist/src/components/Select/Select.d.ts +9 -3
  96. package/dist/src/components/Select/constants.d.ts +7 -6
  97. package/dist/src/components/SelectField/SelectField.d.ts +6 -6
  98. package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +2 -2
  99. package/dist/src/components/Skeleton/Skeleton.d.ts +77 -0
  100. package/dist/src/components/Skeleton/utils.d.ts +2 -0
  101. package/dist/src/components/Tab/Tab.d.ts +4 -4
  102. package/dist/src/components/Tabs/Tabs.d.ts +9 -9
  103. package/dist/src/components/Tag/Tag.d.ts +2 -2
  104. package/dist/src/components/TextAreaField/TextAreaField.d.ts +3 -3
  105. package/dist/src/components/Textarea/Textarea.d.ts +4 -4
  106. package/dist/src/hooks/use-width-breakpoint.d.ts +23 -0
  107. package/dist/src/index.d.ts +9 -2
  108. package/dist/src/models/breadcrumb.d.ts +1 -1
  109. package/dist/src/models/dropdown.d.ts +1 -0
  110. package/dist/src/models/file-manager.d.ts +18 -0
  111. package/dist/src/models/file.d.ts +2 -1
  112. package/dist/src/models/tab.d.ts +2 -1
  113. package/dist/src/types/dropdown.d.ts +2 -1
  114. package/dist/src/types/file-manager.d.ts +28 -11
  115. package/dist/src/types/resizable-container.d.ts +4 -0
  116. package/dist/src/types/skeleton.d.ts +15 -0
  117. package/dist/src/types/tab.d.ts +1 -1
  118. package/package.json +13 -12
@@ -1,2 +1,62 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),D=require("classnames"),A=require("@floating-ui/react"),c=require("react"),k=require("@tabler/icons-react"),Jn=require("react-dom");function Qn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const M=Qn(c),Se=({errorText:e})=>e&&o.jsx("span",{className:"text-error dial-tiny mt-1",children:e}),q=({icon:e,className:t})=>e?o.jsx("span",{className:D("flex-shrink-0",t),children:e}):null,es=7,ts=2,kr=c.createContext(null),Or=()=>{const e=c.useContext(kr);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},rs=({initialOpen:e=!1,placement:t="bottom",isTriggerClickable:r=!1,open:n,onOpenChange:s}={})=>{const[i,a]=c.useState(e),l=c.useRef(null),d=n??i,u=s??a,f=A.useFloating({placement:t,open:d,onOpenChange:u,whileElementsMounted:A.autoUpdate,middleware:[A.offset(es+ts),A.flip({crossAxis:t.includes("-"),fallbackAxisSideDirection:"start",padding:5}),A.shift({padding:5}),A.arrow({element:l})]}),p=A.useHover(f.context,{move:!1,enabled:n==null,mouseOnly:r,delay:{open:500,close:0}}),C=A.useFocus(f.context,{enabled:n==null}),g=A.useDismiss(f.context),m=A.useRole(f.context,{role:"tooltip"}),h=A.useInteractions([p,C,g,m]);return c.useEffect(()=>{if(!d)return;const y=f.refs.reference.current;if(!(y instanceof Element))return;const b=new IntersectionObserver(([v])=>{v.isIntersecting||u(!1)},{root:null,threshold:0});return b.observe(y),()=>b.disconnect()},[d,f.refs.reference,u]),c.useMemo(()=>({open:d,setOpen:u,arrowRef:l,...h,...f}),[d,u,h,f])},Nr=({children:e,...t})=>{const r=rs(t);return o.jsx(kr.Provider,{value:r,children:e})},Rr=({style:e,...t})=>{const r=Or(),n=c.useRef(null),s=A.useMergeRefs([r.refs.setFloating,n]);return r.open?o.jsx(A.FloatingPortal,{id:"tooltip-portal",children:o.jsxs("div",{ref:s,style:{...r.floatingStyles,...e},...r.getFloatingProps(t),className:D("z-[55] whitespace-pre-wrap break-words rounded border border-primary bg-layer-0 px-2 py-1 dial-tiny shadow max-w-[300px]",r.getFloatingProps(t).className),children:[t.children,o.jsx(A.FloatingArrow,{ref:r.arrowRef,context:r.context,fill:"currentColor",strokeWidth:1,className:"stroke-primary w-2 text-[var(--bg-layer-0,_#000000)]"})]})}):null},Pr=({children:e,asChild:t=!1,...r})=>{const n=Or(),s=c.useRef(null),i=t&&c.isValidElement(e),l=e&&typeof e=="object"&&"ref"in e&&e.ref!==void 0?e.ref:void 0,d=[n.refs.setReference,s];i&&l&&d.push(l);const u=A.useMergeRefs(d);return i?c.cloneElement(e,n.getReferenceProps({...e.props,...r,ref:u})):o.jsx("span",{ref:u,...n.getReferenceProps(r),className:r.className??"dial-tooltip-trigger text-left",children:e})},Ie=({hideTooltip:e,tooltip:t,children:r,triggerClassName:n,contentClassName:s,...i})=>o.jsxs(Nr,{...i,children:[o.jsx(Pr,{className:D(n,"truncate"),children:r}),o.jsx(Rr,{className:D("text-primary",s,"max-w-[300px]",(e||!t)&&"hidden"),children:t})]}),Gt="-",ns=e=>{const t=os(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{const l=a.split(Gt);return l[0]===""&&l.length!==1&&l.shift(),Mr(l,t)||ss(a)},getConflictingClassGroupIds:(a,l)=>{const d=r[a]||[];return l&&n[a]?[...d,...n[a]]:d}}},Mr=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?Mr(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Gt);return t.validators.find(({validator:a})=>a(i))?.classGroupId},nr=/^\[(.+)\]$/,ss=e=>{if(nr.test(e)){const t=nr.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},os=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const s in r)Rt(r[s],n,s,t);return n},Rt=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:sr(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(is(s)){Rt(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,a])=>{Rt(a,sr(t,i),r,n)})})},sr=(e,t)=>{let r=e;return t.split(Gt).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},is=e=>e.isThemeGetter,as=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,a)=>{r.set(i,a),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let a=r.get(i);if(a!==void 0)return a;if((a=n.get(i))!==void 0)return s(i,a),a},set(i,a){r.has(i)?r.set(i,a):s(i,a)}}},Pt="!",Mt=":",ls=Mt.length,cs=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let a=0,l=0,d=0,u;for(let m=0;m<s.length;m++){let h=s[m];if(a===0&&l===0){if(h===Mt){i.push(s.slice(d,m)),d=m+ls;continue}if(h==="/"){u=m;continue}}h==="["?a++:h==="]"?a--:h==="("?l++:h===")"&&l--}const f=i.length===0?s:s.substring(d),p=ds(f),C=p!==f,g=u&&u>d?u-d:void 0;return{modifiers:i,hasImportantModifier:C,baseClassName:p,maybePostfixModifierPosition:g}};if(t){const s=t+Mt,i=n;n=a=>a.startsWith(s)?i(a.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},ds=e=>e.endsWith(Pt)?e.substring(0,e.length-1):e.startsWith(Pt)?e.substring(1):e,us=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const s=[];let i=[];return n.forEach(a=>{a[0]==="["||t[a]?(s.push(...i.sort(),a),i=[]):i.push(a)}),s.push(...i.sort()),s}},fs=e=>({cache:as(e.cacheSize),parseClassName:cs(e),sortModifiers:us(e),...ns(e)}),ps=/\s+/,hs=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,a=[],l=e.trim().split(ps);let d="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:p,modifiers:C,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:h}=r(f);if(p){d=f+(d.length>0?" "+d:d);continue}let y=!!h,b=n(y?m.substring(0,h):m);if(!b){if(!y){d=f+(d.length>0?" "+d:d);continue}if(b=n(m),!b){d=f+(d.length>0?" "+d:d);continue}y=!1}const v=i(C).join(":"),x=g?v+Pt:v,j=x+b;if(a.includes(j))continue;a.push(j);const N=s(b,y);for(let T=0;T<N.length;++T){const R=N[T];a.push(x+R)}d=f+(d.length>0?" "+d:d)}return d};function gs(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Fr(t))&&(n&&(n+=" "),n+=r);return n}const Fr=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Fr(e[n]))&&(r&&(r+=" "),r+=t);return r};function ms(e,...t){let r,n,s,i=a;function a(d){const u=t.reduce((f,p)=>p(f),e());return r=fs(u),n=r.cache.get,s=r.cache.set,i=l,l(d)}function l(d){const u=n(d);if(u)return u;const f=hs(d,r);return s(d,f),f}return function(){return i(gs.apply(null,arguments))}}const te=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Hr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Vr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Cs=/^\d+\/\d+$/,xs=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bs=/\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$/,vs=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ys=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ws=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Me=e=>Cs.test(e),V=e=>!!e&&!Number.isNaN(Number(e)),we=e=>!!e&&Number.isInteger(Number(e)),wt=e=>e.endsWith("%")&&V(e.slice(0,-1)),be=e=>xs.test(e),Ds=()=>!0,Ss=e=>bs.test(e)&&!vs.test(e),Ar=()=>!1,Is=e=>ys.test(e),Ts=e=>ws.test(e),Ls=e=>!L(e)&&!E(e),Es=e=>_e(e,Br,Ar),L=e=>Hr.test(e),Ee=e=>_e(e,$r,Ss),Dt=e=>_e(e,Rs,V),or=e=>_e(e,_r,Ar),js=e=>_e(e,zr,Ts),Qe=e=>_e(e,Gr,Is),E=e=>Vr.test(e),Ge=e=>ze(e,$r),ks=e=>ze(e,Ps),ir=e=>ze(e,_r),Os=e=>ze(e,Br),Ns=e=>ze(e,zr),et=e=>ze(e,Gr,!0),_e=(e,t,r)=>{const n=Hr.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ze=(e,t,r=!1)=>{const n=Vr.exec(e);return n?n[1]?t(n[1]):r:!1},_r=e=>e==="position"||e==="percentage",zr=e=>e==="image"||e==="url",Br=e=>e==="length"||e==="size"||e==="bg-size",$r=e=>e==="length",Rs=e=>e==="number",Ps=e=>e==="family-name",Gr=e=>e==="shadow",Ms=()=>{const e=te("color"),t=te("font"),r=te("text"),n=te("font-weight"),s=te("tracking"),i=te("leading"),a=te("breakpoint"),l=te("container"),d=te("spacing"),u=te("radius"),f=te("shadow"),p=te("inset-shadow"),C=te("text-shadow"),g=te("drop-shadow"),m=te("blur"),h=te("perspective"),y=te("aspect"),b=te("ease"),v=te("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...j(),E,L],T=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],I=()=>[E,L,d],z=()=>[Me,"full","auto",...I()],Q=()=>[we,"none","subgrid",E,L],P=()=>["auto",{span:["full",we,E,L]},we,E,L],G=()=>[we,"auto",E,L],B=()=>["auto","min","max","fr",E,L],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],ie=()=>["auto",...I()],X=()=>[Me,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],S=()=>[e,E,L],he=()=>[...j(),ir,or,{position:[E,L]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",Os,Es,{size:[E,L]}],me=()=>[wt,Ge,Ee],$=()=>["","none","full",u,E,L],J=()=>["",V,Ge,Ee],ue=()=>["solid","dashed","dotted","double"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[V,wt,ir,or],ce=()=>["","none",m,E,L],Y=()=>["none",V,E,L],Z=()=>["none",V,E,L],ge=()=>[V,E,L],ye=()=>[Me,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[be],breakpoint:[be],color:[Ds],container:[be],"drop-shadow":[be],ease:["in","out","in-out"],font:[Ls],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[be],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[be],shadow:[be],spacing:["px",V],text:[be],"text-shadow":[be],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Me,L,E,y]}],container:["container"],columns:[{columns:[V,L,E,l]}],"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:N()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{start:z()}],end:[{end:z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[we,"auto",E,L]}],basis:[{basis:[Me,"full","auto",l,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[V,Me,"auto","initial","none",L]}],grow:[{grow:["",V,E,L]}],shrink:[{shrink:["",V,E,L]}],order:[{order:[we,"first","last","none",E,L]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[l,"screen",...X()]}],"min-w":[{"min-w":[l,"screen","none",...X()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Ge,Ee]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,E,Dt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",wt,L]}],"font-family":[{font:[ks,L,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,E,L]}],"line-clamp":[{"line-clamp":[V,"none",E,Dt]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",E,L]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",E,L]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[V,"from-font","auto",E,Ee]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[V,"auto",E,L]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",E,L]}],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",E,L]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:he()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},we,E,L],radial:["",E,L],conic:[we,E,L]},Ns,js]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[V,E,L]}],"outline-w":[{outline:["",V,Ge,Ee]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",f,et,Qe]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",p,et,Qe]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[V,Ee]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",C,et,Qe]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[V,E,L]}],"mix-blend":[{"mix-blend":[...O(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":O()}],"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":[V]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[E,L]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"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":j()}],"mask-image-conic-pos":[{"mask-conic":[V]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:he()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",E,L]}],filter:[{filter:["","none",E,L]}],blur:[{blur:ce()}],brightness:[{brightness:[V,E,L]}],contrast:[{contrast:[V,E,L]}],"drop-shadow":[{"drop-shadow":["","none",g,et,Qe]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",V,E,L]}],"hue-rotate":[{"hue-rotate":[V,E,L]}],invert:[{invert:["",V,E,L]}],saturate:[{saturate:[V,E,L]}],sepia:[{sepia:["",V,E,L]}],"backdrop-filter":[{"backdrop-filter":["","none",E,L]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[V,E,L]}],"backdrop-contrast":[{"backdrop-contrast":[V,E,L]}],"backdrop-grayscale":[{"backdrop-grayscale":["",V,E,L]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[V,E,L]}],"backdrop-invert":[{"backdrop-invert":["",V,E,L]}],"backdrop-opacity":[{"backdrop-opacity":[V,E,L]}],"backdrop-saturate":[{"backdrop-saturate":[V,E,L]}],"backdrop-sepia":[{"backdrop-sepia":["",V,E,L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",E,L]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[V,"initial",E,L]}],ease:[{ease:["linear","initial",b,E,L]}],delay:[{delay:[V,E,L]}],animate:[{animate:["none",v,E,L]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,E,L]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:ge()}],"skew-x":[{"skew-x":ge()}],"skew-y":[{"skew-y":ge()}],transform:[{transform:[E,L,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"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",E,L]}],"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":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",E,L]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[V,Ge,Ee,Dt]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Fs=ms(Ms);function _(...e){return Fs(D(e))}const Pe=({fieldTitle:e,htmlFor:t,optional:r,optionalText:n,cssClass:s,description:i})=>e?o.jsxs("label",{className:_("dial-tiny text-secondary flex gap-1",s,!s?.includes("mb")&&"mb-2"),htmlFor:t,children:[typeof e=="string"?o.jsx("span",{className:"min-h-4",children:e}):e,r&&o.jsx("span",{children:n??"(Optional)"}),i&&o.jsx(Ie,{tooltip:i,children:o.jsx(q,{icon:o.jsx(k.IconInfoCircle,{size:14,className:"text-secondary"})})})]}):null;var se=(e=>(e.Primary="primary",e.Secondary="secondary",e.Tertiary="tertiary",e.Danger="danger",e))(se||{});const Hs={[se.Primary]:"dial-primary-button",[se.Secondary]:"dial-secondary-button",[se.Tertiary]:"dial-tertiary-button",[se.Danger]:"dial-danger-button"},re=({title:e,variant:t,cssClass:r,textCssClass:n,ref:s,onClick:i,disable:a,iconAfter:l,iconBefore:d,hideTitleOnMobile:u,ariaLabel:f})=>{const p=D("dial-small-semi",l?"mr-2":"",d?"ml-2":"",u?"hidden sm:inline":"inline",n),C=D(t&&Hs[t],r,"focus-visible:outline outline-offset-0");return o.jsxs("button",{ref:s,type:"button",className:C,onClick:g=>i?.(g),disabled:a,"aria-label":e||f,children:[o.jsx(q,{icon:d}),e&&o.jsx("span",{className:p,children:e}),o.jsx(q,{icon:l})]})};var ke=(e=>(e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e))(ke||{});const Vs={info:o.jsx(k.IconInfoCircle,{size:24,stroke:2}),error:o.jsx(k.IconAlertCircle,{size:24,stroke:2}),warning:o.jsx(k.IconAlertTriangle,{size:24,stroke:2}),success:o.jsx(k.IconCircleCheck,{size:24,stroke:2})},As={[ke.Info]:"bg-info border-info text-info",[ke.Success]:"bg-success border-success text-success",[ke.Warning]:"bg-warning border-warning text-warning",[ke.Error]:"bg-error border-error text-error"},_s="items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex",zs=({variant:e=ke.Info,message:t,cssClass:r,closable:n=!1,onClose:s})=>o.jsxs("div",{role:"alert",className:D(_s,As[e],r),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(q,{icon:Vs[e]}),o.jsx("div",{className:"text-primary",children:t})]}),n&&o.jsx(re,{cssClass:"ml-2 text-secondary hover:text-primary",ariaLabel:"Close alert",iconBefore:o.jsx(k.IconX,{size:16}),onClick:i=>s?.(i)})]}),Bs="flex items-center justify-center text-secondary",$s="shrink-0 grow-0 basis-auto animate-spin-steps",Gs=e=>M.createElement("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.createElement("path",{d:"M24 39V46.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.4,d:"M9 24H1.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.5,d:"M8.0918 8.0918L13.3994 13.3994",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.6,d:"M24 1.5V9",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.7,d:"M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.8,d:"M46.5 24H39",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.9,d:"M34.6055 34.6055L39.9082 39.9082",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),M.createElement("path",{opacity:.3,d:"M13.3936 34.6055L8.08594 39.9131",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),ct=({size:e=18,cssClass:t,iconClass:r,fullWidth:n=!0,ariaLabel:s="Loading"})=>o.jsx("div",{role:"status",className:D({[Bs]:!0,"w-full h-full":n,[t||""]:!!t}),children:o.jsx(q,{icon:o.jsx(Gs,{width:e,height:e,className:D($s,r),role:"img","aria-label":s})})}),We=18,le={size:We,stroke:2},Us="text-primary",Ce=({text:e,cssClass:t,contentClassName:r,hideTooltip:n,...s})=>{const i=c.useRef(null),[a,l]=c.useState(!1),[d,u]=c.useState(""),f=c.useRef(null),p=()=>{const h=i.current;if(!h)return;u(h.textContent??"");const y=h.clientWidth,b=h.scrollWidth,v=Math.ceil(h.getBoundingClientRect().width);l(b>y||b>v)},C=c.useCallback(()=>{f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(p)},[]);c.useEffect(()=>{C();const h=()=>C();window.addEventListener("resize",h);let y=null;return"ResizeObserver"in window&&i.current&&(y=new ResizeObserver(()=>C()),y.observe(i.current)),()=>{window.removeEventListener("resize",h),y&&y.disconnect(),f.current&&cancelAnimationFrame(f.current)}},[e,C]);const g=c.useMemo(()=>typeof e=="string"?e:d,[d,e]),m=c.useMemo(()=>n?"":a?g:"",[g,n,a]);return o.jsxs(Nr,{...s,children:[o.jsx(Pr,{asChild:!0,onMouseEnter:C,onFocusCapture:C,children:o.jsx("span",{className:_("block truncate flex-1 min-w-0 max-w-full text-left",t),"aria-label":a?g:void 0,onMouseEnter:C,onFocus:C,ref:i,children:e})}),o.jsx(Rr,{className:_(Us,r,!m&&"hidden"),children:m})]})},Ft=({label:e,id:t,checked:r,indeterminate:n,disabled:s,ariaLabel:i,onChange:a,cssClass:l})=>{const d=c.useCallback(C=>{a?.(C.target.checked,t)},[a,t]),u=D("flex flex-row items-center cursor-pointer text-accent-primary small-medium flex-1 min-w-0",`${r||n?"":'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded before:mr-2'}`,s?"pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4":"",l),f=D("mr-2 border rounded",s?"bg-layer-4 border-icon-secondary":""),p=()=>n?o.jsx(k.IconMinus,{className:f,...le}):r?o.jsx(k.IconCheck,{className:f,...le}):null;return o.jsxs("label",{className:u,htmlFor:t,children:[p(),e&&(typeof e=="string"?o.jsx(Ce,{text:e,cssClass:"text-primary"}):e),o.jsx("input",{type:"checkbox",role:"checkbox",name:t,onChange:d,id:t,checked:r,"aria-checked":n?"mixed":r,"aria-disabled":s||void 0,"aria-label":e?void 0:i,className:"invisible w-0 h-0"})]})};var de=(e=>(e.VALID="valid",e.ERROR="error",e))(de||{});const Ws=(e,t)=>{if(t===e.id)switch(e.status){case de.VALID:return"border-accent-secondary text-primary";case de.ERROR:return"border-red-900 text-primary";default:return"border-accent-primary text-primary"}switch(e.status){case de.VALID:return"border-primary text-primary";case de.ERROR:return"border-red-900 text-error";default:return"border-primary text-secondary"}},qs=(e,t)=>{if(t===e.id)switch(e.status){case de.VALID:return"bg-accent-secondary";case de.ERROR:return"bg-red-400";default:return"bg-accent-primary"}switch(e.status){case de.VALID:return"bg-accent-secondary";case de.ERROR:return"bg-red-400";default:return"bg-layer-4"}},Zs=({step:e,index:t,currentStep:r,onChangeStep:n})=>{const s="h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny cursor-pointer dial-step",i="w-[22px] h-[22px] flex justify-center items-center mr-2 rounded-full text-white",a=()=>r===e.id&&e.status===de.ERROR?o.jsx(k.IconExclamationCircle,{stroke:2,size:16}):r!==e.id&&e.status===de.VALID?o.jsx(k.IconCheck,{stroke:2,size:16}):t+1;return o.jsxs("button",{className:D(s,Ws(e,r)),onClick:()=>n(e.id),children:[o.jsx("span",{className:D(i,qs(e,r)),children:a()}),o.jsx("span",{children:e.name})]})},Xs=({steps:e,currentStep:t,onChangeStep:r})=>{const n=s=>{const i=e.findIndex(l=>l.id===t),a=e.findIndex(l=>l.id===s);(s!==t&&e[i].status===de.VALID||a<i)&&r(s)};return o.jsx("div",{id:"steps",className:"flex gap-x-3",children:e.map((s,i)=>o.jsx(Zs,{currentStep:t,onChangeStep:n,step:s,index:i},s.id))})},Ur=({name:e,value:t,title:r,description:n,checked:s=!1,inputId:i,cssClass:a,labelCssClass:l,disabled:d,onChange:u,descriptionCssClass:f})=>{const p=`${i}-desc`,C=D("dial-small cursor-pointer",d?"text-secondary":"text-primary",l),g=D("cursor-pointer dial-input-radio",r&&"mr-2",a),m=D("flex flex-col",!!n&&"mb-2"),h=D("dial-tiny mt-2 ml-[26px] text-secondary",f),y=b=>{d||b.target.checked&&u?.(t)};return o.jsxs("div",{className:m,children:[o.jsxs("div",{className:"flex flex-row items-center",children:[o.jsx("input",{type:"radio",id:i,name:e,value:t,checked:s,disabled:d,"aria-describedby":s&&n?p:void 0,className:g,onChange:y}),r?o.jsx("label",{className:C,htmlFor:i,children:r}):null]}),s&&n&&o.jsx("div",{id:p,className:h,children:n})]})};var Xe=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(Xe||{});const Ys="w-full flex",Ks={[Xe.Vertical]:"flex-col",[Xe.Horizontal]:"flex-row items-end"},dt=({elementId:e,label:t,optional:r,optionalText:n,description:s,error:i,orientation:a=Xe.Vertical,labelVisuallyHidden:l=!1,cssClass:d,labelCssClass:u,errorCssClass:f,childrenCssClass:p,captionDescription:C,readonly:g,value:m,defaultEmptyText:h,children:y})=>{const b=`${e}-label`,v=s?`${e}-desc`:void 0,x=i?`${e}-err`:void 0,j=`${e}-caption-desc`,N=[v,x].filter(Boolean).join(" ")||void 0,T=c.useCallback(()=>typeof i=="boolean"?null:typeof i=="string"||typeof i>"u"?i?o.jsx("div",{id:x,role:"alert","aria-live":"polite",className:f,children:o.jsx(Se,{errorText:i})}):null:o.jsx("div",{id:x,role:"alert","aria-live":"polite",className:f,children:i}),[i,f,x]),R=c.useCallback(()=>m?typeof m=="string"||typeof m=="number"?o.jsx("span",{"aria-readonly":"true",children:m}):m:o.jsx("span",{className:"flex min-h-4","aria-readonly":"true",children:h??"None"}),[m,h]);return o.jsxs("div",{role:"group","aria-labelledby":t?b:void 0,"aria-describedby":N,className:_(Ys,Ks[a],d),children:[t&&o.jsx("div",{id:b,className:_(a==="horizontal"&&"shrink-0"),children:o.jsx(Pe,{htmlFor:e,fieldTitle:t,optional:r,optionalText:n,cssClass:_(l&&"sr-only",u),description:s})}),o.jsxs("div",{className:_("min-w-0 w-full",p),children:[g?o.jsx("div",{className:"dial-input px-3 py-2",children:R()}):y,C&&o.jsx("div",{id:j,className:_({"dial-tiny text-secondary mt-1":!0,"text-error":!!i}),children:C}),T()]})]})};var Ye=(e=>(e.Row="Row",e.Column="Column",e))(Ye||{});const Js="flex",Qs="pb-1 mt-2",eo={[Ye.Column]:"flex-col gap-y-3",[Ye.Row]:"flex-row gap-x-6"},Wr=({fieldTitle:e,radioCssClass:t,containerCssClass:r,selectedItemCssClass:n,selectedLabelCssClass:s,radioGroupCssClass:i,inputContainerCssClass:a,selectedInputContainerCssClass:l,groupLabelCssClass:d,formItemChildrenCssClass:u,labelCssClass:f,disabled:p,elementId:C,radioButtons:g,activeRadioButton:m,orientation:h,onChange:y})=>o.jsx(dt,{elementId:C,label:e,labelCssClass:d||f,cssClass:r,childrenCssClass:u,children:o.jsx("div",{role:"radiogroup","aria-label":e,"aria-disabled":p||void 0,className:_(Js,eo[h],i),children:g.map(b=>o.jsxs("div",{className:_("flex flex-col",a,b.id===m&&l),children:[o.jsx(Ur,{name:C,value:b.id,inputId:b.id,disabled:p,cssClass:t,labelCssClass:_(f,b.id===m&&s),title:b.name,checked:b.id===m,onChange:()=>y(b.id)}),b.id===m&&b.content?o.jsx("div",{className:_(Qs,n),children:b.content}):null]},b.id))})}),qr=({icon:e,title:t,description:r,containerCssClass:n,titleCssClass:s,descriptionCssClass:i})=>o.jsxs("div",{className:_("h-full w-full flex flex-col items-center justify-center text-secondary",n),children:[e||o.jsx(k.IconClipboardX,{width:60,height:60}),o.jsx("span",{className:_("dial-small mt-2 text-primary",s),children:t}),r&&o.jsx("span",{className:_("mt-1 text-primary",i),children:r})]}),St=48,to=({containerCssClass:e,children:t,width:r=280,title:n,iconSize:s=24,iconStroke:i=1.5,titleCssClass:a,additionalButtons:l,isOpened:d,onToggle:u})=>{const[f,p]=c.useState(r),[C,g]=c.useState(!0),m=c.useMemo(()=>typeof d=="boolean",[d]),h=m?d:C;c.useEffect(()=>{m&&p(d?r:St)},[m,d,r]);const y=D(["transform rotate-180 [writing-mode:tb-rl] py-4 px-3",h&&"hidden",a]),b=D(["flex flex-row gap-2 cursor-pointer text-secondary p-2 px-4",h?"justify-end":"justify-center"]),v=x=>{const j=!h;if(m){p(j?r:St),u?.(j,x);return}p(j?r:St),g(j)};return o.jsxs("div",{className:D(["rounded flex flex-col justify-between overflow-y-auto flex-shrink-0",e]),style:{width:`${f}px`},children:[o.jsx("div",{className:D(["flex-1 p-4 min-h-0 overflow-auto",!h&&"hidden"]),children:t}),o.jsx("div",{className:y,children:n}),o.jsxs("div",{className:_("border-t stroke-primary h-12",b),children:[h&&l,o.jsx(re,{cssClass:"hover:text-icon-accent-primary p-1",onClick:v,iconBefore:h?o.jsx(k.IconChevronsLeft,{size:s,stroke:i}):o.jsx(k.IconChevronsRight,{size:s,stroke:i})})]})]})},ro=({label:e,text:t,children:r,postfix:n})=>o.jsxs("div",{className:D("flex flex-col",r?"":"max-w-[200px]"),children:[o.jsx("label",{className:"dial-tiny mb-2 text-secondary",children:e}),r||o.jsxs("div",{className:"flex flex-row items-center",children:[o.jsx(Ie,{triggerClassName:"text-primary",tooltip:t,children:t}),n||null]})]});var ut=(e=>(e.Default="default",e))(ut||{});const no={[ut.Default]:"border-icon-secondary bg-layer-3"},ft=({tag:e,cssClass:t,remove:r,variant:n=ut.Default,iconBefore:s,bordered:i=!0})=>{const a=no[n],l=_("flex items-center gap-1 dial-tiny rounded p-1 h-[22px] text-primary",a,i?"border":"border-transparent",t);return o.jsxs("div",{className:l,children:[o.jsx(q,{icon:s}),o.jsx(Ce,{text:e}),r&&o.jsx(re,{iconAfter:o.jsx(k.IconX,{size:16}),onClick:d=>r(d)})]},e)},Zr=c.createContext({dragDropManager:void 0});function fe(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 ar=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),lr=function(){return Math.random().toString(36).substring(7).split("").join(".")},cr={INIT:"@@redux/INIT"+lr(),REPLACE:"@@redux/REPLACE"+lr()};function so(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 oo(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(lo(e))return"date";if(ao(e))return"error";var r=io(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function io(e){return typeof e.constructor=="function"?e.constructor.name:null}function ao(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function lo(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Fe(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=oo(e)),t}function Xr(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?fe(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?fe(1):"Expected the enhancer to be a function. Instead, received: '"+Fe(r)+"'");return r(Xr)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?fe(2):"Expected the root reducer to be a function. Instead, received: '"+Fe(e)+"'");var s=e,i=t,a=[],l=a,d=!1;function u(){l===a&&(l=a.slice())}function f(){if(d)throw new Error(process.env.NODE_ENV==="production"?fe(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function p(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?fe(4):"Expected the listener to be a function. Instead, received: '"+Fe(h)+"'");if(d)throw new Error(process.env.NODE_ENV==="production"?fe(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 y=!0;return u(),l.push(h),function(){if(y){if(d)throw new Error(process.env.NODE_ENV==="production"?fe(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.");y=!1,u();var v=l.indexOf(h);l.splice(v,1),a=null}}}function C(h){if(!so(h))throw new Error(process.env.NODE_ENV==="production"?fe(7):"Actions must be plain objects. Instead, the actual type was: '"+Fe(h)+"'. 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 h.type>"u")throw new Error(process.env.NODE_ENV==="production"?fe(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(d)throw new Error(process.env.NODE_ENV==="production"?fe(9):"Reducers may not dispatch actions.");try{d=!0,i=s(i,h)}finally{d=!1}for(var y=a=l,b=0;b<y.length;b++){var v=y[b];v()}return h}function g(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?fe(10):"Expected the nextReducer to be a function. Instead, received: '"+Fe(h));s=h,C({type:cr.REPLACE})}function m(){var h,y=p;return h={subscribe:function(v){if(typeof v!="object"||v===null)throw new Error(process.env.NODE_ENV==="production"?fe(11):"Expected the observer to be an object. Instead, received: '"+Fe(v)+"'");function x(){v.next&&v.next(f())}x();var j=y(x);return{unsubscribe:j}}},h[ar]=function(){return this},h}return C({type:cr.INIT}),n={dispatch:C,subscribe:p,getState:f,replaceReducer:g},n[ar]=m,n}function F(e,t,...r){if(co()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let s=0;n=new Error(t.replace(/%s/g,function(){return r[s++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function co(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function uo(e,t,r){return t.split(".").reduce((n,s)=>n&&n[s]?n[s]:r||null,e)}function fo(e,t){return e.filter(r=>r!==t)}function Yr(e){return typeof e=="object"}function po(e,t){const r=new Map,n=i=>{r.set(i,r.has(i)?r.get(i)+1:1)};e.forEach(n),t.forEach(n);const s=[];return r.forEach((i,a)=>{i===1&&s.push(a)}),s}function ho(e,t){return e.filter(r=>t.indexOf(r)>-1)}const Ut="dnd-core/INIT_COORDS",pt="dnd-core/BEGIN_DRAG",Wt="dnd-core/PUBLISH_DRAG_SOURCE",ht="dnd-core/HOVER",gt="dnd-core/DROP",mt="dnd-core/END_DRAG";function dr(e,t){return{type:Ut,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const go={type:Ut,payload:{clientOffset:null,sourceClientOffset:null}};function mo(e){return function(r=[],n={publishSource:!0}){const{publishSource:s=!0,clientOffset:i,getSourceClientOffset:a}=n,l=e.getMonitor(),d=e.getRegistry();e.dispatch(dr(i)),Co(r,l,d);const u=vo(r,l);if(u==null){e.dispatch(go);return}let f=null;if(i){if(!a)throw new Error("getSourceClientOffset must be defined");xo(a),f=a(u)}e.dispatch(dr(i,f));const C=d.getSource(u).beginDrag(l,u);if(C==null)return;bo(C),d.pinSource(u);const g=d.getSourceType(u);return{type:pt,payload:{itemType:g,item:C,sourceId:u,clientOffset:i||null,sourceClientOffset:f||null,isSourcePublic:!!s}}}}function Co(e,t,r){F(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){F(r.getSource(n),"Expected sourceIds to be registered.")})}function xo(e){F(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function bo(e){F(Yr(e),"Item must be an object.")}function vo(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function yo(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){yo(e,s,r[s])})}return e}function Do(e){return function(r={}){const n=e.getMonitor(),s=e.getRegistry();So(n),Lo(n).forEach((a,l)=>{const d=Io(a,l,s,n),u={type:gt,payload:{dropResult:wo({},r,d)}};e.dispatch(u)})}}function So(e){F(e.isDragging(),"Cannot call drop while not dragging."),F(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Io(e,t,r,n){const s=r.getTarget(e);let i=s?s.drop(n,e):void 0;return To(i),typeof i>"u"&&(i=t===0?{}:n.getDropResult()),i}function To(e){F(typeof e>"u"||Yr(e),"Drop result must either be an object or undefined.")}function Lo(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Eo(e){return function(){const r=e.getMonitor(),n=e.getRegistry();jo(r);const s=r.getSourceId();return s!=null&&(n.getSource(s,!0).endDrag(r,s),n.unpinSource()),{type:mt}}}function jo(e){F(e.isDragging(),"Cannot call endDrag while not dragging.")}function Ht(e,t){return t===null?e===null:Array.isArray(e)?e.some(r=>r===t):e===t}function ko(e){return function(r,{clientOffset:n}={}){Oo(r);const s=r.slice(0),i=e.getMonitor(),a=e.getRegistry(),l=i.getItemType();return Ro(s,a,l),No(s,i,a),Po(s,i,a),{type:ht,payload:{targetIds:s,clientOffset:n||null}}}}function Oo(e){F(Array.isArray(e),"Expected targetIds to be an array.")}function No(e,t,r){F(t.isDragging(),"Cannot call hover while not dragging."),F(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){const s=e[n];F(e.lastIndexOf(s)===n,"Expected targetIds to be unique in the passed array.");const i=r.getTarget(s);F(i,"Expected targetIds to be registered.")}}function Ro(e,t,r){for(let n=e.length-1;n>=0;n--){const s=e[n],i=t.getTargetType(s);Ht(i,r)||e.splice(n,1)}}function Po(e,t,r){e.forEach(function(n){r.getTarget(n).hover(t,n)})}function Mo(e){return function(){if(e.getMonitor().isDragging())return{type:Wt}}}function Fo(e){return{beginDrag:mo(e),publishDragSource:Mo(e),hover:ko(e),drop:Do(e),endDrag:Eo(e)}}class Ho{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:r}=this.store;function n(i){return(...a)=>{const l=i.apply(t,a);typeof l<"u"&&r(l)}}const s=Fo(this);return Object.keys(s).reduce((i,a)=>{const l=s[a];return i[a]=n(l),i},{})}dispatch(t){this.store.dispatch(t)}constructor(t,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=r,t.subscribe(this.handleRefCountChange)}}function Vo(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Kr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ao(e){const{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return!t||!r||!n?null:Kr(Vo(t,n),r)}function _o(e){const{clientOffset:t,initialClientOffset:r}=e;return!t||!r?null:Kr(t,r)}const Ze=[],qt=[];Ze.__IS_NONE__=!0;qt.__IS_ALL__=!0;function zo(e,t){return e===Ze?!1:e===qt||typeof t>"u"?!0:ho(t,e).length>0}class Bo{subscribeToStateChange(t,r={}){const{handlerIds:n}=r;F(typeof t=="function","listener must be a function."),F(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let s=this.store.getState().stateId;const i=()=>{const a=this.store.getState(),l=a.stateId;try{l===s||l===s+1&&!zo(a.dirtyHandlerIds,n)||t()}finally{s=l}};return this.store.subscribe(i)}subscribeToOffsetChange(t){F(typeof t=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const s=this.store.getState().dragOffset;s!==r&&(r=s,t())};return this.store.subscribe(n)}canDragSource(t){if(!t)return!1;const r=this.registry.getSource(t);return F(r,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:r.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const r=this.registry.getTarget(t);if(F(r,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(t),s=this.getItemType();return Ht(n,s)&&r.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const r=this.registry.getSource(t,!0);if(F(r,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(t),s=this.getItemType();return n!==s?!1:r.isDragging(this,t)}isOverTarget(t,r={shallow:!1}){if(!t)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const s=this.registry.getTargetType(t),i=this.getItemType();if(i&&!Ht(s,i))return!1;const a=this.getTargetIds();if(!a.length)return!1;const l=a.indexOf(t);return n?l===a.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Ao(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return _o(this.store.getState().dragOffset)}constructor(t,r){this.store=t,this.registry=r}}const ur=typeof global<"u"?global:self,Jr=ur.MutationObserver||ur.WebKitMutationObserver;function Qr(e){return function(){const r=setTimeout(s,0),n=setInterval(s,50);function s(){clearTimeout(r),clearInterval(n),e()}}}function $o(e){let t=1;const r=new Jr(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const Go=typeof Jr=="function"?$o:Qr;class Uo{enqueueTask(t){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const r=this.index;if(this.index++,t[r].call(),this.index>this.capacity){for(let n=0,s=t.length-this.index;n<s;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Go(this.flush),this.requestErrorThrow=Qr(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Wo{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,r){this.onError=t,this.release=r,this.task=null}}class qo{create(t){const r=this.freeTasks,n=r.length?r.pop():new Wo(this.onError,s=>r[r.length]=s);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const en=new Uo,Zo=new qo(en.registerPendingError);function Xo(e){en.enqueueTask(Zo.create(e))}const Zt="dnd-core/ADD_SOURCE",Xt="dnd-core/ADD_TARGET",Yt="dnd-core/REMOVE_SOURCE",Ct="dnd-core/REMOVE_TARGET";function Yo(e){return{type:Zt,payload:{sourceId:e}}}function Ko(e){return{type:Xt,payload:{targetId:e}}}function Jo(e){return{type:Yt,payload:{sourceId:e}}}function Qo(e){return{type:Ct,payload:{targetId:e}}}function ei(e){F(typeof e.canDrag=="function","Expected canDrag to be a function."),F(typeof e.beginDrag=="function","Expected beginDrag to be a function."),F(typeof e.endDrag=="function","Expected endDrag to be a function.")}function ti(e){F(typeof e.canDrop=="function","Expected canDrop to be a function."),F(typeof e.hover=="function","Expected hover to be a function."),F(typeof e.drop=="function","Expected beginDrag to be a function.")}function Vt(e,t){if(t&&Array.isArray(e)){e.forEach(r=>Vt(r,!1));return}F(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 pe;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(pe||(pe={}));let ri=0;function ni(){return ri++}function si(e){const t=ni().toString();switch(e){case pe.SOURCE:return`S${t}`;case pe.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function fr(e){switch(e[0]){case"S":return pe.SOURCE;case"T":return pe.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function pr(e,t){const r=e.entries();let n=!1;do{const{done:s,value:[,i]}=r.next();if(i===t)return!0;n=!!s}while(!n);return!1}class oi{addSource(t,r){Vt(t),ei(r);const n=this.addHandler(pe.SOURCE,t,r);return this.store.dispatch(Yo(n)),n}addTarget(t,r){Vt(t,!0),ti(r);const n=this.addHandler(pe.TARGET,t,r);return this.store.dispatch(Ko(n)),n}containsHandler(t){return pr(this.dragSources,t)||pr(this.dropTargets,t)}getSource(t,r=!1){return F(this.isSourceId(t),"Expected a valid source ID."),r&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return F(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return F(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return F(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return fr(t)===pe.SOURCE}isTargetId(t){return fr(t)===pe.TARGET}removeSource(t){F(this.getSource(t),"Expected an existing source."),this.store.dispatch(Jo(t)),Xo(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){F(this.getTarget(t),"Expected an existing target."),this.store.dispatch(Qo(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const r=this.getSource(t);F(r,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=r}unpinSource(){F(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,r,n){const s=si(t);return this.types.set(s,r),t===pe.SOURCE?this.dragSources.set(s,n):t===pe.TARGET&&this.dropTargets.set(s,n),s}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const ii=(e,t)=>e===t;function ai(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function li(e,t,r=ii){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function ci(e=Ze,t){switch(t.type){case ht:break;case Zt:case Xt:case Ct:case Yt:return Ze;case pt:case Wt:case mt:case gt:default:return qt}const{targetIds:r=[],prevTargetIds:n=[]}=t.payload,s=po(r,n);if(!(s.length>0||!li(r,n)))return Ze;const a=n[n.length-1],l=r[r.length-1];return a!==l&&(a&&s.push(a),l&&s.push(l)),s}function di(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ui(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){di(e,s,r[s])})}return e}const hr={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function fi(e=hr,t){const{payload:r}=t;switch(t.type){case Ut:case pt:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case ht:return ai(e.clientOffset,r.clientOffset)?e:ui({},e,{clientOffset:r.clientOffset});case mt:case gt:return hr;default:return e}}function pi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function He(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){pi(e,s,r[s])})}return e}const hi={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function gi(e=hi,t){const{payload:r}=t;switch(t.type){case pt:return He({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case Wt:return He({},e,{isSourcePublic:!0});case ht:return He({},e,{targetIds:r.targetIds});case Ct:return e.targetIds.indexOf(r.targetId)===-1?e:He({},e,{targetIds:fo(e.targetIds,r.targetId)});case gt:return He({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case mt:return He({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function mi(e=0,t){switch(t.type){case Zt:case Xt:return e+1;case Yt:case Ct:return e-1;default:return e}}function Ci(e=0){return e+1}function xi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){xi(e,s,r[s])})}return e}function vi(e={},t){return{dirtyHandlerIds:ci(e.dirtyHandlerIds,{type:t.type,payload:bi({},t.payload,{prevTargetIds:uo(e,"dragOperation.targetIds",[])})}),dragOffset:fi(e.dragOffset,t),refCount:mi(e.refCount,t),dragOperation:gi(e.dragOperation,t),stateId:Ci(e.stateId)}}function yi(e,t=void 0,r={},n=!1){const s=wi(n),i=new Bo(s,new oi(s)),a=new Ho(s,i),l=e(a,t,r);return a.receiveBackend(l),a}function wi(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Xr(vi,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function Di(e,t){if(e==null)return{};var r=Si(e,t),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)n=i[s],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Si(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,i;for(i=0;i<n.length;i++)s=n[i],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}let gr=0;const nt=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Ii=c.memo(function(t){var{children:r}=t,n=Di(t,["children"]);const[s,i]=Ti(n);return c.useEffect(()=>{if(i){const a=tn();return++gr,()=>{--gr===0&&(a[nt]=null)}}},[]),o.jsx(Zr.Provider,{value:s,children:r})});function Ti(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=Li(e.backend,e.context,e.options,e.debugMode),r=!e.context;return[t,r]}function Li(e,t=tn(),r,n){const s=t;return s[nt]||(s[nt]={dragDropManager:yi(e,t,r,n)}),s[nt]}function tn(){return typeof global<"u"?global:window}function Ei(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var It,mr;function ji(){return mr||(mr=1,It=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var a=i[s];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),It}var ki=ji();const Oi=Ei(ki),Ne=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Ni(e,t,r){const[n,s]=c.useState(()=>t(e)),i=c.useCallback(()=>{const a=t(e);Oi(n,a)||(s(a),r&&r())},[n,e,r]);return Ne(i),[n,i]}function Ri(e,t,r){const[n,s]=Ni(e,t,r);return Ne(function(){const a=e.getHandlerId();if(a!=null)return e.subscribeToStateChange(s,{handlerIds:[a]})},[e,s]),n}function rn(e,t,r){return Ri(t,e||(()=>({})),()=>r.reconnect())}function nn(e,t){const r=[...t||[]];return t==null&&typeof e!="function"&&r.push(e),c.useMemo(()=>typeof e=="function"?e():e,r)}function Pi(e){return c.useMemo(()=>e.hooks.dragSource(),[e])}function Mi(e){return c.useMemo(()=>e.hooks.dragPreview(),[e])}let Tt=!1,Lt=!1;class Fi{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){F(!Tt,"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 Tt=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Tt=!1}}isDragging(){if(!this.sourceId)return!1;F(!Lt,"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 Lt=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Lt=!1}}subscribeToStateChange(t,r){return this.internalMonitor.subscribeToStateChange(t,r)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,r){return this.internalMonitor.isOverTarget(t,r)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let Et=!1;class Hi{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,r){return this.internalMonitor.subscribeToStateChange(t,r)}canDrop(){if(!this.targetId)return!1;F(!Et,"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 Et=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Et=!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 Vi(e,t,r){const n=r.getRegistry(),s=n.addTarget(e,t);return[s,()=>n.removeTarget(s)]}function Ai(e,t,r){const n=r.getRegistry(),s=n.addSource(e,t);return[s,()=>n.removeSource(s)]}function At(e,t,r,n){let s;if(s!==void 0)return!!s;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let d=0;d<i.length;d++){const u=i[d];if(!l(u))return!1;const f=e[u],p=t[u];if(s=void 0,s===!1||s===void 0&&f!==p)return!1}return!0}function _t(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _i(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 zi(e){return(t=null,r=null)=>{if(!c.isValidElement(t)){const i=t;return e(i,r),i}const n=t;return _i(n),Bi(n,r?i=>e(i,r):e)}}function sn(e){const t={};return Object.keys(e).forEach(r=>{const n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{const s=zi(n);t[r]=()=>s}}),t}function Cr(e,t){typeof e=="function"?e(t):e.current=t}function Bi(e,t){const r=e.ref;return F(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?c.cloneElement(e,{ref:n=>{Cr(r,n),Cr(t,n)}}):c.cloneElement(e,{ref:t})}class $i{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return r&&this.disconnectDragSource(),this.handlerId?t?(r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),r):(this.lastConnectedDragSource=t,r):r}reconnectDragPreview(t=!1){const r=this.dragPreview,n=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!r){this.lastConnectedDragPreview=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=r,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,r,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!At(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!At(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=sn({dragSource:(r,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,_t(r)?this.dragSourceRef=r:this.dragSourceNode=r,this.reconnectDragSource()},dragPreview:(r,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,_t(r)?this.dragPreviewRef=r:this.dragPreviewNode=r,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class Gi{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!At(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=sn({dropTarget:(r,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,_t(r)?this.dropTargetRef=r:this.dropTargetNode=r,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function Be(){const{dragDropManager:e}=c.useContext(Zr);return F(e!=null,"Expected drag drop context"),e}function Ui(e,t){const r=Be(),n=c.useMemo(()=>new $i(r.getBackend()),[r]);return Ne(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),Ne(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function Wi(){const e=Be();return c.useMemo(()=>new Fi(e),[e])}class qi{beginDrag(){const t=this.spec,r=this.monitor;let n=null;return typeof t.item=="object"?n=t.item:typeof t.item=="function"?n=t.item(r):n={},n??null}canDrag(){const t=this.spec,r=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(r):!0}isDragging(t,r){const n=this.spec,s=this.monitor,{isDragging:i}=n;return i?i(s):r===t.getSourceId()}endDrag(){const t=this.spec,r=this.monitor,n=this.connector,{end:s}=t;s&&s(r.getItem(),r),n.reconnect()}constructor(t,r,n){this.spec=t,this.monitor=r,this.connector=n}}function Zi(e,t,r){const n=c.useMemo(()=>new qi(e,t,r),[t,r]);return c.useEffect(()=>{n.spec=e},[e]),n}function Xi(e){return c.useMemo(()=>{const t=e.type;return F(t!=null,"spec.type must be defined"),t},[e])}function Yi(e,t,r){const n=Be(),s=Zi(e,t,r),i=Xi(e);Ne(function(){if(i!=null){const[l,d]=Ai(i,s,n);return t.receiveHandlerId(l),r.receiveHandlerId(l),d}},[n,t,r,s,i])}function Ki(e,t){const r=nn(e,t);F(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=Wi(),s=Ui(r.options,r.previewOptions);return Yi(r,n,s),[rn(r.collect,n,s),Pi(s),Mi(s)]}function Ji(e){return c.useMemo(()=>e.hooks.dropTarget(),[e])}function Qi(e){const t=Be(),r=c.useMemo(()=>new Gi(t.getBackend()),[t]);return Ne(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}function ea(){const e=Be();return c.useMemo(()=>new Hi(e),[e])}function ta(e){const{accept:t}=e;return c.useMemo(()=>(F(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class ra{canDrop(){const t=this.spec,r=this.monitor;return t.canDrop?t.canDrop(r.getItem(),r):!0}hover(){const t=this.spec,r=this.monitor;t.hover&&t.hover(r.getItem(),r)}drop(){const t=this.spec,r=this.monitor;if(t.drop)return t.drop(r.getItem(),r)}constructor(t,r){this.spec=t,this.monitor=r}}function na(e,t){const r=c.useMemo(()=>new ra(e,t),[t]);return c.useEffect(()=>{r.spec=e},[e]),r}function sa(e,t,r){const n=Be(),s=na(e,t),i=ta(e);Ne(function(){const[l,d]=Vi(i,s,n);return t.receiveHandlerId(l),r.receiveHandlerId(l),d},[n,t,s,r,i.map(a=>a.toString()).join("|")])}function on(e,t){const r=nn(e,t),n=ea(),s=Qi(r.options);return sa(r,n,s),[rn(r.collect,n,s),Ji(s)]}const xr="column",oa="flex items-center",ia="mr-3 cursor-move text-secondary",aa=({id:e,children:t,cssClass:r,findItem:n,moveItem:s,handleAriaLabel:i="Drag item"})=>{const a=c.useRef(null),l=c.useRef(null),d=typeof n=="function"?n(e):-1,[{isDragging:u},f,p]=Ki(()=>({type:xr,item:{id:e,originalIndex:d},collect:g=>{const m=g.getItem();return{isDragging:g.isDragging()&&m?.id===e}},end:(g,m)=>{if(!g)return;!m.didDrop()&&typeof s=="function"&&g.originalIndex>-1&&s(g.id,g.originalIndex)}}),[e,d,s]),[,C]=on(()=>({accept:xr,hover:g=>{if(!(!g||g.id===e)&&typeof n=="function"&&typeof s=="function"){const m=n(e);s(g.id,m)}}}),[n,s,e]);return p(C(l)),f(a),o.jsxs("div",{ref:l,className:_(oa,r),style:{opacity:u?0:1},"aria-roledescription":"Draggable item",children:[o.jsx("div",{ref:a,className:ia,"aria-label":i,children:o.jsx(k.IconGripVertical,{...le})}),t]})},la=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.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"}),M.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"}),M.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"}),M.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"})),ca=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.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"}),M.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"})),da=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.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"}),M.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"}),M.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"})),ua=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.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"}),M.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"}),M.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"}),M.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"})),fa=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.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"}),M.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"}),M.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"}),M.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"}),M.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"})),pa=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.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"}),M.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"}),M.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"})),ha=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.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"}),M.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"}),M.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"})),U=(e,t)=>o.jsx(e,{size:t.size??le.size,stroke:t.stroke??le.stroke,className:t.className}),je=(e,t)=>o.jsx(e,{width:Number(t.size??le.size),height:Number(t.size??le.size),className:t.className}),br={".bmp":e=>U(k.IconFileTypeBmp,e),".cpp":e=>je(la,e),".c":e=>je(ca,e),".cs":e=>je(da,e),".css":e=>U(k.IconFileTypeCss,e),".csv":e=>U(k.IconFileTypeCsv,e),".doc":e=>U(k.IconFileTypeDoc,e),".docx":e=>U(k.IconFileTypeDocx,e),".html":e=>U(k.IconFileTypeHtml,e),".ini":e=>je(ua,e),".jpg":e=>U(k.IconFileTypeJpg,e),".js":e=>U(k.IconFileTypeJs,e),".json":e=>je(fa,e),".jsx":e=>U(k.IconFileTypeJsx,e),".md":e=>je(pa,e),".pdf":e=>U(k.IconFileTypePdf,e),".php":e=>U(k.IconFileTypePhp,e),".png":e=>U(k.IconFileTypePng,e),".ppt":e=>U(k.IconFileTypePpt,e),".py":e=>je(ha,e),".rs":e=>U(k.IconFileTypeRs,e),".sql":e=>U(k.IconFileTypeSql,e),".svg":e=>U(k.IconFileTypeSvg,e),".ts":e=>U(k.IconFileTypeTs,e),".tsx":e=>U(k.IconFileTypeTsx,e),".txt":e=>U(k.IconFileTypeTxt,e),".vue":e=>U(k.IconFileTypeVue,e),".xls":e=>U(k.IconFileTypeXls,e),".xml":e=>U(k.IconFileTypeXml,e),".zip":e=>U(k.IconFileTypeZip,e),default:e=>U(k.IconFile,e)},an=({extension:e,size:t=le.size,stroke:r=le.stroke,cssClass:n,decorative:s=!1,label:i,indicator:a})=>{const l=(()=>{const p=e.trim().toLowerCase();return p.startsWith(".")?p:`.${p}`})(),u=(br[l]??br.default)({size:t,stroke:r}),f=i??`${l.slice(1).toUpperCase()} file icon`;return o.jsxs("span",{className:D("inline-flex relative",n),...s?{"aria-hidden":!0}:{role:"img","aria-label":f},children:[o.jsx(q,{icon:u,className:"inline-block align-middle"}),a&&o.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:a})]})},Kt=({label:e="Shared entity",size:t=10,cssClass:r,stroke:n=2})=>o.jsx(q,{className:_("text-accent-primary",r),label:"Shared entity indicator",icon:o.jsx(k.IconArrowUpRight,{size:t,stroke:n,"aria-label":e,className:"bg-layer-3",role:"img"})}),ga=({name:e,cssClass:t,shared:r=!1})=>{const n=e.includes(".")?e.split(".").pop():null;return o.jsxs("div",{className:_("flex items-center gap-2 w-full",t),children:[n&&o.jsx(an,{extension:n,cssClass:"text-secondary",indicator:r?o.jsx(Kt,{}):null,label:"File type icon"}),o.jsx(Ce,{cssClass:"text-primary dial-small flex-1 min-w-0",text:e})]})},ma=({name:e,cssClass:t,shared:r=!1,loading:n=!1})=>{const s=()=>n?o.jsx(ct,{}):o.jsx(q,{icon:o.jsx(k.IconFolder,{...le}),className:"inline-block align-middle"});return o.jsxs("div",{className:_("flex items-center gap-2 w-full",t),children:[o.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[s(),r&&o.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:o.jsx(Kt,{})})]}),o.jsx(Ce,{cssClass:"text-primary dial-small flex-1 min-w-0",text:e})]})},Ca="en-US",xa={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},ba="text-primary";function ln(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 n=Number(t);return ln(n)}const r=new Date(t);return isFinite(r.getTime())?r:null}return null}const va=({value:e,locale:t=Ca,options:r=xa,emptyPlaceholder:n="—",cssClass:s})=>{const i=ln(e),a=c.useMemo(()=>i?new Intl.DateTimeFormat(t,r).format(i):n,[i,n,t,r]),l=i?i.toISOString():void 0;return o.jsx(Ce,{text:l?o.jsx("time",{dateTime:l,children:a}):o.jsx("span",{children:a}),cssClass:D(ba,s),hideTooltip:!1})};var ot=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(ot||{}),zt=(e=>(e.Mobile="mobile",e.Tablet="tablet",e))(zt||{}),cn=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(cn||{}),De=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(De||{}),Jt=(e=>(e.Item="item",e.Divider="divider",e))(Jt||{});const ya=D("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),wa=D("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none","w-max"),Da=D("flex w-full cursor-pointer items-center gap-3","focus-visible:border-none focus-visible:outline-none","hover:bg-accent-primary-alpha px-3","dial-small h-[34px] rounded text-primary"),Sa="opacity-75 !cursor-not-allowed",Ia="text-error",Ta="my-1 border-t border-hover border-secondary",Ue=8,Qt=({ariaLabel:e,cssClass:t,size:r=24,onClose:n})=>o.jsx(re,{ariaLabel:e,cssClass:_("text-secondary hover:text-accent-primary",t),onClick:n,iconBefore:o.jsx(k.IconX,{size:r})}),Ve=({children:e,menu:t,renderOverlay:r,trigger:n=[De.Click],placement:s,disabled:i=!1,open:a,defaultOpen:l=!1,onOpenChange:d,closable:u=!1,onClose:f,cssClass:p,listClassName:C,outsidePressIgnoreRef:g,outsideClosable:m=!0,allowedPlacements:h,anchorToMouse:y=!1,matchReferenceWidth:b=!0})=>{const[v,x]=c.useState(l),j=a!==void 0,N=j?!!a:v,T=c.useRef(null),R=c.useCallback(O=>{j||x(O),d?.(O)},[j,d]),I=c.useId(),z=s===void 0,Q=O=>"clientWidth"in O?O.clientWidth:O.getBoundingClientRect?.()?.width??0,{refs:P,floatingStyles:G,context:B}=A.useFloating({placement:s,open:N,onOpenChange:R,whileElementsMounted:A.autoUpdate,middleware:[A.offset({mainAxis:Ue,crossAxis:0}),z?A.autoPlacement({alignment:"start",crossAxis:!0,padding:Ue,allowedPlacements:h}):A.flip({padding:Ue}),A.shift({padding:Ue}),A.size({padding:Ue,apply({availableWidth:O,availableHeight:H,elements:ce}){const Y=ce.floating,Z=Q(ce.reference);Y.style.setProperty("--fui-available-height",`${Math.floor(H)}px`),Y.style.setProperty("--reference-width",b?`${Math.round(Z)}px`:"0px"),b?Y.style.minWidth=`${Math.round(Z)}px`:Y.style.removeProperty("min-width"),Y.style.maxWidth=`${Math.floor(O)}px`,Y.style.maxHeight=`${Math.floor(H)}px`}})]}),ee=A.useClick(B,{enabled:n.includes(De.Click)&&!i}),oe=A.useHover(B,{enabled:n.includes(De.Hover)&&!i,move:!1,restMs:40,delay:{open:80,close:80}}),ie=A.useDismiss(B,{bubbles:!0,referencePress:!1,outsidePress:O=>{if(!m)return!1;const H=O.target;return!(g?.current&&H instanceof Node&&g.current.contains(H))}}),X=A.useRole(B,{role:"menu"}),{getReferenceProps:S,getFloatingProps:he}=A.useInteractions([ee,oe,ie,X]),ne=c.useCallback((O,H)=>{P.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:O,y:H,top:H,left:O,right:O,bottom:H})})},[P]),xe=c.useCallback(O=>{!n.includes(De.ContextMenu)||i||(O.preventDefault(),y&&(ne(O.clientX,O.clientY),T.current=document.elementFromPoint(O.clientX,O.clientY)),R(!0))},[y,i,R,ne,n]),me=c.useCallback(O=>{!y||i||(ne(O.clientX,O.clientY),T.current=document.elementFromPoint(O.clientX,O.clientY))},[y,i,ne]);c.useEffect(()=>{i&&N&&R(!1)},[i,N,R]);const $=c.useCallback(O=>H=>{O.disabled||(O.onClick?.({key:O.key,domEvent:H}),t?.onClick?.({key:O.key,domEvent:H}),R(!1))},[t,R]),J=c.useMemo(()=>r?r():t?o.jsxs(o.Fragment,{children:[t.header&&o.jsx(o.Fragment,{children:typeof t.header=="function"?t.header():t.header}),o.jsx("div",{role:"none",className:"py-1",children:t.items.map(O=>O.type===Jt.Divider?o.jsx("div",{role:"separator",className:Ta},O.key):o.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!O.disabled,className:D(Da,O.disabled&&Sa,O.danger&&Ia),disabled:O.disabled,onClick:$(O),children:[O.icon&&o.jsx("span",{className:D(O.danger&&"text-error",O.disabled&&"text-secondary"),children:o.jsx(q,{icon:O.icon})}),o.jsx("span",{className:D("flex-1 truncate text-left",O.danger&&"text-error",O.disabled&&"text-secondary"),children:O.label})]},O.key))}),t.footer&&o.jsx(o.Fragment,{children:typeof t.footer=="function"?t.footer():t.footer})]}):null,[$,t,r]),ue=S({onContextMenu:xe,onMouseDown:me});return c.useEffect(()=>{if(!N)return;const O=P.reference.current;let H=null;if(O instanceof Element?H=O:T.current instanceof Element&&(H=T.current),!H)return;const ce=new IntersectionObserver(([Y])=>{Y.isIntersecting||R(!1)},{root:null,threshold:0});return ce.observe(H),()=>ce.disconnect()},[N,P.reference,R]),o.jsxs(o.Fragment,{children:[o.jsx("span",{ref:P.setReference,className:D(ya,i&&"!cursor-not-allowed opacity-75",p),"aria-haspopup":"menu","aria-expanded":N,"aria-controls":I,...ue,children:e}),N&&o.jsx(A.FloatingPortal,{children:o.jsx(A.FloatingFocusManager,{context:B,modal:!1,initialFocus:-1,returnFocus:!0,children:o.jsxs("div",{id:I,ref:P.setFloating,style:G,className:D(wa,!b&&"w-max",C),...he(),children:[u&&o.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:o.jsx(Qt,{ariaLabel:"Close dropdown",onClose:O=>{f?.(O),R(!1)}})}),J]})})})]})},tt=({tab:e,active:t,invalid:r,cssClass:n,horizontal:s,onClick:i})=>{const a=_("rounded h-[32px] items-center flex flex-row border-transparent cursor-pointer dial-small leading-4 hover:text-accent-primary",{"border-b-2 px-4":s,"border-l-2 px-3":!s}),l=_(a,{"bg-layer-4":s,"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&&s&&!e.disabled,"border-l-accent-primary":t&&!s&&!e.disabled},n);return o.jsxs("button",{role:"tab",className:l,onClick:()=>i(e.id),disabled:e.disabled,children:[o.jsx(Ce,{text:e.name,contentClassName:"max-w-[200px]",cssClass:"max-w-[200px]"}),(r||e.invalid)&&o.jsx("div",{className:"text-error pl-1",children:o.jsx(k.IconExclamationCircle,{...le})})]})},vr=12;var Oe=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(Oe||{});const yr=()=>{if(typeof window>"u")return Oe.Undefined;const e=window.innerWidth;return e>=1024?Oe.Desktop:e<640?Oe.Mobile:Oe.Tablet},La=()=>{const[e,t]=c.useState(yr());return c.useEffect(()=>{const r=()=>t(yr());return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),e},Ea=({tabs:e,activeTab:t,onClick:r,orientation:n=ot.Horizontal,smallScreenThreshold:s=zt.Tablet,smallScreenContainerCssClass:i,smallScreenDropdownItemCssClass:a})=>{const[l,d]=c.useState(!1),[u,f]=c.useState(!1),[p,C]=c.useState(!1),g=La(),m=g===Oe.Mobile||s===zt.Tablet&&g===Oe.Tablet,h=n===ot.Horizontal,y=c.useRef(null),b=c.useRef(null),v=c.useRef(null),x=e.find(T=>T.id===t),j=c.useMemo(()=>D("flex gap-3",h?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[h]),N=c.useCallback(()=>{const T=b.current;T&&C(T.scrollWidth>T.clientWidth)},[]);return c.useEffect(()=>{N();const T=new ResizeObserver(()=>N()),R=b.current;return R&&T.observe(R),()=>T.disconnect()},[e,N]),c.useEffect(()=>{const T=v.current,R=b.current;if(!T||!R)return;const I=T.offsetLeft,z=I+T.offsetWidth,Q=R.scrollLeft,P=Q+R.clientWidth;I<Q?R.scrollTo({left:I-vr,behavior:"smooth"}):z>P&&R.scrollTo({left:z-R.clientWidth+vr,behavior:"smooth"})},[t]),m?o.jsx("div",{className:_("h-11 flex items-center bg-layer-3 px-4",i),children:o.jsx(Ve,{trigger:[De.Click],open:l,onOpenChange:d,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(T=>o.jsx(tt,{tab:T,active:T.id===t,onClick:R=>{r(R),d(!1)},cssClass:_("w-full rounded-none h-11 items-center px-6",a)},T.id)),children:o.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[o.jsx(tt,{tab:x,active:!0,onClick:r,cssClass:"rounded-none bg-transparent border-l-0 border-b-0 h-full items-center px-0"},t),o.jsx(q,{icon:o.jsx(k.IconChevronDown,{size:16}),className:D("text-primary transition-transform",l&&"rotate-180")})]})})}):o.jsxs("div",{ref:y,className:"flex w-full items-start",children:[o.jsx("div",{ref:b,className:j,children:e.map(T=>o.jsx("div",{ref:t===T.id?v:void 0,className:"w-full",children:o.jsx(tt,{tab:T,active:t===T.id,onClick:r,horizontal:h,cssClass:"w-full"})},T.id))}),p&&o.jsx("div",{className:"flex items-center ml-2",children:o.jsx(Ve,{trigger:[De.Click],open:u,onOpenChange:f,placement:"bottom-end",renderOverlay:()=>e.map(T=>o.jsx(tt,{tab:T,active:T.id===t,onClick:R=>{r(R),f(!1)},cssClass:"w-full rounded-none h-[32px] items-center px-3 py-2"},T.id)),children:o.jsx(re,{iconBefore:o.jsx(k.IconDotsVertical,{size:18}),cssClass:D("w-8 h-8 flex items-center justify-center rounded border",u?"bg-layer-4 border-transparent":"border-primary")})})})]})},ja="w-full overflow-hidden",ka="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",dn="flex items-center gap-2 min-w-0 shrink-0 dial-small",Oa="max-w-[20%] basis-[20%] flex-none",Na="flex-1 min-w-0",wr="inline-flex items-center gap-1 min-w-0 transition-colors",Ra="text-secondary hover:text-accent-primary",Pa="text-primary cursor-default",un="flex-none inline-flex items-center leading-none text-icon-secondary",Ma="items-center gap-1 min-w-0 transition-colors text-secondary hover:text-accent-primary",fn=o.jsx(k.IconChevronRight,{size:16,"aria-hidden":"true"}),qe=({title:e,href:t,onClick:r,disabled:n,isLast:s,separator:i=fn,cssClass:a,iconBefore:l,titleCssClass:d})=>{const u=_(dn,s?Na:Oa,a),f=(!!t||!!r)&&!s&&!n,p=f?_(wr,Ra):_(wr,Pa,n?"pointer-events-none opacity-75":""),C=typeof e=="string"?o.jsx(Ce,{cssClass:d,text:e}):o.jsx("span",{className:_("flex-1 min-w-0 max-w-full truncate",d),children:e});return o.jsxs("li",{className:u,children:[f?o.jsxs("a",{href:t,onClick:r,className:p,children:[l,C]}):o.jsxs("span",{className:p,"aria-current":s?"page":void 0,"aria-disabled":n?"true":void 0,children:[l,C]}),!s&&o.jsx("span",{className:un,children:i})]})},Fa=({pathItems:e,separator:t=fn,ariaLabel:r="Breadcrumb",cssClass:n,children:s,titleCssClass:i})=>{const a=c.useMemo(()=>e?.length?e:c.Children.toArray(s).filter(c.isValidElement).map(u=>{const f=u.props;return{title:f.title,href:f.href,onClick:f.onClick,disabled:f.disabled,iconBefore:f.iconBefore,cssClass:f.cssClass}}),[e,s]),l=c.useCallback(u=>{const f=parseInt(u.key,10),p=a[f];p.onClick?p.onClick(u.domEvent):p.href&&(window.location.href=p.href)},[a]),d=c.useMemo(()=>{if(a.length===0)return null;if(a.length<=3)return a.map((m,h)=>c.createElement(qe,{...m,key:`item-${h}`,isLast:h===a.length-1,separator:t,titleCssClass:i}));const u=a.at(0),f=a.slice(1,-2),p=a.at(-2),C=a.at(-1);if(!u||!p||!C)return null;const g=f.map((m,h)=>({key:String(h+1),label:typeof m.title=="string"?m.title:`Item ${h+1}`,disabled:m.disabled}));return o.jsxs(o.Fragment,{children:[c.createElement(qe,{...u,key:"item-0",separator:t,titleCssClass:i}),o.jsxs("li",{className:_(dn),children:[o.jsx(Ve,{menu:{items:g,onClick:l},placement:"bottom-start",matchReferenceWidth:!1,children:o.jsx("button",{type:"button","aria-label":"More breadcrumbs",className:Ma,children:o.jsx(k.IconDots,{size:16})})}),o.jsx("span",{className:un,children:t})]}),c.createElement(qe,{...p,key:`item-${a.length-2}`,separator:t,titleCssClass:i}),c.createElement(qe,{...C,key:`item-${a.length-1}`,isLast:!0,separator:t,titleCssClass:i})]})},[a,t,i,l]);return o.jsx("nav",{"aria-label":r,className:_(ja,n),children:o.jsx("ol",{className:ka,children:d})})},pn=({iconClass:e,...t})=>o.jsx(re,{iconBefore:o.jsx(k.IconTrashX,{...le,className:e||""}),...t}),hn=({value:e,textareaId:t,placeholder:r,cssClass:n="",containerCssClass:s="",disabled:i,invalid:a,readonly:l,disableTooltip:d,onChange:u})=>o.jsx(Ie,{tooltip:d?null:e,triggerClassName:_("flex",s),children:o.jsx("textarea",{id:t,placeholder:r,value:e||"",disabled:i,className:D("dial-textarea dial-input px-3 py-2",a?"dial-input-error":"",i&&"dial-input-disable",l&&"dial-input-readonly",n),onChange:f=>!l&&u?.(f.currentTarget.value)})}),Ha=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],Va=(e,t,r,n)=>{if((t==="number"||r!==void 0||n!==void 0)&&!Ha.includes(e.key)&&!(e.ctrlKey||e.metaKey)&&!(e.key==="-"&&(e.currentTarget.selectionStart??0)===0&&!e.currentTarget.value.includes("-"))&&!(e.key==="."&&t==="number"&&!e.currentTarget.value.includes("."))){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if(r!==void 0||n!==void 0){const i=e.currentTarget.value,a=e.currentTarget.selectionStart||0,l=i.slice(0,a)+e.key+i.slice(a),d=parseFloat(l);if(!isNaN(d)){if(r!==void 0&&d<r){e.preventDefault();return}if(n!==void 0&&d>n){e.preventDefault();return}}}}},Ae=({iconBefore:e,iconAfter:t,hideBorder:r,value:n,elementId:s,placeholder:i="",cssClass:a="",containerCssClass:l,tooltipTriggerClassName:d,type:u="text",disabled:f,readonly:p,invalid:C,onChange:g,min:m,max:h,prefix:y,suffix:b,textBeforeInput:v,textAfterInput:x,onBlur:j,defaultValue:N,tooltipText:T,hideTooltip:R=!1,inputRef:I})=>{const z=B=>B.target.blur(),Q=u==="number"||m!==void 0||h!==void 0,P=B=>{Va(B,u,m,h)},G=B=>{const ee=B.currentTarget.value;if(Q&&ee!==""){const oe=parseFloat(ee);if(isNaN(oe)&&ee!=="-"&&ee!=="."||!isNaN(oe)&&(m!==void 0&&oe<m||h!==void 0&&oe>h))return}g?.(ee||void 0)};return o.jsxs("div",{className:D("dial-input-field flex flex-row items-center justify-between py-2",r?"dial-input-no-border":"dial-input",C&&"dial-input-error",f&&"dial-input-disable",p&&"dial-input-readonly",!v&&"pl-3",!x&&"pr-3",l),children:[v&&o.jsx("div",{className:"mr-2",children:o.jsx(Ae,{hideBorder:!0,containerCssClass:"rounded-r-none border-r-0",cssClass:"overflow-hidden overflow-ellipsis dial-small",value:v,disabled:!0,elementId:v+"textBefore"})}),y&&o.jsxs("p",{className:"text-secondary dial-small mr-2",children:[" ",y]}),o.jsx(q,{icon:e,className:D(!!e&&"mr-2")}),o.jsx(Ie,{tooltip:R?void 0:T||n,triggerClassName:D(d,"flex-1"),children:o.jsx("input",{ref:I,type:u,autoComplete:"off",id:s,placeholder:i,value:N?void 0:n??"",disabled:f,className:D("border-0 bg-transparent w-full truncate",a),onChange:B=>!p&&G?.(B),onKeyDown:P,onWheel:z,onBlur:j,min:m,max:h,defaultValue:N})}),o.jsx(q,{icon:t,className:D(!!t&&"ml-2")}),b&&o.jsxs("p",{className:"text-secondary dial-small ml-2",children:[" ",b]}),x&&o.jsx("div",{className:"ml-2",children:o.jsx(Ae,{hideBorder:!0,containerCssClass:"rounded-l-none border-l-0",value:x,disabled:!0,elementId:x+"textAfter"})})]})},Aa=/^0+\.(\d+)?$/,_a=/^0+/,gn=({label:e,optional:t,optionalText:r,description:n,error:s,captionDescription:i,readonly:a,orientation:l,elementId:d,fieldTitle:u,errorText:f,elementCssClass:p,elementContainerCssClass:C,containerCssClass:g,defaultEmptyText:m,...h})=>o.jsx(dt,{label:e??u,error:s??f,optionalText:r,optional:t,description:n,captionDescription:i,readonly:a,orientation:l,elementId:d,cssClass:g,defaultEmptyText:m,value:h.value,children:o.jsx(Ae,{elementId:d,cssClass:p,containerCssClass:C,invalid:f!=null,...h})}),za=({onChange:e,...t})=>{const r=n=>!n||n==="-"?n:String(n)?.match(Aa)?String(n)?.replace(_a,"0"):Number(n);return o.jsx(gn,{type:"number",onChange:n=>e?.(r(n)),...t})},Ba=({onChange:e,...t})=>o.jsx(gn,{type:"text",onChange:r=>e?.(r),...t}),$a=({fieldTitle:e,optional:t,elementId:r,elementCssClass:n,containerCssClass:s,elementContainerCssClass:i,errorText:a,...l})=>o.jsxs("div",{className:_("flex flex-col",s),children:[o.jsx(Pe,{fieldTitle:e,optional:t,htmlFor:r}),o.jsx(hn,{textareaId:r,cssClass:n,containerCssClass:i,...l}),o.jsx(Se,{errorText:a})]}),Ga=({title:e,switchId:t,isOn:r=!1,disabled:n,onChange:s})=>{const i=D("flex w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",r?"flex-row-reverse":"flex-row",n?"pointer-events-none":"",n?r?"bg-controls-disable":"bg-layer-4":r?"bg-accent-primary":"bg-layer-4"),a=c.useCallback(l=>{l.stopPropagation(),s?.(!r)},[s,r]);return o.jsxs("div",{className:"flex flex-row items-center",children:[o.jsx("input",{type:"checkbox",onChange:a,id:t,disabled:n,className:"invisible w-0 h-0",checked:r}),o.jsx("label",{htmlFor:t,className:i,children:o.jsx("span",{className:D("size-3 rounded-full",n?r?"bg-layer-4":"bg-controls-disable":"bg-controls-enable-primary")})}),e&&o.jsx("span",{className:"pl-2 dial-small text-primary",children:e})]})};var ve=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(ve||{});const Ua="z-[52] flex items-center justify-center bg-blackout md:p-4",Wa="divide-tertiary divide-y",qa="flex flex-row justify-between py-4 px-6 items-center",Za={[ve.Sm]:"dial-sm-popup",[ve.Md]:"dial-md-popup",[ve.Lg]:"dial-lg-popup"},xt=({open:e=!1,title:t,portalId:r,cssClass:n,overlayClass:s,headingClass:i,dividers:a=!0,children:l,footer:d,onClose:u,size:f=ve.Md})=>{const{refs:p,context:C}=A.useFloating({open:e,onOpenChange:v=>{v||u?.(null)}}),g=A.useRole(C,{role:"dialog"}),m=A.useDismiss(C,{outsidePress:!0}),{getFloatingProps:h}=A.useInteractions([g,m]);if(!e)return null;const y=typeof t=="string"?"dial-popup-heading":void 0,b=v=>v?typeof v=="string"?o.jsx("h3",{id:y,className:D("flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",i),children:o.jsx(Ie,{tooltip:v,children:v})}):v:o.jsx("span",{});return o.jsx(A.FloatingPortal,{id:r,children:o.jsx(A.FloatingOverlay,{className:D(Ua,s),children:o.jsx(A.FloatingFocusManager,{context:C,children:o.jsxs("div",{ref:p.setFloating,...h(),role:"dialog","aria-modal":"true","aria-labelledby":y,className:D("dial-popup",Za[f],a&&Wa,n),children:[o.jsxs("div",{className:qa,children:[b(t),o.jsx(Qt,{ariaLabel:"Close dialog",onClose:v=>u?.(v)})]}),o.jsx("div",{className:"flex-grow overflow-auto",children:l}),d]})})})})};var Ke=(e=>(e.Info="info",e.Danger="danger",e))(Ke||{});const Xa="flex justify-end gap-2 px-6 py-4",Ya="text-secondary dial-small-150 px-6 py-4",Ka="Cancel",Ja="Ok",Dr={[Ke.Info]:{confirmVariant:se.Primary,cancelVariant:se.Secondary},[Ke.Danger]:{container:"dial-danger-popup",confirmVariant:se.Danger,cancelVariant:se.Secondary}},Qa=({title:e,description:t,descriptionCssClass:r,open:n=!1,confirmLabel:s=Ja,cancelLabel:i=Ka,isLoading:a=!1,disableConfirmButton:l=!1,cssClass:d,confirmClassName:u,onClose:f,onConfirm:p,onCancel:C,children:g,dividers:m=!1,variant:h=Ke.Info,size:y=ve.Sm,footer:b})=>{const v=a?null:o.jsxs("div",{className:Xa,children:[o.jsx(re,{variant:se.Secondary,title:i,onClick:()=>C?C():f?.()}),o.jsx(re,{variant:Dr[h].confirmVariant,cssClass:u,title:s,disable:l,onClick:()=>p()})]}),x=c.useCallback(()=>a?o.jsx("div",{className:"px-6 py-4 h-[120px]",children:o.jsx(ct,{size:50})}):g??(t?o.jsx("div",{className:D(Ya,r),children:t}):null),[g,t,a,r]);return o.jsx(xt,{open:n,title:e,cssClass:D(Dr[h].container,d),dividers:m,onClose:()=>f?.(),footer:b??v,size:y,children:x()})},er=({selectedItems:e,listCssClass:t,listElementCssClass:r,placeholder:n})=>e?.length?o.jsx("ul",{className:D("flex-row items-center truncate flex-wrap","flex gap-x-2 gap-y-1",t),children:e?.map(s=>o.jsx("li",{children:o.jsx(Ie,{tooltip:s,children:o.jsx(ft,{tag:s,cssClass:D([r])})})},s))}):n?o.jsx("span",{className:"text-secondary",children:n}):null,Sr=e=>M.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},M.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"})),mn=({children:e,open:t,disabled:r=!1,selectedValue:n,valueCssClasses:s,inputCssClasses:i,onOpen:a,elementId:l,errorText:d,invalid:u,emptyValueText:f,placeholder:p})=>{const C=Array.isArray(n)&&n.length>0,g=typeof n=="string"&&!!n.trim(),m=C||g?n:p?void 0:f,h=r?void 0:a,y=()=>o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",className:"w-full",onClick:h,"aria-label":"open-popup",id:l,children:o.jsxs("div",{className:D("dial-input px-3 py-2 dial-input-field flex flex-row items-center w-full justify-between",i,r&&"dial-input-disable",(d||u)&&"dial-input-error"),children:[o.jsx(Ie,{tooltip:m==null?void 0:String(m),children:m||!p?o.jsx("span",{className:s,children:m}):o.jsx("span",{className:"text-secondary",children:p})}),!r&&o.jsx("div",{className:"flex-shrink-0",children:o.jsx(q,{icon:o.jsx(Sr,{role:"img",width:We,height:We})})})]})}),d&&o.jsx(Se,{errorText:d})]}),b=()=>o.jsx("div",{className:"w-full",onClick:h,children:o.jsxs("div",{className:D("dial-input px-3 py-2 flex flex-row items-center w-full justify-between",r&&"dial-input-disable"),children:[o.jsx(er,{placeholder:p,selectedItems:m}),!r&&o.jsx("div",{className:"ml-1",children:o.jsx(q,{icon:o.jsx(Sr,{role:"img",width:We,height:We})})})]})});return o.jsxs(o.Fragment,{children:[C?b():y(),t&&Jn.createPortal(e,document.body)]})},e1=({fieldTitle:e,htmlFor:t,disabled:r,selectedValue:n,radioButtons:s,customInputValue:i,valueCssClasses:a,inputCssClasses:l,emptyValueText:d,onClose:u,title:f,portalId:p,onApply:C,cancelButtonTitle:g="Cancel",applyButtonTitle:m="Apply",isValid:h,selectedRadioValue:y,onChangeRadioField:b,id:v,size:x=ve.Md})=>{const[j,N]=c.useState(!1),T=c.useCallback(()=>{r||N(!0)},[r]),R=c.useCallback(()=>{N(!1),u?.()},[u]),I=c.useCallback(()=>{C(),R()},[C,R]);return o.jsxs("div",{className:"flex flex-col",children:[o.jsx(Pe,{fieldTitle:e,htmlFor:t}),o.jsx(mn,{disabled:r,open:j,selectedValue:i??s.find(z=>z.id===n)?.name,valueCssClasses:a,inputCssClasses:D(l,"py-2","px-3"),emptyValueText:d,onOpen:T,children:o.jsx(xt,{open:j,onClose:R,title:f,portalId:p,size:x,footer:o.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[o.jsx(re,{variant:se.Secondary,title:g,onClick:R}),o.jsx(re,{variant:se.Primary,title:m,onClick:I,disable:!h})]}),children:o.jsx("div",{className:"px-6 py-4",children:o.jsx(Wr,{radioButtons:s,labelCssClass:"dial-small",activeRadioButton:y,onChange:b,elementId:v,orientation:Ye.Column})})})})]})},t1="Create",r1="Cancel",n1="flex items-center justify-end gap-2 px-6 py-3",s1=({title:e,open:t=!1,submitLabel:r=t1,cancelLabel:n=r1,isLoading:s=!1,disableSubmitButton:i=!1,cssClass:a,submitClassName:l,onClose:d,onSubmit:u,onCancel:f,children:p,dividers:C=!0,size:g=ve.Md,footer:m})=>{const h=s?null:o.jsxs("div",{className:n1,children:[o.jsx(re,{variant:se.Secondary,title:n,onClick:()=>f?f():d?.()}),o.jsx(re,{variant:se.Primary,cssClass:l,title:r,disable:i,onClick:()=>u()})]}),y=c.useCallback(()=>s?o.jsx("div",{className:"px-6 py-4 h-[120px]",children:o.jsx(ct,{size:50})}):p??null,[p,s]);return o.jsx(xt,{open:t,title:e,cssClass:a,dividers:C,onClose:()=>d?.(),footer:m??h,size:g,children:y()})},o1=({onClick:e})=>o.jsx(k.IconEyeOff,{...le,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),i1=({onClick:e})=>o.jsx(k.IconEye,{...le,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),Cn=({...e})=>{const[t,r]=c.useState(!1),n=c.useCallback(s=>{r(s)},[]);return o.jsx(Ae,{type:t?"text":"password",...e,hideTooltip:!t,iconAfter:t?o.jsx(o1,{onClick:()=>n(!1)}):o.jsx(i1,{onClick:()=>n(!0)})})},a1=({fieldTitle:e,optional:t,elementCssClass:r,elementId:n,errorText:s,...i})=>o.jsxs("div",{className:"flex flex-col",children:[o.jsx(Pe,{fieldTitle:e,optional:t,htmlFor:n}),o.jsx(Cn,{cssClass:r,elementId:n,invalid:!!s,...i}),o.jsx(Se,{errorText:s})]});var Je=(e=>(e.Small="small",e.Base="base",e))(Je||{});const l1={[Je.Small]:{textClass:"text-xs px-1",containerClass:"px-[6px] py-1 h-[22px]",iconSize:10,iconStroke:1},[Je.Base]:{textClass:"text-sm px-2",containerClass:"px-3 py-2 h-[38px]",iconSize:18,iconStroke:1.5}},xn=({elementId:e,value:t,placeholder:r="Search...",disabled:n,readonly:s,invalid:i,cssClass:a,containerCssClass:l,onChange:d,size:u=Je.Base,allowClear:f=!0})=>{const[p,C]=c.useState(t||"");c.useEffect(()=>{C(t||"")},[t]);const g=c.useCallback(y=>{C(y),d?.(y)},[d]),m=l1[u],h=c.useCallback(()=>{g("")},[g]);return o.jsxs("div",{className:D("dial-input flex flex-row items-center justify-between",i&&"dial-input-error",n&&"dial-input-disable",s&&"dial-input-readonly",m.containerClass,l),children:[o.jsx(q,{className:D(n?"text-secondary":"text-primary"),icon:o.jsx(k.IconSearch,{size:m.iconSize,stroke:m.iconStroke})}),o.jsx("input",{id:e,type:"text",autoComplete:"off",placeholder:r,value:p??"",disabled:n,readOnly:s,className:D("border-0 bg-transparent w-full",a,m.textClass),onChange:y=>!s&&g(y.currentTarget.value)}),p&&!s&&!n&&f&&o.jsx(q,{className:"text-primary cursor-pointer",icon:o.jsx(k.IconX,{size:m.iconSize,stroke:m.iconStroke,onClick:h,"aria-label":"Clear search",role:"button"})})]})},c1=({placeholder:e="",selectedItems:t=[],updateSelected:r,listCssClass:n,listElementCssClass:s,containerCssClass:i,inputCssClass:a})=>{const[l,d]=c.useState(""),u=c.useCallback(p=>{p.key==="Enter"&&(r([...t,p.currentTarget.value]),d("")),(p.key==="Backspace"||p.key==="Delete")&&t.length&&!l&&r(t.slice(0,-1))},[t,r,l]),f=c.useCallback(p=>{d(p.target.value)},[d]);return o.jsxs("div",{className:D(["dial-input px-3 py-2 flex flex-row items-center flex-wrap w-fit gap-2",i]),children:[o.jsx(er,{selectedItems:t,listCssClass:n,listElementCssClass:s}),o.jsx("input",{type:"text",value:l,className:D(["border-0 bg-transparent p-0",a]),placeholder:t?.length?"":e,onKeyDown:u,onChange:f})]})},d1=({initialTags:e=[],fieldTitle:t,optional:r,elementId:n,placeholder:s,errorText:i,invalid:a,disabled:l,onChange:d})=>{const u=c.useRef(null),[f,p]=c.useState(e),[C,g]=c.useState(""),[m,h]=c.useState(!1),y=x=>{const j=x.trim().replace(/,$/,"");if(j&&!f.includes(j)){const N=[j,...f];p(N),d?.(N)}},b=x=>{(x.key===","||x.key==="Enter")&&(x.preventDefault(),y(C),g(""))},v=x=>{const j=f.filter((N,T)=>T!==x);p(j),d?.(j)};return c.useEffect(()=>{const x=new ResizeObserver(()=>{if(u.current){const j=u.current.scrollHeight>u.current.clientHeight+10;h(j)}});return u.current&&x.observe(u.current),()=>x.disconnect()},[f]),o.jsxs("div",{className:D("flex flex-col w-full"),children:[o.jsx(Pe,{fieldTitle:t,optional:r,htmlFor:n}),o.jsx("div",{className:D("dial-input min-h-[38px] p-[6px]",a&&"dial-input-error",l&&"dial-input-disable"),children:o.jsxs("div",{ref:u,className:D("flex flex-wrap gap-2 items-center",m?"flex-col-reverse":"flex-row"),children:[f.map((x,j)=>o.jsx(ft,{tag:x,remove:l?void 0:()=>v(j)},x+j)),o.jsx("input",{type:"text",value:C,onChange:x=>g(x.target.value),onKeyDown:b,className:D("dial-input-no-border outline-none border-none w-full min-w-[100px] flex-1 p-1"),placeholder:s,disabled:l})]})}),o.jsx(Se,{errorText:i})]})},u1="dial-input flex w-full items-center justify-between gap-2 dial-small",f1="w-full rounded",jt="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none",p1="bg-accent-primary-alpha",h1="bg-accent-primary-alpha border-l border-accent-primary border-1",Ir="opacity-75",g1=o.jsx(k.IconChevronDown,{size:16}),bn=({options:e,selectedValues:t,handleRemoveTag:r})=>o.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(n=>{const s=e.find(a=>a.value===n)?.label??n,i=e.find(a=>a.value===n)?.icon;return o.jsx(ft,{tag:s,remove:a=>r?.(a,n),iconBefore:i?o.jsx(q,{icon:i}):null,cssClass:"max-w-full"},n)})});var it=(e=>(e.Sm="sm",e.Md="md",e))(it||{}),at=(e=>(e.Primary="Primary",e.Secondary="Secondary",e))(at||{});const vn=({options:e,multiple:t=!1,value:r,defaultValue:n,variant:s=at.Primary,size:i=it.Md,prefix:a,placeholder:l="Select...",searchable:d=!1,searchPlaceholder:u,selectAll:f=!1,selectAllLabel:p="Select all",emptyStateTitle:C="No options available",emptyStateDescription:g,emptyStateIcon:m,disabled:h=!1,cssClass:y,closable:b=!1,header:v,footer:x,onClose:j,onChange:N,inlineSearch:T=!1,onFooterClick:R})=>{const[I,z]=c.useState(!1),[Q,P]=c.useState(""),G=c.useId(),B=c.useRef(null),ee=r!==void 0,[oe,ie]=c.useState(n),X=ee?r:oe,S=c.useMemo(()=>t?Array.isArray(X)?X:[]:typeof X=="string"?[X]:[],[X,t]),he=c.useMemo(()=>{const w=Q.trim().toLowerCase();return w?e.filter(W=>W.label.toLowerCase().includes(w)):e},[e,Q]);c.useEffect(()=>{I||P("")},[I]);const ne=c.useCallback(w=>{ee||ie(w),N?.(w)},[ee,N]),xe=w=>{if(t){const W=new Set(S);W.has(w)?W.delete(w):W.add(w),ne(Array.from(W))}else ne(w),z(!1)},me=c.useCallback((w,W)=>{if(w.stopPropagation(),!t){ne("");return}const Te=S.filter(Le=>Le!==W);ne(Te)},[t,S,ne]),$=c.useMemo(()=>he.filter(w=>!w.disabled),[he]),J=c.useMemo(()=>$.filter(w=>S.includes(w.value)).length,[$,S]),ue=$.length>0&&J===$.length,O=J>0&&!ue,H=()=>{if(!(!t||$.length===0))if(ue){const w=new Set($.map(Te=>Te.value)),W=S.filter(Te=>!w.has(Te));ne(W)}else{const w=new Set(S);$.forEach(W=>w.add(W.value)),ne(Array.from(w))}},ce=S.length>0;c.useEffect(()=>{I&&T&&!t&&!h&&requestAnimationFrame(()=>{const w=B.current;if(!w)return;w.focus();const W=w.value?.length??0;w.setSelectionRange?.(W,W)})},[I,T,t,h]);const Y=!t&&ce?S[0]:void 0,Z=c.useMemo(()=>Y?e.find(w=>w.value===Y):void 0,[e,Y]),ge=c.useCallback(()=>!t||S.length===0?null:o.jsx(bn,{options:e,selectedValues:S,handleRemoveTag:me}),[t,e,S,me]),ye=c.useCallback(()=>t?ce?ge():o.jsx("span",{className:"text-secondary truncate",children:l}):Z?o.jsxs(o.Fragment,{children:[Z.icon&&o.jsx(q,{icon:Z.icon}),o.jsx(Ce,{text:a?`${a} ${Z.label}`:Z.label}),Z?.description&&o.jsx("div",{className:"text-secondary dial-small",children:Z.description})]}):o.jsx("span",{className:"text-secondary truncate",children:l}),[ce,t,a,l,ge,Z]),bt=I?Q:Z?.label??"";return o.jsx(Ve,{open:I,onOpenChange:z,disabled:h,closable:b,onClose:j,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>o.jsxs("div",{id:G,role:"listbox","aria-multiselectable":t||void 0,className:f1,children:[v&&o.jsx(o.Fragment,{children:typeof v=="function"?v():v}),(d||b)&&o.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[d&&o.jsx(xn,{placeholder:u,onChange:P,value:Q,elementId:`search-${G}`}),b&&o.jsx(re,{ariaLabel:"Close select",cssClass:"shrink-0",iconBefore:o.jsx(k.IconX,{size:16}),onClick:w=>{j?.(w),z(!1)}})]}),t&&f&&$.length>0&&o.jsx("div",{className:D(jt,"mt-2"),children:o.jsx(Ft,{id:`${G}-selectAll`,label:p,checked:ue,indeterminate:O,onChange:H,ariaLabel:p})}),o.jsx("div",{className:"overflow-y-auto py-1",children:he.length===0?o.jsx("div",{className:"px-2 py-3",children:o.jsx(qr,{icon:m??o.jsx(k.IconClipboardX,{size:24}),title:C,description:g})}):he.map(w=>{const W=S.includes(w.value);return t?o.jsxs("div",{role:"option","aria-selected":W,"aria-disabled":!!w.disabled,className:D(jt,W&&p1,w.disabled&&Ir,"w-full"),children:[o.jsx(Ft,{id:`${G}-${w.value}`,label:o.jsxs("span",{className:"flex w-full flex-1 min-w-0 items-center gap-2 text-primary",children:[w.icon&&o.jsx(q,{icon:w.icon}),o.jsx("span",{className:"truncate",children:w.label})]}),checked:W,disabled:w.disabled,onChange:()=>!w.disabled&&xe(w.value),ariaLabel:w.label}),w.description&&o.jsx("div",{className:"text-secondary dial-small",children:w.description})]},w.value):o.jsx("button",{role:"option",type:"button","aria-selected":W,"aria-disabled":!!w.disabled,disabled:w.disabled,className:D(jt,W&&h1,w.disabled&&Ir),onClick:()=>!w.disabled&&xe(w.value),children:o.jsxs("div",{className:"flex items-center gap-2 w-full",children:[w.icon&&o.jsx(q,{icon:w.icon}),o.jsx(Ce,{text:w.label}),w.description&&o.jsx("div",{className:"text-secondary dial-small",children:w.description})]})},w.value)})}),x&&o.jsx("div",{onClick:w=>{R?.(w),R&&z(!1)},children:typeof x=="function"?x():x})]}),children:o.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-expanded":I,"aria-controls":G,className:_(u1,h&&"opacity-75 !cursor-not-allowed",i===it.Sm?"min-h-[25px] px-1.5 py-1":"min-h-[38px] px-3 py-2",s===at.Secondary?"!bg-layer-4":"",y),onMouseDown:w=>{h||T&&!t&&w.preventDefault()},onClick:()=>{h||(z(w=>!w),T&&!t&&B.current?.focus())},children:[T&&!t?o.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-primary flex-1",children:[o.jsx("input",{id:`inline-${G}`,type:"text",placeholder:u??l,value:bt,onChange:w=>P(w.currentTarget.value),onFocus:()=>!h&&z(!0),onMouseDown:w=>w.stopPropagation(),onClick:w=>w.stopPropagation(),className:"bg-transparent outline-none w-full dial-small",ref:B,disabled:h,"aria-disabled":h}),Z&&!h&&o.jsx(re,{ariaLabel:"Clear selection",iconBefore:o.jsx(k.IconX,{size:16}),onClick:w=>{w.stopPropagation(),ne(""),P(""),z(!0)}})]}):o.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary",children:ye()}),o.jsx(q,{icon:g1,className:D("text-primary",I&&"rotate-180")})]})})},m1=({fieldTitle:e,optional:t,captionDescription:r,containerCssClass:n,selectCssClass:s,error:i,elementId:a,description:l,readonly:d,value:u,defaultEmptyText:f,...p})=>{const C=c.useCallback(()=>{if(!u||Array.isArray(u)&&u.length===0)return f??"None";if(Array.isArray(u))return o.jsx(bn,{options:p.options,selectedValues:u});{const g=p.options?.find(m=>m.value===u);return o.jsx("span",{"aria-readonly":!0,className:"text-primary",children:g?.label||u})}},[u,p.options,f]);return o.jsx(dt,{elementId:a,label:e,optional:t,description:l,error:i,captionDescription:r,cssClass:n,readonly:d,value:C(),defaultEmptyText:f,children:o.jsx(vn,{cssClass:s,value:u,...p})})};function yn(e){let t=null;return()=>(t==null&&(t=e()),t)}function C1(e,t){return e.filter(r=>r!==t)}function x1(e,t){const r=new Set,n=i=>r.add(i);e.forEach(n),t.forEach(n);const s=[];return r.forEach(i=>s.push(i)),s}class b1{enter(t){const r=this.entered.length,n=s=>this.isNodeInDocument(s)&&(!s.contains||s.contains(t));return this.entered=x1(this.entered.filter(n),[t]),r===0&&this.entered.length>0}leave(t){const r=this.entered.length;return this.entered=C1(this.entered.filter(this.isNodeInDocument),t),r>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class v1{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const r={};Object.keys(this.config.exposeProperties).forEach(n=>{const s=this.config.exposeProperties[n];s!=null&&(r[n]={value:s(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,r)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,r){return r===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const tr="__NATIVE_FILE__",wn="__NATIVE_URL__",Dn="__NATIVE_TEXT__",Sn="__NATIVE_HTML__",Tr=Object.freeze(Object.defineProperty({__proto__:null,FILE:tr,HTML:Sn,TEXT:Dn,URL:wn},Symbol.toStringTag,{value:"Module"}));function kt(e,t,r){const n=t.reduce((s,i)=>s||e.getData(i),"");return n??r}const Bt={[tr]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Sn]:{exposeProperties:{html:(e,t)=>kt(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[wn]:{exposeProperties:{urls:(e,t)=>kt(e,t,"").split(`
2
- `),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Dn]:{exposeProperties:{text:(e,t)=>kt(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function y1(e,t){const r=Bt[e];if(!r)throw new Error(`native type ${e} has no configuration`);const n=new v1(r);return n.loadDataTransfer(t),n}function Ot(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(Bt).filter(r=>{const n=Bt[r];return n?.matchesTypes?n.matchesTypes.some(s=>t.indexOf(s)>-1):!1})[0]||null}const w1=yn(()=>/firefox/i.test(navigator.userAgent)),In=yn(()=>!!window.safari);class Lr{interpolate(t){const{xs:r,ys:n,c1s:s,c2s:i,c3s:a}=this;let l=r.length-1;if(t===r[l])return n[l];let d=0,u=a.length-1,f;for(;d<=u;){f=Math.floor(.5*(d+u));const g=r[f];if(g<t)d=f+1;else if(g>t)u=f-1;else return n[f]}l=Math.max(0,u);const p=t-r[l],C=p*p;return n[l]+s[l]*p+i[l]*C+a[l]*p*C}constructor(t,r){const{length:n}=t,s=[];for(let g=0;g<n;g++)s.push(g);s.sort((g,m)=>t[g]<t[m]?-1:1);const i=[],a=[];let l,d;for(let g=0;g<n-1;g++)l=t[g+1]-t[g],d=r[g+1]-r[g],i.push(l),a.push(d/l);const u=[a[0]];for(let g=0;g<i.length-1;g++){const m=a[g],h=a[g+1];if(m*h<=0)u.push(0);else{l=i[g];const y=i[g+1],b=l+y;u.push(3*b/((b+y)/m+(b+l)/h))}}u.push(a[a.length-1]);const f=[],p=[];let C;for(let g=0;g<u.length-1;g++){C=a[g];const m=u[g],h=1/i[g],y=m+u[g+1]-C-C;f.push((C-m-y)*h),p.push(y*h*h)}this.xs=t,this.ys=r,this.c1s=u,this.c2s=f,this.c3s=p}}const D1=1;function Tn(e){const t=e.nodeType===D1?e:e.parentElement;if(!t)return null;const{top:r,left:n}=t.getBoundingClientRect();return{x:n,y:r}}function rt(e){return{x:e.clientX,y:e.clientY}}function S1(e){var t;return e.nodeName==="IMG"&&(w1()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function I1(e,t,r,n){let s=e?t.width:r,i=e?t.height:n;return In()&&e&&(i/=window.devicePixelRatio,s/=window.devicePixelRatio),{dragPreviewWidth:s,dragPreviewHeight:i}}function T1(e,t,r,n,s){const i=S1(t),l=Tn(i?e:t),d={x:r.x-l.x,y:r.y-l.y},{offsetWidth:u,offsetHeight:f}=e,{anchorX:p,anchorY:C}=n,{dragPreviewWidth:g,dragPreviewHeight:m}=I1(i,t,u,f),h=()=>{let T=new Lr([0,.5,1],[d.y,d.y/f*m,d.y+m-f]).interpolate(C);return In()&&i&&(T+=(window.devicePixelRatio-1)*m),T},y=()=>new Lr([0,.5,1],[d.x,d.x/u*g,d.x+g-u]).interpolate(p),{offsetX:b,offsetY:v}=s,x=b===0||b,j=v===0||v;return{x:x?b:y(),y:j?v:h()}}class L1{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,r){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=r}}function E1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable}))),n.forEach(function(s){E1(e,s,r[s])})}return e}class j1{profile(){var t,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,r,n){return this.sourcePreviewNodeOptions.set(t,n),this.sourcePreviewNodes.set(t,r),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,r,n){this.sourceNodes.set(t,r),this.sourceNodeOptions.set(t,n);const s=a=>this.handleDragStart(a,t),i=a=>this.handleSelectStart(a);return r.setAttribute("draggable","true"),r.addEventListener("dragstart",s),r.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),r.removeEventListener("dragstart",s),r.removeEventListener("selectstart",i),r.setAttribute("draggable","false")}}connectDropTarget(t,r){const n=a=>this.handleDragEnter(a,t),s=a=>this.handleDragOver(a,t),i=a=>this.handleDrop(a,t);return r.addEventListener("dragenter",n),r.addEventListener("dragover",s),r.addEventListener("drop",i),()=>{r.removeEventListener("dragenter",n),r.removeEventListener("dragover",s),r.removeEventListener("drop",i)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(t);return Er({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(t);return Er({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(Tr).some(r=>Tr[r]===t)}beginDragNativeItem(t,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=y1(t,r),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const r=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},r)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,r){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}handleDragEnter(t,r){this.dragEnterTargetIds.unshift(r)}handleDragOver(t,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}handleDrop(t,r){this.dropTargetIds.unshift(r)}constructor(t,r,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=s=>{const i=this.sourceNodes.get(s);return i&&Tn(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=s=>!!(s&&this.document&&this.document.body&&this.document.body.contains(s)),this.endDragIfSourceWasRemovedFromDOM=()=>{const s=this.currentDragSourceNode;s==null||this.isNodeInDocument(s)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=s=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(s||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=s=>{if(s.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const a=rt(s);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:l}=s,d=Ot(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const f=this.monitor.getSourceId(),p=this.sourceNodes.get(f),C=this.sourcePreviewNodes.get(f)||p;if(C){const{anchorX:g,anchorY:m,offsetX:h,offsetY:y}=this.getCurrentSourcePreviewNodeOptions(),x=T1(p,C,a,{anchorX:g,anchorY:m},{offsetX:h,offsetY:y});l.setDragImage(C,x.x,x.y)}}try{l?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(s.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(d)this.beginDragNativeItem(d);else{if(l&&!l.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=s=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}if(!this.enterLeaveCounter.enter(s.target)||this.monitor.isDragging())return;const{dataTransfer:l}=s,d=Ot(l);d&&this.beginDragNativeItem(d,l)},this.handleTopDragEnter=s=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=s.altKey,i.length>0&&this.actions.hover(i,{clientOffset:rt(s)}),i.some(l=>this.monitor.canDropOnTarget(l))&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=s=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}},this.handleTopDragOver=s=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}this.altKeyPressed=s.altKey,this.lastClientOffset=rt(s),this.scheduleHover(i),(i||[]).some(l=>this.monitor.canDropOnTarget(l))?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=s=>{this.isDraggingNativeItem()&&s.preventDefault(),this.enterLeaveCounter.leave(s.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=s=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;s.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}else Ot(s.dataTransfer)&&s.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=s=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:rt(s)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=s=>{const i=s.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(s.preventDefault(),i.dragDrop()))},this.options=new L1(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new b1(this.isNodeInDocument)}}const k1=function(t,r,n){return new j1(t,r,n)},O1=({onChange:e,emptyTextFirstLine:t,emptyTextSecondLine:r,emptyButtonLabel:n,acceptTypes:s,maxFilesCount:i,multiple:a,fileFormatError:l,fileCountError:d,getIsFileFormatError:u})=>{const f=c.useRef(null),p=c.useRef(null),[C,g]=c.useState([]),[m,h]=c.useState(!1),y=c.useCallback(P=>{const G=P.target.files;if(G&&G.length>0){const B=Array.from(G);u?.(B)?h(!0):e(B)}},[u,e]),b=c.useCallback(P=>i&&P?.length>i,[i]),v=c.useMemo(()=>m||b(C),[m,C,b]),x=()=>{g([]),h(!1)};c.useEffect(()=>{x()},[s]);const[{isOver:j,canDrop:N},T]=on(()=>({accept:[tr],drop(P){const G=P.files;!u?.(G)&&!b(G)&&e(G),x()},collect:P=>({isOver:P.isOver(),canDrop:P.canDrop()})}),[y]),R=P=>{(P.key==="Enter"||P.key==="Space")&&(P.preventDefault(),p.current?.click())},I=P=>{P?.preventDefault();const G=Array.from(P.dataTransfer?.items??[]);h(!!u?.(G)),g(G)},z=P=>{P.target===P.currentTarget&&x()},Q=D("border border-dashed rounded w-full cursor-pointer relative h-full hover:border-hover",!N&&!v&&"border-primary",N&&(j?"border-accent-primary":"border-hover"),v&&"border-error");return T(f),o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:Q,ref:f,onDragOver:I,onDragLeave:z,children:[o.jsxs("label",{htmlFor:"file",tabIndex:0,onKeyDown:R,className:"flex flex-col items-center cursor-pointer h-full w-full text-secondary dial-tiny justify-center",children:[t&&o.jsx("p",{className:"mb-1",children:t}),r&&o.jsx("p",{className:"mb-0.5",children:r}),n&&o.jsx(re,{variant:se.Tertiary,title:n,onClick:()=>p.current?.click()})]}),o.jsx("input",{multiple:a,id:"file",type:"file",ref:p,hidden:!0,accept:s,onChange:y})]}),o.jsx(o.Fragment,{children:m?o.jsx(Se,{errorText:l}):b(C)&&o.jsx(Se,{errorText:d})})]})},N1=({iconBefore:e,cssClass:t,errorText:r,...n})=>{const s=n.invalid,i=()=>o.jsx("div",{className:"mr-2",children:s?o.jsx(k.IconExclamationCircle,{...le,className:"text-error"}):e});return o.jsx(Ae,{...n,iconBefore:i(),tooltipTriggerClassName:"flex-1 min-w-0",cssClass:D(s?"text-error":"",t),tooltipText:s&&r?r:void 0,hideBorder:!0})},R1=e=>{const{files:t,iconBeforeInput:r,dynamicIcon:n,onChange:s,isInvalid:i,errorText:a,removeButtonAriaLabel:l}=e,d=(p,C)=>{p.stopPropagation(),s(t?.filter(g=>g.name!==C)||[])},u=p=>o.jsx(pn,{ariaLabel:l,onClick:C=>d(C,p)}),f=p=>{s(p)};return!t||t.length===0?o.jsx(Ii,{backend:k1,children:o.jsx(O1,{...e,onChange:f})}):o.jsx("div",{className:"flex-1 min-h-0 border border-solid border-primary rounded",children:t&&t.length>0&&o.jsx("div",{className:"max-h-full overflow-y-auto",children:t.map((p,C)=>o.jsx(N1,{elementId:p.name,value:p.name,iconAfter:u(p.name),iconBefore:r||n?.(p.name),invalid:i?.(p),errorText:a},p.name+C))})})},P1=({onChange:e,fieldTitle:t,elementId:r,files:n,maxFilesCount:s,fileFormatError:i,fileCountError:a,multiple:l=!0,acceptTypes:d,deleteAllButtonLabel:u,addButtonLabel:f,...p})=>{const C=c.useRef(null),g=()=>C.current?.click(),m=()=>{e([])},h=c.useCallback(b=>b?.some(v=>v.type===""||!(d==="/"||d?.toLowerCase()?.includes(v?.type?.toLowerCase()))),[d]),y=c.useCallback(b=>{const v=b.target.files;if(v&&v.length>0){const x=Array.from(v);h(x)||e([...n||[],...x])}},[e,n,h]);return o.jsxs("div",{className:"h-full flex flex-col",children:[o.jsxs("div",{className:"flex justify-between items-center pb-1 min-h-[42px]",children:[o.jsx(Pe,{fieldTitle:`${t}: ${l?n?.length||0:""}`,htmlFor:r}),l&&!!n?.length&&o.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[o.jsx(re,{variant:se.Tertiary,cssClass:"!text-error",iconBefore:o.jsx(k.IconTrashX,{...le}),title:u,onClick:m}),(s?s>n?.length:!0)&&o.jsx(re,{variant:se.Tertiary,iconBefore:o.jsx(k.IconPlus,{...le}),title:f,onClick:g})]})]}),n&&n.length>0&&o.jsx("input",{id:"file",type:"file",multiple:l,ref:C,hidden:!0,accept:d,onChange:y}),o.jsx(R1,{files:n,onChange:e,acceptTypes:d,maxFilesCount:s,multiple:l,fileFormatError:i,fileCountError:a,getIsFileFormatError:h,...p})]})},M1=o.jsx(k.IconChevronDown,{size:16}),F1=o.jsx(k.IconChevronUp,{size:16}),H1=e=>{const[t,r]=c.useState(!1),n=c.useMemo(()=>t?F1:M1,[t]);return o.jsx("div",{children:o.jsx(Ve,{menu:{items:e.items},onOpenChange:s=>r(s),children:o.jsx(re,{...e,iconAfter:n})})})};var lt=(e=>(e.MyFiles="my_files",e.Shared="shared",e.Organization="organization",e))(lt||{}),Ln=(e=>(e.Duplicate="duplicate",e.Copy="copy",e.Move="move",e.Rename="rename",e.Download="download",e.Delete="delete",e))(Ln||{}),En=(e=>(e.Normal="normal",e.Reverse="reverse",e))(En||{}),jn=(e=>(e.File="file",e.Folder="folder",e))(jn||{});const V1=e=>{const[t,r]=c.useState(lt.MyFiles),n=i=>{r(i)},s=c.useMemo(()=>{if(e)return Object.values(lt).map(i=>({id:i,name:e?.[i]||i.replace("_"," ")}))},[e]);return{activeTab:t,handleTabChange:n,tabs:s}};function A1({value:e,isEditing:t,restoreOnCancel:r=!0,onValidate:n,onSave:s,onCancel:i}){const[a,l]=c.useState(e),[d,u]=c.useState(!1),[f,p]=c.useState(""),C=c.useRef(null),g=c.useCallback((v=!1,x="")=>{u(v),p(x)},[]),m=c.useCallback(v=>{if(!n)return g(),!0;const x=n(v);return x?(g(!0,x),!1):(g(),!0)},[n,g]),h=c.useCallback(v=>{const x=v??"";l(x),m(x)},[m]),y=c.useCallback(()=>{m(a)?s?.(a):C.current?.focus()},[m,s,a]),b=c.useCallback(()=>{r&&l(e),g(),i?.()},[e,i,r,g]);return c.useEffect(()=>{t&&(l(e),g(),requestAnimationFrame(()=>{C.current?.focus(),C.current?.select()}))},[t,e,g]),c.useEffect(()=>{const v=C.current;if(!t||!v)return;const x=j=>{j.key==="Enter"?(j.preventDefault(),y()):j.key==="Escape"&&(j.preventDefault(),b())};return v.addEventListener("keydown",x),()=>v.removeEventListener("keydown",x)},[t,y,b]),c.useEffect(()=>{if(!t)return;const v=C.current;if(!v)return;const x=j=>{const N=j.relatedTarget;N&&v.contains(N)||(m(a)?y():v.focus())};return v.addEventListener("blur",x),()=>{v.removeEventListener("blur",x)}},[t,a,m,y]),{inputRef:C,value:a,onChange:h,invalid:d,invalidMessage:f}}var Re=(e=>(e.ITEM="item",e.FOLDER="folder",e))(Re||{}),kn=(e=>(e.FILE="FILE",e.PROMPT="PROMPT",e.CONVERSATION="CONVERSATION",e.APPLICATION="APPLICATION",e.TOOLSET="TOOL_SET",e))(kn||{}),On=(e=>(e.READ="READ",e.WRITE="WRITE",e.SHARE="SHARE",e))(On||{});const $t=(e,t)=>{if(!(!e||!e.length||!t))for(const r of e){if(r.path===t)return r;const n=$t(r.items,t);if(n)return n}},jr=(e,t)=>{if(!e?.length)return;if(!t)return e[0];const r=$t(e,t);if(r&&r.nodeType===Re.FOLDER)return r;const n=t.split("/").filter(Boolean);if(n.length<=1)return e[0];const s="/"+n.slice(0,n.length-1).join("/");return $t(e,s)??e[0]},st=e=>(e??"").toLowerCase(),_1=e=>st(e).replace(/^\./,""),z1=e=>{if(!e)return[];const t=[],r=n=>{const s=n.items??[];for(const i of s)t.push(i),i.nodeType===Re.FOLDER&&r(i)};return r(e),t},B1=e=>(e.name??e.path.split("/").pop()??"").startsWith("."),$1=e=>{const[t,r]=c.useState(e?.showHiddenFiles??!1),n=!!e?.onShowHiddenFilesChange,s=n?e.showHiddenFiles??!1:t,i=c.useCallback(l=>{n?e?.onShowHiddenFilesChange?.(l):r(l)},[n,e]),a=c.useCallback(()=>{const l=!s;n?e?.onShowHiddenFilesChange?.(l):r(l)},[s,n,e]);return{areHiddenFilesVisible:s,toggleHiddenFilesVisibility:a,setAreHiddenFilesVisible:i}},G1=e=>{const[t,r]=c.useState(e?.collapsed??!1),n=!!e?.onCollapseChange,s=n?e.collapsed??!1:t,i=c.useCallback(l=>{n?e?.onCollapseChange?.(l):r(l)},[n,e]),a=c.useCallback(()=>{const l=!s;n?e?.onCollapseChange?.(l):r(l)},[s,n,e]);return{isTreeCollapsed:s,toggleTreeCollapse:a,setIsTreeCollapsed:i}},U1=(e,t)=>{if(!t.has(e))return e;const r=e.lastIndexOf("."),n=r>0,s=n?e.substring(0,r):e,i=n?e.substring(r):"";let a=1,l;do l=`${s} (${a})${i}`,a++;while(t.has(l));return l},W1=e=>e.name,Nt=(e,t,r,n=!1)=>{const s=new Set(r.map(W1));return t.map(i=>{const a=i.name,l=n?a:U1(a,s);return n||s.add(l),{sourceUrl:i.path,destinationUrl:`${e}/${l}`,overwrite:n,nodeType:i.nodeType??Re.ITEM}})},q1=({getDestinationFiles:e,onCopyFiles:t,onMoveToFiles:r})=>{const[n,s]=c.useState(!1),[i,a]=c.useState([]),[l,d]=c.useState([]),[u,f]=c.useState("copy"),p=c.useCallback(x=>{const j=e(x),N=Nt(x,i,j,!1);t?.(N,x)},[e,t,i]),C=c.useCallback((x,j)=>{const N=e(x),T=Nt(x,l,N,!0);r?.(T,j,x)},[e,r,l]),g=c.useCallback(x=>{const j=x.at(0)?.parentPath??"/",N=e(j),T=Nt(j,x,N,!1);t?.(T,j)},[t,e]),m=c.useCallback(x=>{f(x),s(!0)},[]),h=c.useCallback(()=>{a([]),d([])},[]),y=c.useCallback(()=>{s(!1),h()},[h]),b=c.useCallback(x=>{a(x)},[]),v=c.useCallback(x=>{d(x)},[]);return{handleDuplicate:g,handleCloseDestinationFolderPopup:y,handleOpenDestinationFolderPopup:m,handleCopyTo:p,handleMoveTo:C,openDestinationFolderPopup:n,destinationFolderMode:u,handleSetCopiedFiles:b,handleSetMovedFiles:v,clearState:h}},Z1=({path:e,onPathChange:t,onSelectionClear:r})=>{const[n,s]=c.useState(e);c.useEffect(()=>{s(e),r?.()},[e,r]);const i=c.useCallback(a=>{s(a),t?.(a),r?.()},[t,r]);return{currentPath:n,setCurrentPath:s,handlePathChange:i}},X1=({onDeleteFiles:e})=>{const[t,r]=c.useState(!1),[n,s]=c.useState([]),[i,a]=c.useState(""),l=c.useCallback((f,p)=>{s(f),a(p),r(!0)},[]),d=c.useCallback(()=>{r(!1),s([])},[]),u=c.useCallback(()=>{if(e&&n.length>0){const f=n.map(p=>({sourceUrl:p.path,nodeType:p.nodeType}));e(f,i)}d()},[n,e,d,i]);return{deleteConfirmationOpen:t,itemsToDelete:n,openDeleteConfirmation:l,closeDeleteConfirmation:d,confirmDelete:u}},Y1=({onDownloadFiles:e})=>({handleDownloadFiles:c.useCallback(r=>{e&&r.length>0&&e(r)},[e])}),Nn=c.createContext(void 0),K1=({onRename:e,onRenameSave:t,onRenameCancel:r,onRenameValidate:n})=>{const[s,i]=c.useState(),a=c.useCallback(f=>{e?.(f),i(f)},[e]),l=c.useCallback(()=>{i(void 0),r?.()},[r]),d=c.useCallback(f=>{i(void 0),t?.(f)},[t]),u=c.useCallback((f,p)=>n?.(f,p)??null,[n]);return{renamedPath:s,renameHandler:a,renameSaveHandler:d,renameCancelHandler:l,renameValidateHandler:u}},J1=e=>{if(!e||e<=0)return"-";const t=1024,r=t*1024;return e>=r?`${(e/r).toFixed(1)} MB`:e>=t?`${(e/t).toFixed(0)} KB`:`${e} bytes`},Q1=({children:e,cssClass:t,items:r=[],rootItem:n,path:s,showHiddenFiles:i,onShowHiddenFilesChange:a,treeOptions:l,navigationPanelOptions:d,deleteConfirmationOptions:u,gridOptions:f,toolbarOptions:p,bulkActionsToolbarOptions:C,destinationFolderPopupOptions:g,onPathChange:m,onTableFileClick:h,onCopyFiles:y,onMoveToFiles:b,onDeleteFiles:v,onDownloadFiles:x,onRename:j,onRenameSave:N,onRenameCancel:T,onRenameValidate:R})=>{const[I,z]=c.useState(new Set),Q=c.useCallback(()=>z(new Set),[]),{currentPath:P,setCurrentPath:G,handlePathChange:B}=Z1({path:s,onPathChange:m,onSelectionClear:Q}),[ee,oe]=c.useState(),ie=g?.destinationFolderPath??ee,X=c.useCallback(K=>{g?.setDestinationFolderPath?g.setDestinationFolderPath(K):oe(K)},[g]),{areHiddenFilesVisible:S,toggleHiddenFilesVisibility:he}=$1({showHiddenFiles:i,onShowHiddenFilesChange:a}),{isTreeCollapsed:ne,toggleTreeCollapse:xe,setIsTreeCollapsed:me}=G1({collapsed:l?.collapsed,onCollapseChange:l?.onCollapseChange}),{renamedPath:$,renameHandler:J,renameSaveHandler:ue,renameCancelHandler:O,renameValidateHandler:H}=K1({onRename:j,onRenameSave:N,onRenameCancel:T,onRenameValidate:R}),[ce,Y]=c.useState("");c.useEffect(()=>{const K=d?.value;K!=null&&Y(String(K))},[d?.value]);const Z=String(d?.value??ce??"").trim(),ge=c.useMemo(()=>jr(r,P)??r[0],[r,P]),{handleCopyTo:ye,handleMoveTo:bt,handleDuplicate:w,handleOpenDestinationFolderPopup:W,handleCloseDestinationFolderPopup:Te,openDestinationFolderPopup:Le,handleSetCopiedFiles:Rn,handleSetMovedFiles:Pn,destinationFolderMode:Mn}=q1({getDestinationFiles:K=>jr(r,K)?.items??[],onCopyFiles:y,onMoveToFiles:b});c.useEffect(()=>{Le&&!ie&&X(P??n?.path??"/")},[Le,ie,P,n?.path,X]),c.useEffect(()=>{Le||X(void 0)},[Le,X]);const{deleteConfirmationOpen:Fn,itemsToDelete:Hn,openDeleteConfirmation:Vn,closeDeleteConfirmation:An,confirmDelete:_n}=X1({onDeleteFiles:v}),{handleDownloadFiles:zn}=Y1({onDownloadFiles:x}),Bn=c.useMemo(()=>{const K=st(Z).trim(),$e=ge?.items??[];let vt=K?z1(ge):$e;S||(vt=vt.filter(ae=>!B1(ae)));const rr=vt.map(ae=>({id:ae.id??ae.path,name:ae.name??ae.path.split("/").pop()??"",updatedAt:ae.updatedAt,size:ae.nodeType===Re.ITEM?J1(ae.contentLength):"-",author:ae.author,path:ae.path,nodeType:ae.nodeType,extension:ae.extension}));if(!K)return rr;const Zn=K.split(/\s+/).filter(Boolean);return rr.filter(ae=>{const Xn=st(ae.name),Yn=st(ae.author),Kn=_1(ae.extension);return Zn.every(yt=>Xn.includes(yt)||Yn.includes(yt)||Kn.includes(yt))})},[ge,Z,S]),$n=c.useCallback(K=>{B(K.path)},[B]),Gn=c.useCallback(K=>{B(K)},[B]),Un=c.useCallback(K=>{const $e=String(K??"");Y($e),d?.onSearchChange?.($e)},[d]),Wn=c.useCallback(K=>{K.nodeType===Re.FOLDER?B(K.path):h?.(K)},[B,h]),qn={cssClass:t,items:r,rootItem:n,treeOptions:l,navigationPanelOptions:d,gridOptions:f,toolbarOptions:p,bulkActionsToolbarOptions:C,deleteConfirmationOptions:u,destinationFolderPopupOptions:{destinationFolderPath:ie,setDestinationFolderPath:X},currentPath:P,setCurrentPath:G,searchValue:ce,effectiveSearchValue:Z,setSearchValue:Y,areHiddenFilesVisible:S,toggleHiddenFilesVisibility:he,isTreeCollapsed:ne,toggleTreeCollapse:xe,setIsTreeCollapsed:me,selectedIds:I,setSelectedIds:z,clearSelection:Q,currentFolder:ge,gridRows:Bn,handleCopyTo:ye,handleMoveTo:bt,handleDuplicate:w,handleSetCopiedFiles:Rn,handleSetMovedFiles:Pn,openDestinationFolderPopup:Le,handleCloseDestinationFolderPopup:Te,handleOpenDestinationFolderPopup:W,destinationFolderMode:Mn,handleDownloadFiles:zn,renamedPath:$,onRename:J,onRenameSave:ue,onRenameCancel:O,onRenameValidate:H,openDeleteConfirmation:Vn,closeDeleteConfirmation:An,confirmDelete:_n,deleteConfirmationOpen:Fn,itemsToDelete:Hn,handlePathChange:B,handleTreeItemClick:$n,handleBreadcrumbItemClick:Gn,handleSearchChange:Un,handleTableRowClick:Wn,onTableFileClick:h};return o.jsx(Nn.Provider,{value:qn,children:e})},el=()=>{const e=c.useContext(Nn);if(!e)throw new Error("useFileManagerContext must be used within <FileManagerProvider>");return e};exports.AlertVariant=ke;exports.ButtonVariant=se;exports.ConfirmationPopupVariant=Ke;exports.DialAlert=zs;exports.DialAutocompleteInput=c1;exports.DialAutocompleteInputValue=er;exports.DialBreadcrumb=Fa;exports.DialBreadcrumbItem=qe;exports.DialButton=re;exports.DialButtonDropdown=H1;exports.DialCheckbox=Ft;exports.DialCloseButton=Qt;exports.DialCollapsibleSidebar=to;exports.DialConfirmationPopup=Qa;exports.DialDateCellRenderer=va;exports.DialDraggableItem=aa;exports.DialDropdown=Ve;exports.DialEllipsisTooltip=Ce;exports.DialErrorText=Se;exports.DialFieldLabel=Pe;exports.DialFileIcon=an;exports.DialFileManagerActions=Ln;exports.DialFileManagerTabs=lt;exports.DialFileName=ga;exports.DialFileNodeType=Re;exports.DialFilePermission=On;exports.DialFileResourceType=kn;exports.DialFolderName=ma;exports.DialFormItem=dt;exports.DialFormPopup=s1;exports.DialIcon=q;exports.DialInput=Ae;exports.DialInputPopup=mn;exports.DialItemType=jn;exports.DialLabelledText=ro;exports.DialLoadFileAreaField=P1;exports.DialLoader=ct;exports.DialNoDataContent=qr;exports.DialNumberInputField=za;exports.DialPasswordInput=Cn;exports.DialPasswordInputField=a1;exports.DialPopup=xt;exports.DialRadioButton=Ur;exports.DialRadioGroup=Wr;exports.DialRadioGroupPopupField=e1;exports.DialRemoveButton=pn;exports.DialSearch=xn;exports.DialSelect=vn;exports.DialSelectField=m1;exports.DialSharedEntityIndicator=Kt;exports.DialSteps=Xs;exports.DialSwitch=Ga;exports.DialTabs=Ea;exports.DialTag=ft;exports.DialTagInput=d1;exports.DialTextAreaField=$a;exports.DialTextInputField=Ba;exports.DialTextarea=hn;exports.DialTooltip=Ie;exports.DropdownItemType=Jt;exports.DropdownTrigger=De;exports.DropdownType=cn;exports.FileManagerProvider=Q1;exports.FlexibleActionsDirection=En;exports.FormItemOrientation=Xe;exports.PopupSize=ve;exports.RadioGroupOrientation=Ye;exports.SearchSize=Je;exports.SelectSize=it;exports.SelectVariant=at;exports.StepStatus=de;exports.TabOrientation=ot;exports.TagVariant=ut;exports.mergeClasses=_;exports.useDialFileManagerTabs=V1;exports.useEditableItem=A1;exports.useFileManagerContext=el;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),Z=require("classnames"),be=require("@floating-ui/react"),g=require("react"),V=require("@tabler/icons-react"),pn=require("react-dom");function LC(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const ge=LC(g),Ts=({errorText:e})=>e&&m.jsx("span",{className:"text-error dial-tiny mt-1",children:e}),Le=({icon:e,className:t})=>e?m.jsx("span",{className:Z("flex-shrink-0",t),children:e}):null,OC=7,NC=2,ng=g.createContext(null),rg=()=>{const e=g.useContext(ng);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},HC=({initialOpen:e=!1,placement:t="bottom",isTriggerClickable:s=!1,open:o,onOpenChange:i}={})=>{const[n,r]=g.useState(e),a=g.useRef(null),l=o??n,c=i??r,d=be.useFloating({placement:t,open:l,onOpenChange:c,whileElementsMounted:be.autoUpdate,middleware:[be.offset(OC+NC),be.flip({crossAxis:t.includes("-"),fallbackAxisSideDirection:"start",padding:5}),be.shift({padding:5}),be.arrow({element:a})]}),u=be.useHover(d.context,{move:!1,enabled:o==null,mouseOnly:s,delay:{open:500,close:0}}),h=be.useFocus(d.context,{enabled:o==null}),p=be.useDismiss(d.context),f=be.useRole(d.context,{role:"tooltip"}),C=be.useInteractions([u,h,p,f]);return g.useEffect(()=>{if(!l)return;const v=d.refs.reference.current;if(!(v instanceof Element))return;const w=new IntersectionObserver(([b])=>{b.isIntersecting||c(!1)},{root:null,threshold:0});return w.observe(v),()=>w.disconnect()},[l,d.refs.reference,c]),g.useMemo(()=>({open:l,setOpen:c,arrowRef:a,...C,...d}),[l,c,C,d])},ag=({children:e,...t})=>{const s=HC(t);return m.jsx(ng.Provider,{value:s,children:e})},lg=({style:e,...t})=>{const s=rg(),o=g.useRef(null),i=be.useMergeRefs([s.refs.setFloating,o]);return s.open?m.jsx(be.FloatingPortal,{id:"tooltip-portal",children:m.jsxs("div",{ref:i,style:{...s.floatingStyles,...e},...s.getFloatingProps(t),className:Z("z-[55] whitespace-pre-wrap break-words rounded border border-primary bg-layer-0 px-2 py-1 dial-tiny shadow max-w-[300px]",s.getFloatingProps(t).className),children:[t.children,m.jsx(be.FloatingArrow,{ref:s.arrowRef,context:s.context,fill:"currentColor",strokeWidth:1,className:"border-primary w-2 text-[var(--bg-layer-0,_#000000)]"})]})}):null},cg=({children:e,asChild:t=!1,...s})=>{const o=rg(),i=t&&g.isValidElement(e),n=i?e.props?.ref:null,r=be.useMergeRefs([o.refs.setReference,...n?[n]:[]]);return i?g.cloneElement(e,o.getReferenceProps({...e.props,...s,ref:r})):m.jsx("span",{ref:r,...o.getReferenceProps(s),className:s.className??"dial-tooltip-trigger text-left",children:e})},ms=({hideTooltip:e,tooltip:t,children:s,triggerClassName:o,contentClassName:i,...n})=>m.jsxs(ag,{...n,children:[m.jsx(cg,{className:Z(o,"truncate"),children:s}),m.jsx(lg,{className:Z("text-primary",i,"max-w-[300px]",(e||!t)&&"hidden"),children:t})]}),Bc="-",GC=e=>{const t=VC(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:r=>{const a=r.split(Bc);return a[0]===""&&a.length!==1&&a.shift(),dg(a,t)||BC(r)},getConflictingClassGroupIds:(r,a)=>{const l=s[r]||[];return a&&o[r]?[...l,...o[r]]:l}}},dg=(e,t)=>{if(e.length===0)return t.classGroupId;const s=e[0],o=t.nextPart.get(s),i=o?dg(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;const n=e.join(Bc);return t.validators.find(({validator:r})=>r(n))?.classGroupId},Yd=/^\[(.+)\]$/,BC=e=>{if(Yd.test(e)){const t=Yd.exec(e)[1],s=t?.substring(0,t.indexOf(":"));if(s)return"arbitrary.."+s}},VC=e=>{const{theme:t,classGroups:s}=e,o={nextPart:new Map,validators:[]};for(const i in s)Yl(s[i],o,i,t);return o},Yl=(e,t,s,o)=>{e.forEach(i=>{if(typeof i=="string"){const n=i===""?t:Zd(t,i);n.classGroupId=s;return}if(typeof i=="function"){if(zC(i)){Yl(i(o),t,s,o);return}t.validators.push({validator:i,classGroupId:s});return}Object.entries(i).forEach(([n,r])=>{Yl(r,Zd(t,n),s,o)})})},Zd=(e,t)=>{let s=e;return t.split(Bc).forEach(o=>{s.nextPart.has(o)||s.nextPart.set(o,{nextPart:new Map,validators:[]}),s=s.nextPart.get(o)}),s},zC=e=>e.isThemeGetter,WC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=new Map,o=new Map;const i=(n,r)=>{s.set(n,r),t++,t>e&&(t=0,o=s,s=new Map)};return{get(n){let r=s.get(n);if(r!==void 0)return r;if((r=o.get(n))!==void 0)return i(n,r),r},set(n,r){s.has(n)?s.set(n,r):i(n,r)}}},Zl="!",Xl=":",_C=Xl.length,jC=e=>{const{prefix:t,experimentalParseClassName:s}=e;let o=i=>{const n=[];let r=0,a=0,l=0,c;for(let f=0;f<i.length;f++){let C=i[f];if(r===0&&a===0){if(C===Xl){n.push(i.slice(l,f)),l=f+_C;continue}if(C==="/"){c=f;continue}}C==="["?r++:C==="]"?r--:C==="("?a++:C===")"&&a--}const d=n.length===0?i:i.substring(l),u=UC(d),h=u!==d,p=c&&c>l?c-l:void 0;return{modifiers:n,hasImportantModifier:h,baseClassName:u,maybePostfixModifierPosition:p}};if(t){const i=t+Xl,n=o;o=r=>r.startsWith(i)?n(r.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:r,maybePostfixModifierPosition:void 0}}if(s){const i=o;o=n=>s({className:n,parseClassName:i})}return o},UC=e=>e.endsWith(Zl)?e.substring(0,e.length-1):e.startsWith(Zl)?e.substring(1):e,$C=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const i=[];let n=[];return o.forEach(r=>{r[0]==="["||t[r]?(i.push(...n.sort(),r),n=[]):n.push(r)}),i.push(...n.sort()),i}},KC=e=>({cache:WC(e.cacheSize),parseClassName:jC(e),sortModifiers:$C(e),...GC(e)}),qC=/\s+/,YC=(e,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:n}=t,r=[],a=e.trim().split(qC);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:u,modifiers:h,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:C}=s(d);if(u){l=d+(l.length>0?" "+l:l);continue}let v=!!C,w=o(v?f.substring(0,C):f);if(!w){if(!v){l=d+(l.length>0?" "+l:l);continue}if(w=o(f),!w){l=d+(l.length>0?" "+l:l);continue}v=!1}const b=n(h).join(":"),S=p?b+Zl:b,y=S+w;if(r.includes(y))continue;r.push(y);const x=i(w,v);for(let R=0;R<x.length;++R){const E=x[R];r.push(S+E)}l=d+(l.length>0?" "+l:l)}return l};function ZC(){let e=0,t,s,o="";for(;e<arguments.length;)(t=arguments[e++])&&(s=ug(t))&&(o&&(o+=" "),o+=s);return o}const ug=e=>{if(typeof e=="string")return e;let t,s="";for(let o=0;o<e.length;o++)e[o]&&(t=ug(e[o]))&&(s&&(s+=" "),s+=t);return s};function XC(e,...t){let s,o,i,n=r;function r(l){const c=t.reduce((d,u)=>u(d),e());return s=KC(c),o=s.cache.get,i=s.cache.set,n=a,a(l)}function a(l){const c=o(l);if(c)return c;const d=YC(l,s);return i(l,d),d}return function(){return n(ZC.apply(null,arguments))}}const Ye=e=>{const t=s=>s[e]||[];return t.isThemeGetter=!0,t},hg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,gg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,QC=/^\d+\/\d+$/,JC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ev=/\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$/,tv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ov=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,To=e=>QC.test(e),ve=e=>!!e&&!Number.isNaN(Number(e)),ys=e=>!!e&&Number.isInteger(Number(e)),Ja=e=>e.endsWith("%")&&ve(e.slice(0,-1)),is=e=>JC.test(e),iv=()=>!0,nv=e=>ev.test(e)&&!tv.test(e),pg=()=>!1,rv=e=>sv.test(e),av=e=>ov.test(e),lv=e=>!se(e)&&!oe(e),cv=e=>li(e,Cg,pg),se=e=>hg.test(e),$s=e=>li(e,vg,nv),el=e=>li(e,pv,ve),Xd=e=>li(e,fg,pg),dv=e=>li(e,mg,av),Bn=e=>li(e,wg,rv),oe=e=>gg.test(e),Fi=e=>ci(e,vg),uv=e=>ci(e,fv),Qd=e=>ci(e,fg),hv=e=>ci(e,Cg),gv=e=>ci(e,mg),Vn=e=>ci(e,wg,!0),li=(e,t,s)=>{const o=hg.exec(e);return o?o[1]?t(o[1]):s(o[2]):!1},ci=(e,t,s=!1)=>{const o=gg.exec(e);return o?o[1]?t(o[1]):s:!1},fg=e=>e==="position"||e==="percentage",mg=e=>e==="image"||e==="url",Cg=e=>e==="length"||e==="size"||e==="bg-size",vg=e=>e==="length",pv=e=>e==="number",fv=e=>e==="family-name",wg=e=>e==="shadow",mv=()=>{const e=Ye("color"),t=Ye("font"),s=Ye("text"),o=Ye("font-weight"),i=Ye("tracking"),n=Ye("leading"),r=Ye("breakpoint"),a=Ye("container"),l=Ye("spacing"),c=Ye("radius"),d=Ye("shadow"),u=Ye("inset-shadow"),h=Ye("text-shadow"),p=Ye("drop-shadow"),f=Ye("blur"),C=Ye("perspective"),v=Ye("aspect"),w=Ye("ease"),b=Ye("animate"),S=()=>["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"],x=()=>[...y(),oe,se],R=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],D=()=>[oe,se,l],T=()=>[To,"full","auto",...D()],k=()=>[ys,"none","subgrid",oe,se],F=()=>["auto",{span:["full",ys,oe,se]},ys,oe,se],M=()=>[ys,"auto",oe,se],L=()=>["auto","min","max","fr",oe,se],B=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...D()],ee=()=>[To,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],O=()=>[e,oe,se],le=()=>[...y(),Qd,Xd,{position:[oe,se]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",hv,cv,{size:[oe,se]}],Y=()=>[Ja,Fi,$s],_=()=>["","none","full",c,oe,se],U=()=>["",ve,Fi,$s],te=()=>["solid","dashed","dotted","double"],N=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>[ve,Ja,Qd,Xd],j=()=>["","none",f,oe,se],ie=()=>["none",ve,oe,se],J=()=>["none",ve,oe,se],pe=()=>[ve,oe,se],Se=()=>[To,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[is],breakpoint:[is],color:[iv],container:[is],"drop-shadow":[is],ease:["in","out","in-out"],font:[lv],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[is],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[is],shadow:[is],spacing:["px",ve],text:[is],"text-shadow":[is],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",To,se,oe,v]}],container:["container"],columns:[{columns:[ve,se,oe,a]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:x()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[ys,"auto",oe,se]}],basis:[{basis:[To,"full","auto",a,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ve,To,"auto","initial","none",se]}],grow:[{grow:["",ve,oe,se]}],shrink:[{shrink:["",ve,oe,se]}],order:[{order:[ys,"first","last","none",oe,se]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...B(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...B()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":B()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],w:[{w:[a,"screen",...ee()]}],"min-w":[{"min-w":[a,"screen","none",...ee()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",s,Fi,$s]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,oe,el]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ja,se]}],"font-family":[{font:[uv,se,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,oe,se]}],"line-clamp":[{"line-clamp":[ve,"none",oe,el]}],leading:[{leading:[n,...D()]}],"list-image":[{"list-image":["none",oe,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[ve,"from-font","auto",oe,$s]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ve,"auto",oe,se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,se]}],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",oe,se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ys,oe,se],radial:["",oe,se],conic:[ys,oe,se]},gv,dv]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:_()}],"rounded-s":[{"rounded-s":_()}],"rounded-e":[{"rounded-e":_()}],"rounded-t":[{"rounded-t":_()}],"rounded-r":[{"rounded-r":_()}],"rounded-b":[{"rounded-b":_()}],"rounded-l":[{"rounded-l":_()}],"rounded-ss":[{"rounded-ss":_()}],"rounded-se":[{"rounded-se":_()}],"rounded-ee":[{"rounded-ee":_()}],"rounded-es":[{"rounded-es":_()}],"rounded-tl":[{"rounded-tl":_()}],"rounded-tr":[{"rounded-tr":_()}],"rounded-br":[{"rounded-br":_()}],"rounded-bl":[{"rounded-bl":_()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ve,oe,se]}],"outline-w":[{outline:["",ve,Fi,$s]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",d,Vn,Bn]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",u,Vn,Bn]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ve,$s]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",h,Vn,Bn]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[ve,oe,se]}],"mix-blend":[{"mix-blend":[...N(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":N()}],"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":[ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":P()}],"mask-image-linear-to-pos":[{"mask-linear-to":P()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":P()}],"mask-image-t-to-pos":[{"mask-t-to":P()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":P()}],"mask-image-r-to-pos":[{"mask-r-to":P()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":P()}],"mask-image-b-to-pos":[{"mask-b-to":P()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":P()}],"mask-image-l-to-pos":[{"mask-l-to":P()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":P()}],"mask-image-x-to-pos":[{"mask-x-to":P()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":P()}],"mask-image-y-to-pos":[{"mask-y-to":P()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[oe,se]}],"mask-image-radial-from-pos":[{"mask-radial-from":P()}],"mask-image-radial-to-pos":[{"mask-radial-to":P()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"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":[ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":P()}],"mask-image-conic-to-pos":[{"mask-conic-to":P()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,se]}],filter:[{filter:["","none",oe,se]}],blur:[{blur:j()}],brightness:[{brightness:[ve,oe,se]}],contrast:[{contrast:[ve,oe,se]}],"drop-shadow":[{"drop-shadow":["","none",p,Vn,Bn]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",ve,oe,se]}],"hue-rotate":[{"hue-rotate":[ve,oe,se]}],invert:[{invert:["",ve,oe,se]}],saturate:[{saturate:[ve,oe,se]}],sepia:[{sepia:["",ve,oe,se]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,se]}],"backdrop-blur":[{"backdrop-blur":j()}],"backdrop-brightness":[{"backdrop-brightness":[ve,oe,se]}],"backdrop-contrast":[{"backdrop-contrast":[ve,oe,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ve,oe,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ve,oe,se]}],"backdrop-invert":[{"backdrop-invert":["",ve,oe,se]}],"backdrop-opacity":[{"backdrop-opacity":[ve,oe,se]}],"backdrop-saturate":[{"backdrop-saturate":[ve,oe,se]}],"backdrop-sepia":[{"backdrop-sepia":["",ve,oe,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ve,"initial",oe,se]}],ease:[{ease:["linear","initial",w,oe,se]}],delay:[{delay:[ve,oe,se]}],animate:[{animate:["none",b,oe,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,oe,se]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:J()}],"scale-x":[{"scale-x":J()}],"scale-y":[{"scale-y":J()}],"scale-z":[{"scale-z":J()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[oe,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"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",oe,se]}],"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":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",oe,se]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[ve,Fi,$s,el]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Cv=XC(mv);function ce(...e){return Cv(Z(e))}const bo=({fieldTitle:e,optional:t,optionalText:s,className:o,description:i,...n})=>e?m.jsxs("label",{...n,className:ce("dial-tiny text-secondary flex gap-1",o,!o?.includes("mb")&&"mb-2"),children:[typeof e=="string"?m.jsx("span",{className:"min-h-4",children:e}):e,t&&m.jsx("span",{children:s??"(Optional)"}),i&&m.jsx(ms,{tooltip:i,children:m.jsx(Le,{icon:m.jsx(V.IconInfoCircle,{size:14,className:"text-secondary"})})})]}):null;var Te=(e=>(e.Primary="primary",e.Secondary="secondary",e.Tertiary="tertiary",e.Danger="danger",e))(Te||{});const vv={[Te.Primary]:"dial-primary-button",[Te.Secondary]:"dial-secondary-button",[Te.Tertiary]:"dial-tertiary-button",[Te.Danger]:"dial-danger-button"},De=({label:e,variant:t,className:s,textClassName:o,iconAfter:i,iconBefore:n,hideTitleOnMobile:r,type:a="button",...l})=>{const c=Z("dial-small-semi",i?"mr-2":"",n?"ml-2":"",r?"hidden sm:inline":"inline",o),d=Z(t&&vv[t],"disabled:cursor-not-allowed focus-visible:outline outline-offset-0",s);return m.jsxs("button",{...l,type:a,className:d,"aria-label":e||l["aria-label"],children:[m.jsx(Le,{icon:n}),e&&m.jsx("span",{className:c,children:e}),m.jsx(Le,{icon:i})]})};var Zs=(e=>(e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e))(Zs||{});const wv=e=>({info:m.jsx(V.IconInfoCircle,{...e}),error:m.jsx(V.IconAlertCircle,{...e}),warning:m.jsx(V.IconAlertTriangle,{...e}),success:m.jsx(V.IconCircleCheck,{...e})}),bv={[Zs.Info]:"bg-info border-info text-info",[Zs.Success]:"bg-success border-success text-success",[Zs.Warning]:"bg-warning border-warning text-warning",[Zs.Error]:"bg-error border-error text-error"},Sv="items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex",yv=({variant:e=Zs.Info,message:t,className:s,iconSize:o=24,iconStroke:i=2,closable:n=!1,onClose:r})=>{const a=g.useMemo(()=>wv({size:o,stroke:i})[e],[e,o,i]);return m.jsxs("div",{role:"alert",className:ce(Sv,bv[e],s),children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Le,{icon:a}),m.jsx("div",{className:"text-primary",children:t})]}),n&&m.jsx(De,{className:"ml-2 text-secondary hover:text-primary","aria-label":"Close alert",iconBefore:m.jsx(V.IconX,{size:16}),onClick:r})]})},xv="flex items-center justify-center text-secondary",Rv="shrink-0 grow-0 basis-auto animate-spin-steps",Fv=e=>ge.createElement("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ge.createElement("path",{d:"M24 39V46.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ge.createElement("path",{opacity:.4,d:"M9 24H1.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ge.createElement("path",{opacity:.5,d:"M8.0918 8.0918L13.3994 13.3994",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ge.createElement("path",{opacity:.6,d:"M24 1.5V9",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ge.createElement("path",{opacity:.7,d:"M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ge.createElement("path",{opacity:.8,d:"M46.5 24H39",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ge.createElement("path",{opacity:.9,d:"M34.6055 34.6055L39.9082 39.9082",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),ge.createElement("path",{opacity:.3,d:"M13.3936 34.6055L8.08594 39.9131",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),fn=({size:e=18,className:t,iconClassName:s,fullWidth:o=!0,ariaLabel:i="Loading"})=>m.jsx("div",{role:"status",className:Z({[xv]:!0,"w-full h-full":o,[t||""]:!!t}),children:m.jsx(Le,{icon:m.jsx(Fv,{width:e,height:e,className:Z(Rv,s),role:"img","aria-label":i})})}),ls=18,ae={size:ls,stroke:2},Ev="text-primary",ut=({text:e,className:t,contentClassName:s,hideTooltip:o,id:i,...n})=>{const r=g.useRef(null),[a,l]=g.useState(!1),[c,d]=g.useState(""),u=g.useRef(null),h=()=>{const v=r.current;if(!v)return;d(v.textContent??"");const w=v.clientWidth,b=v.scrollWidth,S=Math.ceil(v.getBoundingClientRect().width);l(b>w||b>S)},p=g.useCallback(()=>{u.current&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(h)},[]);g.useEffect(()=>{p();const v=()=>p();window.addEventListener("resize",v);let w=null;return"ResizeObserver"in window&&r.current&&(w=new ResizeObserver(()=>p()),w.observe(r.current)),()=>{window.removeEventListener("resize",v),w&&w.disconnect(),u.current&&cancelAnimationFrame(u.current)}},[e,p]);const f=g.useMemo(()=>typeof e=="string"?e:c,[c,e]),C=g.useMemo(()=>o?"":a?f:"",[f,o,a]);return m.jsxs(ag,{...n,children:[m.jsx(cg,{asChild:!0,onMouseEnter:p,onFocusCapture:p,children:m.jsx("span",{id:i,className:ce("block truncate flex-1 min-w-0 max-w-full text-left",t),"aria-label":a?f:void 0,onMouseEnter:p,onFocus:p,ref:r,children:e})}),m.jsx(lg,{className:ce(Ev,s,!C&&"hidden"),children:C})]})},Yi=({label:e,id:t,checked:s,indeterminate:o,disabled:i,ariaLabel:n,onChange:r,className:a,...l})=>{const c=g.useCallback(p=>{r?.(p.target.checked,t)},[r,t]),d=Z("flex flex-row items-center cursor-pointer text-accent-primary small-medium min-w-0",`${s||o?"":'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded'}`,i?"pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4":"",a),u=Z("border rounded",i?"bg-layer-4 border-icon-secondary":""),h=()=>o?m.jsx(V.IconMinus,{className:u,...ae}):s?m.jsx(V.IconCheck,{className:u,...ae}):null;return m.jsxs("label",{...l,className:d,htmlFor:t,"aria-description":l["aria-description"]||"checkbox-container",children:[h(),e&&(typeof e=="string"?m.jsx(ut,{text:e,className:"ml-2 text-primary"}):e),m.jsx("input",{type:"checkbox",role:"checkbox",name:t,onChange:c,id:t,checked:s,"aria-checked":o?"mixed":s,"aria-disabled":i||void 0,"aria-label":e?void 0:n,className:"invisible w-0 h-0"})]})};var xt=(e=>(e.VALID="valid",e.ERROR="error",e))(xt||{});const Dv=(e,t)=>{if(t===e.id)switch(e.status){case xt.VALID:return"border-accent-secondary text-primary";case xt.ERROR:return"border-red-900 text-primary";default:return"border-accent-primary text-primary"}switch(e.status){case xt.VALID:return"border-primary text-primary";case xt.ERROR:return"border-red-900 text-error";default:return"border-primary text-secondary"}},Pv=(e,t)=>{if(t===e.id)switch(e.status){case xt.VALID:return"bg-accent-secondary";case xt.ERROR:return"bg-red-400";default:return"bg-accent-primary"}switch(e.status){case xt.VALID:return"bg-accent-secondary";case xt.ERROR:return"bg-red-400";default:return"bg-layer-4"}},Mv=({step:e,index:t,currentStep:s,onChangeStep:o})=>{const i="h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny cursor-pointer dial-step",n="w-[22px] h-[22px] flex justify-center items-center mr-2 rounded-full text-white",r=()=>s===e.id&&e.status===xt.ERROR?m.jsx(V.IconExclamationCircle,{stroke:2,size:16}):s!==e.id&&e.status===xt.VALID?m.jsx(V.IconCheck,{stroke:2,size:16}):t+1;return m.jsxs("button",{className:Z(i,Dv(e,s)),onClick:()=>o(e.id),children:[m.jsx("span",{className:Z(n,Pv(e,s)),children:r()}),m.jsx("span",{children:e.name})]})},Tv=({steps:e,currentStep:t,onChangeStep:s})=>{const o=i=>{const n=e.findIndex(a=>a.id===t),r=e.findIndex(a=>a.id===i);(i!==t&&e[n].status===xt.VALID||r<n)&&s(i)};return m.jsx("div",{id:"steps",className:"flex gap-x-3",children:e.map((i,n)=>m.jsx(Mv,{currentStep:t,onChangeStep:o,step:i,index:n},i.id))})},bg=({name:e,value:t,title:s,description:o,checked:i=!1,inputId:n,className:r,labelClassName:a,disabled:l,onChange:c,descriptionClassName:d})=>{const u=`${n}-desc`,h=Z("dial-small cursor-pointer",l?"text-secondary":"text-primary",a),p=Z("cursor-pointer dial-input-radio",s&&"mr-2",r),f=Z("flex flex-col",!!o&&"mb-2"),C=Z("dial-tiny mt-2 ml-[26px] text-secondary",d),v=w=>{l||w.target.checked&&c?.(t)};return m.jsxs("div",{className:f,children:[m.jsxs("div",{className:"flex flex-row items-center",children:[m.jsx("input",{type:"radio",id:n,name:e,value:t,checked:i,disabled:l,"aria-describedby":i&&o?u:void 0,className:p,onChange:v}),s?m.jsx("label",{className:h,htmlFor:n,children:s}):null]}),i&&o&&m.jsx("div",{id:u,className:C,children:o})]})};var Zi=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(Zi||{});const Iv="w-full flex",kv={[Zi.Vertical]:"flex-col",[Zi.Horizontal]:"flex-row items-end"},ta=({elementId:e,label:t,optional:s,optionalText:o,description:i,error:n,orientation:r=Zi.Vertical,labelVisuallyHidden:a=!1,className:l,labelClassName:c,errorClassName:d,childrenClassName:u,captionDescription:h,readonly:p,value:f,defaultEmptyText:C,children:v})=>{const w=`${e}-label`,b=i?`${e}-desc`:void 0,S=n?`${e}-err`:void 0,y=`${e}-caption-desc`,x=[b,S].filter(Boolean).join(" ")||void 0,R=g.useCallback(()=>typeof n=="boolean"?null:typeof n=="string"||typeof n>"u"?n?m.jsx("div",{id:S,role:"alert","aria-live":"polite",className:d,children:m.jsx(Ts,{errorText:n})}):null:m.jsx("div",{id:S,role:"alert","aria-live":"polite",className:d,children:n}),[n,d,S]),E=g.useCallback(()=>f?typeof f=="string"||typeof f=="number"?m.jsx("span",{"aria-readonly":"true",children:f}):f:m.jsx("span",{className:"flex min-h-4","aria-readonly":"true",children:C??"None"}),[f,C]);return m.jsxs("div",{role:"group","aria-labelledby":t?w:void 0,"aria-describedby":x,className:ce(Iv,kv[r],l),children:[t&&m.jsx("div",{id:w,className:ce(r==="horizontal"&&"shrink-0"),children:m.jsx(bo,{htmlFor:e,fieldTitle:t,optional:s,optionalText:o,className:ce(a&&"sr-only",c),description:i})}),m.jsxs("div",{className:ce("min-w-0 w-full",u),children:[p?m.jsx("div",{className:"dial-input px-3 py-2",children:E()}):v,h&&m.jsx("div",{id:y,className:ce({"dial-tiny text-secondary mt-1":!0,"text-error":!!n}),children:h}),R()]})]})};var lo=(e=>(e.Row="Row",e.Column="Column",e))(lo||{});const Av="flex",Lv="pb-1 mt-2",Ov={[lo.Column]:"flex-col gap-y-3",[lo.Row]:"flex-row gap-x-6"},yr=({fieldTitle:e,radioClassName:t,containerClassName:s,selectedItemClassName:o,selectedLabelClassName:i,radioGroupClassName:n,inputContainerClassName:r,selectedInputContainerClassName:a,groupLabelClassName:l,formItemChildrenClassName:c,labelClassName:d,disabled:u,elementId:h,radioButtons:p,activeRadioButton:f,orientation:C,onChange:v})=>m.jsx(ta,{elementId:h,label:e,labelClassName:l||d,className:s,childrenClassName:c,children:m.jsx("div",{role:"radiogroup","aria-label":e,"aria-disabled":u||void 0,className:ce(Av,Ov[C],n),children:p.map(w=>m.jsxs("div",{className:ce("flex flex-col",r,w.id===f&&a),children:[m.jsx(bg,{name:h,value:w.id,inputId:w.id,disabled:u,className:t,labelClassName:ce(d,w.id===f&&i),title:w.name,checked:w.id===f,onChange:()=>v(w.id)}),w.id===f&&w.content?m.jsx("div",{className:ce(Lv,o),children:w.content}):null]},w.id))})}),sa=({icon:e,title:t,description:s,containerClassName:o,titleClassName:i,descriptionClassName:n})=>m.jsxs("div",{className:ce("h-full w-full flex flex-col items-center justify-center text-secondary",o),"aria-label":"no-data-container",children:[e||m.jsx(V.IconClipboardX,{width:60,height:60}),m.jsx("span",{className:ce("dial-small mt-2 text-primary",i),"aria-label":"no-results-title",children:t}),s&&m.jsx("span",{className:ce("mt-1 text-primary",n),"aria-label":"no-results-description",children:s})]}),tl=48,Sg=({containerClassName:e,children:t,width:s=280,title:o,iconSize:i=24,iconStroke:n=1.5,titleClassName:r,additionalButtons:a,isOpened:l,onToggle:c})=>{const[d,u]=g.useState(s),[h,p]=g.useState(!0),f=g.useMemo(()=>typeof l=="boolean",[l]),C=f?l:h;g.useEffect(()=>{f&&u(l?s:tl)},[f,l,s]);const v=Z(["transform rotate-180 [writing-mode:tb-rl] py-4 px-3",C&&"hidden",r]),w=Z(["flex flex-row gap-2 cursor-pointer text-secondary p-2 px-4",C?"justify-end":"justify-center"]),b=S=>{const y=!C;if(f){u(y?s:tl),c?.(y,S);return}u(y?s:tl),p(y)};return m.jsxs("div",{className:Z(["rounded flex flex-col justify-between overflow-y-auto flex-shrink-0",e]),style:{width:`${d}px`},"aria-label":"collapsible-sidebar",children:[m.jsx("div",{className:Z(["flex-1 p-4 min-h-0 overflow-auto",!C&&"hidden"]),children:t}),m.jsx("div",{className:v,children:o}),m.jsxs("div",{className:ce("border-t border-primary h-12",w),children:[C&&a,m.jsx(De,{className:"hover:text-accent-primary p-1",onClick:b,"aria-label":"sidebar-state",iconBefore:C?m.jsx(V.IconChevronsLeft,{size:i,stroke:n}):m.jsx(V.IconChevronsRight,{size:i,stroke:n})})]})]})},Nv=({label:e,text:t,children:s,postfix:o})=>m.jsxs("div",{className:Z("flex flex-col",s?"":"max-w-[200px]"),children:[m.jsx("label",{className:"dial-tiny mb-2 text-secondary",children:e}),s||m.jsxs("div",{className:"flex flex-row items-center",children:[m.jsx(ms,{triggerClassName:"text-primary",tooltip:t,children:t}),o||null]})]});var oa=(e=>(e.Default="default",e))(oa||{});const Hv={[oa.Default]:"border-icon-secondary bg-layer-3"},ia=({tag:e,className:t,remove:s,variant:o=oa.Default,iconBefore:i,bordered:n=!0})=>{const r=Hv[o],a=ce("flex items-center gap-1 dial-tiny rounded p-1 h-[22px] text-primary",r,n?"border":"border-transparent",t);return m.jsxs("div",{className:a,children:[m.jsx(Le,{icon:i}),m.jsx(ut,{text:e}),s&&m.jsx(De,{iconAfter:m.jsx(V.IconX,{size:16}),onClick:l=>s(l)})]},e)},yg=g.createContext({dragDropManager:void 0});function Pt(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 Jd=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),eu=function(){return Math.random().toString(36).substring(7).split("").join(".")},tu={INIT:"@@redux/INIT"+eu(),REPLACE:"@@redux/REPLACE"+eu()};function Gv(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 Bv(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(Wv(e))return"date";if(zv(e))return"error";var s=Vv(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 Vv(e){return typeof e.constructor=="function"?e.constructor.name:null}function zv(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Wv(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Io(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=Bv(e)),t}function xg(e,t,s){var o;if(typeof t=="function"&&typeof s=="function"||typeof s=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Pt(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"?Pt(1):"Expected the enhancer to be a function. Instead, received: '"+Io(s)+"'");return s(xg)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(2):"Expected the root reducer to be a function. Instead, received: '"+Io(e)+"'");var i=e,n=t,r=[],a=r,l=!1;function c(){a===r&&(a=r.slice())}function d(){if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return n}function u(C){if(typeof C!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(4):"Expected the listener to be a function. Instead, received: '"+Io(C)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var v=!0;return c(),a.push(C),function(){if(v){if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");v=!1,c();var b=a.indexOf(C);a.splice(b,1),r=null}}}function h(C){if(!Gv(C))throw new Error(process.env.NODE_ENV==="production"?Pt(7):"Actions must be plain objects. Instead, the actual type was: '"+Io(C)+"'. 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 C.type>"u")throw new Error(process.env.NODE_ENV==="production"?Pt(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"?Pt(9):"Reducers may not dispatch actions.");try{l=!0,n=i(n,C)}finally{l=!1}for(var v=r=a,w=0;w<v.length;w++){var b=v[w];b()}return C}function p(C){if(typeof C!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(10):"Expected the nextReducer to be a function. Instead, received: '"+Io(C));i=C,h({type:tu.REPLACE})}function f(){var C,v=u;return C={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?Pt(11):"Expected the observer to be an object. Instead, received: '"+Io(b)+"'");function S(){b.next&&b.next(d())}S();var y=v(S);return{unsubscribe:y}}},C[Jd]=function(){return this},C}return h({type:tu.INIT}),o={dispatch:h,subscribe:u,getState:d,replaceReducer:p},o[Jd]=f,o}function Ce(e,t,...s){if(_v()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let o;if(t===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;o=new Error(t.replace(/%s/g,function(){return s[i++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}function _v(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function jv(e,t,s){return t.split(".").reduce((o,i)=>o&&o[i]?o[i]:s||null,e)}function Uv(e,t){return e.filter(s=>s!==t)}function Rg(e){return typeof e=="object"}function $v(e,t){const s=new Map,o=n=>{s.set(n,s.has(n)?s.get(n)+1:1)};e.forEach(o),t.forEach(o);const i=[];return s.forEach((n,r)=>{n===1&&i.push(r)}),i}function Kv(e,t){return e.filter(s=>t.indexOf(s)>-1)}const Vc="dnd-core/INIT_COORDS",na="dnd-core/BEGIN_DRAG",zc="dnd-core/PUBLISH_DRAG_SOURCE",ra="dnd-core/HOVER",aa="dnd-core/DROP",la="dnd-core/END_DRAG";function su(e,t){return{type:Vc,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const qv={type:Vc,payload:{clientOffset:null,sourceClientOffset:null}};function Yv(e){return function(s=[],o={publishSource:!0}){const{publishSource:i=!0,clientOffset:n,getSourceClientOffset:r}=o,a=e.getMonitor(),l=e.getRegistry();e.dispatch(su(n)),Zv(s,a,l);const c=Jv(s,a);if(c==null){e.dispatch(qv);return}let d=null;if(n){if(!r)throw new Error("getSourceClientOffset must be defined");Xv(r),d=r(c)}e.dispatch(su(n,d));const h=l.getSource(c).beginDrag(a,c);if(h==null)return;Qv(h),l.pinSource(c);const p=l.getSourceType(c);return{type:na,payload:{itemType:p,item:h,sourceId:c,clientOffset:n||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}}function Zv(e,t,s){Ce(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(o){Ce(s.getSource(o),"Expected sourceIds to be registered.")})}function Xv(e){Ce(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Qv(e){Ce(Rg(e),"Item must be an object.")}function Jv(e,t){let s=null;for(let o=e.length-1;o>=0;o--)if(t.canDragSource(e[o])){s=e[o];break}return s}function ew(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function tw(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){ew(e,i,s[i])})}return e}function sw(e){return function(s={}){const o=e.getMonitor(),i=e.getRegistry();ow(o),rw(o).forEach((r,a)=>{const l=iw(r,a,i,o),c={type:aa,payload:{dropResult:tw({},s,l)}};e.dispatch(c)})}}function ow(e){Ce(e.isDragging(),"Cannot call drop while not dragging."),Ce(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function iw(e,t,s,o){const i=s.getTarget(e);let n=i?i.drop(o,e):void 0;return nw(n),typeof n>"u"&&(n=t===0?{}:o.getDropResult()),n}function nw(e){Ce(typeof e>"u"||Rg(e),"Drop result must either be an object or undefined.")}function rw(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function aw(e){return function(){const s=e.getMonitor(),o=e.getRegistry();lw(s);const i=s.getSourceId();return i!=null&&(o.getSource(i,!0).endDrag(s,i),o.unpinSource()),{type:la}}}function lw(e){Ce(e.isDragging(),"Cannot call endDrag while not dragging.")}function Ql(e,t){return t===null?e===null:Array.isArray(e)?e.some(s=>s===t):e===t}function cw(e){return function(s,{clientOffset:o}={}){dw(s);const i=s.slice(0),n=e.getMonitor(),r=e.getRegistry(),a=n.getItemType();return hw(i,r,a),uw(i,n,r),gw(i,n,r),{type:ra,payload:{targetIds:i,clientOffset:o||null}}}}function dw(e){Ce(Array.isArray(e),"Expected targetIds to be an array.")}function uw(e,t,s){Ce(t.isDragging(),"Cannot call hover while not dragging."),Ce(!t.didDrop(),"Cannot call hover after drop.");for(let o=0;o<e.length;o++){const i=e[o];Ce(e.lastIndexOf(i)===o,"Expected targetIds to be unique in the passed array.");const n=s.getTarget(i);Ce(n,"Expected targetIds to be registered.")}}function hw(e,t,s){for(let o=e.length-1;o>=0;o--){const i=e[o],n=t.getTargetType(i);Ql(n,s)||e.splice(o,1)}}function gw(e,t,s){e.forEach(function(o){s.getTarget(o).hover(t,o)})}function pw(e){return function(){if(e.getMonitor().isDragging())return{type:zc}}}function fw(e){return{beginDrag:Yv(e),publishDragSource:pw(e),hover:cw(e),drop:sw(e),endDrag:aw(e)}}class mw{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:s}=this.store;function o(n){return(...r)=>{const a=n.apply(t,r);typeof a<"u"&&s(a)}}const i=fw(this);return Object.keys(i).reduce((n,r)=>{const a=i[r];return n[r]=o(a),n},{})}dispatch(t){this.store.dispatch(t)}constructor(t,s){this.isSetUp=!1,this.handleRefCountChange=()=>{const o=this.store.getState().refCount>0;this.backend&&(o&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!o&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=s,t.subscribe(this.handleRefCountChange)}}function Cw(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Fg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vw(e){const{clientOffset:t,initialClientOffset:s,initialSourceClientOffset:o}=e;return!t||!s||!o?null:Fg(Cw(t,o),s)}function ww(e){const{clientOffset:t,initialClientOffset:s}=e;return!t||!s?null:Fg(t,s)}const Hi=[],Wc=[];Hi.__IS_NONE__=!0;Wc.__IS_ALL__=!0;function bw(e,t){return e===Hi?!1:e===Wc||typeof t>"u"?!0:Kv(t,e).length>0}class Sw{subscribeToStateChange(t,s={}){const{handlerIds:o}=s;Ce(typeof t=="function","listener must be a function."),Ce(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const n=()=>{const r=this.store.getState(),a=r.stateId;try{a===i||a===i+1&&!bw(r.dirtyHandlerIds,o)||t()}finally{i=a}};return this.store.subscribe(n)}subscribeToOffsetChange(t){Ce(typeof t=="function","listener must be a function.");let s=this.store.getState().dragOffset;const o=()=>{const i=this.store.getState().dragOffset;i!==s&&(s=i,t())};return this.store.subscribe(o)}canDragSource(t){if(!t)return!1;const s=this.registry.getSource(t);return Ce(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(Ce(s,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const o=this.registry.getTargetType(t),i=this.getItemType();return Ql(o,i)&&s.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const s=this.registry.getSource(t,!0);if(Ce(s,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const o=this.registry.getSourceType(t),i=this.getItemType();return o!==i?!1:s.isDragging(this,t)}isOverTarget(t,s={shallow:!1}){if(!t)return!1;const{shallow:o}=s;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),n=this.getItemType();if(n&&!Ql(i,n))return!1;const r=this.getTargetIds();if(!r.length)return!1;const a=r.indexOf(t);return o?a===r.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return vw(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return ww(this.store.getState().dragOffset)}constructor(t,s){this.store=t,this.registry=s}}const ou=typeof global<"u"?global:self,Eg=ou.MutationObserver||ou.WebKitMutationObserver;function Dg(e){return function(){const s=setTimeout(i,0),o=setInterval(i,50);function i(){clearTimeout(s),clearInterval(o),e()}}}function yw(e){let t=1;const s=new Eg(e),o=document.createTextNode("");return s.observe(o,{characterData:!0}),function(){t=-t,o.data=t}}const xw=typeof Eg=="function"?yw:Dg;class Rw{enqueueTask(t){const{queue:s,requestFlush:o}=this;s.length||(o(),this.flushing=!0),s[s.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const s=this.index;if(this.index++,t[s].call(),this.index>this.capacity){for(let o=0,i=t.length-this.index;o<i;o++)t[o]=t[o+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=xw(this.flush),this.requestErrorThrow=Dg(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Fw{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 Ew{create(t){const s=this.freeTasks,o=s.length?s.pop():new Fw(this.onError,i=>s[s.length]=i);return o.task=t,o}constructor(t){this.onError=t,this.freeTasks=[]}}const Pg=new Rw,Dw=new Ew(Pg.registerPendingError);function Pw(e){Pg.enqueueTask(Dw.create(e))}const _c="dnd-core/ADD_SOURCE",jc="dnd-core/ADD_TARGET",Uc="dnd-core/REMOVE_SOURCE",ca="dnd-core/REMOVE_TARGET";function Mw(e){return{type:_c,payload:{sourceId:e}}}function Tw(e){return{type:jc,payload:{targetId:e}}}function Iw(e){return{type:Uc,payload:{sourceId:e}}}function kw(e){return{type:ca,payload:{targetId:e}}}function Aw(e){Ce(typeof e.canDrag=="function","Expected canDrag to be a function."),Ce(typeof e.beginDrag=="function","Expected beginDrag to be a function."),Ce(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Lw(e){Ce(typeof e.canDrop=="function","Expected canDrop to be a function."),Ce(typeof e.hover=="function","Expected hover to be a function."),Ce(typeof e.drop=="function","Expected beginDrag to be a function.")}function Jl(e,t){if(t&&Array.isArray(e)){e.forEach(s=>Jl(s,!1));return}Ce(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 kt;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(kt||(kt={}));let Ow=0;function Nw(){return Ow++}function Hw(e){const t=Nw().toString();switch(e){case kt.SOURCE:return`S${t}`;case kt.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function iu(e){switch(e[0]){case"S":return kt.SOURCE;case"T":return kt.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function nu(e,t){const s=e.entries();let o=!1;do{const{done:i,value:[,n]}=s.next();if(n===t)return!0;o=!!i}while(!o);return!1}class Gw{addSource(t,s){Jl(t),Aw(s);const o=this.addHandler(kt.SOURCE,t,s);return this.store.dispatch(Mw(o)),o}addTarget(t,s){Jl(t,!0),Lw(s);const o=this.addHandler(kt.TARGET,t,s);return this.store.dispatch(Tw(o)),o}containsHandler(t){return nu(this.dragSources,t)||nu(this.dropTargets,t)}getSource(t,s=!1){return Ce(this.isSourceId(t),"Expected a valid source ID."),s&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return Ce(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return Ce(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return Ce(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return iu(t)===kt.SOURCE}isTargetId(t){return iu(t)===kt.TARGET}removeSource(t){Ce(this.getSource(t),"Expected an existing source."),this.store.dispatch(Iw(t)),Pw(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){Ce(this.getTarget(t),"Expected an existing target."),this.store.dispatch(kw(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const s=this.getSource(t);Ce(s,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=s}unpinSource(){Ce(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,s,o){const i=Hw(t);return this.types.set(i,s),t===kt.SOURCE?this.dragSources.set(i,o):t===kt.TARGET&&this.dropTargets.set(i,o),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const Bw=(e,t)=>e===t;function Vw(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function zw(e,t,s=Bw){if(e.length!==t.length)return!1;for(let o=0;o<e.length;++o)if(!s(e[o],t[o]))return!1;return!0}function Ww(e=Hi,t){switch(t.type){case ra:break;case _c:case jc:case ca:case Uc:return Hi;case na:case zc:case la:case aa:default:return Wc}const{targetIds:s=[],prevTargetIds:o=[]}=t.payload,i=$v(s,o);if(!(i.length>0||!zw(s,o)))return Hi;const r=o[o.length-1],a=s[s.length-1];return r!==a&&(r&&i.push(r),a&&i.push(a)),i}function _w(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function jw(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){_w(e,i,s[i])})}return e}const ru={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Uw(e=ru,t){const{payload:s}=t;switch(t.type){case Vc:case na:return{initialSourceClientOffset:s.sourceClientOffset,initialClientOffset:s.clientOffset,clientOffset:s.clientOffset};case ra:return Vw(e.clientOffset,s.clientOffset)?e:jw({},e,{clientOffset:s.clientOffset});case la:case aa:return ru;default:return e}}function $w(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function ko(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){$w(e,i,s[i])})}return e}const Kw={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function qw(e=Kw,t){const{payload:s}=t;switch(t.type){case na:return ko({},e,{itemType:s.itemType,item:s.item,sourceId:s.sourceId,isSourcePublic:s.isSourcePublic,dropResult:null,didDrop:!1});case zc:return ko({},e,{isSourcePublic:!0});case ra:return ko({},e,{targetIds:s.targetIds});case ca:return e.targetIds.indexOf(s.targetId)===-1?e:ko({},e,{targetIds:Uv(e.targetIds,s.targetId)});case aa:return ko({},e,{dropResult:s.dropResult,didDrop:!0,targetIds:[]});case la:return ko({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Yw(e=0,t){switch(t.type){case _c:case jc:return e+1;case Uc:case ca:return e-1;default:return e}}function Zw(e=0){return e+1}function Xw(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Qw(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){Xw(e,i,s[i])})}return e}function Jw(e={},t){return{dirtyHandlerIds:Ww(e.dirtyHandlerIds,{type:t.type,payload:Qw({},t.payload,{prevTargetIds:jv(e,"dragOperation.targetIds",[])})}),dragOffset:Uw(e.dragOffset,t),refCount:Yw(e.refCount,t),dragOperation:qw(e.dragOperation,t),stateId:Zw(e.stateId)}}function e1(e,t=void 0,s={},o=!1){const i=t1(o),n=new Sw(i,new Gw(i)),r=new mw(i,n),a=e(r,t,s);return r.receiveBackend(a),r}function t1(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return xg(Jw,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function s1(e,t){if(e==null)return{};var s=o1(e,t),o,i;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}function o1(e,t){if(e==null)return{};var s={},o=Object.keys(e),i,n;for(n=0;n<o.length;n++)i=o[n],!(t.indexOf(i)>=0)&&(s[i]=e[i]);return s}let au=0;const nr=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var i1=g.memo(function(t){var{children:s}=t,o=s1(t,["children"]);const[i,n]=n1(o);return g.useEffect(()=>{if(n){const r=Mg();return++au,()=>{--au===0&&(r[nr]=null)}}},[]),m.jsx(yg.Provider,{value:i,children:s})});function n1(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=r1(e.backend,e.context,e.options,e.debugMode),s=!e.context;return[t,s]}function r1(e,t=Mg(),s,o){const i=t;return i[nr]||(i[nr]={dragDropManager:e1(e,t,s,o)}),i[nr]}function Mg(){return typeof global<"u"?global:window}function a1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sl,lu;function l1(){return lu||(lu=1,sl=function e(t,s){if(t===s)return!0;if(t&&s&&typeof t=="object"&&typeof s=="object"){if(t.constructor!==s.constructor)return!1;var o,i,n;if(Array.isArray(t)){if(o=t.length,o!=s.length)return!1;for(i=o;i--!==0;)if(!e(t[i],s[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===s.source&&t.flags===s.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===s.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===s.toString();if(n=Object.keys(t),o=n.length,o!==Object.keys(s).length)return!1;for(i=o;i--!==0;)if(!Object.prototype.hasOwnProperty.call(s,n[i]))return!1;for(i=o;i--!==0;){var r=n[i];if(!e(t[r],s[r]))return!1}return!0}return t!==t&&s!==s}),sl}var c1=l1();const d1=a1(c1),co=typeof window<"u"?g.useLayoutEffect:g.useEffect;function u1(e,t,s){const[o,i]=g.useState(()=>t(e)),n=g.useCallback(()=>{const r=t(e);d1(o,r)||(i(r),s&&s())},[o,e,s]);return co(n),[o,n]}function h1(e,t,s){const[o,i]=u1(e,t,s);return co(function(){const r=e.getHandlerId();if(r!=null)return e.subscribeToStateChange(i,{handlerIds:[r]})},[e,i]),o}function Tg(e,t,s){return h1(t,e||(()=>({})),()=>s.reconnect())}function Ig(e,t){const s=[...t||[]];return t==null&&typeof e!="function"&&s.push(e),g.useMemo(()=>typeof e=="function"?e():e,s)}function g1(e){return g.useMemo(()=>e.hooks.dragSource(),[e])}function p1(e){return g.useMemo(()=>e.hooks.dragPreview(),[e])}let ol=!1,il=!1;class f1{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){Ce(!ol,"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 ol=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{ol=!1}}isDragging(){if(!this.sourceId)return!1;Ce(!il,"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 il=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{il=!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 nl=!1;class m1{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,s){return this.internalMonitor.subscribeToStateChange(t,s)}canDrop(){if(!this.targetId)return!1;Ce(!nl,"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 nl=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{nl=!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 C1(e,t,s){const o=s.getRegistry(),i=o.addTarget(e,t);return[i,()=>o.removeTarget(i)]}function v1(e,t,s){const o=s.getRegistry(),i=o.addSource(e,t);return[i,()=>o.removeSource(i)]}function ec(e,t,s,o){let i;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let l=0;l<n.length;l++){const c=n[l];if(!a(c))return!1;const d=e[c],u=t[c];if(i=void 0,i===!1||i===void 0&&d!==u)return!1}return!0}function tc(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function w1(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 b1(e){return(t=null,s=null)=>{if(!g.isValidElement(t)){const n=t;return e(n,s),n}const o=t;return w1(o),S1(o,s?n=>e(n,s):e)}}function kg(e){const t={};return Object.keys(e).forEach(s=>{const o=e[s];if(s.endsWith("Ref"))t[s]=e[s];else{const i=b1(o);t[s]=()=>i}}),t}function cu(e,t){typeof e=="function"?e(t):e.current=t}function S1(e,t){const s=e.ref;return Ce(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?g.cloneElement(e,{ref:o=>{cu(s,o),cu(t,o)}}):g.cloneElement(e,{ref:t})}class y1{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,s=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return s&&this.disconnectDragSource(),this.handlerId?t?(s&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),s):(this.lastConnectedDragSource=t,s):s}reconnectDragPreview(t=!1){const s=this.dragPreview,o=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(o&&this.disconnectDragPreview(),!!this.handlerId){if(!s){this.lastConnectedDragPreview=s;return}o&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=s,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,s,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!ec(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ec(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=kg({dragSource:(s,o)=>{this.clearDragSource(),this.dragSourceOptions=o||null,tc(s)?this.dragSourceRef=s:this.dragSourceNode=s,this.reconnectDragSource()},dragPreview:(s,o)=>{this.clearDragPreview(),this.dragPreviewOptions=o||null,tc(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 x1{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!ec(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=kg({dropTarget:(s,o)=>{this.clearDropTarget(),this.dropTargetOptions=o,tc(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 di(){const{dragDropManager:e}=g.useContext(yg);return Ce(e!=null,"Expected drag drop context"),e}function R1(e,t){const s=di(),o=g.useMemo(()=>new y1(s.getBackend()),[s]);return co(()=>(o.dragSourceOptions=e||null,o.reconnect(),()=>o.disconnectDragSource()),[o,e]),co(()=>(o.dragPreviewOptions=t||null,o.reconnect(),()=>o.disconnectDragPreview()),[o,t]),o}function F1(){const e=di();return g.useMemo(()=>new f1(e),[e])}class E1{beginDrag(){const t=this.spec,s=this.monitor;let o=null;return typeof t.item=="object"?o=t.item:typeof t.item=="function"?o=t.item(s):o={},o??null}canDrag(){const t=this.spec,s=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(s):!0}isDragging(t,s){const o=this.spec,i=this.monitor,{isDragging:n}=o;return n?n(i):s===t.getSourceId()}endDrag(){const t=this.spec,s=this.monitor,o=this.connector,{end:i}=t;i&&i(s.getItem(),s),o.reconnect()}constructor(t,s,o){this.spec=t,this.monitor=s,this.connector=o}}function D1(e,t,s){const o=g.useMemo(()=>new E1(e,t,s),[t,s]);return g.useEffect(()=>{o.spec=e},[e]),o}function P1(e){return g.useMemo(()=>{const t=e.type;return Ce(t!=null,"spec.type must be defined"),t},[e])}function M1(e,t,s){const o=di(),i=D1(e,t,s),n=P1(e);co(function(){if(n!=null){const[a,l]=v1(n,i,o);return t.receiveHandlerId(a),s.receiveHandlerId(a),l}},[o,t,s,i,n])}function T1(e,t){const s=Ig(e,t);Ce(!s.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const o=F1(),i=R1(s.options,s.previewOptions);return M1(s,o,i),[Tg(s.collect,o,i),g1(i),p1(i)]}function I1(e){return g.useMemo(()=>e.hooks.dropTarget(),[e])}function k1(e){const t=di(),s=g.useMemo(()=>new x1(t.getBackend()),[t]);return co(()=>(s.dropTargetOptions=e||null,s.reconnect(),()=>s.disconnectDropTarget()),[e]),s}function A1(){const e=di();return g.useMemo(()=>new m1(e),[e])}function L1(e){const{accept:t}=e;return g.useMemo(()=>(Ce(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class O1{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 N1(e,t){const s=g.useMemo(()=>new O1(e,t),[t]);return g.useEffect(()=>{s.spec=e},[e]),s}function H1(e,t,s){const o=di(),i=N1(e,t),n=L1(e);co(function(){const[a,l]=C1(n,i,o);return t.receiveHandlerId(a),s.receiveHandlerId(a),l},[o,t,i,s,n.map(r=>r.toString()).join("|")])}function Ag(e,t){const s=Ig(e,t),o=A1(),i=k1(s.options);return H1(s,o,i),[Tg(s.collect,o,i),I1(i)]}const du="column",G1="flex items-center",B1="mr-3 cursor-move text-secondary",V1=({id:e,children:t,className:s,onFind:o,onMove:i,ariaLabel:n="Drag item"})=>{const r=g.useRef(null),a=g.useRef(null),l=typeof o=="function"?o(e):-1,[{isDragging:c},d,u]=T1(()=>({type:du,item:{id:e,originalIndex:l},collect:p=>{const f=p.getItem();return{isDragging:p.isDragging()&&f?.id===e}},end:(p,f)=>{if(!p)return;!f.didDrop()&&typeof i=="function"&&p.originalIndex>-1&&i(p.id,p.originalIndex)}}),[e,l,i]),[,h]=Ag(()=>({accept:du,hover:p=>{if(!(!p||p.id===e)&&typeof o=="function"&&typeof i=="function"){const f=o(e);i(p.id,f)}}}),[o,i,e]);return u(h(a)),d(r),m.jsxs("div",{ref:a,className:ce(G1,s),style:{opacity:c?0:1},"aria-roledescription":"Draggable item",children:[m.jsx("div",{ref:r,className:B1,"aria-label":n,children:m.jsx(V.IconGripVertical,{...ae})}),t]})},z1=e=>ge.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ge.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"}),ge.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"}),ge.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"}),ge.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"})),W1=e=>ge.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ge.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"}),ge.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"})),_1=e=>ge.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ge.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"}),ge.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"}),ge.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"})),j1=e=>ge.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ge.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"}),ge.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"}),ge.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"}),ge.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"})),U1=e=>ge.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ge.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"}),ge.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"}),ge.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"}),ge.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"}),ge.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"})),$1=e=>ge.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ge.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"}),ge.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"}),ge.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"})),K1=e=>ge.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ge.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"}),ge.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"}),ge.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"})),Ne=(e,t)=>m.jsx(e,{size:t.size??ae.size,stroke:t.stroke??ae.stroke,className:t.className}),Ks=(e,t)=>m.jsx(e,{width:Number(t.size??ae.size),height:Number(t.size??ae.size),className:t.className}),uu={".bmp":e=>Ne(V.IconFileTypeBmp,e),".cpp":e=>Ks(z1,e),".c":e=>Ks(W1,e),".cs":e=>Ks(_1,e),".css":e=>Ne(V.IconFileTypeCss,e),".csv":e=>Ne(V.IconFileTypeCsv,e),".doc":e=>Ne(V.IconFileTypeDoc,e),".docx":e=>Ne(V.IconFileTypeDocx,e),".html":e=>Ne(V.IconFileTypeHtml,e),".ini":e=>Ks(j1,e),".jpg":e=>Ne(V.IconFileTypeJpg,e),".js":e=>Ne(V.IconFileTypeJs,e),".json":e=>Ks(U1,e),".jsx":e=>Ne(V.IconFileTypeJsx,e),".md":e=>Ks($1,e),".pdf":e=>Ne(V.IconFileTypePdf,e),".php":e=>Ne(V.IconFileTypePhp,e),".png":e=>Ne(V.IconFileTypePng,e),".ppt":e=>Ne(V.IconFileTypePpt,e),".py":e=>Ks(K1,e),".rs":e=>Ne(V.IconFileTypeRs,e),".sql":e=>Ne(V.IconFileTypeSql,e),".svg":e=>Ne(V.IconFileTypeSvg,e),".ts":e=>Ne(V.IconFileTypeTs,e),".tsx":e=>Ne(V.IconFileTypeTsx,e),".txt":e=>Ne(V.IconFileTypeTxt,e),".vue":e=>Ne(V.IconFileTypeVue,e),".xls":e=>Ne(V.IconFileTypeXls,e),".xml":e=>Ne(V.IconFileTypeXml,e),".zip":e=>Ne(V.IconFileTypeZip,e),default:e=>Ne(V.IconFile,e)},$c=({extension:e,size:t=ae.size,stroke:s=ae.stroke,className:o,decorative:i=!1,label:n,indicator:r})=>{const a=(()=>{const u=e.trim().toLowerCase();return u.startsWith(".")?u:`.${u}`})(),c=(uu[a]??uu.default)({size:t,stroke:s}),d=n??`${a.slice(1).toUpperCase()} file icon`;return m.jsxs("span",{className:Z("inline-flex relative",o),...i?{"aria-hidden":!0}:{role:"img","aria-label":d},children:[m.jsx(Le,{icon:c,className:"inline-block align-middle"}),r&&m.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:r})]})},Xi=({label:e="Shared entity",size:t=10,className:s,stroke:o=2})=>m.jsx(Le,{className:ce("text-accent-primary",s),icon:m.jsx(V.IconArrowUpRight,{size:t,stroke:o,"aria-label":e,className:"bg-layer-3",role:"img"})}),mn=({name:e,className:t,shared:s=!1,iconSize:o=ls,details:i})=>{const n=e.includes(".")?e.split(".").pop():null;return m.jsxs("div",{className:ce("flex items-center gap-2 w-full",t),children:[n&&m.jsx($c,{extension:n,size:o,className:"text-secondary",indicator:s?m.jsx(Xi,{}):null,label:"File type icon"}),m.jsxs("div",{className:Z(["w-full flex min-w-0",i&&"flex-col gap-1"]),children:[m.jsx(ut,{className:"text-primary dial-small flex-1 min-w-0",text:e,id:"name"}),i]})]})},da=({name:e,className:t,shared:s=!1,loading:o=!1,iconSize:i=ls})=>{const n=()=>o?m.jsx(fn,{size:i}):m.jsx(Le,{icon:m.jsx(V.IconFolder,{...ae,size:i}),className:"inline-block align-middle"});return m.jsxs("div",{className:ce("flex items-center gap-2 w-full",t),children:[m.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[n(),s&&m.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:m.jsx(Xi,{})})]}),m.jsx(ut,{className:"text-primary dial-small flex-1 min-w-0",text:e,id:"name"})]})};var Qi=(e=>(e.Left="left",e.Right="right",e))(Qi||{}),Ue=function(){return Ue=Object.assign||function(e){for(var t,s=1,o=arguments.length;s<o;s++){t=arguments[s];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ue.apply(this,arguments)},hu={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},gu={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},zn={width:"20px",height:"20px",position:"absolute",zIndex:1},q1={top:Ue(Ue({},hu),{top:"-5px"}),right:Ue(Ue({},gu),{left:void 0,right:"-5px"}),bottom:Ue(Ue({},hu),{top:void 0,bottom:"-5px"}),left:Ue(Ue({},gu),{left:"-5px"}),topRight:Ue(Ue({},zn),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Ue(Ue({},zn),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Ue(Ue({},zn),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Ue(Ue({},zn),{left:"-10px",top:"-10px",cursor:"nw-resize"})},Y1=g.memo(function(e){var t=e.onResizeStart,s=e.direction,o=e.children,i=e.replaceStyles,n=e.className,r=g.useCallback(function(c){t(c,s)},[t,s]),a=g.useCallback(function(c){t(c,s)},[t,s]),l=g.useMemo(function(){return Ue(Ue({position:"absolute",userSelect:"none"},q1[s]),i??{})},[i,s]);return m.jsx("div",{className:n||void 0,style:l,onMouseDown:r,onTouchStart:a,children:o})}),Z1=(function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,i){o.__proto__=i}||function(o,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(o[n]=i[n])},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 o(){this.constructor=t}t.prototype=s===null?Object.create(s):(o.prototype=s.prototype,new o)}})(),Kt=function(){return Kt=Object.assign||function(e){for(var t,s=1,o=arguments.length;s<o;s++){t=arguments[s];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Kt.apply(this,arguments)},X1={width:"auto",height:"auto"},Wn=function(e,t,s){return Math.max(Math.min(e,s),t)},pu=function(e,t,s){var o=Math.round(e/t);return o*t+s*(o-1)},Ao=function(e,t){return new RegExp(e,"i").test(t)},_n=function(e){return!!(e.touches&&e.touches.length)},Q1=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},fu=function(e,t,s){s===void 0&&(s=0);var o=t.reduce(function(n,r,a){return Math.abs(r-e)<Math.abs(t[n]-e)?a:n},0),i=Math.abs(t[o]-e);return s===0||i<s?t[o]:e},rl=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")},jn=function(e,t,s,o){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return s*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return o*i}}return e},J1=function(e,t,s,o,i,n,r){return o=jn(o,e.width,t,s),i=jn(i,e.height,t,s),n=jn(n,e.width,t,s),r=jn(r,e.height,t,s),{maxWidth:typeof o>"u"?void 0:Number(o),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof n>"u"?void 0:Number(n),minHeight:typeof r>"u"?void 0:Number(r)}},eb=function(e){return Array.isArray(e)?e:[e,e]},tb=["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"],mu="__resizable_base__",sb=(function(e){Z1(t,e);function t(s){var o,i,n,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(mu):c.className+=mu,l.appendChild(c),c},a.removeBase=function(l){var c=a.parentNode;c&&c.removeChild(l)},a.state={isResizing:!1,width:(i=(o=a.propsSize)===null||o===void 0?void 0:o.width)!==null&&i!==void 0?i:"auto",height:(r=(n=a.propsSize)===null||n===void 0?void 0:n.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||X1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var s=0,o=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,n=this.resizable.offsetHeight,r=this.resizable.style.position;r!=="relative"&&(this.resizable.style.position="relative"),s=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,o=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:n,this.resizable.style.position=r}return{width:s,height:o}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var s=this,o=this.props.size,i=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 rl(s.state[a])},n=o&&typeof o.width<"u"&&!this.state.isResizing?rl(o.width):i("width"),r=o&&typeof o.height<"u"&&!this.state.isResizing?rl(o.height):i("height");return{width:n,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 o=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(o=!0,this.parentNode.style.flexWrap="wrap"),s.style.position="relative",s.style.minWidth="100%",s.style.minHeight="100%";var n={width:s.offsetWidth,height:s.offsetHeight};return o&&(this.parentNode.style.flexWrap=i),this.removeBase(s),n},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,o){var i=this.propsSize&&this.propsSize[o];return this.state[o]==="auto"&&this.state.original[o]===s&&(typeof i>"u"||i==="auto")?"auto":s},t.prototype.calculateNewMaxFromBoundary=function(s,o){var i=this.props.boundsByDirection,n=this.state.direction,r=i&&Ao("left",n),a=i&&Ao("top",n),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)&&(o=o&&o<c?o:c),{maxWidth:s,maxHeight:o}},t.prototype.calculateNewSizeFromDirection=function(s,o){var i=this.props.scale||1,n=eb(this.props.resizeRatio||1),r=n[0],a=n[1],l=this.state,c=l.direction,d=l.original,u=this.props,h=u.lockAspectRatio,p=u.lockAspectRatioExtraHeight,f=u.lockAspectRatioExtraWidth,C=d.width,v=d.height,w=p||0,b=f||0;return Ao("right",c)&&(C=d.width+(s-d.x)*r/i,h&&(v=(C-b)/this.ratio+w)),Ao("left",c)&&(C=d.width-(s-d.x)*r/i,h&&(v=(C-b)/this.ratio+w)),Ao("bottom",c)&&(v=d.height+(o-d.y)*a/i,h&&(C=(v-w)*this.ratio+b)),Ao("top",c)&&(v=d.height-(o-d.y)*a/i,h&&(C=(v-w)*this.ratio+b)),{newWidth:C,newHeight:v}},t.prototype.calculateNewSizeFromAspectRatio=function(s,o,i,n){var r=this.props,a=r.lockAspectRatio,l=r.lockAspectRatioExtraHeight,c=r.lockAspectRatioExtraWidth,d=typeof n.width>"u"?10:n.width,u=typeof i.width>"u"||i.width<0?s:i.width,h=typeof n.height>"u"?10:n.height,p=typeof i.height>"u"||i.height<0?o:i.height,f=l||0,C=c||0;if(a){var v=(h-f)*this.ratio+C,w=(p-f)*this.ratio+C,b=(d-C)/this.ratio+f,S=(u-C)/this.ratio+f,y=Math.max(d,v),x=Math.min(u,w),R=Math.max(h,b),E=Math.min(p,S);s=Wn(s,y,x),o=Wn(o,R,E)}else s=Wn(s,d,u),o=Wn(o,h,p);return{newWidth:s,newHeight:o}},t.prototype.setBoundingClientRect=function(){var s=1/(this.props.scale||1);if(this.props.bounds==="parent"){var o=this.parentNode;if(o){var i=o.getBoundingClientRect();this.parentLeft=i.left*s,this.parentTop=i.top*s}}if(this.props.bounds&&typeof this.props.bounds!="string"){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left*s,this.targetTop=n.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,o){if(!(!this.resizable||!this.window)){var i=0,n=0;if(s.nativeEvent&&Q1(s.nativeEvent)?(i=s.nativeEvent.clientX,n=s.nativeEvent.clientY):s.nativeEvent&&_n(s.nativeEvent)&&(i=s.nativeEvent.touches[0].clientX,n=s.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var r=this.props.onResizeStart(s,o,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:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Kt(Kt({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(s.target).cursor||"auto"}),direction:o,flexBasis:a};this.setState(u)}},t.prototype.onMouseMove=function(s){var o=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&_n(s))try{s.preventDefault(),s.stopPropagation()}catch{}var i=this.props,n=i.maxWidth,r=i.maxHeight,a=i.minWidth,l=i.minHeight,c=_n(s)?s.touches[0].clientX:s.clientX,d=_n(s)?s.touches[0].clientY:s.clientY,u=this.state,h=u.direction,p=u.original,f=u.width,C=u.height,v=this.getParentSize(),w=J1(v,this.window.innerWidth,this.window.innerHeight,n,r,a,l);n=w.maxWidth,r=w.maxHeight,a=w.minWidth,l=w.minHeight;var b=this.calculateNewSizeFromDirection(c,d),S=b.newHeight,y=b.newWidth,x=this.calculateNewMaxFromBoundary(n,r);this.props.snap&&this.props.snap.x&&(y=fu(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(S=fu(S,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(y,S,{width:x.maxWidth,height:x.maxHeight},{width:a,height:l});if(y=R.newWidth,S=R.newHeight,this.props.grid){var E=pu(y,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),D=pu(S,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),T=this.props.snapGap||0,k=T===0||Math.abs(E-y)<=T?E:y,F=T===0||Math.abs(D-S)<=T?D:S;y=k,S=F}var M={width:y-p.width,height:S-p.height};if(this.delta=M,f&&typeof f=="string"){if(f.endsWith("%")){var L=y/v.width*100;y="".concat(L,"%")}else if(f.endsWith("vw")){var B=y/this.window.innerWidth*100;y="".concat(B,"vw")}else if(f.endsWith("vh")){var H=y/this.window.innerHeight*100;y="".concat(H,"vh")}}if(C&&typeof C=="string"){if(C.endsWith("%")){var L=S/v.height*100;S="".concat(L,"%")}else if(C.endsWith("vw")){var B=S/this.window.innerWidth*100;S="".concat(B,"vw")}else if(C.endsWith("vh")){var H=S/this.window.innerHeight*100;S="".concat(H,"vh")}}var Q={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(S,"height")};this.flexDir==="row"?Q.flexBasis=Q.width:this.flexDir==="column"&&(Q.flexBasis=Q.height);var ee=this.state.width!==Q.width,O=this.state.height!==Q.height,le=this.state.flexBasis!==Q.flexBasis,z=ee||O||le;z&&pn.flushSync(function(){o.setState(Q)}),this.props.onResize&&z&&this.props.onResize(s,h,this.resizable,M)}},t.prototype.onMouseUp=function(s){var o,i,n=this.state,r=n.isResizing,a=n.direction;n.original,!(!r||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(s,a,this.resizable,this.delta),this.props.size&&this.setState({width:(o=this.props.size.width)!==null&&o!==void 0?o:"auto",height:(i=this.props.size.height)!==null&&i!==void 0?i:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Kt(Kt({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(s){var o,i;this.setState({width:(o=s.width)!==null&&o!==void 0?o:"auto",height:(i=s.height)!==null&&i!==void 0?i:"auto"})},t.prototype.renderResizer=function(){var s=this,o=this.props,i=o.enable,n=o.handleStyles,r=o.handleClasses,a=o.handleWrapperStyle,l=o.handleWrapperClass,c=o.handleComponent;if(!i)return null;var d=Object.keys(i).map(function(u){return i[u]!==!1?m.jsx(Y1,{direction:u,onResizeStart:s.onResizeStart,replaceStyles:n&&n[u],className:r&&r[u],children:c&&c[u]?c[u]:null},u):null});return m.jsx("div",{className:l,style:a,children:d})},t.prototype.render=function(){var s=this,o=Object.keys(this.props).reduce(function(r,a){return tb.indexOf(a)!==-1||(r[a]=s.props[a]),r},{}),i=Kt(Kt(Kt({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&&(i.flexBasis=this.state.flexBasis);var n=this.props.as||"div";return m.jsxs(n,Kt({style:i,className:this.props.className},o,{ref:function(r){r&&(s.resizable=r)},children:[this.state.isResizing&&m.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})(g.PureComponent);const ob=({side:e,className:t})=>{const s=e===Qi.Left,o=s?V.IconChevronLeft:V.IconChevronRight;return m.jsx("div",{className:t,children:m.jsx(o,{className:Z("h-full",s&&"-ml-6")})})},ib=({side:e,isResizing:t,customHandler:s,handlerClassName:o})=>{const i=ce("invisible h-full w-0.5 group-hover:visible bg-accent-primary text-accent-primary cursor-col-resize transition-opacity",t&&"visible",o),n=m.jsx(ob,{side:e,className:i});return s?m.jsx("div",{className:i,children:s}):n},Lg=({children:e,minWidth:t,maxWidth:s,width:o,defaultWidth:i,onResizeStop:n,onResize:r,side:a=Qi.Right,resizeHandlerClassName:l,resizeHandler:c})=>{const[d,u]=g.useState(!1),[h,p]=g.useState(i),f=o!==void 0,C=f?o:h,v=g.useRef(null),w=g.useCallback(()=>{u(!0)},[]),b=g.useCallback(()=>{u(!1);const y=v.current?.resizable?.getBoundingClientRect(),x=y?Math.round(y.width):t;f||p(x),n?.(x)},[n,f,t]),S=g.useMemo(()=>{const y=a===Qi.Left,x=m.jsx(ib,{side:a,isResizing:d,customHandler:c,handlerClassName:l});return{size:f?{width:C,height:"100%"}:void 0,defaultSize:f?void 0:{width:C,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?x:void 0,right:y?void 0:x},onResizeStart:w,onResize:(R,E,D)=>{const T=Math.round(D.offsetWidth);r?.(T)},onResizeStop:b}},[a,f,C,t,s,c,l,d,w,b,r]);return m.jsx(sb,{ref:v,...S,children:m.jsx("div",{className:"group flex size-full flex-col bg-layer-3 divide-y divide-tertiary transition-all",children:e})})},Og=({enabled:e=!0,children:t,...s})=>e?m.jsx(Lg,{...s,children:t}):t;var At=(e=>(e.Default="default",e.Text="text",e.Circular="circular",e.Rectangular="rectangular",e))(At||{}),Gi=(e=>(e.Small="small",e.Default="default",e.Large="large",e))(Gi||{}),xr=(e=>(e.Circle="circle",e.Square="square",e))(xr||{});const nb=e=>{if(typeof e=="number")return e;switch(e){case Gi.Small:return 32;case Gi.Large:return 64;case Gi.Default:default:return 40}},Go=({active:e=!0,paragraph:t=!0,avatar:s=!1,showTitle:o=!0,loading:i=!0,children:n,variant:r=At.Default,width:a,height:l,className:c,...d})=>{if(!i&&n)return m.jsx(m.Fragment,{children:n});const u=ce("bg-layer-3",e&&"animate-pulse",c);if(r!==At.Default){const D=ce(u,r===At.Circular&&"rounded-full",r===At.Rectangular&&"rounded",r===At.Text&&"rounded"),T={};return a&&(T.width=typeof a=="number"?`${a}px`:a),l&&(T.height=typeof l=="number"?`${l}px`:l),m.jsx("div",{className:D,style:T,...d})}const h=!!s,p=!!o,f=!!t,C=typeof s=="object"?s:{},v=typeof o=="object"?o:{},w=typeof t=="object"?t:{},b=nb(C.size),S=C.shape??xr.Circle,y=v.width??"38%",x=w.rows??3,R=w.width,E=D=>R?Array.isArray(R)?R[D]??"100%":R:D===x-1?"61%":"100%";return m.jsxs("div",{...d,className:ce("flex gap-4",c),children:[h&&m.jsx("div",{className:ce(u,S===xr.Circle?"rounded-full":"rounded","flex-shrink-0"),style:{width:b,height:b}}),m.jsxs("div",{className:"flex-1 flex flex-col gap-3",children:[p&&m.jsx("div",{className:ce(u,"h-4 rounded"),style:{width:y}}),f&&m.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:x}).map((D,T)=>m.jsx("div",{className:ce(u,"h-4 rounded"),style:{width:E(T)}},T))})]})]})};var uo=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,s){const o=t?this.allAsyncListeners:this.allSyncListeners;let i=o.get(e);return!i&&s&&(i=new Set,o.set(e,i)),i}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,s=!1){this.getListeners(e,s,!0).add(t)}removeEventListener(e,t,s=!1){const o=this.getListeners(e,s,!1);o&&(o.delete(t),o.size===0&&(s?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const s=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:o}=this,i=a=>{const l=o?()=>o.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},n=this.getListeners(s,t,!1);if((n?.size??0)>0){const a=new Set(n);for(const l of a)n?.has(l)&&i(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)i(()=>l(s,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}};function us(e){return e==null||e===""?null:e}function q(e){return e!=null&&e!==""}function Ge(e){return!q(e)}function sc(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Ji(e,t){const s=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return s===o}function rb(e,t,s=!1){const o=e==null,i=t==null;if(e?.toNumber&&(e=e.toNumber()),t?.toNumber&&(t=t.toNumber()),o&&i)return 0;if(o)return-1;if(i)return 1;function n(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!s)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var ab=/[&<>"']/g,lb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function ui(e){return e?.toString().toString()??null}function Bi(e){return ui(e)?.replace(ab,t=>lb[t])??null}function qt(e){return e.eRootDiv.getRootNode()}function Ve(e){return qt(e).activeElement}function Qe(e){const{gos:t,eRootDiv:s}=e;let o=null;const i=t.get("getDocument");return i&&q(i)?o=i():s&&(o=s.ownerDocument),o&&q(o)?o:document}function Ng(e){const t=Ve(e);return t===null||t===Qe(e).body}function Hg(e){return Qe(e).defaultView||window}function Kc(e){let t=null,s=null;try{t=Qe(e).fullscreenElement}catch{}finally{t||(t=qt(e));const o=t.querySelector("body");o?s=o:t instanceof ShadowRoot?s=t:t instanceof Document?s=t?.documentElement:s=t}return s}function cb(e){return Kc(e)?.clientWidth??(window.innerWidth||-1)}function db(e){return Kc(e)?.clientHeight??(window.innerHeight||-1)}function Wt(e,t,s){s==null||typeof s=="string"&&s==""?Gg(e,t):_t(e,t,s)}function _t(e,t,s){e.setAttribute(Bg(t),s.toString())}function Gg(e,t){e.removeAttribute(Bg(t))}function Bg(e){return`aria-${e}`}function ho(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function ub(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function hb(e){return e.getAttribute("aria-label")}function ti(e,t){Wt(e,"label",t)}function en(e,t){Wt(e,"labelledby",t)}function Vg(e,t){Wt(e,"live",t)}function gb(e,t){Wt(e,"atomic",t)}function pb(e,t){Wt(e,"relevant",t)}function fb(e,t){Wt(e,"invalid",t)}function mb(e,t){Wt(e,"disabled",t)}function zg(e,t){Wt(e,"hidden",t)}function oc(e,t){_t(e,"expanded",t)}function Cb(e,t){_t(e,"setsize",t)}function vb(e,t){_t(e,"posinset",t)}function wb(e,t){_t(e,"rowcount",t)}function Wg(e,t){_t(e,"rowindex",t)}function bb(e,t){_t(e,"rowspan",t)}function Sb(e,t){_t(e,"colcount",t)}function _g(e,t){_t(e,"colindex",t)}function yb(e,t){_t(e,"colspan",t)}function xb(e,t){_t(e,"sort",t)}function Rb(e){Gg(e,"sort")}function jg(e,t){Wt(e,"selected",t)}function Fb(e,t){Wt(e,"controls",t)}function Eb(e,t){Fb(e,t.id),en(t,e.id)}function Cu(e,t){Wt(e,"owns",t)}function ua(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Db="[tabindex], input, select, button, textarea, [href]",Ug="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Vi(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(Ug)?!1:Cs(e)}function Be(e,t,s={}){const{skipAriaHidden:o}=s;e.classList.toggle("ag-hidden",!t),o||zg(e,!t)}function Pb(e,t,s={}){const{skipAriaHidden:o}=s;e.classList.toggle("ag-invisible",!t),o||zg(e,!t)}function tn(e,t){const s="disabled",o=t?n=>n.setAttribute(s,""):n=>n.removeAttribute(s);o(e);const i=e.querySelectorAll("input")??[];for(const n of i)o(n)}function to(e,t,s){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof s=="number"){if(++o>s)break}else if(e===s)break}return!1}function So(e){const{height:t,width:s,borderTopWidth:o,borderRightWidth:i,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:h,marginBottom:p,marginLeft:f,boxSizing:C}=window.getComputedStyle(e),v=Number.parseFloat;return{height:v(t||"0"),width:v(s||"0"),borderTopWidth:v(o||"0"),borderRightWidth:v(i||"0"),borderBottomWidth:v(n||"0"),borderLeftWidth:v(r||"0"),paddingTop:v(a||"0"),paddingRight:v(l||"0"),paddingBottom:v(c||"0"),paddingLeft:v(d||"0"),marginTop:v(u||"0"),marginRight:v(h||"0"),marginBottom:v(p||"0"),marginLeft:v(f||"0"),boxSizing:C}}function qc(e){const t=So(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function sn(e){const t=So(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function $g(e){const{height:t,marginBottom:s,marginTop:o}=So(e);return Math.floor(t+s+o)}function Rr(e){const{width:t,marginLeft:s,marginRight:o}=So(e);return Math.floor(t+s+o)}function Kg(e){const t=e.getBoundingClientRect(),{borderTopWidth:s,borderLeftWidth:o,borderRightWidth:i,borderBottomWidth:n}=So(e);return{top:t.top+(s||0),left:t.left+(o||0),right:t.right+(i||0),bottom:t.bottom+(n||0)}}function Fr(e,t){let s=e.scrollLeft;return t&&(s=Math.abs(s)),s}function Er(e,t,s){s&&(t*=-1),e.scrollLeft=t}function mt(e){for(;e?.firstChild;)e.firstChild.remove()}function Is(e){e?.parentNode&&e.remove()}function qg(e){return!!e.offsetParent}function Cs(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!qg(e)||window.getComputedStyle(e).visibility!=="visible")}function Yc(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function rr(e){return()=>{const t=e();return t?Zc(t)||Yg(t):!0}}function Zc(e){return e.clientWidth<e.scrollWidth}function Yg(e){return e.clientHeight<e.scrollHeight}function Dr(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Jt(e,t)}function Jt(e,t){t=Xc(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function zi(e,t){t=Xc(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Xc(e){return typeof e=="number"?`${e}px`:e}function Qc(e){return e instanceof Node||e instanceof HTMLElement}function Rt(e,t,s){s==null||s===""?e.removeAttribute(t):e.setAttribute(t,s.toString())}function vs(e,t,s){const i=Hg(e).ResizeObserver,n=i?new i(s):null;return n?.observe(t),()=>n?.disconnect()}function ws(e,t){const s=Hg(e);s.requestAnimationFrame?s.requestAnimationFrame(t):s.webkitRequestAnimationFrame?s.webkitRequestAnimationFrame(t):s.setTimeout(t,0)}var Zg="data-ref",al;function vu(){return al??(al=document.createTextNode(" ")),al.cloneNode()}function Cn(e){const{attrs:t,children:s,cls:o,ref:i,role:n,tag:r}=e,a=document.createElement(r);if(o&&(a.className=o),i&&a.setAttribute(Zg,i),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(s)if(typeof s=="string")a.textContent=s;else{let l=!0;for(const c of s)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(vu()),l=!1),a.append(Cn(c)),a.appendChild(vu())))}return a}var Mb=["touchstart","touchend","touchmove","touchcancel","scroll"],Tb=["wheel"],ll={},Xg=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return s=>{if(typeof ll[s]=="boolean")return ll[s];const o=document.createElement(e[s]||"div");return s="on"+s,ll[s]=s in o}})();function Ib(e,t){return!t||!e?!1:Ab(t).indexOf(e)>=0}function kb(e){const t=[];let s=e.target;for(;s;)t.push(s),s=s.parentElement;return t}function Ab(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():kb(t)}function Lb(e,t,s){const o=Ob(t);let i;o!=null&&(i={passive:o}),e.addEventListener(t,s,i)}var Ob=e=>{const t=Mb.includes(e),s=Tb.includes(e);if(t)return!0;if(s)return!1};function Qg(e,t,s){if(s===0)return!1;const o=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return Math.max(o,i)<=s}var Wi=(e,t)=>{const s=e.identifier;for(let o=0,i=t.length;o<i;++o){const n=t[o];if(n.identifier===s)return n}return null};function on(e,t){return e.gos.isElementInThisInstance(t.target)}function Nb(e,t,s){const i=e.getBoundingClientRect().height,n=cb(s)-2,r=db(s)-2;if(!e.offsetParent)return;const l=Kg(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-i/2,h=d-l.left-10;const p=Qe(s),f=p.defaultView||window,C=f.pageYOffset||p.documentElement.scrollTop,v=f.pageXOffset||p.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+v&&(h=n+v-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+C&&(u=r+C-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}var ar=(e,...t)=>{for(const s of t){const[o,i,n,r]=s;o.addEventListener(i,n,r),e.push(s)}},Jc=e=>{if(e){for(const[t,s,o,i]of e)t.removeEventListener(s,o,i);e.length=0}},Es=e=>{e.cancelable&&e.preventDefault()};function Hb(e,t){return t}function Jg(e){return e?.getLocaleTextFunc()??Hb}function Gb(e,t,s,o){const i=t[s];return e.getLocaleTextFunc()(s,typeof i=="function"?i(o):i,o)}function Bb(e){return(t,s,o)=>e({key:t,defaultValue:s,variableValues:o})}function Vb(e){return(t,s,o)=>{let i=e?.[t];if(i&&o?.length){let n=0;for(;!(n>=o.length||i.indexOf("${variable}")===-1);)i=i.replace("${variable}",o[n++])}return i??s}}var ss=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 uo),this.localEventService.addEventListener(e,t,s)}removeEventListener(e,t,s){this.localEventService?.removeEventListener(e,t,s)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const s=[];for(const o of Object.keys(t)){const i=t[o];i&&s.push(this._setupListener(e,o,i))}return s}_setupListener(e,t,s){if(this.destroyed)return()=>null;let o;if(zb(e))e.__addEventListener(t,s),o=()=>(e.__removeEventListener(t,s),null);else{const i=Wb(e);e instanceof HTMLElement?Lb(e,t,s):i?e.addListener(t,s):e.addEventListener(t,s),o=i?()=>(e.removeListener(t,s),null):()=>(e.removeEventListener(t,s),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==o),null)}setupPropertyListener(e,t){const{gos:s}=this;s.addPropertyEventListener(e,t);const o=()=>(s.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const s=e.join("-")+this.propertyListenerId++,o=i=>{if(i.changeSet){if(i.changeSet&&i.changeSet.id===this.lastChangeSetIdLookup[s])return;this.lastChangeSetIdLookup[s]=i.changeSet.id}const n={type:"propertyChanged",changeSet:i.changeSet,source:i.source};t(n)};for(const i of e)this.setupPropertyListener(i,o)}getLocaleTextFunc(){return Jg(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 zb(e){return e.__addEventListener!==void 0}function Wb(e){return e.eventServiceType==="global"}var A=class extends ss{},wu={};function ed(e,t){wu[t]||(e(),wu[t]=!0)}var _b={pending:!1,funcs:[]},jb={pending:!1,funcs:[]};function ic(e,t="setTimeout",s){const o=t==="raf"?jb:_b;if(o.funcs.push(e),o.pending)return;o.pending=!0;const i=()=>{const n=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const r of n)r()};t==="raf"?ws(s,i):window.setTimeout(i,0)}function st(e,t,s){let o;return function(...i){const n=this;window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(n,i)},s)}}function bu(e,t){let s=0;return function(...o){const i=this,n=Date.now();n-s<t||(s=n,e.apply(i,o))}}function Ub(e,t,s,o=100){const i=Date.now();let n=null,r=!1;const a=()=>{n!=null&&(window.clearInterval(n),n=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-i>o;(t()||c)&&(s(),r=!0,a())};l(),r||(n=window.setInterval(l,10))}var ep=new Set(["__proto__","constructor","prototype"]);function $b(e,t){if(e!=null){if(Array.isArray(e)){for(let s=0;s<e.length;s++)t(s.toString(),e[s]);return}for(const s of Object.keys(e).filter(o=>!ep.has(o)))t(s,e[s])}}function ht(e,t,s=!0,o=!1){q(t)&&$b(t,(i,n)=>{let r=e[i];r!==n&&(o&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[i]=r),Su(n)&&Su(r)&&!Array.isArray(r)?ht(r,n,s,o):(s||n!==void 0)&&(e[i]=n))})}function Su(e){return typeof e=="object"&&e!==null}var td=class rs{static applyGlobalGridOptions(t){if(!rs.gridOptions)return{...t};let s={};return ht(s,rs.gridOptions,!0,!0),rs.mergeStrategy==="deep"?ht(s,t,!0,!0):s={...s,...t},rs.gridOptions.context&&(s.context=rs.gridOptions.context),t.context&&(rs.mergeStrategy==="deep"&&s.context&&ht(t.context,s.context,!0,!0),s.context=t.context),s}static applyGlobalGridOption(t,s){if(rs.mergeStrategy==="deep"){const o=tp(t);if(o&&typeof o=="object"&&typeof s=="object")return rs.applyGlobalGridOptions({[t]:s})[t]}return s}};td.gridOptions=void 0;td.mergeStrategy="shallow";var sd=td;function tp(e){return sd.gridOptions?.[e]}var sp={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},op="https://www.ag-grid.com";function go(e,t,...s){e.get("debug")&&console.log("AG Grid: "+t,...s)}function _i(e,...t){ed(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function _o(e,...t){ed(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var ip=new Set,Pr={},so={},lr,np=!1,rp=!1,Kb=!1;function qb(e){const[t,s]=e.version.split(".")||[],[o,i]=lr.split(".")||[];return t===o&&s===i}function Yb(e){lr||(lr=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;e.version?qb(e)||_o(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${lr}.`)):_o(t(`'${e.moduleName}' is incompatible.`));const s=e.validate?.();s&&!s.isValid&&_o(`${s.message}`)}function nn(e,t,s=!1){s||(np=!0),Yb(e);const o=e.rowModels??["all"];ip.add(e);let i;t!==void 0?(rp=!0,so[t]===void 0&&(so[t]={}),i=so[t]):i=Pr;for(const n of o)i[n]===void 0&&(i[n]={}),i[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)nn(n,t,s)}function Zb(e){delete so[e]}function nc(e,t,s){const o=i=>!!Pr[i]?.[e]||!!so[t]?.[i]?.[e];return o(s)||o("all")}function od(){return rp}function Xb(e,t){const s=so[e]??{};return[...Object.values(Pr.all??{}),...Object.values(s.all??{}),...Object.values(Pr[t]??{}),...Object.values(s[t]??{})]}function Qb(){return new Set(ip)}function Jb(e,t){const s=so[e]??{};return[...Object.values(s.all??{}),...Object.values(s[t]??{})]}function e0(){return np}function t0(){return Kb}var s0=class{static register(e){nn(e,void 0)}static registerModules(e){for(const t of e)nn(t,void 0)}},K="34.3.0",yu=2e3,xu=100,ap="_version_",lp=null,jo=`${op}/javascript-data-grid`;function o0(e){lp=e}function i0(e){jo=e}function cp(e,t,s){return lp?.(e,t)??[l0(e,t,s)]}function id(e,t,s,o,i){e(`${o?"warning":"error"} #${t}`,...cp(t,s,i))}function n0(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 r0(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=n0(e)),t}function Mr(e){return e===void 0?"undefined":e===null?"null":e}function rc(e,t){return`${e}?${t.toString()}`}function a0(e,t,s){const o=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let i=rc(e,t);for(const[n,r]of o){if(n===ap)continue;const a=i.length-s;if(a<=0)break;const l="...",c=a+l.length,d=r.length-c>xu?r.slice(0,r.length-c)+l:r.slice(0,xu)+l;t.set(n,d),i=rc(e,t)}return i}function dp(e,t){const s=new URLSearchParams;if(s.append(ap,K),t)for(const n of Object.keys(t))s.append(n,r0(t[n]));const o=`${jo}/errors/${e}`,i=rc(o,s);return i.length<=yu?i:a0(o,s,yu)}var l0=(e,t,s)=>{const o=dp(e,t);return`${`${s?s+`
2
+ `:""}Visit ${o}`}${s?"":`
3
+ Alternatively register the ValidationModule to see the full message in the console.`}`};function G(...e){id(_i,e[0],e[1],!0)}function Pe(...e){id(_o,e[0],e[1],!1)}function Li(e,t,s){id(_o,e,t,!1,s)}function c0(e,t){const s=t[0];return`error #${s} `+cp(s,t[1],e).join(" ")}function es(...e){return c0(void 0,e)}function up(e,t){return e.get("rowModelType")===t}function We(e,t){return up(e,"clientSide")}function yo(e,t){return up(e,"serverSide")}function ot(e,t){return e.get("domLayout")===t}function oo(e){return Ir(e)!==void 0}function hp(e){return typeof e.get("getRowHeight")=="function"}function d0(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function ks(e,t,s=!1,o){const{gos:i,environment:n}=e;if(o==null&&(o=n.getDefaultRowHeight()),hp(i)){if(s)return{height:o,estimated:!0};const l={node:t,data:t.data},c=i.getCallback("getRowHeight")(l);if(ac(c))return c===0&&G(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&i.get("masterDetail"))return u0(i);const r=i.get("rowHeight");return{height:r&&ac(r)?r:o,estimated:!1}}function u0(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return ac(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function io(e){const{environment:t,gos:s}=e,o=s.get("rowHeight");if(!o||Ge(o))return t.getDefaultRowHeight();const i=t.refreshRowHeightVariable();return i!==-1?i:(G(24),t.getDefaultRowHeight())}function ac(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function gp(e,t,s){const o=t[e.getDomDataKey()];return o?o[s]:void 0}function po(e,t,s,o){const i=e.getDomDataKey();let n=t[i];Ge(n)&&(n={},t[i]=n),n[s]=o}function Uo(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function pp(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||ot(e,"print"))}function Zt(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function lc(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function fp(e){return e.get("grandTotalRow")}function mp(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Cp(e,t,s){return!!t.group&&!t.footer&&mp(e,s)}function si(e){const t=e.getCallback("getRowId");return t===void 0?t:s=>{let o=t(s);return typeof o!="string"&&(ed(()=>G(25,{id:o}),"getRowIdString"),o=String(o)),o}}function h0(e,t){const s=e.get("groupHideParentOfSingleChild");return!!(s===!0||s==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function g0(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function $o(e){return e?.checkboxes??!0}function cr(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function Tr(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function cl(e){return e?.hideDisabledCheckboxes??!1}function p0(e){return typeof e.get("rowSelection")!="string"}function As(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function vp(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const s=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return s&&o?!1:s?"enableDeselection":o?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function f0(e){const t=vp(e);return t===!0||t==="enableSelection"}function m0(e){const t=vp(e);return t===!0||t==="enableDeselection"}function cc(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function Ir(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 kr(e){return Ir(e)==="multiRow"}function C0(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function Ar(e){const t=e.get("rowSelection");if(typeof t=="string"){const s=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return s&&o?"filteredDescendants":s?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function wp(e,t=!0){const s=e.get("rowSelection");return typeof s!="object"?t?"all":void 0:s.mode==="multiRow"?s.selectAll:"all"}function v0(e){const t=e.get("rowSelection");return typeof t=="string"?!1:t?.mode==="multiRow"?t.ctrlASelectsRows??!1:!1}function rn(e){const t=Ar(e);return t==="descendants"||t==="filteredDescendants"}function Ru(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function w0(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Ft(e){return e.get("columnMenu")==="legacy"}function b0(e){return!Ft(e)}function S0(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function y0(e,t,s){typeof e!="object"&&(e={});const o={...e};for(const i of s){const n=t[i];typeof n<"u"&&(o[i]=n)}return o}function x0(e,t){if(!e)return;const s={};let o=!1;for(const r of Object.keys(e))s[r]=e[r],o=!0;if(!o)return;const i={type:"gridOptionsChanged",options:s};t.dispatchEvent(i);const n={type:"componentStateChanged",...s};t.dispatchEvent(n)}function de(e,t){return e.addCommon(t)}function dr(e,t){return e[t]??e.gridOptions?.[t]??tp(t)??sp[t]}function Fu({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var R0={resizable:!0,sortable:!0},F0=0;function bp(){return F0++}function Ls(e){return e instanceof xo}var xo=class extends A{constructor(e,t,s,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=s,this.primary=o,this.isColumn=!0,this.instanceId=bp(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new uo,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Bi(s)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:s,colFlex:o}}=this;t?.initCol(this);const i=e.hide;i!==void 0?this.visible=!i:this.visible=!e.initialHide,s?.initCol(this),o?.initCol(this)}setColDef(e,t,s){const o=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),o&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",s)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:s}}=this,o=e.get("suppressFieldDotNotation");this.fieldContainsDots=q(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=q(s)&&s.includes(".")&&!o}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:s=>{const o=e.recreateColDef(this.colDef);this.setColDef(o,o,s.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const s=e.width,o=e.initialWidth;return s!=null?t=s:o!=null?t=o:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const s=this.frameworkEventListenerService?.wrap(e,t)??t;this.colEventSvc.addEventListener(e,s)}removeEventListener(e,t){const s=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,s)}createColumnFunctionCallbackParams(e){return de(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]??R0[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 de(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return Ge(this.sort)}isSorting(){return q(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return G(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 de(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Ge(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),s=this.colDef.colSpan(t);return Math.max(s,1)}getRowSpan(e){if(Ge(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),s=this.colDef.rowSpan(t);return Math.max(s,1)}setActualWidth(e,t,s=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),s||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,s){const o=this.createColumnEvent(e,t);s&&ht(o,s),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function rt(e){return e instanceof ur}var ur=class extends A{constructor(e,t,s,o){super(),this.colGroupDef=e,this.groupId=t,this.padding=s,this.level=o,this.isColumn=!1,this.expandable=!1,this.instanceId=bp(),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)Ls(t)?e(t):rt(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)Ls(t)?e.push(t):rt(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,s=!1;const o=this.findChildrenRemovingPadding();for(let n=0,r=o.length;n<r;n++){const a=o[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,s=!0):l==="closed"?(t=!0,s=!0):(e=!0,t=!0)}const i=e&&t&&s;this.expandable!==i&&(this.expandable=i,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=s=>{for(const o of s)rt(o)&&o.isPadding()?t(o.children):e.push(o)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},E0={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Eu(e,t,s){const o={},i=e.gos;return Object.assign(o,i.get("defaultColGroupDef")),Object.assign(o,t),i.validateColDef(o,s),o}var D0=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=sc(e);let s=0;for(;;){let o=e??t;if(o?s!==0&&(o+="_"+s):o=s,!this.existingKeys[o]){const i=String(o);return e&&s>0&&G(273,{providedId:e,usedId:i}),this.existingKeys[i]=!0,i}s++}}};function Me(e){if(e?.length)return e[e.length-1]}function Ns(e,t,s){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i++)if(e[i]!==t[i]&&!s?.(e[i],t[i]))return!1;return!0}function Ei(e,t){if(e)for(const s of e)t(s)}function zt(e,t){const s=e.indexOf(t);s>=0&&e.splice(s,1)}function Du(e,t,s){for(let o=0;o<t.length;o++)zt(e,t[o]);for(let o=t.length-1;o>=0;o--)e.splice(s,0,t[o])}var ha="ag-Grid-AutoColumn",Sp="ag-Grid-SelectionColumn",yp="ag-Grid-RowNumbersColumn";function xp(e){const t=[],s=o=>{for(let i=0;i<o.length;i++){const n=o[i];Ls(n)?t.push(n):rt(n)&&s(n.getChildren())}};return s(e),t}function as(e){return e.reduce((t,s)=>t+s.getActualWidth(),0)}function Lr(e,t,s){const o={};if(!t)return;gs(null,t,n=>{o[n.getInstanceId()]=n}),s&&gs(null,s,n=>{o[n.getInstanceId()]=null});const i=Object.values(o).filter(n=>n!=null);e.context.destroyBeans(i)}function nd(e){return e.getId().startsWith(ha)}function bs(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Sp)??!1}function hs(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(yp)??!1}function P0(e){return bs(e)||hs(e)}function Or(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function M0(e,t){return Ns(e,t,(s,o)=>s.getColId()===o.getColId())}function T0(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function Ko(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function ji(e,t){const s=e===t,o=e.getColDef()===t,i=e.getColId()==t;return s||o||i}var I0=(e,t)=>(s,o)=>{const i={value1:void 0,value2:void 0};let n=!1;return e&&(e[s]!==void 0&&(i.value1=e[s],n=!0),q(o)&&e[o]!==void 0&&(i.value2=e[o],n=!0)),!n&&t&&(t[s]!==void 0&&(i.value1=t[s]),q(o)&&t[o]!==void 0&&(i.value2=t[o])),i},k0=(e,t)=>{rt(e)&&e.setupExpandable(),e.originalParent=t};function A0(e,t=null,s,o,i){const n=new D0,{existingCols:r,existingGroups:a,existingColKeys:l}=L0(o);n.addExistingKeys(l);const c=Rp(e,t,0,s,r,n,a,i),{colGroupSvc:d}=e,u=d?.findMaxDepth(c,0)??0,h=d?d.balanceColumnTree(c,0,u,n):c;return gs(null,h,k0),{columnTree:h,treeDepth:u}}function L0(e){const t=[],s=[],o=[];return e&&gs(null,e,i=>{if(rt(i)){const n=i;s.push(n)}else{const n=i;o.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:s,existingColKeys:o}}function Rp(e,t,s,o,i,n,r,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let d=0;d<c.length;d++){const u=t[d];l&&V0(u)?c[d]=l.createProvidedColumnGroup(o,u,s,i,n,r,a):c[d]=O0(e,o,u,i,n,a)}return c}function O0(e,t,s,o,i,n){const r=H0(s,o);r&&o?.splice(r.idx,1);let a=r?.column;if(a){const l=dc(e,s,a.getColId());a.setColDef(l,s,n),N0(e,a,l,n)}else{const l=i.getUniqueKey(s.colId,s.field),c=dc(e,s,l);a=new xo(c,s,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function Fp(e,t,s,o,i,n,r,a){const{sortSvc:l,pinnedCols:c,colFlex:d}=e;s!==void 0&&t.setVisible(!s,a),l&&(l.updateColSort(t,o,a),i!==void 0&&l.setColSortIndex(t,i)),n!==void 0&&c?.setColPinned(t,n),r!==void 0&&d?.setColFlex(t,r)}function N0(e,t,s,o){Fp(e,t,s.hide,s.sort,s.sortIndex,s.pinned,s.flex,o);const i=t.getFlex();if(!(i!=null&&i>0))if(s.width!=null)t.setActualWidth(s.width,o);else{const n=t.getActualWidth();t.setActualWidth(n,o)}}function H0(e,t){if(t)for(let s=0;s<t.length;s++){const o=t[s].getUserProvidedColDef();if(!o)continue;if(e.colId!=null){if(t[s].getId()===e.colId)return{idx:s,column:t[s]};continue}if(e.field!=null){if(o.field===e.field)return{idx:s,column:t[s]};continue}if(o===e)return{idx:s,column:t[s]}}}function dc(e,t,s,o){const{gos:i,dataTypeSvc:n}=e,r={},a=i.get("defaultColDef");ht(r,a,!1,!0);const l=G0(e,r,t,s);l&&B0(e,l,r);const c=r.cellDataType;ht(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const d=i.get("autoGroupColumnDef"),u=Zt(i);return t.rowGroup&&d&&u&&ht(r,{sort:d.sort,initialSort:d.initialSort},!1,!0),n&&(n.postProcess(r),n.validateColDef(r)),i.validateColDef(r,s,o),r}function G0(e,t,s,o){const i=e.dataTypeSvc?.updateColDefAndGetColumnType(t,s,o),n=s.type??i??t.type;return t.type=n,n?Or(n):void 0}function B0(e,t,s){if(!t.length)return;const o=Object.assign({},E0),i=e.gos.get("columnTypes")||{};for(const n of Object.keys(i)){const r=i[n];n in o?G(34,{key:n}):(r.type&&G(35),o[n]=r)}for(const n of t){const r=o[n.trim()];r?ht(s,r,!1,!0):G(36,{t:n})}}function V0(e){return e.children!==void 0}function gs(e,t,s){if(t)for(let o=0;o<t.length;o++){const i=t[o];rt(i)&&gs(i,i.getChildren(),s),s(i,e)}}function Ep(e,t){const s=[],o=[],i=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?i.push(r):a==="left"||a===!0?s.push(r):o.push(r)}),t.get("enableRtl")?[...i,...o,...s]:[...s,...o,...i]}function Dp(e,t){let s=!0;return gs(null,t,o=>{if(!rt(o))return;const i=o;if(!i.getColGroupDef()?.marryChildren)return;const a=[];for(const h of i.getLeafColumns()){const p=e.indexOf(h);a.push(p)}const l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),d=l-c,u=i.getLeafColumns().length-1;d>u&&(s=!1)}),s}function Pp(e,t){if(!e||e.length==0)return;const s=t(e[0]);for(let o=1;o<e.length;o++)if(s!==t(e[o]))return;return s}function Mp(e,t,s){if(!t.length)return;const o=t.length===1?t[0]:null,i=Pp(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:i??null,columns:t,column:o,source:s})}function z0(e,t,s){if(!t.length)return;const o=t.length===1?t[0]:null,i=Pp(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:i,columns:t,column:o,source:s})}function W0(e,t,s,o){e.dispatchEvent({type:t,columns:s,column:s&&s.length==1?s[0]:null,source:o})}function oi(e,t,s,o,i=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:i,finished:s,source:o})}function Vt(e,t,s){const{colModel:o,rowGroupColsSvc:i,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:d,environment:u,valueColsSvc:h,eventSvc:p,gos:f}=e,C=o.getColDefCols()??[],v=a?.getColumns();if(!C.length&&!v?.length)return!1;if(t?.state&&!t.state.forEach)return G(32),!1;const w=(x,R,E,D,T)=>{if(!x)return;const k=I0(R,t.defaultState),F=k("flex").value1;if(Fp(e,x,k("hide").value1,k("sort").value1,k("sortIndex").value1,k("pinned").value1,F,s),F==null){const M=k("width").value1;if(M!=null){const L=x.getColDef().minWidth??u.getDefaultColumnMinWidth();L!=null&&M>=L&&x.setActualWidth(M,s)}}T||!x.isPrimary()||(h?.syncColumnWithState(x,s,k),i?.syncColumnWithState(x,s,k,E),n?.syncColumnWithState(x,s,k,D))},b=(x,R,E)=>{const D=Tp(e,s),T=R.slice(),k={},F={},M=[],L=[],B=[];let H=0;const Q=i?.columns.slice()??[],ee=n?.columns.slice()??[];for(const z of x){const X=z.colId;if(X.startsWith(ha)){M.push(z),B.push(z);continue}if(bs(X)){L.push(z),B.push(z);continue}const _=E(X);_?(w(_,z,k,F,!1),zt(T,_)):(B.push(z),H+=1)}const O=z=>w(z,null,k,F,!1);T.forEach(O),i?.sortColumns(Pu.bind(i,k,Q)),n?.sortColumns(Pu.bind(n,F,ee)),o.refreshCols(!1,s);const le=(z,X,Y=[])=>{for(const _ of X){const U=z(_.colId);zt(Y,U),w(U,_,null,null,!0)}Y.forEach(O)};return le(z=>r?.getColumn(z)??null,M,r?.getColumns()?.slice()),le(z=>a?.getColumn(z)??null,L,a?.getColumns()?.slice()),j0(t,o,f),c.refresh(s),p.dispatchEvent({type:"columnEverythingChanged",source:s}),D(),{unmatchedAndAutoStates:B,unmatchedCount:H}};l?.start();let{unmatchedAndAutoStates:S,unmatchedCount:y}=b(t.state||[],C,x=>o.getColDefCol(x));if(S.length>0||q(t.defaultState)){const x=d?.getPivotResultCols()?.list??[];y=b(S,x,R=>d?.getPivotResultCol(R)??null).unmatchedCount}return l?.finish(),y===0}function _0(e,t){const{colModel:s,autoColSvc:o,selectionColSvc:i,eventSvc:n,gos:r}=e,a=s.getColDefCols();if(!a?.length)return;const l=s.getColDefColTree(),c=xp(l),d=[];let u=1e3,h=1e3;const p=b=>{const S=Ip(b);Ge(S.rowGroupIndex)&&S.rowGroup&&(S.rowGroupIndex=u++),Ge(S.pivotIndex)&&S.pivot&&(S.pivotIndex=h++),d.push(S)};o?.getColumns()?.forEach(p),i?.getColumns()?.forEach(p),c?.forEach(p),Vt(e,{state:d},t);const f=o?.getColumns()??[],w=[...i?.getColumns()??[],...f,...a].map(b=>({colId:b.colId}));Vt(e,{state:w,applyOrder:!0},t),n.dispatchEvent(de(r,{type:"columnsReset",source:t}))}function Tp(e,t){const{rowGroupColsSvc:s,pivotColsSvc:o,valueColsSvc:i,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:s?.columns.slice()??[],pivotColumns:o?.columns.slice()??[],valueColumns:i?.columns.slice()??[]},c=Nr(e),d={};for(const u of c)d[u.colId]=u;return()=>{const u=(R,E,D,T)=>{const k=E.map(T),F=D.map(T);if(Ns(k,F))return;const L=new Set(E);for(const H of D)L.delete(H)||L.add(H);const B=[...L];a.dispatchEvent({type:R,columns:B,column:B.length===1?B[0]:null,source:t})},h=R=>{const E=[];return n.forAllCols(D=>{const T=d[D.getColId()];T&&R(T,D)&&E.push(D)}),E},p=R=>R.getColId();u("columnRowGroupChanged",l.rowGroupColumns,s?.columns??[],p),u("columnPivotChanged",l.pivotColumns,o?.columns??[],p);const C=h((R,E)=>{const D=R.aggFunc!=null,T=D!=E.isValueActive(),k=D&&R.aggFunc!=E.getAggFunc();return T||k});C.length>0&&W0(a,"columnValueChanged",C,t),oi(a,h((R,E)=>R.width!=E.getActualWidth()),!0,t),Mp(a,h((R,E)=>R.pinned!=E.getPinned()),t),z0(a,h((R,E)=>R.hide==E.isVisible()),t);const y=h((R,E)=>R.sort!=E.getSort()||R.sortIndex!=E.getSortIndex());y.length>0&&r?.dispatchSortChangedEvents(t,y);const x=Nr(e);$0(c,x,t,n,a)}}function Nr(e){const{colModel:t,rowGroupColsSvc:s,pivotColsSvc:o}=e,i=t.getColDefCols();if(Ge(i)||!t.isAlive())return[];const n=s?.columns,r=o?.columns,a=[],l=d=>{const u=d.isRowGroupActive()&&n?n.indexOf(d):null,h=d.isPivotActive()&&r?r.indexOf(d):null,p=d.isValueActive()?d.getAggFunc():null,f=d.getSort()!=null?d.getSort():null,C=d.getSortIndex()!=null?d.getSortIndex():null;a.push({colId:d.getColId(),width:d.getActualWidth(),hide:!d.isVisible(),pinned:d.getPinned(),sort:f,sortIndex:C,aggFunc:p,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,p=c.has(u.colId)?c.get(u.colId):-1;return h-p}),a}function Ip(e){const t=(f,C)=>f??C??null,s=e.getColDef(),o=t(s.sort,s.initialSort),i=t(s.sortIndex,s.initialSortIndex),n=t(s.hide,s.initialHide),r=t(s.pinned,s.initialPinned),a=t(s.width,s.initialWidth),l=t(s.flex,s.initialFlex);let c=t(s.rowGroupIndex,s.initialRowGroupIndex),d=t(s.rowGroup,s.initialRowGroup);c==null&&!d&&(c=null,d=null);let u=t(s.pivotIndex,s.initialPivotIndex),h=t(s.pivot,s.initialPivot);u==null&&!h&&(u=null,h=null);const p=t(s.aggFunc,s.initialAggFunc);return{colId:e.getColId(),sort:o,sortIndex:i,hide:n,pinned:r,width:a,flex:l,rowGroup:d,rowGroupIndex:c,pivot:h,pivotIndex:u,aggFunc:p}}function j0(e,t,s){if(!e.applyOrder||!e.state)return;const o=[];for(const i of e.state)i.colId!=null&&o.push(i.colId);U0(t.cols,o,t,s)}function U0(e,t,s,o){if(e==null)return;let i=[];const n={};for(const a of t){if(n[a])continue;const l=e.map[a];l&&(i.push(l),n[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(n[l]!=null)continue;l.startsWith(ha)?i.splice(r++,0,a):i.push(a)}if(i=Ep(i,o),!Dp(i,s.getColTree())){G(39);return}e.list=i}function $0(e,t,s,o,i){const n={};for(const d of t)n[d.colId]=d;const r={};for(const d of e)n[d.colId]&&(r[d.colId]=!0);const a=e.filter(d=>r[d.colId]),l=t.filter(d=>r[d.colId]),c=[];l.forEach((d,u)=>{const h=a?.[u];if(h&&h.colId!==d.colId){const p=o.getCol(h.colId);p&&c.push(p)}}),c.length&&i.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:s})}var Pu=(e,t,s,o)=>{const i=e[s.getId()],n=e[o.getId()],r=i!=null,a=n!=null;if(r&&a)return i-n;if(r)return-1;if(a)return 1;const l=t.indexOf(s),c=t.indexOf(o),d=l>=0,u=c>=0;return d&&u?l-c:d?-1:1},K0=class extends A{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(Ko(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Ko(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:s,colAutosize:o,rowGroupColsSvc:i,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,d=this.colDefs?Tp(t,e):void 0;s?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,p=A0(t,this.colDefs,!0,h,e);Lr(t,this.colDefCols?.tree,p.columnTree);const f=p.columnTree,C=p.treeDepth,v=xp(f),w={};for(const b of v)w[b.getId()]=b;this.colDefCols={tree:f,treeDepth:C,list:v,map:w},this.createColumnsForService([c],this.colDefCols,e),i?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.refreshCols(!0,e),a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&o?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const s=this.cols?.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:i,rowNumbersSvc:n,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:d,colViewport:u,eventSvc:h}=this.beans,p=this.selectCols(a,this.colDefCols);this.createColumnsForService([o,i,n],p,t);const f=d0(this.gos,this.showingPivotResult);(!e||f)&&this.restoreColOrder(p),this.positionLockedCols(p),l?.refresh(),r?.refreshCols(),this.setColSpanActive(),c?.setAutoHeightActive(p),d.clear(),u.clear(),!Ns(s,this.cols.tree)&&h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,s){for(const o of e)o&&(o.createColumns(t,i=>{this.lastOrder=i(this.lastOrder),this.lastPivotOrder=i(this.lastPivotOrder)},s),o.addColumns(t))}selectCols(e,t){const s=e?.getPivotResultCols()??null;this.showingPivotResult=s!=null;const{map:o,list:i,tree:n,treeDepth:r}=s??t;return this.cols={list:i.slice(),map:{...o},tree:n.slice(),treeDepth:r},s&&(s.list.some(l=>this.cols?.map[l.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:e,selectionColSvc:t,gos:s}=this.beans,o=this.isPivotMode()&&!this.showingPivotResult,i=t?.isSelectionColumnEnabled(),n=s.get("rowNumbers"),r=e?.columns;return this.cols.list.filter(l=>{const c=nd(l);if(o){const d=r?.includes(l);return c||d||i&&bs(l)||n&&hs(l)}else return c||l.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,s){Vt(this.beans,{state:e.map(o=>({colId:typeof o=="string"?o:o.getColId(),hide:!t}))},s)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const s=t.filter(u=>e.map[u.getId()]!=null);if(s.length===0)return;if(s.length===e.list.length){e.list=s;return}const o=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:o(h):!1};if(!s.some(u=>o(u))){const u=new Set(s);for(const h of e.list)u.has(h)||s.push(h);e.list=s;return}const i=new Map;for(let u=0;u<s.length;u++){const h=s[u];i.set(h,u)}const n=e.list.filter(u=>!i.has(u));if(n.length===0){e.list=s;return}const r=(u,h)=>{const p=h?h.getOriginalParent():u.getOriginalParent();if(!p)return null;let f=null,C=null;for(const v of p.getChildren())if(!(v===h||v===u)){if(v instanceof xo){const w=i.get(v);if(w==null)continue;(f==null||f<w)&&(f=w,C=v);continue}v.forEachLeafColumn(w=>{const b=i.get(w);b!=null&&(f==null||f<b)&&(f=b,C=w)})}return C??r(u,p)},a=[],l=new Map;for(const u of n){const h=r(u,null);if(h==null){a.push(u);continue}const p=l.get(h);p===void 0?l.set(h,u):Array.isArray(p)?p.push(u):l.set(h,[p,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],p=l.get(h);if(p)if(Array.isArray(p))for(let f=p.length-1;f>=0;f--){const C=p[f];c[d--]=C}else c[d--]=p;c[d--]=h}e.list=c}positionLockedCols(e){e.list=Ep(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:s,eventSvc:o}=this.beans;s.refresh(t),o.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=Ko(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){Lr(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:s,selectionColSvc:o,groupHierarchyColSvc:i}=this.beans;Ei(this.colDefCols?.list,e),Ei(s?.columns?.list,e),Ei(o?.columns?.list,e),Ei(i?.columns?.list,e),Ei(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(t==null)return null;const{map:s,list:o}=t;if(typeof e=="string"&&s[e])return s[e];for(let a=0;a<o.length;a++)if(ji(o[a],e))return o[a];const{autoColSvc:i,selectionColSvc:n,groupHierarchyColSvc:r}=this.beans;return i?.getColumn(e)??n?.getColumn(e)??r?.getColumn(e)??null}},kp=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}},hi=class extends A{};function vn(e,t,s){return s&&e.addDestroyFunc(()=>t.destroyBean(s)),s??e}var ne=null;function Mu(e){return typeof e?.getGui=="function"}var wn=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(!e)return;if(e.indexOf(" ")>=0){const o=(e||"").split(" ");if(o.length>1){for(const i of o)this.toggleCss(i,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}},q0=0,bn=class extends ss{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=q0++,this.cssManager=new wn(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(s=>[s.selector,s])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui());const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(const t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(Zg):null}applyElementsToComponent(e,t,s,o=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const i=this[t];if(i===ne)this[t]=o??e;else{const n=s?.[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${i}`)}}}createChildComponentsFromTags(e,t){const s=[];for(const o of e.childNodes??[])s.push(o);for(const o of s){if(!(o instanceof HTMLElement))continue;const i=this.createComponentFromElement(o,n=>{const r=n.getGui();if(r)for(const a of o.attributes??[])r.setAttribute(a.name,a.value)},t);if(i){if(i.addItems&&o.children.length){this.createChildComponentsFromTags(o,t);const n=Array.prototype.slice.call(o.children);i.addItems(n)}this.swapComponentForNode(i,e,o)}else o.childNodes&&this.createChildComponentsFromTags(o,t)}}createComponentFromElement(e,t,s){const o=e.nodeName,i=this.getDataRefAttribute(e),n=o.indexOf("AG-")===0,r=n?this.componentSelectors.get(o):null;let a=null;if(r){const l=s&&i?s[i]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${o}`);return this.applyElementsToComponent(e,i,s,a),a}swapComponentForNode(e,t,s){const o=e.getGui();t.replaceChild(o,s),t.insertBefore(document.createComment(s.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const s of e)s.setAttribute("tabindex",t.toString())}setTemplate(e,t,s){let o;typeof e=="string"||e==null?o=Yc(e):o=Cn(e),this.setTemplateFromElement(o,t,s)}setTemplateFromElement(e,t,s,o=!1){if(this.eGui=e,this.suppressDataRefValidation=o,t)for(let i=0;i<t.length;i++){const n=t[i];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,s)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let s=t;return e==null?null:(s||(s=this.eGui),Qc(e)?{element:e,parent:s}:{element:e.getGui(),parent:s})}prependChild(e,t){const{element:s,parent:o}=this.getContainerAndElement(e,t)||{};!s||!o||o.insertAdjacentElement("afterbegin",s)}appendChild(e,t){const{element:s,parent:o}=this.getContainerAndElement(e,t)||{};!s||!o||o.appendChild(s)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:s}=t;Pb(this.eGui,e,{skipAriaHidden:s})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:s}=t;Be(this.eGui,e,{skipAriaHidden:s});const o={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(o)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,s){this.eGui.addEventListener(e,t,s),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},ze=class extends bn{};function Ap(e){return typeof e=="object"&&!!e.component}function Y0(e,t){return new Re(s=>{s(window.setInterval(e,t))})}var Re=class Oi{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 Oi(s=>{let o=t.length;const i=new Array(o);t.forEach((n,r)=>{n.then(a=>{i[r]=a,o--,o===0&&s(i)})})}):Oi.resolve()}static resolve(t=null){return new Oi(s=>s(t))}then(t){return new Oi(s=>{this.status===1?s(t(this.resolution)):this.waiters.push(o=>s(t(o)))})}onDone(t){this.status=1,this.resolution=t;for(const s of this.waiters)s(t)}onReject(t){}};function Z0(e){return e?e.prototype&&"getGui"in e.prototype:!1}function Lp(e,t,s,o){const{name:i}=s;let n,r,a,l,c,d;if(t){const u=t,h=u[i+"Selector"],p=h?h(o):null,f=C=>{typeof C=="string"?n=C:C!=null&&C!==!0&&(e.isFrameworkComponent(C)?a=C:r=C)};p?(f(p.component),l=p.params,c=p.popup,d=p.popupPosition):f(u[i])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:d}}var X0=class extends A{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,s,o=!1){return this.getCompDetails(this.gridOptions,e,t,s,o)}getCompDetails(e,t,s,o,i=!1){const{name:n,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:d,popupFromSelector:u,popupPositionFromSelector:h}=Lp(this.beans.frameworkOverrides,e,t,o),p,f;const C=S=>{const y=this.registry.getUserComponent(n,S);y&&(l=y.componentFromFramework?void 0:y.component,c=y.componentFromFramework?y.component:void 0,p=y.params,f=y.processParams)};if(a!=null&&C(a),l==null&&c==null&&s!=null&&C(s),l&&r&&!Z0(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!c){const{validation:S}=this.beans;i&&(a!==s||!s)?a?S?.isProvidedUserComp(a)||Pe(50,{compName:a}):s?S||Pe(260,{...this.gos.getModuleErrorParams(),propName:n,compName:s}):Pe(216,{name:n}):s&&!S&&Pe(146,{comp:s});return}const v=this.mergeParams(e,t,o,d,p,f),w=l==null,b=l??c;return{componentFromFramework:w,componentClass:b,params:v,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(b,w,v,t)}}newAgStackInstance(e,t,s,o){const i=!t;let n;i?n=new e:n=this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o),this.createBean(n);const r=n.init?.(s);return r==null?Re.resolve(n):r.then(()=>n)}mergeParams(e,t,s,o=null,i,n){const r={...s,...i},l=e?.[t.name+"Params"];if(typeof l=="function"){const c=l(s);ht(r,c)}else typeof l=="object"&&ht(r,l);return ht(r,o),n?n(r):r}},Q0={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},J0={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},eS={name:"headerComponent",optionalMethods:["refresh"]},tS={name:"innerHeaderComponent"},sS={name:"innerHeaderGroupComponent"},oS={name:"headerGroupComponent"},iS={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},nS={name:"loadingCellRenderer",cellRenderer:!0},rS={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},aS={name:"loadingOverlayComponent",optionalMethods:["refresh"]},lS={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},cS={name:"tooltipComponent"},rd={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},dS={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},uS={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},hS={name:"loadingCellRenderer",cellRenderer:!0},gS={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},pS={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function fS(e,t){return e.getCompDetailsFromGridOptions(J0,"agDragAndDropImage",t,!0)}function mS(e,t,s){return e.getCompDetails(t,eS,"agColumnHeader",s)}function CS(e,t,s){return e.getCompDetails(t,tS,void 0,s)}function vS(e,t){const s=t.columnGroup.getColGroupDef();return e.getCompDetails(s,oS,"agColumnGroupHeader",t)}function wS(e,t,s){return e.getCompDetails(t,sS,void 0,s)}function bS(e,t){return e.getCompDetailsFromGridOptions(uS,void 0,t,!0)}function SS(e,t){return e.getCompDetailsFromGridOptions(hS,"agLoadingCellRenderer",t,!0)}function yS(e,t){return e.getCompDetailsFromGridOptions(gS,"agGroupRowRenderer",t,!0)}function xS(e,t){return e.getCompDetailsFromGridOptions(pS,"agDetailCellRenderer",t,!0)}function Tu(e,t,s){return e.getCompDetails(t,iS,void 0,s)}function Iu(e,t,s){return e.getCompDetails(t,nS,"agSkeletonCellRenderer",s,!0)}function Op(e,t,s){return e.getCompDetails(t,rS,"agCellEditor",s,!0)}function RS(e,t,s,o){const i=t.filter;return Ap(i)&&(t={filter:i.component,filterParams:t.filterParams}),e.getCompDetails(t,rd,o,s,!0)}function FS(e,t,s){return e.getCompDetails(t,Q0,"agDateInput",s,!0)}function ES(e,t){return e.getCompDetailsFromGridOptions(aS,"agLoadingOverlay",t,!0)}function DS(e,t){return e.getCompDetailsFromGridOptions(lS,"agNoRowsOverlay",t,!0)}function PS(e,t){return e.getCompDetails(t.colDef,cS,"agTooltipComponent",t,!0)}function MS(e,t,s,o){return e.getCompDetails(t,dS,o,s)}function Np(e,t){return Lp(e,t,rd)}function dl(e,t,s){return e.mergeParams(t,rd,s)}function an(e){const t=e;return t?.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}function TS(e){return typeof e=="object"&&!!e.getComp}var I={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"},ad=class extends bn{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()}},ul,hl,gl,pl,uc,hc,fl;function Hs(){return ul===void 0&&(ul=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),ul}function Hp(){return hl===void 0&&(hl=/(firefox)/i.test(navigator.userAgent)),hl}function Gp(){return gl===void 0&&(gl=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),gl}function no(){return pl===void 0&&(pl=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),pl}function gc(e){if(!e)return null;const t=e.tabIndex,s=e.getAttribute("tabIndex");return t===-1&&(s===null||s===""&&!Hp())?null:t.toString()}function IS(){if(fl!==void 0)return fl;if(!document.body)return-1;let e=1e6;const t=Hp()?6e6:1e9,s=document.createElement("div");for(document.body.appendChild(s);;){const o=e*2;if(s.style.height=o+"px",o>t||s.clientHeight!==o)break;e=o}return s.remove(),fl=e,e}function kS(){return hc==null&&Bp(),hc}function Bp(){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&&(hc=s,uc=s===0)}function Vp(){return uc==null&&Bp(),uc}var ld="T",AS=new RegExp(`[${ld} ]`),LS=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${ld}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Xt(e,t){return e.toString().padStart(t,"0")}function Et(e,t=!0,s=ld){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(i=>Xt(i,2)).join("-");return t&&(o+=s+[e.getHours(),e.getMinutes(),e.getSeconds()].map(i=>Xt(i,2)).join(":")),o}function Un(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Xt(e.getDate(),2),Xt(e.getHours(),2),`:${Xt(e.getMinutes(),2)}`,`:${Xt(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Xt(e.getDate(),2)].map(String):null}var ml=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"},ku=["January","February","March","April","May","June","July","August","September","October","November","December"],Cl=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function pc(e,t){if(t==null)return Et(e,!1);const s=Xt(e.getFullYear(),4),o={YYYY:()=>s.slice(s.length-4,s.length),YY:()=>s.slice(s.length-2,s.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>ku[e.getMonth()],MMM:()=>ku[e.getMonth()].slice(0,3),MM:()=>Xt(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${ml(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${ml(e.getDate())}`,DD:()=>Xt(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>Cl[e.getDay()],ddd:()=>Cl[e.getDay()].slice(0,3),dd:()=>Cl[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${ml(e.getDay())}`,d:()=>`${e.getDay()}`},i=new RegExp(Object.keys(o).join("|"),"g");return t.replace(i,n=>n in o?o[n]():n)}function hr(e,t=!1){return!!Ct(e,t)}function OS(e){return hr(e,!0)}function Ct(e,t=!1,s){if(!e||!s&&!LS.test(e))return null;const[o,i]=e.split(AS);if(!o)return null;const n=o.split("-").map(p=>Number.parseInt(p,10));if(n.filter(p=>!isNaN(p)).length!==3)return null;const[r,a,l]=n,c=new Date(r,a-1,l);if(c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l||!i&&t)return null;if(!i||i==="00:00:00")return c;const[d,u,h]=i.split(":").map(p=>Number.parseInt(p,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 fc(e){const{inputValue:t,allSuggestions:s,hideIrrelevant:o,filterByPercentageOfBestMatch:i}=e;let n=(s??[]).map((l,c)=>({value:l,relevance:NS(t,l),idx:c}));if(n.sort((l,c)=>l.relevance-c.relevance),o&&(n=n.filter(l=>l.relevance<Math.max(l.value.length,t.length))),n.length>0&&i&&i>0){const c=n[0].relevance*i;n=n.filter(d=>c-d.relevance<0)}const r=[],a=[];for(const l of n)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function NS(e,t){e.length<t.length&&([e,t]=[t,e]);let s=[],o=[];const i=e.length,n=t.length;for(let a=0;a<=n;a++)s[a]=a;let r=0;for(let a=1;a<=i;a++){o[0]=a;for(let l=1;l<=n;l++){const c=e[a-1],d=t[l-1];if(c.toLocaleLowerCase()===d.toLocaleLowerCase())++r,c===d&&++r,a>1&&l>1&&e[a-2].toLocaleLowerCase()===t[l-2].toLocaleLowerCase()&&(++r,e[a-2]===t[l-2]&&++r),a<i/2-10&&++r,o[l]=s[l-1];else{const u=o[l-1],h=s[l],p=s[l-1];o[l]=1+Math.min(u,h,p)}}[s,o]=[o,s]}return s[n]/(r+1)}function zp(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}var mc=!1,Hr=0;function HS(e){Hr>0||(e.addEventListener("keydown",Gr),e.addEventListener("mousedown",Gr))}function GS(e){Hr>0||(e.removeEventListener("keydown",Gr),e.removeEventListener("mousedown",Gr))}function Gr(e){const t=mc,s=e.type==="keydown";s&&(e.ctrlKey||e.metaKey||e.altKey)||t!==s&&(mc=s)}function BS(e){const t=Qe(e);return HS(t),Hr++,()=>{Hr--,GS(t)}}function VS(){return mc}function qo(e,t,s=!1){const o=Db;let i=Ug;t&&(i+=", "+t),s&&(i+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(o)).filter(l=>Cs(l)),r=Array.prototype.slice.apply(e.querySelectorAll(i));return r.length?((l,c)=>l.filter(d=>c.indexOf(d)===-1))(n,r):n}function fo(e,t=!1,s=!1,o=!1){const i=qo(e,o?".ag-tab-guard":null,s),n=t?Me(i):i[0];return n?(n.focus({preventScroll:!0}),!0):!1}function Ro(e,t,s,o){const i=qo(t,s?':not([tabindex="-1"])':null),n=Ve(e);let r;s?r=i.findIndex(l=>l.contains(n)):r=i.indexOf(n);const a=r+(o?-1:1);return a<0||a>=i.length?null:i[a]}function Wp(e,t=5){let s=0;for(;e&&gc(e)===null&&++s<=t;)e=e.parentElement;return gc(e)===null?null:e}var zS=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",WS=class extends bn{constructor(e,t,s){super(t,s),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(zS)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:s,labelAlignment:o,disabled:i}=this.config;i!=null&&this.setDisabled(i),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),s!=null&&this.setLabelWidth(s),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;mt(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Be(t,!1),ho(t,"presentation")):(Be(t,!0),ho(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:(Dr(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return tn(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},_p=class extends WS{constructor(e,t,s,o){super(e,t,s),this.className=o}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:s}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),s!=null&&this.onValueChange(s),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),s=this.getLabel();s==null||s==""||hb(e)!==null?en(e,""):en(e,t??"")}setAriaLabel(e){return ti(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 Jt(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 _S(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 Xs=class extends _p{constructor(e,t,s="text",o="input"){super(e,e?.template??_S(o),[],t),this.inputType=s,this.displayFieldTag=o,this.eLabel=ne,this.eWrapper=ne,this.eInput=ne}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:s,className:o}=this;e.classList.add(`${o}-label`),t.classList.add(`${o}-input-wrapper`),s.classList.add(`${o}-input`),this.addCss("ag-input-field"),s.id=s.id||`ag-${this.getCompId()}-input`;const{inputName:i,inputWidth:n}=this.config;i!=null&&this.setInputName(i),n!=null&&this.setInputWidth(n),this.addInputListeners(),this.activateTabIndex([s])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Rt(this.eInput,"type",e))}getInputElement(){return this.eInput}setInputWidth(e){return Dr(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 Rt(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return ti(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return tn(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Rt(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Rt(this.eInput,"autocomplete",t)}return this}},cd=class extends Xs{constructor(e,t="ag-checkbox",s="checkbox"){super(e,t,s),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const s=this.eInput;s.checked=e,s.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,s){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:s});const o=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:o.id,name:o.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),s=this.selected=e.target.checked;this.refreshSelectedClass(s),this.dispatchChange(s,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},dd={selector:"AG-CHECKBOX",component:cd},jS=class extends cd{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)}},Fo=class extends Xs{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=q(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=s=>{zp(s)&&s.key&&!e.test(s.key)&&s.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:s=>{s.clipboardData?.getData("text")?.split("").some(i=>!e.test(i))&&s.preventDefault()}})}},ga={selector:"AG-INPUT-TEXT-FIELD",component:Fo},US=class extends Xs{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}},$S={selector:"AG-INPUT-TEXT-AREA",component:US},ud=class extends Fo{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=Number.parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:s,max:o,step:i}=this.config;typeof t=="number"&&this.setPrecision(t),typeof s=="number"&&this.setMin(s),typeof o=="number"&&this.setMax(o),typeof i=="number"&&this.setStep(i)}onWheel(e){Ve(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const s=this.precision;if(s==null)return e;if(t){const i=Number.parseFloat(e).toFixed(s);return Number.parseFloat(i).toString()}const o=String(e).split(".");if(o.length>1){if(o[1].length<=s)return e;if(s>0)return`${o[0]}.${o[1].slice(0,s)}`}return o[0]}setMin(e){return this.min===e?this:(this.min=e,Rt(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Rt(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Rt(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(q(s)){let o=this.isScientificNotation(s);if(o&&this.eInput.validity.valid)return e(s);if(!o){s=this.adjustPrecision(s);const i=this.normalizeValue(s);o=s!=i}if(o)return t(s)}return e(s)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},KS={selector:"AG-INPUT-NUMBER-FIELD",component:ud},qS=class extends Fo{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Hs();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Ve(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Et(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Rt(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?Et(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Rt(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Rt(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 Ct(this.getValue())??void 0}setDate(e,t){this.setValue(Et(e??null,this.includeTime),t)}},jp={selector:"AG-INPUT-DATE-FIELD",component:qS},YS=".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)}}",ZS="ag-active-item",XS=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:t}]}),QS=class extends bn{constructor(e,t,s){super(XS(e,t)),this.label=t,this.value=s,this.eText=ne}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(ZS,e),jg(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const s=this.getGui();vb(s,e),Cb(s,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>Zc(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)}))}},JS=class extends bn{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(YS)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case I.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const s=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(s)}break;case I.DOWN:case I.UP:e.preventDefault(),this.navigate(t);break;case I.PAGE_DOWN:case I.PAGE_UP:case I.PAGE_HOME:case I.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:s}=e,o=s??t;return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();mt(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const s=this.options.findIndex(o=>o.value===e);if(s!==-1){const o=this.options[s];this.value=o.value,this.displayValue=o.text,this.highlightItem(this.listItems[s]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!Cs(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const s=this.getGui(),{scrollTop:o,clientHeight:i}=s,{offsetTop:n,offsetHeight:r}=t;(n+r>o+i||n<o)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const s=new QS(this.cssIdentifier,t,e);s.setParentComponent(this);const o=this.createManagedBean(s);this.listItems.push(o),this.getGui().appendChild(o.getGui())}navigate(e){const t=e===I.DOWN;let s;const{listItems:o,highlightedItem:i}=this;if(!i)s=t?o[0]:Me(o);else{let r=o.indexOf(i)+(t?1:-1);r=Math.min(Math.max(r,0),o.length-1),s=o[r]}this.highlightItem(s)}navigateToPage(e){const{listItems:t,highlightedItem:s}=this;if(!s||t.length===0)return;const o=t.indexOf(s),i=this.options.length-1,n=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/n);let a=-1;e===I.PAGE_HOME?a=0:e===I.PAGE_END?a=i:e===I.PAGE_DOWN?a=Math.min(o+r,i):e===I.PAGE_UP&&(a=Math.max(o-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){ho(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((s,o)=>{s.setIndex(o+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},ey=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}",ty={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"}}]}]},sy=class extends _p{constructor(e){if(super(e,e?.template||ty,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=ne,this.eWrapper=ne,this.eDisplayField=ne,this.eIcon=ne,this.registerCSS(ey),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:s,variableWidth:o,minPickerWidth:i,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!o,s!=null&&this.setPickerMaxHeight(s),i!=null&&this.setPickerMinWidth(i),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:s,inputWidth:o}=this.config;if(s){const i=this.beans.iconSvc.createIconNoSpan(s);i&&this.eIcon.appendChild(i)}o!=null&&this.setInputWidth(o)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),oc(e,!1),this.ariaRole&&ho(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 I.UP:case I.DOWN:case I.ENTER:case I.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case I.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:s,pickerAriaLabelValue:o,modalPicker:i=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:d}=this,u={modal:i,eChild:e,closeOnEsc:!0,closedCallback:()=>{const C=Ng(c);this.beforeHidePicker(),C&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(s,o),anchorToElement:d};e.style.position="absolute";const h=c.popupSvc,p=h.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=Xc(Rr(d)),a&&(e.style.maxWidth=a)):Dr(e,a??Rr(d));const f=n??`${qc(h.getPopupParent())}px`;return e.style.setProperty("max-height",f),this.alignPickerToComponent(),p.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:s,gos:o},eWrapper:i,pickerComponent:n}=this,r=o.get("enableRtl")?"right":"left";s.positionPopupByComponent({type:t,eventSource:i,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();oc(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 Dr(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()}},oy=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}",hd=class extends sy{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(oy)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:rr(()=>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 JS("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),s=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",s),Eb(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:o=>{o?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch(t===I.TAB&&this.hidePicker(),t){case I.ENTER:case I.UP:case I.DOWN:case I.PAGE_UP:case I.PAGE_DOWN:case I.PAGE_HOME:case I.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case I.ESCAPE:super.onKeyDown(e);break;case I.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,s){const{listComponent:o,config:{placeholder:i},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!o)return this;if(s||o.setValue(e,!0),o.getValue()===this.getValue())return this;let l=o.getDisplayValue();return l==null&&i&&(l=i),n.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},iy={selector:"AG-SELECT",component:hd},ny=':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',gd=typeof window!="object"||!window?.document?.fonts?.forEach,ii=(e,t,s,o,i,n)=>{if(gd)return;o&&(e=`@layer ${CSS.escape(o)} { ${e} }`);let r=Yo.map.get(t);if(r||(r=[],Yo.map.set(t,r)),r.some(d=>d.css===e))return;const a=document.createElement("style");n&&a.setAttribute("nonce",n),a.dataset.agGlobalCss=s,a.textContent=e;const l={css:e,el:a,priority:i};let c;for(const d of r){if(d.priority>i)break;c=d}if(c){c.el.insertAdjacentElement("afterend",a);const d=r.indexOf(c);r.splice(d+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),r.push(l)},Up=(e,t,s,o)=>{ii(ny,e,"shared",t,0,s),o?.forEach((i,n)=>i.forEach(r=>ii(r,e,n,t,0,s)))},ry=e=>{Yo.grids.add(e)},ay=e=>{if(Yo.grids.delete(e),Yo.grids.size===0){Yo.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},Au,Yo=(Au=typeof window=="object"?window:{}).agStyleInjectionState??(Au.agStyleInjectionState={map:new WeakMap,grids:new Set}),gt=e=>new $p(e),Ds="$default",ly=0,$p=class{constructor({feature:e,params:t,modeParams:s={},css:o,cssImports:i}){this.feature=e,this.css=o,this.cssImports=i,this.modeParams={[Ds]:{...s[Ds]??{},...t??{}},...s}}use(e,t,s){let o=this._inject;if(o==null){let{css:i}=this;if(i){const n=`ag-theme-${this.feature??"part"}-${++ly}`;typeof i=="function"&&(i=i()),i=`:where(.${n}) {
4
+ ${i}
5
+ }
6
+ `;for(const r of this.cssImports??[])i=`@import url(${JSON.stringify(r)});
7
+ ${i}`;o={css:i,class:n}}else o=!1;this._inject=o}return o&&e&&ii(o.css,e,o.class,t,1,s),o?o.class:!1}},cy=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),Kp=e=>`--ag-${cy(e)}`,ts=e=>`var(${Kp(e)})`,dy=(e,t,s)=>Math.max(t,Math.min(s,e)),uy=e=>{const t=new Map;return s=>{const o=s;return t.has(o)||t.set(o,e(s)),t.get(o)}},Yt=e=>({ref:"accentColor",mix:e}),dt=e=>({ref:"foregroundColor",mix:e}),tt=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),hy=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),$e={ref:"backgroundColor"},cs={ref:"foregroundColor"},Lt={ref:"accentColor"},Br={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:dt(.15),chromeBackgroundColor:tt(.02),browserColorScheme:"light"},gy={...Br,textColor:cs,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,focusShadow:{spread:3,color:Yt(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:$e,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:Lt,toggleButtonOffBackgroundColor:tt(.3),toggleButtonSwitchBackgroundColor:$e,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}}},py=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],fy=uy(e=>(e=e.toLowerCase(),py.find(t=>e.endsWith(t.toLowerCase()))??"length")),pa=e=>typeof e=="object"&&e?.ref?ts(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,pd=e=>{if(typeof e=="string")return e;if(e&&"ref"in e){const t=ts(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?ts(e.onto):"transparent"}, ${t} ${dy(e.mix*100,0,100)}%)`}return!1},my=pa,Vo=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,s=>s[0]==="-"?s:" "+ts(s)+" ")})`:e&&"ref"in e?ts(e.ref):!1,Cy=pa,Cc=(e,t)=>typeof e=="string"?e:e===!0?Cc({},t):e===!1?t==="columnBorder"?Cc({color:"transparent"},t):"none":e&&"ref"in e?ts(e.ref):qp(e.style??"solid")+" "+Vo(e.width??{ref:"borderWidth"})+" "+pd(e.color??{ref:"borderColor"}),vy=e=>typeof e=="string"?e:e===!1?"none":e&&"ref"in e?ts(e.ref):[Vo(e.offsetX??0),Vo(e.offsetY??0),Vo(e.radius??0),Vo(e.spread??0),pd(e.color??{ref:"foregroundColor"})].join(" "),qp=pa,Yp=e=>typeof e=="string"?e.includes(",")?e:Lu(e):e&&"googleFont"in e?Yp(e.googleFont):e&&"ref"in e?ts(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),Lu(t))).join(", "):!1,Lu=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),wy=pa,Zp=e=>typeof e=="string"?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?Zp({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):e&&"ref"in e?ts(e.ref):!1,by=(e,t,s)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&s.warn(104,{value:e,param:t}),`${e}s`):e&&"ref"in e?ts(e.ref):!1,Sy={color:pd,colorScheme:my,length:Vo,scale:Cy,border:Cc,borderStyle:qp,shadow:vy,image:Zp,fontFamily:Yp,fontWeight:wy,duration:by},yy=(e,t,s)=>{const o=fy(e);return Sy[o](t,e,s)},xy=e=>new Xp(e),Xp=class Qp{constructor(t,s=[]){this.themeLogger=t,this.parts=s}withPart(t){return typeof t=="function"&&(t=t()),t instanceof $p?new Qp(this.themeLogger,[...this.parts,t]):(this.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(gt({feature:t}))}withParams(t,s=Ds){return this.withPart(gt({modeParams:{[s]:t}}))}_startUse({styleContainer:t,cssLayer:s,nonce:o,loadThemeGoogleFonts:i,moduleCss:n}){if(gd)return;Fy(),Up(t,s,o,n);const r=Ry(this);if(r.length>0)for(const a of r)i&&Ey(a,o);for(const a of this.parts)a.use(t,s,o)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=Ou(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const s={[Ds]:{...gy}};for(const o of Ou(this.parts))for(const i of Object.keys(o.modeParams)){const n=o.modeParams[i];if(n){const r=s[i]??(s[i]={}),a=new Set;for(const l of Object.keys(n)){const c=n[l];c!==void 0&&(r[l]=c,a.add(l))}if(i===Ds)for(const l of Object.keys(s)){const c=s[l];if(l!==Ds)for(const d of a)delete c[d]}}}this._paramsCache=t=s}return t}_getPerInstanceCss(t){const s="##SELECTOR##";let o=this._paramsCssCache;if(!o){let i="",n="";const r=this._getModeParams();for(const l of Object.keys(r)){const c=r[l];if(l!==Ds){const u=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(l):l}"]) & {
8
+ `;i+=u,n+=u}for(const d of Object.keys(c).sort()){const u=c[d],h=yy(d,u,this.themeLogger);if(h===!1)this.themeLogger.error(107,{key:d,value:u});else{const p=Kp(d),f=p.replace("--ag-","--ag-inherited-");i+=` ${p}: var(${f}, ${h});
9
+ `,n+=` ${f}: var(${p});
10
+ `}}l!==Ds&&(i+=`}
11
+ `,n+=`}
12
+ `)}let a=`${s} {
13
+ ${i}}
14
+ `;a+=`:has(> ${s}):not(${s}) {
15
+ ${n}}
16
+ `,this._paramsCssCache=o=a}return o.replaceAll(s,`:where(.${t})`)}},Ou=e=>{const t=new Map;for(const o of e)t.set(o.feature,o);const s=[];for(const o of e)(!o.feature||t.get(o.feature)===o)&&s.push(o);return s},Ry=e=>{const t=new Set,s=n=>{if(Array.isArray(n))n.forEach(s);else{const r=n?.googleFont;typeof r=="string"&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(n=>Object.values(n)).forEach(s),Array.from(t).sort()},Nu=!1,Fy=()=>{if(!Nu){Nu=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},Ey=async(e,t)=>{const s=`@import url('https://${Dy}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
17
+ `;ii(s,document.head,`googleFont:${e}`,void 0,0,t)},Dy="fonts.googleapis.com",Py=1,My=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=Py++,e?.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];for(const t of e.beanClasses){const s=new t;s.beanName?this.beans[s.beanName]=s:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(s)}for(const t of e.derivedBeans??[]){const{beanName:s,bean:o}=t(this);this.beans[s]=o,this.createdBeans.push(o)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){const s=this.beans;for(const o of e)o.preWireBeans?.(s),o.wireBeans?.(s);for(const o of e)o.preConstruct?.();t&&e.forEach(t);for(const o of e)o.postConstruct?.()}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],this.destroyCallback?.()}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},Ty=0,Iy=class extends ss{constructor(){super(...arguments),this.beanName="environment",this.paramsClass=`ag-theme-params-${++Ty}`,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){const{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t),this.eStyleContainer=e.get("themeStyleContainer")??(t.getRootNode()===document?document.head:t),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.initVariables(),this.addDestroyFunc(()=>ay(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){const{theme:s}=this;let o;s?o=`${this.paramsClass} ${s._getCssClass()}`:o=this.applyLegacyThemeClasses();for(const i of Array.from(e.classList))i.startsWith("ag-theme-")&&e.classList.remove(i);if(o){const i=e.className;e.className=`${i}${i?" ":""}${o}${t?.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let s=!1;for(const o of Array.from(t.classList))o.startsWith("ag-theme-")&&(s=!0,e=e?`${e} ${o}`:o);s&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?ii(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}handleThemeChange(){const{gos:e,theme:t}=this,s=e.get("theme");let o;if(s==="legacy")o=void 0;else{const i=s??this.getDefaultTheme();i instanceof Xp?o=i:this.themeError(i)}o!==t&&this.handleNewTheme(o),this.postProcessThemeChange(o,s)}handleNewTheme(e){const{gos:t,eRootDiv:s,globalCSS:o}=this,i=this.getAdditionalCss();if(e){ry(this),Up(this.eStyleContainer,this.cssLayer,this.styleNonce,i);for(const[r,a]of o)ii(r,this.eStyleContainer,a,this.cssLayer,0,this.styleNonce);o.length=0}this.theme=e,e?._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:i});let n=this.eParamsStyle;if(!n){n=this.eParamsStyle=Cn({tag:"style"});const r=t.get("styleNonce");r&&n.setAttribute("nonce",r),s.appendChild(n)}gd||(n.textContent=e?._getPerInstanceCss(this.paramsClass)||""),this.applyThemeClasses(s),this.fireStylesChangedEvent("themeChanged")}},ky=class extends ss{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){if(e){this.dynamicBeans??(this.dynamicBeans={});for(const t of Object.keys(e))this.dynamicBeans[t]=e[t]}}createDynamicBean(e,t,...s){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));const o=this.dynamicBeans[e];if(o==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new o(...s)}},Ay=class extends ss{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new uo}addListener(e,t,s){this.globalSvc.addEventListener(e,t,s)}removeListener(e,t,s){this.globalSvc.removeEventListener(e,t,s)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},Jp=class extends ss{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const s="title",o=this.ctrl.getGui();o&&(e!=null&&(e!=""||t)?o.setAttribute(s,e):o.removeAttribute(s))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},Ly=1e3,Oy=1e3,Hu=100,Gu,$n=!1,Ny=class extends ss{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return e==="show"?this.tooltipCtrl.getTooltipShowDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipCtrl.getTooltipHideDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!no()&&($n?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},Hu):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,s=this.tooltipCtrl.getGui(),o=this.tooltipComp?.getGui();this.isInteractingWithTooltip||s.contains(t)||this.interactionEnabled&&o?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||$n)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-Gu<Ly}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(!q(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const s=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const o=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(s,o)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Gu=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const o=t.getGui();this.tooltipComp=t,o.classList.contains("ag-tooltip")||o.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&o.classList.add("ag-tooltip-animate"),this.interactionEnabled&&o.classList.add("ag-tooltip-interactive");const i=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:o,ariaLabel:i("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:r}),this.setEventHandlers(r)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(o,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Qe(this.beans),{keydown:r=>{o.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(o,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:o,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=Ve(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?Oy: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(){$n=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Hu)}unlockService(){$n=!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()}},Hy=class extends Jp{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()}},Kn=0,Gy=200,By=class extends ss{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:s,nudgeY:o,skipObserver:i}=e;this.positionPopup({ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:!0,skipObserver:i,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:i,eventSource:n,alignSide:r="left",position:a="over",type:l}=e,c=n.getBoundingClientRect(),d=this.getParentRect();this.setAlignedTo(n,t);const u=()=>{let h=c.left-d.left;r==="right"&&(h-=t.offsetWidth-c.width);let p;return a==="over"?(p=c.top-d.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,c,d,e.nudgeY||0)==="under"?p=c.top-d.top+c.height:p=c.top-t.offsetHeight-(o||0)*2-d.top),{x:h,y:p}};this.positionPopup({ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:i,updatePosition:u,postProcessCallback:()=>this.callPostProcessPopup(e,l,t,n,null)})}shouldRenderUnderOrAbove(e,t,s,o){const i=s.bottom-t.bottom,n=t.top-s.top,r=e.offsetHeight+o;return i>r?"under":n>r||n>i?"above":"under"}setAlignedStyles(e,t){const s=this.getPopupIndex(e);if(s===-1)return;const o=this.popupList[s],{alignedToElement:i}=o;if(!i)return;const n=["right","left","over","above","under"];for(const r of n)i.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`);t&&(i.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const s=this.getPopupIndex(t);if(s!==-1){const o=this.popupList[s];o.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:s,nudgeX:o,nudgeY:i,skipObserver:n,updatePosition:r}=e,a={width:0,height:0},l=(c=!1)=>{let{x:d,y:u}=r();c&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,o&&(d+=o),i&&(u+=i),s&&(d=this.keepXYWithinBounds(t,d,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${d}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!n){const c=vs(this.beans,t,()=>l(!0));setTimeout(()=>c(),Gy)}}getParentRect(){const e=Qe(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Kg(t)}keepXYWithinBounds(e,t,s){const o=s===0,i=o?"clientHeight":"clientWidth",n=o?"top":"left",r=o?"height":"width",a=o?"scrollTop":"scrollLeft",l=Qe(this.beans),c=l.documentElement,d=this.getPopupParent(),u=e.getBoundingClientRect(),h=d.getBoundingClientRect(),p=l.documentElement.getBoundingClientRect(),f=d===l.body,C=Math.ceil(u[r]);let w=f?(o?$g:Rr)(c)+c[a]:d[i];f&&(w-=Math.abs(p[n]-h[n]));const b=w-C;return Math.min(Math.max(t,0),Math.max(b,0))}addPopup(e){const{eChild:t,ariaLabel:s,ariaOwns:o,alwaysOnTop:i,positionCallback:n,anchorToElement:r}=e,a=this.getPopupIndex(t);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!i,s,o),c=this.addEventListenersToPopup({...e,wrapperEl:l});return n&&n(),this.addPopupToPopupList(t,l,c,r),{hideFunc:c}}initialisePopupPosition(e){const s=this.getPopupParent().getBoundingClientRect();q(e.style.top)||(e.style.top=`${s.top*-1}px`),q(e.style.left)||(e.style.left=`${s.left*-1}px`)}createPopupWrapper(e,t,s,o){const i=this.getPopupParent(),{environment:n,gos:r}=this.beans,a=Cn({tag:"div"});return n.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||ho(e,"dialog"),s?ti(e,s):o&&(e.id||(e.id=`popup-component-${Kn}`),Cu(o,e.id)),a.appendChild(e),i.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,s=Qe(t),{wrapperEl:o,eChild:i,closedCallback:n,afterGuiAttached:r,closeOnEsc:a,modal:l,ariaOwns:c}=e;let d=!1;const u=C=>{if(!o.contains(Ve(t)))return;C.key===I.ESCAPE&&!this.isStopPropagation(C)&&f({keyboardEvent:C})},h=C=>f({mouseEvent:C}),p=C=>f({touchEvent:C}),f=(C={})=>{const{mouseEvent:v,touchEvent:w,keyboardEvent:b,forceHide:S}=C;!S&&(this.isEventFromCurrentPopup({mouseEvent:v,touchEvent:w},i)||d)||(d=!0,o.remove(),s.removeEventListener("keydown",u),s.removeEventListener("mousedown",h),s.removeEventListener("touchstart",p),s.removeEventListener("contextmenu",h),this.eventSvc.removeListener("dragStarted",h),n&&n(v||w||b),this.removePopupFromPopupList(i,c))};return r&&r({hidePopup:f}),window.setTimeout(()=>{a&&s.addEventListener("keydown",u),l&&(s.addEventListener("mousedown",h),this.eventSvc.addListener("dragStarted",h),s.addEventListener("touchstart",p),s.addEventListener("contextmenu",h))},0),f}addPopupToPopupList(e,t,s,o){this.popupList.push({element:e,wrapper:t,hideFunc:s,instanceId:Kn,isAnchored:!!o}),o&&this.setPopupPositionRelatedToElement(e,o),Kn=Kn+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const s=this.getPopupIndex(e);if(s===-1)return;const o=this.popupList[s];if(o.stopAnchoringPromise&&o.stopAnchoringPromise.then(n=>n&&n()),o.stopAnchoringPromise=void 0,o.isAnchored=!1,!t)return;const i=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:o.hideFunc});return o.stopAnchoringPromise=i,o.isAnchored=!0,i}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&Cu(t,null),this.popupList=this.popupList.filter(s=>s.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),s=t.getBoundingClientRect(),{element:o,ePopup:i}=e,n=o.getBoundingClientRect(),r=u=>Number.parseInt(u.substring(0,u.length-1),10),a=(u,h)=>{const p=s[u]-n[u],f=r(i.style[u]);return{initialDiff:p,lastDiff:p,initial:f,last:f,direction:h}},l=a("top",0),c=a("left",1),d=this.beans.frameworkOverrides;return new Re(u=>{d.wrapIncoming(()=>{Y0(()=>{const h=t.getBoundingClientRect(),p=o.getBoundingClientRect();if(p.top==0&&p.left==0&&p.height==0&&p.width==0){e.hidePopup();return}const C=(v,w)=>{const b=r(i.style[w]);v.last!==b&&(v.initial=b,v.last=b);const S=h[w]-p[w];if(S!=v.lastDiff){const y=this.keepXYWithinBounds(i,v.initial+v.initialDiff-S,v.direction);i.style[w]=`${y}px`,v.last=y}v.lastDiff=S};C(l,"top"),C(c,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:s,touchEvent:o}=e,i=s||o;if(!i)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const a=this.popupList[r];if(Ib(a.element,i))return!0}return this.isElementWithinCustomPopup(i.target)}isElementWithinCustomPopup(e){const t=Qe(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const s=this.getWrapper(e);s&&(s.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(s))}bringPopupToFront(e){const t=this.getPopupParent(),s=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),o=s.length,i=this.getWrapper(e);if(!i||o<=1||!t.contains(e))return;const n=[],r=[];for(const h of s)h!==i&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const a=[],l=r.length,u=i.classList.contains("ag-always-on-top")||!l?[...n,...r,i]:[...n,i,...r];for(let h=0;h<=o;h++){const p=u[h];if(s[h]===u[h]||p===i)continue;const f=p.querySelectorAll("div");for(const C of f)C.scrollTop!==0&&a.push([C,C.scrollTop]);h===0?t.insertAdjacentElement("afterbegin",p):u[h-1].insertAdjacentElement("afterend",p)}for(;a.length;){const h=a.pop();h[0].scrollTop=h[1]}}},Vy=class extends ad{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,s=this.getGui();s.textContent=ui(t);const o=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();s.classList.add(`ag-${o}-tooltip`)}},ef=(e,t)=>{if(t!=null&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},zy=(e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const s=t.pointerId;if(!ef(e,s))return null;const o={eElement:e,pointerId:s,onLost(i){_y(o,i)}};return e.addEventListener("lostpointercapture",o.onLost),o},Wy=e=>{if(!e)return;tf(e);const{eElement:t,pointerId:s}=e;if(t){try{t.releasePointerCapture(s)}catch{}e.eElement=null}},tf=e=>{const{eElement:t,onLost:s}=e;t&&s&&(t.removeEventListener("lostpointercapture",s),e.onLost=null)},_y=(e,t)=>{tf(e);const{eElement:s,pointerId:o}=e;s&&t.pointerId===o&&ef(s,o)},Lo,zo,ns=e=>{if(!zo)zo=new WeakSet;else if(zo.has(e))return!1;return zo.add(e),!0},jy=class extends ss{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!Lo?.has(qt(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)Bu(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let s=0,o=t.length;s<o;++s){const i=t[s];if(i.params===e){t.splice(s,1),Bu(i);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:s}=e,o=[];let i;if(s){const c=t.style;c&&(i=c.touchAction,c.touchAction="none")}const n={handlers:o,params:e,oldTouchAction:i};this.dragSources.push(n),ar(o,[t,"pointerdown",c=>this.onPointerDown(e,c),{passive:!1}],[t,"mousedown",c=>this.onMouseDown(e,c)]);const l=this.gos.get("suppressTouch");s&&!l&&ar(o,[t,"touchstart",d=>this.onTouchStart(e,d),{passive:!1}])}cancelDrag(e){const t=this.drag;e??(e=t?.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),t?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(e){const t=e.type;return(t==="mousemove"||t==="pointermove")&&e.cancelable&&on(this.beans,e)&&!Vi(wl(e))}initDrag(e,...t){this.drag=e;const s=this.beans,o=a=>this.onScroll(a),i=a=>this.onKeyDown(a),n=qt(s),r=Qe(s);ar(e.handlers,[n,"contextmenu",Es],[n,"keydown",i],[r,"scroll",o,{capture:!0}],[r.defaultView||window,"scroll",o],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;Lo?.get(t)===e&&Lo?.delete(t),this.drag=null,Wy(e.pointerCapture),Jc(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const s=this.beans;if(zo?.has(t))return;const o=t.pointerType;if(o==="touch"&&(s.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),Vi(wl(t))))||!t.isPrimary||o==="mouse"&&t.button!==0)return;this.destroyDrag();const i=qt(s),n=e.eElement,r=t.pointerId,a=new vl(i,e,t,r);Lo??(Lo=new WeakMap),Lo.set(i,a);const l=u=>{u.pointerId===r&&this.onMouseOrPointerMove(u)},c=u=>{u.pointerId===r&&this.onMouseOrPointerUp(u)},d=u=>{u.pointerId===r&&ns(u)&&this.cancelDrag()};this.initDrag(a,[i,"pointerup",c],[i,"pointercancel",d],[i,"pointermove",l,{passive:!1}],[i,"touchmove",Es,{passive:!1}],[n,"mousemove",Es,{passive:!1}]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):ns(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!ns(t)||Vi(wl(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){Es(t);return}this.destroyDrag();const o=this.beans,i=qt(o),n=new vl(i,e,t.touches[0]),r=c=>this.onTouchMove(c),a=c=>this.onTouchUp(c),l=t.target??e.eElement;this.initDrag(n,[qt(o),"touchmove",Es,{passive:!1}],[l,"touchmove",r,{passive:!0}],[l,"touchend",a,{passive:!0}],[l,"touchcancel",a,{passive:!0}]),e.dragStartPixels===0&&this.onMove(n.start)}onMouseDown(e,t){if(t.button!==0||zo?.has(t)||this.isPointer())return;const s=this.beans;this.destroyDrag();const o=new vl(qt(s),e,t),i=a=>this.onMouseOrPointerMove(a),n=a=>this.onMouseOrPointerUp(a),r=qt(s);this.initDrag(o,[r,"mousemove",i],[r,"mouseup",n]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):ns(t)}onScroll(e){if(!ns(e))return;const t=this.drag,s=t?.lastDrag;s&&this.dragging&&t.params?.onDragging(s)}onMouseOrPointerMove(e){ns(e)&&(Hs()&&Qe(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&Es(e),this.onMove(e))}onTouchMove(e){const t=this.drag;if(!t||!ns(e))return;const s=Wi(t.start,e.touches);s&&(e.preventDefault(),this.onMove(s))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const s=t.params;if(!this.dragging){const o=t.start,n=s.dragStartPixels??4;if(Qg(e,o,n)||(this.dragging=!0,s.capturePointer&&(t.pointerCapture=zy(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:s.eElement}),s.onDragStart(o),this.drag!==t)||(s.onDragging(o),this.drag!==t))return}s.onDragging(e)}onTouchUp(e){const t=this.drag;t&&ns(e)&&this.onUp(Wi(t.start,e.changedTouches))}onMouseOrPointerUp(e){ns(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===I.ESCAPE&&this.cancelDrag()}},Bu=e=>{Jc(e.handlers);const t=e.oldTouchAction;if(t!=null){const s=e.params.eElement.style;s&&(s.touchAction=t)}},vl=class{constructor(e,t,s,o=null){this.rootEl=e,this.params=t,this.start=s,this.pointerId=o,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},wl=e=>{const t=e.target;return t instanceof Element?t:null},Uy=class extends ss{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageParent=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.lastDropTarget=null}addDragSource(e,t=!1){const s={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:o=>this.onDragStart(e,o),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(s),this.beans.dragSvc.addDragSource(s)}setDragImageCompIcon(e,t=!1){const s=this.dragImageComp;s&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,s.setIcon(e,t))}removeDragSource(e){const{dragSourceAndParamsList:t,beans:s}=this,o=t.find(i=>i.dragSource===e);o&&(s.dragSvc?.removeDragSource(o),zt(t,o))}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:s}=this,o=s.dragSvc;for(const i of e)o?.removeDragSource(i);e.length=0,t.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){const e=this.lastMouseEvent;e&&this.onDragging(e,!0)}onDragStart(e,t){this.lastMouseEvent=t,this.dragSource=e,this.dragItem=e.getDragItem();const s=e.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=t.clientX-s.left,this.dragInitialSourcePointerOffsetY=t.clientY-s.top,e.onDragStarted?.(),this.createAndUpdateDragImageComp(e)}onDragStop(e){const{dragSource:t,lastDropTarget:s}=this;if(t?.onDragStopped?.(),s){const o=this.dropTargetEvent(s,e,!1);s.onDragStop?.(o)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t,lastMouseEvent:s}=this;if(e?.onDragCancelled?.(),t&&s){const o=this.dropTargetEvent(t,s,!1);t.onDragCancel?.(o)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);const s=this.findCurrentDropTarget(e),{lastDropTarget:o,dragSource:i,dragItem:n}=this;let r=!1;if(s!==o){if(r=!0,o){const a=this.dropTargetEvent(o,e,t);o.onDragLeave?.(a)}if(o!==null&&!s?this.handleExit(i,n):o===null&&s&&this.handleEnter(i,n),s){const a=this.dropTargetEvent(s,e,t);s.onDragEnter?.(a)}this.lastDropTarget=s}else if(s){const a=this.dropTargetEvent(s,e,t);s.onDragging?.(a),a?.changed&&(r=!0)}this.lastMouseEvent=e,r&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageParent=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,s=[[e.getContainer()]];return t?s.concat(t):s}isMouseOnDropTarget(e,t){const s=this.getAllContainersFromDropTarget(t);let o=!1;const i=(a,l)=>{for(const c of l){const{width:d,height:u,left:h,right:p,top:f,bottom:C}=c.getBoundingClientRect();if(d===0||u===0)return!1;const v=a.clientX>=h&&a.clientX<p,w=a.clientY>=f&&a.clientY<C;if(!v||!w)return!1}return!0};for(const a of s)if(i(e,a)){o=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:o&&t.isInterestedIn(r,n)}findCurrentDropTarget(e){const t=this.dropTargets.filter(n=>this.isMouseOnDropTarget(e,n)),s=t.length;if(s===0)return null;if(s===1)return t[0];const i=qt(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of i)for(const r of t)if(this.getAllContainersFromDropTarget(r).flatMap(l=>l).indexOf(n)!==-1)return r;return null}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.find(t=>t.external&&t.getContainer()===e)||null}dropTargetEvent(e,t,s){const{dragSource:o,dragItem:i,lastDraggingEvent:n,lastMouseEvent:r,dragInitialSourcePointerOffsetX:a,dragInitialSourcePointerOffsetY:l}=this,c=e.getContainer(),d=c.getBoundingClientRect(),{clientX:u,clientY:h}=t,p=u-(r?.clientX||0),f=h-(r?.clientY||0),C=this.createEvent({event:t,x:u-d.left,y:h-d.top,vDirection:f>0?"down":f<0?"up":null,hDirection:p<0?"left":p>0?"right":null,initialSourcePointerOffsetX:a,initialSourcePointerOffsetY:l,dragSource:o,fromNudge:s,dragItem:i,dropZoneTarget:c,dropTarget:n?.dropTarget??null,changed:!!n?.changed});return this.lastDraggingEvent=C,C}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&Nb(t,e,this.beans)}removeDragImageComp(e){this.dragImageComp===e&&(this.dragImageComp=null),e&&(e.getGui()?.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){const t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t?.then(s=>{if(t!==this.dragImageCompPromise||!this.lastMouseEvent||!this.isAlive()){this.destroyBean(s);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const o=this.dragImageComp;o!==s&&(this.dragImageComp=s,this.removeDragImageComp(o)),s&&(this.appendDragImageComp(s),this.updateDragImageComp())})}appendDragImageComp(e){const t=e.getGui(),s=t.style;s.position="absolute",s.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(s.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),s.top="20px",s.left="20px";const o=Kc(this.beans);this.dragImageParent=o,o?o.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:s,lastDraggingEvent:o,dragImageLastLabel:i}=this;if(!e)return;this.setDragImageCompIcon(s?.getIconName?.(o)??null);let n=t?.dragItemName;typeof n=="function"&&(n=n(o)),n||(n=""),i!==n&&(this.dragImageLastLabel=n,e.setLabel(n))}},$y=class extends Uy{createEvent(e){return de(this.gos,e)}createDragImageComp(e){const{gos:t,beans:s}=this;return fS(s.userCompFactory,de(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){G(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const s={getContainer:e,isInterestedIn:o=>o===1||o===0,getIconName:()=>"notAllowed"};this.addDropTarget(s),t.addDestroyFunc(()=>this.removeDropTarget(s))}};function sf(e,t){return e+"_"+t}function je(e){return e instanceof ln}var ln=class extends A{constructor(e,t,s,o){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=s,this.pinned=o,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=Bi(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return sf(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)je(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=Me(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??[])Ls(t)?e.push(t):je(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])Ls(t)?e.push(t):je(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(je(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"})}},vc="row-group-",fd="t-",md="b-",Ky=0,Os=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Ky++,this.alreadyRendered=!1,this.hovered=!1,this.__selected=!1,this.beans=e}get allLeafChildren(){const e=this._leafs;return e===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:s,eventSvc:o}=this.beans,i=this.data;this.data=e,s?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,i,t);if(this.__localEventService?.dispatchEvent(n),this.sibling){this.sibling.data=e;const a=this.sibling.createDataChangedEvent(e,i,t);this.sibling.__localEventService?.dispatchEvent(a)}o.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(e,i,t)),o.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,s){return{type:"dataChanged",node:this,oldData:t,newData:e,update:s}}getRowIndexString(){return this.rowIndex==null?(Pe(13),null):this.rowPinned==="top"?fd+this.rowIndex:this.rowPinned==="bottom"?md+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:s}=this.beans,o=s?.createDaemonNode?.(this),i=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),s&&(s.updateRowSelectable(this),s.syncInRowNode(this,o));const n=this.createDataChangedEvent(e,i,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=si(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(vc)&&Pe(14,{groupPrefix:vc})}else this.id=void 0;else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=e!==null;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,s){this.beans.expansionSvc?.setExpanded(this,e,t,s)}setDataValue(e,t,s){const{colModel:o,valueSvc:i,gos:n,editSvc:r}=this.beans,a=typeof e!="string"?e:o.getCol(e)??o.getColDefCol(e);if(!a)return!1;const l=i.getValueForDisplay(a,this,void 0,void 0,"api").value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:d},data:u,rowIndex:h,rowPinned:p}=this;return d.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:p,column:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:s}),!1}if(r&&!r.committing){const d=r.setDataValue({rowNode:this,column:a},t,s);if(d!=null)return d}const c=i.setValue(this,a,t,s);return this.dispatchCellChangedEvent(a,t,l),c&&this.pinnedSibling?.dispatchCellChangedEvent(a,t,l),c}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,s){const o={type:"cellChanged",node:this,column:e,newValue:t,oldValue:s};this.__localEventService?.dispatchEvent(o)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let s=0,o=t.length;s<o;++s)t[s].depthFirstSearch(e);e(this)}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,s="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:s})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){(this.__localEventService??(this.__localEventService=new uo)).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 uo);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,s);const o=this.frameworkEventListenerService?.wrap(e,t)??t;s.addEventListener(e,o)}removeEventListener(e,t){const s=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,s)}removeLocalListener(e,t){const s=this.__localEventService;s&&(s.removeEventListener(e,t),s.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(G(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t?.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){const e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}};function qy(e,t,s){return de(t,{type:s,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var Yy=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_leafs","childStore","oldRowTop","sticky","treeNodeFlags","treeParent"]),Zy=(e,t)=>{const s=new Os(t);for(const o of Object.keys(e))Yy.has(o)||(s[o]=e[o]);return s.oldRowTop=null,s},of=e=>{for(;e?.length;){const t=e[0];if(t.data)return t;e=t.childrenAfterGroup}},nf={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},Xy=new Set(Object.values(nf));function xs(e,t){const s=e.filterUi;if(!s)return null;if(s.created)return s.promise;if(t)return null;const o=s.create(s.refreshed),i=s;return i.created=!0,i.promise=o,o}function Qy(e,t,s,o,i,n,r){return t.refresh?.({...s,model:o,source:n,additionalEventAttributes:r}),e().then(a=>{if(a){const{filter:l,filterParams:c}=a;rf(l,c,o,i,n,r)}})}function rf(e,t,s,o,i,n){e?.refresh?.({...t,model:s,state:o,source:i,additionalEventAttributes:n})}function af(e,t,s){const o=e();o?.created&&o.promise.then(i=>{const n=t();rf(i,o.filterParams,n,s()??{model:n},"ui")})}function Vu(e,t,s,o,i,n,r){let a,l=!1,c;switch(e){case"apply":{const d=o();c=d?.model??null,r&&(c=r(c)),a={state:d?.state,model:c},l=!0;break}case"clear":{a={model:null};break}case"reset":{a={model:null},l=!0,c=null;break}case"cancel":{a={model:s()};break}}i(a),l?n(c):af(t,s,o)}function Xe(e,t){return e[t]??null}function pt(e){return Cn(e)}function Jy(e){return{tag:"div",cls:e}}var ex=class extends ze{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(Jy(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const s=this.buttons;if(this.buttons=e,s===e)return;const o=this.getGui();mt(o);let i;this.destroyListeners();const n=document.createDocumentFragment(),r=this.className,a=({type:c,label:d})=>{const u=w=>{this.dispatchLocalEvent({type:c,event:w})};["apply","clear","reset","cancel"].includes(c)||G(75);const h=c==="apply",f=pt({tag:"button",attrs:{type:h&&t?"submit":"button"},ref:`${c}FilterButton`,cls:`ag-button ag-standard-button ${r}-button${h?" "+r+"-apply-button":""}`,children:d});this.activateTabIndex([f]),h&&(i=f);const C=w=>{w.key===I.ENTER&&(w.preventDefault(),u(w))},v=this.listeners;f.addEventListener("click",u),v.push(()=>f.removeEventListener("click",u)),f.addEventListener("keydown",C),v.push(()=>f.removeEventListener("keydown",C)),n.append(f)};for(const c of e)a(c);this.eApply=i;const l=this.validationTooltipFeature;i&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!i&&l&&(this.validationTooltipFeature=this.destroyBean(l)),o.append(n)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const s=this.eApply;s&&(tn(s,e===!1),this.validationMessage=t??null,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},tx={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`};function Ps(e,t,s){return Gb(e,tx,t,s)}function Cd(e,t){const{debounceMs:s}=e;return fa(e)?(s!=null&&G(71),0):s??t}function fa(e){return(e.buttons?.indexOf("apply")??-1)>=0}var sx=class extends ze{constructor(e,t,s,o,i,n){super(),this.column=e,this.wrapper=t,this.eventParent=s,this.updateModel=o,this.isGlobalButtons=i,this.enableGlobalButtonCheck=n,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,s=t,o=s.useForm,i=o?"form":"div";this.setTemplate({tag:i,cls:"ag-filter-wrapper"}),o&&this.addManagedElementListeners(this.getGui(),{submit:n=>{n?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=s,this.resetButtonsPanel(s),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:n,params:r})=>{n===this.column&&this.resetButtonsPanel(r,this.params)},filterStateChanged:({column:n,state:r})=>{n===this.column&&this.eButtons?.updateValidity(r.valid!==!1)},filterAction:({column:n,action:r,event:a})=>{n===this.column&&this.afterAction(r,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:n})=>{if(n!==this.isGlobalButtons){this.isGlobalButtons=n;const r=this.params;this.resetButtonsPanel(r,r,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,s){const{buttons:o,readOnly:i}=t??{},{buttons:n,readOnly:r,useForm:a}=e;if(!s&&i===r&&Ji(o,n))return;const l=n&&n.length>0&&!e.readOnly&&!this.isGlobalButtons;let c=this.eButtons;if(l){const d=n.map(u=>{const h=`${u}Filter`;return{type:u,label:Ps(this,h)}});if(this.applyActive=fa(this.params),!c){c=this.createBean(new ex),this.appendChild(c.getGui());const u=this.column,h=p=>({event:f})=>{this.updateModel(u,p,{fromButtons:!0}),this.afterAction(p,f)};c?.addManagedListeners(c,{apply:h("apply"),clear:h("clear"),reset:h("reset"),cancel:h("cancel")}),this.eButtons=c}c.updateButtons(d,a)}else this.applyActive=!1,c&&(Is(c.getGui()),this.eButtons=this.destroyBean(c))}close(e){const t=this.hidePopup;if(!t)return;const s=e,o=s?.key;let i;(o===I.ENTER||o===I.SPACE)&&(i={keyboardEvent:s}),t(i),this.hidePopup=null}afterAction(e,t){const{params:s,applyActive:o}=this,i=s?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),i&&o&&this.close(t);break}case"reset":{i&&o&&this.close();break}case"cancel":{i&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===I.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},ox={tag:"div",cls:"ag-filter"},ix=class extends ze{constructor(e,t,s){super(ox),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(()=>{})??Re.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:s,beans:{colFilter:o}}=this,i=o.getFilterUiForDisplay(t)??null;this.wrapper=i,i?.then(n=>{if(!n)return;const{isHandler:r,comp:a}=n;let l;if(r){const c=!!this.enableGlobalButtonCheck,d=this.createBean(new sx(t,n,o,o.updateModel.bind(o),c&&o.isGlobalButtons,c));this.comp=d,l=d.getGui()}else l=a.getGui(),q(l)||G(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)&&(mt(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()}},zu={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Wu=["january","february","march","april","may","june","july","august","september","october","november","december"];function nx(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function _u(e){return e instanceof Date&&!isNaN(e.getTime())}var wc={number:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:_u}),dateString:({dataTypeDefinition:e})=>({comparator:(t,s)=>{const o=e.dateParser(s);return s==null||o<t?-1:o>t?1:0},isValidDate:t=>typeof t=="string"&&_u(e.dateParser(t))}),dateTime:e=>wc.date(e),dateTimeString:e=>wc.dateString(e),object:()=>{},text:()=>{}},bc={number:()=>({comparator:nx}),boolean:({t:e})=>({valueFormatter:t=>q(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:s=>{const o=e(s);return q(o)?o:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(s,o)=>{if(s==="NaN")return t("invalidDate","Invalid Date");if(o===1&&s!=null){const i=Wu[Number(s)-1];return t(i,zu[i])}return s??t("blanks","(Blanks)")},treeListPathGetter:s=>Un(s,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:s})=>({valueFormatter:o=>{const i=e(o);return q(i)?i:s("blanks","(Blanks)")},treeList:!0,treeListPathGetter:o=>Un(t.dateParser(o??void 0),!1),treeListFormatter:(o,i)=>{if(i===1&&o!=null){const n=Wu[Number(o)-1];return s(n,zu[n])}return o??s("blanks","(Blanks)")}}),dateTime:e=>{const t=bc.date(e);return t.treeListPathGetter=Un,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,s=bc.dateString(e);return s.treeListPathGetter=o=>Un(t(o??void 0)),s},object:({formatValue:e,t})=>({valueFormatter:s=>{const o=e(s);return q(o)?o:t("blanks","(Blanks)")}}),text:()=>{}};function rx(e,t,s,o,i,n,r){let a=t,l=s;const c=e==="agSetColumnFilter";!l&&o.baseDataType==="object"&&!c&&(l=({column:p,node:f})=>i({column:p,node:f,value:n.valueSvc.getValue(p,f)}));const u=(c?bc:wc)[o.baseDataType],h=u({dataTypeDefinition:o,formatValue:i,t:r});return a=typeof t=="object"?{...h,...t}:h,{filterParams:a,filterValueGetter:l}}var ax={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},lx={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function cx(e,t=!1){return(t?lx:ax)[e??"text"]}var lf="ag-resizer-wrapper",Rs=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),dx={tag:"div",cls:lf,children:[Rs("eTopLeft","topLeft"),Rs("eTop","top"),Rs("eTopRight","topRight"),Rs("eRight","right"),Rs("eBottomRight","bottomRight"),Rs("eBottom","bottom"),Rs("eBottomLeft","bottomLeft"),Rs("eLeft","left")]},ux=class extends A{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){const{clientHeight:t,clientWidth:s}=this.offsetParent,o=s/2-this.getWidth()/2,i=t/2-this.getHeight()/2;this.offsetElement(o,i,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:s,minWidth:o,width:i,minHeight:n,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,d=0;const u=Cs(this.element);if(u){const h=this.findBoundaryElement(),p=window.getComputedStyle(h);if(p.minWidth!=null){const f=h.offsetWidth-this.element.offsetWidth;d=Number.parseInt(p.minWidth,10)-f}if(p.minHeight!=null){const f=h.offsetHeight-this.element.offsetHeight;c=Number.parseInt(p.minHeight,10)-f}}if(this.minHeight=n||c,this.minWidth=o||d,i&&this.setWidth(i),r&&this.setHeight(r),(!i||!r)&&this.refreshSize(),t)this.center(e);else if(a||l)this.offsetElement(a,l,e);else if(u&&s){let h=this.boundaryEl,p=!0;if(h||(h=this.findBoundaryElement(),p=!1),h){const f=Number.parseFloat(h.style.top),C=Number.parseFloat(h.style.left);p?this.offsetElement(isNaN(C)?0:C,isNaN(f)?0:f,e):this.setPosition(C,f)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const s=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(s),this.moveElementDragListener=s):(this.dragSvc?.removeDragSource(s),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const o=!!e[t],i=this.getResizerElement(t),n={dragStartPixels:0,eElement:i,onDragStart:r=>this.onResizeStart(r,t),onDragging:this.onResize.bind(this),onDragStop:r=>this.onResizeEnd(r,t)};(o||!this.isAlive()&&!o)&&(o?(this.dragSvc?.addDragSource(n),this.resizeListeners.push(n),i.style.pointerEvents="all"):i.style.pointerEvents="none",this.resizable[t]=o)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,s=this.element;let o=!1;if(typeof e=="string"&&e.includes("%"))zi(s,e),e=$g(s),o=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const i=this.getAvailableHeight();i&&e>i&&(e=i)}this.getHeight()!==e&&(o?(s.style.maxHeight="unset",s.style.minHeight="unset"):t?zi(s,e):(s.style.height=`${e}px`,s.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:Number.parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:s}=this.offsetParent;if(!s)return null;const o=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:o.top,r=e?0:i.top;let a=0;if(t){const c=this.element.parentElement;if(c){const{bottom:d}=c.getBoundingClientRect();a=d-o.bottom}}return s+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:s}=this.config;let o=!1;if(typeof e=="string"&&e.includes("%"))Jt(t,e),e=Rr(t),o=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:i}=this.offsetParent,n=s?this.position.x:this.element.getBoundingClientRect().left;i&&e+n>i&&(e=i-n)}this.getWidth()!==e&&(o?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Jt(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,s){const{forcePopupParentAsOffsetParent:o}=this.config,i=o?this.boundaryEl:this.element;i&&(this.popupSvc?.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:s}),this.setPosition(Number.parseFloat(i.style.left),Number.parseFloat(i.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const s=this.getAvailableHeight();this.element.style.setProperty("max-height",`${s}px`)};e&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=vs(this.beans,this.popupSvc?.getPopupParent(),t)):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:s,isTop:o,anywhereWithin:i,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!s,!!i,r)?0:r,c=this.shouldSkipY(t,!!o,n,a)?0:a;return{movementX:l,movementY:c}}shouldSkipX(e,t,s,o){const i=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:i.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return l?!0:(t?l=o<0&&e.clientX>a+n.left||o>0&&e.clientX<a+n.left:s?l=o<0&&e.clientX>r.right||o>0&&e.clientX<a+n.left:l=o<0&&e.clientX>r.right||o>0&&e.clientX<r.right,l)}shouldSkipY(e,t,s=0,o){const i=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:i.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return l?!0:(t?l=o<0&&e.clientY>a+n.top+s||o>0&&e.clientY<a+n.top:l=o<0&&e.clientY>r.bottom||o>0&&e.clientY<r.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(pt(dx)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${lf}`)?.remove(),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:s,forcePopupParentAsOffsetParent:o}=this.config;!s&&!o&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(s=>!s.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,s=0;for(let o=0;o<e.length;o++){const i=e[o],n=!!i.style.flex&&i.style.flex!=="0 0 auto";if(i===this.element)continue;let r=this.minHeight||0,a=this.minWidth||0;if(n){const l=window.getComputedStyle(i);l.minHeight&&(r=Number.parseInt(l.minHeight,10)),l.minWidth&&(a=Number.parseInt(l.minWidth,10))}else r=i.offsetHeight,a=i.offsetWidth;t+=r,s+=a}return{height:t,width:s}}applySizeToSiblings(e){let t=null;const s=this.getSiblings();if(s){for(let o=0;o<s.length;o++){const i=s[o];i!==t&&(e?i.style.height=`${i.offsetHeight}px`:i.style.width=`${i.offsetWidth}px`,i.style.flex="0 0 auto",i===this.element&&(t=s[o+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:s}=this.config,{isTop:o,isRight:i,isBottom:n,isLeft:r}=this.currentResizer,a=i||r,l=n||o,{movementX:c,movementY:d}=this.calculateMouseMovement({e,isLeft:r,isTop:o}),u=this.position.x,h=this.position.y;let p=0,f=0;if(a&&c){const C=r?-1:1,v=this.getWidth(),w=v+c*C;let b=!1;r&&(p=v-w,(u+p<=0||w<=this.minWidth)&&(b=!0,p=0)),b||this.setWidth(w)}if(l&&d){const C=o?-1:1,v=this.getHeight(),w=v+d*C;let b=!1;o?(f=v-w,(h+f<=0||w<=this.minHeight)&&(b=!0,f=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&v<w&&this.getMinSizeOfSiblings().height+w>this.element.parentElement.offsetHeight&&(b=!0),b||this.setHeight(w)}this.updateDragStartPosition(e.clientX,e.clientY),((t||s)&&p||f)&&this.offsetElement(u+p,h+f)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:s}=this.position;let o;this.config.calculateTopBuffer&&(o=this.config.calculateTopBuffer());const{movementX:i,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:o});this.offsetElement(t+i,s+n),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},cf="__ag_Grid_Stop_Propagation";function mo(e){e[cf]=!0}function ps(e){return e[cf]===!0}var hx="ag-focus-managed",gi=class extends A{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:s=>{if(s.defaultPrevented)return;const o=Ro(this.beans,this.eFocusable,!1,s.shiftKey);o&&(o.focus(),s.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:s}}=this;e.classList.add(hx),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||ps(t))return;const{callbacks:s}=this;if(s.shouldStopEventPropagation(t)){mo(t);return}t.key===I.TAB?s.onTabKeyDown(t):s.handleKeyDown&&s.handleKeyDown(t)}})}},gx=class extends ze{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 gi(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new ux(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}refresh(e){const t=e,s=this.params;this.params=t,t.source==="colDef"&&this.updateParams(t,s);const i=t.state,n=this.state;return this.state=i,(i.model!==n.model||i.state!==n.state)&&this.setModelIntoUi(i.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=fa(e),this.setupApplyDebounced()}doesFilterPass(e){G(283);const{getHandler:t,model:s,column:o}=this.params;return t().doesFilterPass({...e,model:s,handlerParams:this.beans.colFilter.getHandlerParams(o)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return G(284),this.params.model!=null}setupApplyDebounced(){const e=Cd(this.params,this.defaultDebounceMs),t=st(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return G(285),this.params.model}setModel(e){G(286);const{beans:t,params:s}=this;return t.colFilter.setModelForColumnLegacy(s.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:s}=this,o=!this.areModelsEqual(t.model,s.model);return o&&t.onAction("apply",e),o}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const s=this.getModelFromUi(),o={model:s,state:this.getState(),valid:this.canApply(s)};this.state=o;const i=this.params;i.onStateChange(o),i.onUiChange(this.getUiChangeEventParams()),this.gos.get("enableFilterHandlers")||this.eventSvc.dispatchEvent({type:"filterModified",column:i.column,filterInstance:this}),e??(e=this.applyActive?void 0:"debounce"),e==="immediately"?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):e==="debounce"&&this.applyDebounced()}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:s}=this;if(!t)return;const o=e==="floatingFilter"||e==="columnFilter";o?(t.restoreLastSize(),t.setResizable(s.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(o)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e){return Ps(this,e)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}};function df(e){return!!e.operator}function px(e,t,s){if(t==null)return null;let o=null;const{compName:i,jsComp:n,fwComp:r}=Np(e,t);return i?o={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[i]:n==null&&r==null&&t.filter===!0&&(o=s()),o}var gr={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},vd=class extends A{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?gr.AUTO_HEIGHT:t.print?gr.PRINT:gr.NORMAL;this.view.updateLayoutClasses(s,t)}},Fs="Viewport",ju="fakeVScrollComp",bl=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],Uu=100,Sl=150,fx=class extends A{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=st(this,()=>this.lastScrollSource[1]=null,Sl),this.resetLastVScrollDebounced=st(this,()=>this.lastScrollSource[0]=null,Sl)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,s=>{this.centerRowsCtrl=s.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,Fs)});for(const e of bl){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),s=t?st(this,this.onVScroll.bind(this,Fs),Uu):this.onVScroll.bind(this,Fs),o=t?st(this,this.onVScroll.bind(this,ju),Uu):this.onVScroll.bind(this,ju);this.addManagedElementListeners(this.eBodyViewport,{scroll:s}),this.registerScrollPartner(e,o)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...bl,Fs]){if(this.lastScrollSource[1]===t)continue;const s=this.getViewportForSource(t);Er(s,e,this.enableRtl)}}getViewportForSource(e){return e===Fs?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:s}=t;if(this.shouldBlockScrollUpdate(1,s,!0))return;const o=Fr(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(o),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===Fs?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:s}=this;s?.setScrollTop(t),this.nextScrollTop=t,e===Fs?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,s?.active?s.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Sl)}shouldBlockScrollUpdate(e,t,s=!1){return s&&!no()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=qc(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 bl)if(this.getViewportForSource(s).scrollLeft!==e){t=!0;break}t&&this.onHScroll(Fs)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const o=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:o:e=Math.min(Math.max(e,0),o)),Er(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:s,lastScrollTop:o}=this;return{top:o,bottom:o+s}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:s}=this.beans,o=s.getRowCount();let i=-1;for(let n=0;n<o;n++){const r=s.getRow(n);if(typeof e=="function"){if(r&&e(r)){i=n;break}}else if(e===r||e===r.data){i=n;break}}i>=0&&this.ensureIndexVisible(i,t)}ensureIndexVisible(e,t,s=0){if(ot(this.gos,"print"))return;const{rowModel:o}=this.beans,i=o.getRowCount();if(typeof e!="number"||e<0||e>=i){G(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:a,rowRenderer:l}=this.beans;n.wrapIncoming(()=>{const c=this.ctrlsSvc.getGridBodyCtrl(),d=o.getRow(e);let u,h,p=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:f,stickyBottomHeight:C}=c,v=d.rowTop,w=d.rowHeight,b=r.getPixelOffset(),S=d.rowTop-b,y=S+d.rowHeight,x=this.getVScrollPosition(),R=a.divStretchOffset,E=x.top+R,D=x.bottom+R,T=D-E,k=a.getScrollPositionForPixel(S),F=a.getScrollPositionForPixel(y-T),M=Math.min((k+F)/2,S),L=E+f>S,B=D-C<y;let H=null;t==="top"?H=k-f:t==="bottom"?H=F+C:t==="middle"?H=M:L?H=k-f:B&&(F-k>T?H=k-f:H=F+C),H!==null&&(this.setVerticalScrollPosition(H),l.redraw({afterScroll:!0})),u=v!==d.rowTop||w!==d.rowHeight,h=f!==c.stickyTopHeight||C!==c.stickyBottomHeight,p++}while((u||h)&&p<10);if(this.animationFrameSvc?.flushAllFrames(),s<10&&(d?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const f=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const C=this.getVScrollPosition().top;f!==C&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=o.getRowCount())&&this.ensureIndexVisible(e,t,s+1)}})}})}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:s,frameworkOverrides:o}=this.beans,i=s.getCol(e);if(!i||i.isPinned()||!this.visibleCols.isColDisplayed(i))return;const n=this.getPositionedHorizontalScroll(i,t);o.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:s,columnAfterEnd:o}=this.isColumnOutsideViewport(e),i=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?s:o)||i,l=r?o:s;t!=="auto"&&(a=t==="start",l=t==="end");const c=t==="middle";if(a||l||c){const{colLeft:d,colMiddle:u,colRight:h}=this.getColumnBounds(e);return c?u-n/2:a?r?h:d:r?d-n:h-n}return null}isColumnOutsideViewport(e){const{start:t,end:s}=this.getViewportBounds(),{colLeft:o,colRight:i}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>i:s<i,a=n?s<o:t>o;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,s=this.visibleCols.bodyWidth,o=e.getActualWidth(),i=e.getLeft(),n=t?-1:1,r=t?s-i:i,a=r+o*n,l=r+o/2*n;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),s=t,o=e+t;return{start:s,end:o,width:e}}},wd=class extends A{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=ot(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:s}=this.beans,o=t.bodyWidth,i=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=o+i+n:(r=o,this.addSpacer&&(this.gos.get("enableRtl")?i:n)===0&&s.verticalScrollShowing&&(r+=s.getScrollbarWidth())),this.callback(r)}},mx=class extends A{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:s}=this,o=()=>{ws(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(o),s.registerBodyViewportResizeListener(o)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const s=this.centerContainerCtrl.getCenterWidth();s!==this.centerWidth&&(this.centerWidth=s,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=qc(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function pr(e,t,s,o){const i=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return uf(e,t,s,o,i)}function Cx(e,t,s,o){const i=t?.suppressMouseEventHandling;return uf(e,void 0,s,o,i)}function uf(e,t,s,o,i){return i?i(de(e,{column:t,node:s,event:o})):!1}function hf(e,t,s){let o=t;for(;o;){const i=gp(e,o,s);if(i)return i;o=o.parentElement}return null}var Vr="cellCtrl";function bd(e,t){return hf(e,t,Vr)}var zr="renderedRow";function vx(e,t){return hf(e,t,zr)}function Sc(e,t,s,o,i){const n=o?o.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=de(e,{event:t,editing:i,column:o,node:s,data:s.data,colDef:o.getColDef()});return!!(n&&n(r))}function wx(e){const{pinnedRowModel:t,rowModel:s}=e,[o,i]=[t?.isEmpty("top")??!0,t?.isEmpty("bottom")??!0],n=o?null:"top";let r,a;i?(r=null,a=s.getRowCount()-1):(r="bottom",a=t?.getPinnedBottomRowCount()??-1);const{visibleCols:l,rangeSvc:c}=e,d=l.allCols;!c||!d?.length||c.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:r})}var bx=65,Sx=67,yx=86,xx=68,Rx=90,Fx=89;function Ex(e){const{keyCode:t}=e;let s;switch(t){case bx:s=I.A;break;case Sx:s=I.C;break;case yx:s=I.V;break;case xx:s=I.D;break;case Rx:s=I.Z;break;case Fx:s=I.Y;break;default:s=e.code}return s}var Dx=class extends A{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){const t=["dblclick","contextmenu","mouseover","mouseout","click",Xg("touchstart")?"touchstart":"mousedown"];for(const s of t){const o=this.processMouseEvent.bind(this,s);this.addManagedElementListeners(this.element,{[s]:o})}}processMouseEvent(e,t){if(!on(this.beans,t)||ps(t))return;const{cellCtrl:s,rowCtrl:o}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(s?.column&&s.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,o,s)):(s&&s.onMouseEvent(e,t),o&&o.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:bd(t,e),rowCtrl:vx(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:s,rowCtrl:o}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(s?this.processCellKeyboardEvent(s,e,t):o?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(o,e,t))}processCellKeyboardEvent(e,t,s){const o=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!Sc(this.gos,s,e.rowNode,e.column,o)&&t==="keydown"&&(!o&&this.beans.navigation?.handlePageScrollingKey(s)||e.onKeyDown(s),this.doGridOperations(s,o),zp(s)&&e.processCharacter(s)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(s,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,s){const{rowNode:o}=e,{focusSvc:i,navigation:n}=this.beans,a=i.getFocusedCell()?.column;if(!Sc(this.gos,s,o,a,!1)){const c=s.key;if(t==="keydown")switch(c){case I.PAGE_HOME:case I.PAGE_END:case I.PAGE_UP:case I.PAGE_DOWN:n?.handlePageScrollingKey(s,!0);break;case I.LEFT:case I.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case I.UP:case I.DOWN:e.onKeyboardNavigate(s);break;case I.TAB:e.onTabKeyDown(s);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",s))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!on(this.beans,e))return;const s=Ex(e),{clipboardSvc:o,undoRedo:i}=this.beans;if(s===I.A)return this.onCtrlAndA(e);if(s===I.C)return this.onCtrlAndC(o,e);if(s===I.D)return this.onCtrlAndD(o,e);if(s===I.V)return this.onCtrlAndV(o,e);if(s===I.X)return this.onCtrlAndX(o,e);if(s===I.Y)return this.onCtrlAndY(i);if(s===I.Z)return this.onCtrlAndZ(i,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:s,selectionSvc:o},gos:i}=this;s&&As(i)&&!v0(i)&&t.isRowsToRender()?wx(this.beans):o&&o.selectAllRowNodes({source:"keyboardSelectAll",selectAll:wp(i)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:s}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(s,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:s}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(s,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:s}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(s,{withOpenEditor:!0})||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},gf=class extends A{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)}},qn=e=>e.topRowCtrls,Yn=e=>e.getStickyTopRowCtrls(),Zn=e=>e.getStickyBottomRowCtrls(),Xn=e=>e.bottomRowCtrls,Qn=e=>e.allRowCtrls,yl=e=>e.getCtrls("top"),xl=e=>e.getCtrls("center"),Rl=e=>e.getCtrls("bottom"),Px={center:{type:"center",name:"center-cols",getRowCtrls:Qn,getSpannedRowCtrls:xl},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:Qn,getSpannedRowCtrls:xl},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:Qn,getSpannedRowCtrls:xl},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:Qn},topCenter:{type:"center",name:"floating-top",getRowCtrls:qn,getSpannedRowCtrls:yl},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:qn,getSpannedRowCtrls:yl},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:qn,getSpannedRowCtrls:yl},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:qn},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Yn},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Yn},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Yn},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Yn},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:Zn},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:Zn},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:Zn},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:Zn},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:Xn,getSpannedRowCtrls:Rl},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:Xn,getSpannedRowCtrls:Rl},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:Xn,getSpannedRowCtrls:Rl},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:Xn}};function pf(e){return`ag-${Sn(e).name}-viewport`}function fr(e){const t=Sn(e);return t.container??`ag-${t.name}-container`}function Mx(e){return`ag-${Sn(e).name}-spanned-cells-container`}function Sn(e){return Px[e]}var Tx=["topCenter","topLeft","topRight"],Ix=["bottomCenter","bottomLeft","bottomRight"],kx=["center","left","right"],Ax=["center","left","right","fullWidth"],Lx=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],Ox=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],Nx=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],ff=["stickyTopCenter","stickyTopLeft","stickyTopRight"],mf=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Hx=[...ff,"stickyTopFullWidth",...mf,"stickyBottomFullWidth"],Gx=[...Tx,...Ix,...kx,...ff,...mf],Bx=class extends A{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=Sn(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new mx(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,s,o){this.comp=e,this.eContainer=t,this.eSpannedContainer=s,this.eViewport=o,this.createManagedBean(new Dx(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:i,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(Ox,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(Nx,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(Ax,()=>this.createManagedBean(new gf(this.eContainer,this.name==="center"?o:void 0))),n&&this.forContainers(Gx,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(Lx,()=>this.createManagedBean(new wd(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,s=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:s,displayedColumnsWidthChanged:s,displayedRowsChanged:o=>this.onDisplayedRowsChanged(o.afterScroll)}),s(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const o=this.options.getSpannedRowCtrls(e);o&&this.comp.setSpannedRowCtrls(o,!1)}})}listenOnDomOrder(){if(Hx.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const s=this.gos.get("ensureDomOrder"),o=ot(this.gos,"print");this.comp.setDomOrder(s||o)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=s=>{e.dragging&&s.cancelable&&s.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),s=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,s,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return sn(this.eViewport)}getCenterViewportScrollLeft(){return Fr(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=vs(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return qg(this.eViewport)}getViewportScrollLeft(){return Fr(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||Zc(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Er(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=ot(this.gos,"print"),i=this.gos.get("embedFullWidthRows")||s,n=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!i&&a:i||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},Vx="ag-force-vertical-scroll",zx="ag-selectable",Wx="ag-column-moving",_x=class extends A{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,s,o,i,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=s,this.eTop=o,this.eBottom=i,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=s.querySelector(`.${pf("center")}`),this.eFullWidthContainer=s.querySelector(`.${fr("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${fr("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${fr("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new vd(this.comp)),this.scrollFeature=this.createManagedBean(new fx(s)),this.beans.rowDragSvc?.setupRowDrag(s,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([o,s,i,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(o),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),s=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:s,rowResizeEnded:s}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const s=t&&e.getScrollbarWidth()||0,o=Vp()?16:0,i=`calc(100% + ${s+o}px)`;ws(this.beans,()=>this.comp.setBodyViewportWidth(i)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let s=this.gos.get("treeData");if(!s){const o=t.isPivotMode();s=(e?e.columns.length:0)>=(o?2:1)}this.comp.setGridRootRole(s?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:s=>{const{target:o}=s,i=to(o,"ag-root",t);t.classList.toggle("ag-has-focus",!i)},focusout:s=>{const{target:o,relatedTarget:i}=s,n=t.contains(i),r=to(i,"ag-root",t);to(o,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(Wx,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(zx,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,s=t.isLastRowIndexKnown()?t.getRowCount():-1,o=s===-1?-1:e+s;this.comp.setRowCount(o)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?Vx:null,s=ot(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||s&&Yg(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let s=t.sizesMeasured;const o=()=>{const i=s&&Uo(this.gos)&&!e.stretching,n=i?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,i)};o(),this.addManagedEventListeners({heightScaleChanged:o}),this.addManagedPropertyListener("animateRows",o),this.addManagedEventListeners({gridStylesChanged:()=>{!s&&t.sizesMeasured&&(s=!0,o())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:s,eTop:o,eBottom:i,beans:{popupSvc:n,touchSvc:r}}=this,a=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:a}),r?.mockBodyContextMenu(this,a),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const l=this.onStickyWheel.bind(this);for(const d of[t,s,o,i])this.addManagedElementListeners(d,{wheel:l});const c=this.onHorizontalWheel.bind(this);for(const d of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(d).eContainer,{wheel:c});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:s,shiftKey:o}=e;(o||Math.abs(t)>Math.abs(s))&&on(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:s,shiftKey:o}=e;(o||Math.abs(t)>Math.abs(s))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:s}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||s})}onBodyViewportContextMenu(e,t,s){if(!e&&!s)return;this.gos.get("preventDefaultOnContextMenu")&&(e||s).preventDefault();const{target:o}=e||t;(o===this.eBodyViewport||o===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:s,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e,beans:{environment:t}}=this,s=e?.getPinnedTopTotalHeight(),o=e?.getPinnedBottomTotalHeight(),i=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=i-n,a=s?r+s:0,l=o?r+o:0;this.comp.setTopHeight(a),this.comp.setBottomHeight(l),this.comp.setTopInvisible(a<=0),this.comp.setBottomInvisible(l<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),s=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let o=0;t>0&&(o+=t),s>0&&(o+=s),o>0&&(o+=1),this.comp.setStickyTopTop(`${o}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:s}=this,o=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=o+n;s.setStickyBottomBottom(`${r}px`)}};function jx(e,t){return bd(e,t.target)?.getFocusedCellPosition()??null}function $u(e,t){const s=ot(e.gos,"normal"),o=t;let i,n;o.clientX!=null||o.clientY!=null?(i=o.clientX,n=o.clientY):(i=o.x,n=o.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(n+=r,s){const a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition(),c=a.getHScrollPosition();i+=c.left,n+=l.top}return{x:i,y:n}}var Cf=class extends ze{constructor(e,t){super(),this.direction=t,this.eViewport=ne,this.eContainer=ne,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",Gp()||no())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=Vp(),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(),ws(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;Ub(this,()=>Cs(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},Ux={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"}]},$x=class extends Cf{constructor(){super(Ux,"horizontal"),this.eLeftSpacer=ne,this.eRightSpacer=ne,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 wd(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const s=!this.enableRtl&&e,o=this.scrollVisibleSvc.getScrollbarWidth();s&&(t+=o),Jt(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=o);let i=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(i+=o),Jt(this.eLeftSpacer,i),this.eLeftSpacer.classList.toggle("ag-scroller-corner",i<=o)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,s=this.gos.get("suppressHorizontalScroll"),o=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=s?0:o===0&&t?16:o,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),zi(this.getGui(),n),zi(this.eViewport,n),zi(this.eContainer,n),n||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return Fr(this.eViewport,this.enableRtl)}setScrollPosition(e){Cs(this.eViewport)||this.attemptSettingScrollPosition(e),Er(this.eViewport,e,this.enableRtl)}},Kx={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"}]}]},qx=class extends Cf{constructor(){super(Kx,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new gf(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,s=this.invisibleScrollbar,o=t&&e.getScrollbarWidth()||0,i=o===0&&s?16:o;this.toggleCss("ag-scrollbar-invisible",s),Jt(this.getGui(),i),Jt(this.eViewport,i),Jt(this.eContainer,i),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const s=e.getGridBodyCtrl().eBodyViewport,o=this.getScrollPosition(),i=s.scrollTop;o!=i&&this.setScrollPosition(i,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!Cs(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},Yx="ag-column-first",Zx="ag-column-last";function vf(e,t,s,o){return Ge(e)?[]:Qx(e.headerClass,e,t,s,o)}function wf(e,t,s){e.toggleCss(Yx,s.isColAtEdge(t,"first")),e.toggleCss(Zx,s.isColAtEdge(t,"last"))}function Xx(e,t,s,o){return de(t,{colDef:e,column:s,columnGroup:o})}function Qx(e,t,s,o,i){if(Ge(e))return[];let n;if(typeof e=="function"){const r=Xx(t,s,o,i);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}function Jx(e,t,s){t.addManagedElementListeners(s,{keydown:o=>{if(!o.defaultPrevented&&o.key===I.TAB){const i=o.shiftKey;Ro(e,s,!1,i)||ni(e,i)&&o.preventDefault()}}})}function eR(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function ro(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function ma(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function ni(e,t,s=!1){const o=e.ctrlsSvc.get("gridCtrl");return!s&&o.focusNextInnerContainer(t)?!0:((s||!t&&!o.isDetailGrid())&&o.forceFocusOutOfContainer(t),!1)}function Qt(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function Sd(e){const t=[],s=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const o of s){if(!o)continue;const i=o.getGroupRowCount()||0;for(let n=0;n<i;n++){const r=o.getGroupRowCtrlAtIndex(n),a=t[n];if(r){const l=tR(e,r);(a==null||l>a)&&(t[n]=l)}}}return t}function tR(e,t){let o=e.colModel.isPivotMode()?oR(e):Sf(e);const i=t.getHeaderCellCtrls();for(const n of i){const{column:r}=n,a=r.getAutoHeaderHeight();a!=null&&a>o&&r.isAutoHeaderHeight()&&(o=a)}return o}function yd(e){let s=e.colModel.isPivotMode()?sR(e):yn(e);return e.colModel.forAllCols(o=>{const i=o.getAutoHeaderHeight();i!=null&&i>s&&o.isAutoHeaderHeight()&&(s=i)}),s}function yn(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function bf(e){return e.gos.get("floatingFiltersHeight")??yn(e)}function Sf(e){return e.gos.get("groupHeaderHeight")??yn(e)}function sR(e){return e.gos.get("pivotHeaderHeight")??yn(e)}function oR(e){return e.gos.get("pivotGroupHeaderHeight")??Sf(e)}function iR(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}var nR=class extends A{setComp(e,t,s){this.comp=e,this.eGui=t;const{beans:o}=this,{headerNavigation:i,touchSvc:n,ctrlsSvc:r}=o;i&&this.createManagedBean(new gi(s,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,o),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,o)}),this.onPivotModeChanged(o),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),n?.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>ws(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const s=Sd(e).reduce((n,r)=>n+r,0),o=yd(e);if(e.filterManager?.hasFloatingFilters()&&(t+=bf(e)),t+=s,t+=o,this.headerHeight===t)return;this.headerHeight=t;const i=`${t+1}px`;this.comp.setHeightAndMinHeight(i),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const s=e.visibleCols.allCols.some(o=>o.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",s)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),s=e.shiftKey,o=s!==t?"LEFT":"RIGHT",{beans:i}=this,{headerNavigation:n,focusSvc:r}=i;(n.navigateHorizontally(o,!0,e)||!s&&r.focusOverlay(!1)||ni(i,s,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:s}=this.beans;switch(e.key){case I.LEFT:t="LEFT";case I.RIGHT:{q(t)||(t="RIGHT"),s.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case I.UP:t="UP";case I.DOWN:{q(t)||(t="DOWN"),s.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:s,beans:o}=this;!t&&s.contains(Ve(o))||s.contains(t)||(o.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,s){const{menuSvc:o,ctrlsSvc:i}=this.beans;if(!e&&!s||!o?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===i.getHeaderRowContainerCtrl()?.eViewport)&&o.showHeaderContextMenu(void 0,e,s)}},xd=class extends A{constructor(e,t,s,o){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=o,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=s}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?Me(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,s=e.get("suppressColumnMoveAnimation"),o=q(this.columnOrGroup.getOldLeft());t?.isActive()&&o&&!s?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),s=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=s,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===s&&this.setLeft(s)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:s,visibleCols:o}=this.beans;if(!ot(s,"print")||e.getPinned()==="left")return t;const n=o.getColsLeftWidth();if(e.getPinned()==="right"){const r=o.bodyWidth;return n+r+t}return n+t}setLeft(e){if(q(e)&&(this.eCell.style.left=`${e}px`),je(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&yb(this.ariaEl,t.length)}}},rR=0,yf="headerCtrl",Rd=class extends A{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()+"-"+rR++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,s,o,i){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,s,o,i),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:s}=this.beans.focusSvc.focusedHeader,o=s.getDefinition(),i=o?.suppressHeaderKeyboardEvent;if(!q(i))return!1;const n=de(this.gos,{colDef:o,column:s,headerRowIndex:t,event:e});return!!i(n)}getWrapperHasFocus(){return Ve(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let s;if(typeof t=="function"){const o=this.getHeaderClassParams();s=t(o)}else s=t;s&&this.comp.setUserStyles(s)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:s,compBean:o}=e,{beans:i}=this,n=u=>{if(!this.isAlive()||!o.isAlive())return;const{paddingTop:h,paddingBottom:p,borderBottomWidth:f,borderTopWidth:C}=So(this.eGui),v=h+p+f+C,b=t.offsetHeight+v;if(u<5){const y=!Qe(i)?.contains(t),x=b==0;if(y||x){ic(()=>n(u+1),"raf",i);return}}this.setColHeaderHeight(this.column,b)};let r=!1,a;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&c(),!u&&r&&d()},c=()=>{r=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),n(0),a=vs(this.beans,t,()=>n(0))},d=()=>{r=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0};l(),o.addDestroyFunc(()=>d()),o.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),o.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),s&&s(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:s,eGui:o}=this;!e||!t||!o||(wf(e,t,s.visibleCols),_g(o,s.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=ro(this.beans);this.eGui&&Rt(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=Ve(this.beans),s=e.key===I.LEFT||e.key===I.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||s)&&(e.preventDefault(),e.stopImmediatePropagation()),!s))return;const i=e.key===I.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const n=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(n,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(i)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:s}=this.beans;return s?s.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:s}=this;let o=e.key===I.LEFT!==t.get("enableRtl");const i=s.getPinned(),n=t.get("enableRtl");return i&&n!==(i==="right")&&(o=!o),(o?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case I.PAGE_DOWN:case I.PAGE_UP:case I.PAGE_HOME:case I.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=yf,{eGui:s,gos:o}=this;po(o,s,t,this),e.addDestroyFunc(()=>po(o,s,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(t.focus(),this.lastFocusEvent=e||null):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,s){const o=e??t,{menuSvc:i,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&o.preventDefault(),i?.isHeaderContextMenuEnabled(s)&&i.showHeaderContextMenu(s,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",s)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:s}=this;e.isColumn?s.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):s.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},aR=class extends Rd{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,s,o,i){this.comp=e;const{rowCtrl:n,column:r,beans:a}=this,{colResize:l,context:c,colHover:d,rangeSvc:u}=a,h=vn(this,c,i);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:o,checkMeasuringCallback:f=>this.setRefreshFunction("measuring",f),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=h.createManagedBean(l.createResizeFeature(n.pinned,r,s,e,this)):Be(s,!1),d?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new xd(r,t,a)),h.createManagedBean(new gi(t,{shouldStopEventPropagation:f=>this.shouldStopEventPropagation(f),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh()}),h.addManagedListeners(r,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const p=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:p,columnRowGroupChanged:p,columnPivotChanged:p,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.colDef;return de(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 mS(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:s,gos:o}=this.beans;return de(o,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!s&&(!this.openFilterEnabled||Ft(this.gos)),showColumnMenu:(n,r)=>{e?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t?.setSortForColumn(this.column,n,!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{const s=t.createSelectAllFeature(this.column);s&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(s),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!s&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===I.SPACE&&this.selectAllFeature?.onSpaceKeyDown(e),e.key===I.ENTER&&this.onEnterKeyDown(e),e.key===I.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&this.beans.sortSvc?.progressSort(this.column,e.shiftKey,"uiColumnSorted")}showMenuOnKeyPress(e,t){const s=this.comp.getUserCompInstance();Ku(s)&&s.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),VS()&&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=vf(t,this.gos,this.column,null),o=this.userHeaderClasses;this.userHeaderClasses=new Set(s);for(const i of s)o.has(i)?o.delete(i):this.comp.toggleCss(i,!0);for(const i of o)this.comp.toggleCss(i,!1)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(const e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const s=this.column.getActualWidth();this.comp.setWidth(`${s}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const s=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",s),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,s=e===1;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",s)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:s,beans:o}=this,i=Sd(this.beans),n=i.reduce((h,p)=>h+p,0)===0;if(s.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),s.toggleCss("ag-header-span-height",!1),s.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();s.toggleCss("ag-header-span-height",r>0);const l=yd(o);if(r===0){s.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}s.toggleCss("ag-header-span-total",a);const c=(this.column.getFirstRealParent()?.getLevel()??-1)+1,d=i.length-c;let u=0;for(let h=0;h<d;h++)u+=i[i.length-1-h];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${l+u}px`)}refreshAriaSort(){if(this.sortable){const e=this.getLocaleTextFunc(),t=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(ub(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!Ft(this.gos)){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(Ve(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,s)=>t==="filter"?-1:s.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnounce?.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=i=>this.handleMouseOverChange(i.type==="mouseenter"),s=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},o=i=>this.handleContextMenuMouseEvent(i,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:s,contextmenu:o})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return Ku(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Ku(e){return typeof e?.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var lR=0,Fl=class extends A{constructor(e,t,s){super(),this.rowIndex=e,this.pinned=t,this.type=s,this.instanceId=lR++,this.comp=null,this.allCtrls=[];let o="ag-header-row-column";s==="group"?o="ag-header-row-group":s==="filter"&&(o="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${o}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=ot(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=vn(this,this.beans.context,t),s&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),s=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:s,virtualColumnsChanged:o=>this.onVirtualColumnsChanged(o.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",s),e.addManagedPropertyListener("ensureDomOrder",o=>this.isEnsureDomOrder=o.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=ot(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=Sd(this.beans);for(let i=0;i<t.length;i++){if(i===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[i]};e+=t[i]}const s=yd(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:s};e+=s;const o=bf(this.beans);return{topOffset:e,rowHeight:o}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;const t=this.getUpdatedHeaderCtrls(),s=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,s,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const o of t)this.recycleAndCreateHeaderCtrls(o,this.ctrlsById,e);const s=o=>{const{focusSvc:i,visibleCols:n}=this.beans;return i.isHeaderWrapperFocused(o)?n.isVisible(o.column):!1};if(e)for(const[o,i]of e)s(i)?this.ctrlsById.set(o,i):this.destroyBean(i);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,s){if(e.isEmptyGroup())return;const o=e.getUniqueId();let i;if(s&&(i=s.get(o),s.delete(o)),i&&i.column!=e&&(this.destroyBean(i),i=void 0),i==null)switch(this.type){case"filter":{i=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":i=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:i=this.createBean(new aR(e,this));break}t.set(o,i)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];for(const t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const s=this.allCtrls.find(i=>i.column==e);return s?s.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},cR=class extends A{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:s,ctrlsSvc:o,colModel:i,colMoves:n}=this.beans;this.setupCenterWidth(),s?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});const a=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;o.register(a,this),i.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,filterManager:s,visibleCols:o}=this.beans;let i=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=o.headerGroupRowCount;i=u,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let p=u;p<h;p++)this.destroyBean(this.groupsRowCtrls[p]);this.groupsRowCtrls.length=u;return}for(let p=h;p<u;p++){const f=this.createBean(new Fl(p,this.pinned,"group"));this.groupsRowCtrls.push(f)}}},a=()=>{const u=i++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new Fl(u,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},l=()=>{this.includeFloatingFilter=!!s?.hasFloatingFilters()&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}e||u();const h=i++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new Fl(h,this.pinned,"filter"))},c=this.getAllCtrls();r(),a(),l();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,n),c.length!==d.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=s=>s?.getHeaderCellCtrls().find(o=>o.column===e);if(Ls(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let s=0;s<this.groupsRowCtrls.length;s++){const o=t(this.groupsRowCtrls[s]);if(o)return o}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,s){const i=this.getAllCtrls()[e];return i?i.focusHeader(t,s):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const s=e?.createBodyDropTarget(this.pinned,t);s&&this.createManagedBean(s)}restoreFocusOnHeader(e,t){if(!t)return;const{column:s}=t;s.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t,scroll:!1})}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new wd(e=>this.comp.setCenterWidth(`${e}px`),!0))}},dR=class extends A{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(Yu(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(){Yu(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(Ft(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&Ls(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(no()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!Ft(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!Ft(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 Ft(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,s,o){const{positionBy:i,onClosedCallback:n}=t,r=t.column;if(i==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(r,a,s,n,o)}else if(i==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,s,n,o)}else if(r){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),ws(a,()=>{const c=l.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);c&&e?.showMenuAfterButtonClick(r,c.getAnchorElementForMenu(o),s,n,o)})}}};function qu(e,t,s){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",s))}function Yu(e){const{enterpriseMenuFactory:t,filterMenuFactory:s,gos:o}=e;return t&&Ft(o)?t:s}var Ca=class extends ad{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.errorMessages=null}},xf=class extends ze{constructor(){super()}},uR={tag:"span",cls:"ag-overlay-loading-center"},hR=class extends xf{init(){const e=us(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??uR),!e){const s=this.getLocaleTextFunc()("loadingOoo","Loading...");this.getGui().textContent=s,this.beans.ariaAnnounce.announceValue(s,"overlay")}}},gR={tag:"span",cls:"ag-overlay-no-rows-center"},pR=class extends xf{init(){const e=us(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??gR),!e){const s=this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=s,this.beans.ariaAnnounce.announceValue(s,"overlay")}}};function fR(e,t,s){const o=Ot(e,t,s);if(o){const{className:n}=o;if(typeof n=="string"&&n.includes("ag-icon")||typeof n=="object"&&n["ag-icon"])return o}const i=pt({tag:"span"});return i.appendChild(o),i}function Ot(e,t,s){let o=null;e==="smallDown"?G(262):e==="smallLeft"?G(263):e==="smallRight"&&G(264);const i=s?.getColDef().icons;if(i&&(o=i[e]),t.gos&&!o){const n=t.gos.get("icons");n&&(o=n[e])}if(o){let n;if(typeof o=="function")n=o();else if(typeof o=="string")n=o;else{G(38,{iconName:e});return}if(typeof n=="string")return Yc(n);if(Qc(n))return n;G(133,{iconName:e});return}else{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),pt({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var mR=".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)}",CR={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"}]}]},vR=class extends ze{constructor(){super(),this.dragSource=null,this.eIcon=ne,this.eLabel=ne,this.eGhost=ne,this.registerCSS(mR)}postConstruct(){const e=t=>fR(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(CR),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:s,eIcon:o,dragSource:i,dropIconMap:n,gos:r}=this;mt(o);let a=null;e||(e=i?.getDefaultIconName?i.getDefaultIconName():"notAllowed"),a=n[e],s.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),o.classList.toggle("ag-shake-left-to-right",t),!(a===n.hide&&r.get("suppressDragLeaveHidesColumns"))&&a&&o.appendChild(a)}setLabel(e){this.eLabel.textContent=e}},wR=".ag-checkbox-cell{height:100%}",bR={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},SR=class extends ze{constructor(){super(bR,[dd]),this.eCheckbox=ne,this.registerCSS(wR)}init(e){this.refresh(e);const{eCheckbox:t,beans:s}=this,o=t.getInputElement();o.setAttribute("tabindex","-1"),Vg(o,"polite"),this.addManagedListeners(o,{click:i=>{if(mo(i),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:i=>{mo(i)}}),this.addManagedElementListeners(e.eGridCell,{keydown:i=>{if(i.key===I.SPACE&&!t.isDisabled()){e.eGridCell===Ve(s)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),i.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,s=!0;const{value:o,column:i,node:n}=e;if(n.group&&i)if(typeof o=="boolean")t=o;else{const u=i.getColId();u.startsWith(ha)?t=o==null||o===""?void 0:o==="true":n.aggData&&n.aggData[u]!==void 0||n.sourceRowIndex>=0?t=o??void 0:s=!1}else t=o??void 0;const{eCheckbox:r}=this;if(!s){r.setDisplayed(!1);return}r.setValue(t);const a=e.disabled??!i?.isCellEditable(n);r.setDisabled(a);const l=this.getLocaleTextFunc(),c=ua(l,t),d=a?c:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;r.setInputAriaLabel(d)}onCheckboxChanged(e){const{params:t}=this,{column:s,node:o,value:i}=t;this.beans?.editSvc?.setEditingCells([{column:s,colId:s.getColId(),rowIndex:o.rowIndex,rowPinned:o.rowPinned,state:"changed",oldValue:i,newValue:i}],{update:!0,forceRefreshOfEditCellsOnly:!0});const n=o.setDataValue(s,e,"renderer");this.beans.editSvc?.stopEditing({rowNode:o,column:s},{source:this.beans.editSvc?.isBatchEditing()?"ui":"api"}),n||this.updateCheckbox(t)}},Zu=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){const{all:t,visible:s,order:o}=this;t.has(e)||(t.add(e),s.add(e),o.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),zt(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(const t of this.visible)if(t.id==e)return t}clear(){const{all:e,visible:t,order:s,queued:o}=this;e.clear(),o.clear(),t.clear(),s.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:s}=this.beans,o=e?.getSortOptions()??[],i=RR(this.order);if(this.order.sort((r,a)=>(r.pinnedSibling?.rowIndex??0)-(a.pinnedSibling?.rowIndex??0)),this.order=t?.doFullSort(this.order,o)??this.order,!i)return;const n=fp(s);n==="bottom"||n==="pinnedBottom"?this.order.push(i):this.order.unshift(i)}hide(e){const{all:t,visible:s}=this;t.forEach(o=>e(o)?s.delete(o):s.add(o)),this.order=Array.from(s),this.sort()}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function Rf(e){if(e.level===-1)return!0;const t=e.parent;return t?.childrenAfterSort?.some(s=>s==e)?Rf(t):!1}function El(e,t){const{gos:s,rowModel:o,filterManager:i}=e;return yo(s)?!o.getRowNode(t.id):i?.isAnyFilterPresent()?!Rf(t):s.get("pivotMode")?!t.group:!1}function yR(e){return!!e.footer&&e.level===-1}function xR(e){return!!e.pinnedSibling&&yR(e.pinnedSibling)}function RR(e){const t=e.findIndex(xR);if(t>-1)return e.splice(t,1)?.[0]}var Xu=class extends A{postConstruct(){const{gos:e,beans:t}=this;this.top=new Zu(t,"top"),this.bottom=new Zu(t,"bottom");const s=i=>El(t,i.pinnedSibling),o=()=>{const i=e.get("isRowPinned");i&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,i(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:i})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow(),this.forContainers(r=>r.hide(s));const n=this.refreshRowPositions();(!i||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(ER),this.refreshRowPositions()},rowNodeDataChanged:({node:i})=>{(e.get("isRowPinnable")?.(i)??!0)||this.pinRow(i,null)},firstDataRendered:o}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(i=>i.hide(s)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:i})=>{this._grandTotalPinned=i==="pinnedBottom"?"bottom":i==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",o)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const s=[];t.forEach(o=>s.push(o)),s.forEach(o=>this.pinRow(o,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,s){if(e.footer&&e.level>-1)return;if(e.footer&&e.level===-1){this._grandTotalPinned=t,PR(this.beans);return}const o=e.rowPinned??e.pinnedSibling?.rowPinned;if(o!=null&&t!=null&&t!=o){const r=e.rowPinned?e:e.pinnedSibling,a=e.rowPinned?e.pinnedSibling:e;this.pinRow(r,null,s),this.pinRow(a,t,s);return}const n=s&&DR(this.beans,e,s);if(n){n.forEach(r=>this.pinRow(r,t));return}if(t==null){const r=e.rowPinned?e:e.pinnedSibling,a=this.findPinnedRowNode(r);if(!a)return;a.delete(r);const l=r.pinnedSibling;Dl(r),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(l)}else{const r=Qu(this.beans,e,t),a=this.getContainer(t);a.add(r),El(this.beans,e)&&a.hide(l=>El(this.beans,l.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const s=o=>{if(o.rowHeightEstimated){const i=ks(this.beans,o);o.setRowTop(t),o.setRowHeight(i.height),t+=i.height,e=!0}};return this.bottom.forEach(s),t=0,this.top.forEach(s),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return Ju(this.top)}getPinnedBottomTotalHeight(){return Ju(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const e=t=>{const s=[];return this.forEachPinnedRow(t,o=>s.push(o.pinnedSibling.id)),s};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,s)=>{for(const o of e[s]){const i=this.beans.rowModel.getRowNode(o);i?this.pinRow(i,s):t.queue(o)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const s=new Set;e.forEachQueued(o=>{const i=this.beans.rowModel.getRowNode(o);i&&s.add(i)});for(const o of s)e.unqueue(o.id),this.pinRow(o,t)})}pinGrandTotalRow(){const{gos:e,beans:t,_grandTotalPinned:s}=this,o=t.rowModel;if(!We(e))return;const i=o.rootNode?.sibling;if(!i)return;const n=i.pinnedSibling,r=n&&this.findPinnedRowNode(n);if(s){if(r&&r.floating!==s&&(r.delete(n),Dl(n)),!r||r.floating!==s){const a=Qu(t,i,s);this.getContainer(s).add(a)}}else{if(!r)return;r.delete(n),Dl(n)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(s=>s.setRowHeight(s.rowHeight,!0)))}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){const t=o=>FR(this.beans,o);if(e)return t(this.getContainer(e));let s=!1;return this.forContainers(o=>{const i=t(o);s||(s=i)}),s}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function FR(e,t){let s=0,o=!1;return t.forEach((i,n)=>{if(o||(o=i.rowTop!==s),i.setRowTop(s),i.rowHeightEstimated||i.rowHeight==null){const r=ks(e,i).height;o||(o=i.rowHeight!==r),i.setRowHeight(r)}i.setRowIndex(n),s+=i.rowHeight}),o}function Qu(e,t,s){if(t.pinnedSibling)return t.pinnedSibling;const o=Zy(t,e);o.setRowTop(null),o.setRowIndex(null),o.rowPinned=s;const i=s==="top"?fd:md;return o.id=`${i}${s}-${t.id}`,o.pinnedSibling=t,t.pinnedSibling=o,o}function Dl(e){if(!e.pinnedSibling)return;e.rowPinned=null,e.setRowTop(null),e.setRowIndex(null);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function ER(e){const t=new Set;e.forEach(s=>{s.group&&t.add(s)}),t.forEach(s=>e.delete(s))}function DR(e,t,s){const{rowSpanSvc:o}=e,i=(s&&o?.isCellSpanning(s,t))??!1;if(s&&i)return o?.getCellSpan(s,t)?.spannedNodes}function Ju(e){const t=e.size();if(t===0)return 0;const s=e.getByIndex(t-1);return s===void 0?0:s.rowTop+s.rowHeight}function PR({gos:e,rowModel:t}){We(e)&&t.refreshModel({step:"map"})}var eh=class extends A{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=s=>{s.setRowHeight(s.rowHeight,!0)};Di(this.pinnedBottomRows,t),Di(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const s=o=>{if(o.rowHeightEstimated){const i=ks(this.beans,o);o.setRowTop(t),o.setRowHeight(i.height),t+=i.height,e=!0}};return Di(this.pinnedBottomRows,s),t=0,Di(this.pinnedTopRows,s),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const s=this.getCache(t);if(e===void 0){s.order.length=0,s.cache={};return}const o=si(this.gos),i=t==="top"?fd:md,n=new Set(s.order),r=[],a=new Set;let l=0,c=-1;for(const d of e){const u=o?.({data:d,level:0,rowPinned:t})??i+this.nextId++;if(a.has(u)){G(96,{id:u,data:d});continue}c++,a.add(u),r.push(u);const h=Ui(s,u);if(h!==void 0)h.data!==d&&h.updateData(d),l+=this.setRowTopAndRowIndex(h,l,c),n.delete(u);else{const p=new Os(this.beans);p.id=u,p.data=d,p.rowPinned=t,l+=this.setRowTopAndRowIndex(p,l,c),s.cache[u]=p,s.order.push(u)}}for(const d of n)Ui(s,d)?.clearRowTopAndRowIndex(),delete s.cache[d];s.order=r}setRowTopAndRowIndex(e,t,s){return e.setRowTop(t),e.setRowHeight(ks(this.beans,e).height),e.setRowIndex(s),e.rowHeight}getPinnedTopTotalHeight(){return th(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return th(this.pinnedBottomRows)}getPinnedTopRowCount(){return xc(this.pinnedTopRows)}getPinnedBottomRowCount(){return xc(this.pinnedBottomRows)}getPinnedTopRow(e){return yc(this.pinnedTopRows,e)}getPinnedBottomRow(e){return yc(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return Ui(this.getCache(t),e)}forEachPinnedRow(e,t){return Di(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function th(e){const t=xc(e);if(t===0)return 0;const s=yc(e,t-1);return s===void 0?0:s.rowTop+s.rowHeight}function Ui(e,t){return e.cache[t]}function yc(e,t){return Ui(e,e.order[t])}function Di(e,t){e.order.forEach((s,o)=>{const i=Ui(e,s);i&&t(i,o)})}function xc(e){return e.order.length}var MR=class extends A{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const s=e.get("enableRowPinning"),o=fp(e),n=!!s||(o==="pinnedBottom"||o==="pinnedTop"),r=n?this.inner instanceof eh:this.inner instanceof Xu;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(n?new Xu:new eh))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,s){return this.inner.pinRow(e,t,s)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}};function xn(e){return!!(e.rowPinned&&e.pinnedSibling)}function Tt(e,t,s,o){const i=t==="top";if(!s)return Tt(e,t,i?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),o);if(!o){const l=i?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return Tt(e,t,s,i?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let n=!1,r=!1;const a=[];return e.forEachPinnedRow(t,l=>{if(l===s&&!n){n=!0,a.push(l);return}if(n&&l===o){r=!0,a.push(l);return}n&&!r&&a.push(l)}),a}var TR={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},IR=class extends ze{constructor(){super(TR,[dd]),this.eCheckbox=ne}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:s}=this,o=t.isSelected(),i=ua(e,o),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(n,r);s.setValue(o,!0),s.setInputAriaLabel(`${a} (${i})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:mo,click:o=>{mo(o),this.beans.selectionSvc?.handleSelectionEvent(o,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:i})=>{const n=typeof o=="object"?cl(o):void 0,r=typeof i=="object"?cl(i):void 0;n!==r&&this.onSelectableChanged()}),cc(this.gos)||typeof this.getIsVisible()=="function"){const o=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o}),this.addManagedListeners(this.rowNode,{dataChanged:o,cellChanged:o}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:s,gos:o}=this,i=t.selectable,n=this.getIsVisible();let r;if(typeof n=="function"){const u=s?.callbackParams;if(!e)r=n({...u,node:t,data:t.data});else{const h=e.createColumnFunctionCallbackParams(t);r=n({...u,...h})}}else r=n??!1;const a=i&&!r||!i&&r,l=i||r,c=o.get("rowSelection"),d=c&&typeof c!="string"?!cl(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"?$o(t):this.column?.getColDef()?.checkboxSelection}},kR=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:s,pinnedRowModel:o}=this;return t??(t=s.getRowNode(e)),o?.isManual()&&(t??(t=o.getPinnedRowById(e,"top")),t??(t=o.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const s=t[0].id===this.rootId,o=t.findIndex(i=>i.id===e.id);if(o>-1){const i=t.slice(0,o),n=t.slice(o+1);return this.setEndRange(e),s?{keep:i,discard:n}:{keep:n,discard:i}}else return{keep:t,discard:[]}}extend(e,t=!1){const s=this.getRoot();if(s==null){const i=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&i.push(n)),i.push(e),this.setRoot(e),{keep:i,discard:[]}}const o=this.getNodesInRange(s,e);if(!o)return this.setRoot(e),{keep:[e],discard:[]};if(o.find(i=>i.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const i=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:i}}}getNodesInRange(e,t){const{pinnedRowModel:s,rowModel:o}=this;if(!s?.isManual())return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return Tt(s,"top",e,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const i=Tt(s,"bottom",void 0,e),n=o.getRowCount(),r=o.getRow(n-1);return(o.getNodesInRangeForSelection(t,r)??[]).concat(i)}if(!e.rowPinned&&!t.rowPinned)return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return Tt(s,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const i=Tt(s,"top",t,void 0),n=Tt(s,"bottom",void 0,e),r=o.getRow(0),a=o.getRow(o.getRowCount()-1);return i.concat(o.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(!e.rowPinned&&t.rowPinned==="top")return Tt(s,"top",t,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const i=Tt(s,"top",e,void 0),n=Tt(s,"bottom",void 0,t),r=o.getRow(0),a=o.getRow(o.getRowCount()-1);return i.concat(o.getNodesInRangeForSelection(r,a)??[]).concat(n)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return Tt(s,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const i=Tt(s,"bottom",void 0,t),n=o.getRow(o.getRowCount());return(o.getNodesInRangeForSelection(e,n)??[]).concat(i)}return null}},AR=class extends A{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(Ve(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new cd);this.cbSelectAll=t,t.addCss("ag-header-select-all"),ho(t.getGui(),"presentation"),this.showOrHideSelectAll();const s=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:s,paginationChanged:s,modelUpdated:s}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:i})=>{const n=r=>typeof r=="string"||!r||r.mode==="singleRow"?void 0:r.selectAll;n(o)!==n(i)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,s=this.cbSelectAll,o=t.getSelectAllState(e);s.setValue(o);const i=t.hasNodesToSelect(e);s.setDisabled(!i),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:s,cbSelectAll:o,cbSelectAllVisible:i}=this,n=o.getValue(),r=ua(t,n),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",i?`${a} (${r})`:null),o.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||s.announceAriaDescription()}checkSelectionType(e){return kr(this.gos)?!0:(G(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:s}=this.beans;return We(t)||yo(t)?!0:(G(129,{feature:e,rowModel:s.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let s="uiSelectAll";t==="currentPage"?s="uiSelectAllCurrentPage":t==="filtered"&&(s="uiSelectAllFiltered");const o={source:s,selectAll:t},i=this.beans.selectionSvc;e?i.selectAllRowNodes(o):i.deselectAllRowNodes(o)}isCheckboxSelection(){const{column:e,gos:t,beans:s}=this,n=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return Ff(s,e)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const e=wp(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 Ff({gos:e,selectionColSvc:t},s){const o=e.get("rowSelection"),i=s.getColDef(),{headerCheckboxSelection:n}=i;let r=!1;if(typeof o=="object"){const l=bs(s),c=nd(s);(Tr(o)==="autoGroupColumn"&&c||l&&t?.isSelectionColumnEnabled())&&(r=cr(o))}else typeof n=="function"?r=n(de(e,{column:s,colDef:i})):r=!!n;return r}var LR=class extends A{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new kR(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=cc(e);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=cc(e),this.addManagedEventListeners({cellValueChanged:s=>this.updateRowSelectable(s.node),rowNodeDataChanged:s=>this.updateRowSelectable(s.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new IR}createSelectAllFeature(e){if(Ff(this.beans,e))return new AR(e)}isMultiSelect(){return kr(this.gos)}onRowCtrlSelected(e,t,s){const o=!!e.rowNode.isSelected();e.forEachGui(s,i=>{i.rowComp.toggleCss("ag-row-selected",o);const n=i.element;jg(n,o),n.contains(Ve(this.beans))&&t(i)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),s=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||s)return;const i=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(i,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!xn(e)||!oo(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(rn(this.gos)){const i=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:i??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,s=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let o=0;o<e.childrenAfterGroup.length;o++){const i=e.childrenAfterGroup[o];let n=i.isSelected();if(!i.selectable){const r=this.calculateSelectedFromChildren(i);if(r===null)continue;n=r}switch(n){case!0:t=!0;break;case!1:s=!0;break;default:return}}if(!(t&&s))return t?!0:s?!1:e.selectable?e.__selected:null}selectRowNode(e,t,s,o="api"){const i=!e.selectable&&t,n=e.__selected===t;if(i||n)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...qy(e,this.gos,"rowSelected"),event:s||null,source:o}),!0}isCellCheckboxSelection(e,t){const s=this.gos.get("rowSelection");if(s&&typeof s!="string"){const o=bs(e)&&$o(s);return e.isColumnFunc(t,o)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,s,o){const{gos:i,selectionCtx:n}=this,r=e.isSelected(),a=rn(i),l=f0(i),c=m0(i),d=this.isMultiSelect(),u=o==="rowClicked";if(u&&!(l||c))return null;if(t&&s&&d){const h=n.getRoot();if(h)if(h.isSelected()){const p=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{deselect:p.discard,select:p.keep,reset:!1}}else{const p=n.extend(e,a);return{select:[],deselect:p.keep,reset:!1}}else return null}else if(t&&d){const h=n.selectAll?this.beans.rowModel.getRow(0):void 0,p=n.getRoot(h),f=n.isInRange(e)?n.truncate(e):n.extend(e,a);return{select:f.keep,deselect:f.discard,reset:n.selectAll||!!(p&&!p.isSelected())}}else if(s){if(u){const h=!r;return h&&!l||!h&&!c?null:(n.setRoot(e),{node:e,newValue:h,clearSelection:!1})}return n.setRoot(e),{node:e,newValue:!r,clearSelection:!d}}else{n.setRoot(e);const h=C0(i),p=Ar(i)==="filteredDescendants",f=u&&(!h||!l);if(p&&r===void 0&&We(i))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!d||f};if(u){const C=r?!h:l;return C===r&&!f||C&&!l||!C&&!c?null:{node:e,newValue:C,clearSelection:!d||f,keepDescendants:e.group&&a}}return{node:e,newValue:!r,clearSelection:!d||f}}}},Zo={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},Ef=class extends A{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:s,eBottomGuard:o,focusTrapActive:i,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:r,focusInnerElement:a,onFocusIn:l,onFocusOut:c,shouldStopEventPropagation:d,onTabKeyDown:u,handleKeyDown:h,isEmpty:p,eFocusableElement:f}=e;this.comp=t,this.eTopGuard=s,this.eBottomGuard=o,this.providedFocusInnerElement=a,this.eFocusableElement=f,this.focusTrapActive=!!i,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=l,this.providedFocusOut=c,this.providedShouldStopEventPropagation=d,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=h,this.providedIsEmpty=p}postConstruct(){this.createManagedBean(new gi(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards();for(const e of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)})}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():qo(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=Qe(this.beans),s=qo(t.body,null,!0),o=s.indexOf(e?this.eTopGuard:this.eBottomGuard);if(o===-1)return;let i,n;e?(i=0,n=o):(i=o+1,n=s.length);const r=s.slice(i,n),a=this.gos.get("tabIndex");r.sort((l,c)=>{const d=Number.parseInt(l.getAttribute("tabindex")||"0"),u=Number.parseInt(c.getAttribute("tabindex")||"0");return u===a?1:d===a?-1:d===0?1:u===0?-1:d-u}),r[e?r.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const s=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),s&&(s.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=qo(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return Ro(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}},OR=class extends A{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:s,eFocusableElement:o}=this,i=[t,s],n={setTabIndex:v=>{for(const w of i)v!=null?w.setAttribute("tabindex",v):w.removeAttribute("tabindex")}};this.addTabGuards(t,s);const{focusTrapActive:r=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:d,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:C}=e;this.tabGuardCtrl=this.createManagedBean(new Ef({comp:n,focusTrapActive:r,eTopGuard:t,eBottomGuard:s,eFocusableElement:o,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:d,onTabKeyDown:u,shouldStopEventPropagation:h,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:C}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Qe(this.beans).createElement("div"),s=e==="top"?Zo.TAB_GUARD_TOP:Zo.TAB_GUARD_BOTTOM;return t.classList.add(Zo.TAB_GUARD,s),ho(t,"presentation"),t}addTabGuards(e,t){const s=this.eFocusableElement;s.insertAdjacentElement("afterbegin",e),s.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];mt(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,s){Qc(t)||(t=t.getGui());const{eBottomGuard:o}=this;o?o.insertAdjacentElement("beforebegin",t):e(t,s)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;Is(e),Is(t),super.destroy()}},NR=class extends ze{initialiseTabGuard(t){this.tabGuardFeature=this.createManagedBean(new OR(this)),this.tabGuardFeature.initialiseTabGuard(t)}forceFocusOutOfContainer(t=!1){this.tabGuardFeature.forceFocusOutOfContainer(t)}appendChild(t,s){this.tabGuardFeature.appendChild(super.appendChild.bind(this),t,s)}},HR=500,GR=550,Jn,BR=e=>{if(!Jn)Jn=new WeakSet;else if(Jn.has(e))return!1;return Jn.add(e),!0},qs=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 uo;const o=this.onTouchStart.bind(this);this.startListener=o,this.eElement.addEventListener("touchstart",o,{passive:!0})}s.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!BR(e))return;const t=e.touches[0];this.touchStart=t;const s=this.handlers;if(!s.length){const o=this.eElement,i=o.ownerDocument,n=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),l={passive:!0},c={passive:!1};ar(s,[o,"touchmove",n,l],[i,"touchcancel",a,l],[i,"touchend",r,c],[i,"contextmenu",Es,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}))},GR)}onTouchMove(e){const{moved:t,touchStart:s}=this;if(!t&&s){const o=Wi(s,e.touches);o&&!Qg(o,s,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;!t||!Wi(t,e.changedTouches)||(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&Es(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!Wi(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const s=this.lastTapTime;s&&t-s>HR&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),Jc(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}},VR=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}get scrolling(){return this.tickingInterval!==null}check(e,t=!1){const s=t||this.shouldSkipVerticalScroll();if(s&&this.shouldSkipHorizontalScroll())return;const o=this.scrollContainer.getBoundingClientRect(),i=this.scrollByTick;this.tickLeft=e.clientX<o.left+i,this.tickRight=e.clientX>o.right-i,this.tickUp=e.clientY<o.top+i&&!s,this.tickDown=e.clientY>o.bottom-i&&!s,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},Df=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${op}/${this.frameworkName}-data-grid`,i0(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}};function zR(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var WR=["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"],sh=Object.fromEntries(WR.map((e,t)=>[e,t]));function _R(e,t){const s=(e.beanName?sh[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,o=(t.beanName?sh[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return s-o}function jR(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}var UR=class extends A{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,s){this.view=e,this.eGridHostDiv=t,this.eGui=s,this.eGui.setAttribute("grid-id",this.beans.context.getId());const{dragAndDrop:o,ctrlsSvc:i}=this.beans;o?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new vd(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=vs(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),i.register("gridCtrl",this)}isDetailGrid(){return Wp(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry?.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){const{view:t}=this;if(e===!1)t.setCursor(null);else{const s=e===1?"ew-resize":"ns-resize";t.setCursor(s)}}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:s,nextIndex:o}=this.getNextFocusableIndex(t,e);if(o<0||o>=t.length)return!1;if(o===0){if(s>0){const{visibleCols:i,focusSvc:n}=this.beans,r=i.allCols,a=Me(r);if(n.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[o],e)}focusInnerElement(e){if(this.gos.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const s=this.getFocusableContainers(),{focusSvc:o,visibleCols:i}=this.beans,n=i.allCols;if(e){if(s.length>1)return this.focusContainer(Me(s),e);const r=Me(n);if(o.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||ro(this.beans)){if(o.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<s.length;r++)if(fo(s[r].getGui(),e))return!0;return!1}return o.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{nextIndex:s,indexWithFocus:o}=this.getNextFocusableIndex(t,e);if(o===-1||s<0||s>=t.length)return;const i=t[s];i.setAllowFocus?.(!0),setTimeout(()=>{i.setAllowFocus?.(!1)})}isFocusable(){const e=this.beans;return!ma(e)||!ro(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const s=Ve(this.beans),o=e.findIndex(n=>n.getGui().contains(s)),i=o+(t?-1:1);return{indexWithFocus:o,nextIndex:i}}focusContainer(e,t){e.setAllowFocus?.(!0);const s=fo(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),s}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},he=(e,t)=>{for(const s of Object.keys(t))t[s]=e;return t},oh={dispatchEvent:"CommunityCore",...he("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...he("GridState",{getState:0,setState:0}),...he("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...he("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...he("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...he("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...he("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...he("ValueCache",{expireValueCache:0}),...he("CellApi",{getCellValue:0}),...he("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...he("Sort",{onSortChanged:0}),...he("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...he("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...he("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...he("HighlightChanges",{flashCells:0}),...he("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...he("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}),...he("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...he("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...he("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...he("ColumnResize",{setColumnWidths:0}),...he("ColumnHover",{isColumnHovered:0}),...he("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...he("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...he("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...he("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...he("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...he("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...he("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...he("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...he("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0}),...he("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...he("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}),...he("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...he("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...he("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...he("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...he("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...he("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...he("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...he("ContextMenu",{showContextMenu:0}),...he("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...he("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...he("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...he("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...he("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}),...he("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...he("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...he("StatusBar",{getStatusPanel:0}),...he("AiToolkit",{getStructuredSchema:0})},Pl={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},$R=(e,t)=>e.eventSvc.dispatchEvent(t),Pf=class{};Reflect.defineProperty(Pf,"name",{value:"GridApi"});var KR=class extends A{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Pf,this.fns={...Pl,dispatchEvent:$R},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(oh))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:s,beans:o}=this;s!==Pl&&(s[e]=o?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:s,fns:{[e]:o}}=this;return o?o(s,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:s,preDestroyLink:o}=this;if(!t)G(26,{fnName:e,preDestroyLink:o});else{const i=oh[e];s.assertModuleRegistered(i,`api.${e}`)&&G(27,{fnName:e,module:i})}}destroy(){super.destroy(),this.fns=Pl,this.beans=null}};function qR(e){return e.context.getId()}function YR(e){e.gridDestroySvc.destroy()}function ZR(e){return e.gridDestroySvc.destroyCalled}function XR(e,t){return e.gos.get(t)}function QR(e,t,s){Mf(e,{[t]:s})}function Mf(e,t){e.gos.updateGridOptions({options:t})}function JR(e,t){const s=t.replace(/Module$/,"");return e.gos.isModuleRegistered(s)}var e2={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},t2=class extends ze{constructor(e,t,s){super(e2),this.rowNode=e,this.column=t,this.eCell=s}postConstruct(){this.getGui().appendChild(Ot("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:s,eCell:o,gos:i}=this,n=s.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(o,0,0),n){const a=de(i,{rowNode:t,dragEvent:e});n(a)}else try{const a=JSON.stringify(t.data);r.setData("application/json",a),r.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};function s2(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function o2(e,t){const s=e.dragAndDrop?.findExternalZone(t.getContainer());s&&e.dragAndDrop?.removeDropTarget(s)}function i2(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function n2(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function r2(e,t){const s=e.rowDropHighlightSvc;if(!s)return;const o=t?.row;let i=t?.dropIndicatorPosition;i!=="above"&&i!=="below"&&i!=="inside"&&(i="none");const n=o?.rowIndex;n==null||i==="none"?s.clear():s.set(o,i)}var a2=class extends jy{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},l2=class extends A{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)}},c2={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},d2=class extends ze{constructor(e,t,s,o,i,n=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=s,this.customGui=o,this.dragStartPixels=i,this.alwaysVisible=n,this.dragSource=null}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(c2),this.getGui().appendChild(Ot("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,gos:t,rowNode:s}=this,o=this.refreshVisibility.bind(this);this.addManagedPropertyListener("suppressRowDrag",o),this.addManagedListeners(s,{dataChanged:o,cellChanged:o}),this.addManagedListeners(e.eventSvc,t.get("rowDragManaged")?{sortChanged:o,filterChanged:o,columnRowGroupChanged:o,newColumnsLoaded:o}:{newColumnsLoaded:o})}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const e={skipAriaHidden:!0};if(this.isNeverDisplayed()){this.setDisplayed(!1,e);return}const t=this.column;let s=typeof t?.getColDef().rowDrag=="function",o=!t||this.isCustomGui()||t.isRowDrag(this.rowNode);o&&this.rowNode.footer&&this.gos.get("rowDragManaged")&&(o=!1,s=!0),this.setDisplayed(s||o,e),this.setVisible(o,e)}isNeverDisplayed(){const{gos:e,beans:t}=this;return!!(e.get("suppressRowDrag")||e.get("rowDragManaged")&&t.rowDragSvc.rowDragFeature?.shouldPreventRowMove()&&!t.dragAndDrop?.hasExternalDropZones())}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const s=this.beans.selectionSvc?.getSelectedNodes()??[];return s.indexOf(e)!==-1?s:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){const t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(t,{mousedown:o=>{o?.preventDefault()}})[0]);const s=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:o=>{const i=o?.dragItem||this.getDragItem(),n=(o?.dropTarget?.rows.length??i.rowNodes?.length)||1,r=this.getRowDragText(this.column);return r?r(i,n):n===1?this.cellValueFn():`${n} ${s("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},mr=class{constructor(){this.reordered=!1,this.removals=new Set,this.updates=new Set,this.adds=new Set}};function u2(e){const{rowIndex:t,rowPinned:s,column:o}=e;return`${t}.${s??"null"}.${o.getId()}`}function Tf(e,t){const s=e.column===t.column,o=e.rowPinned===t.rowPinned,i=e.rowIndex===t.rowIndex;return s&&o&&i}function h2(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(q(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function g2(e,t){return!e&&!t?!0:e&&!t||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function p2(e){let t=0,s;const{pinnedRowModel:o,rowModel:i,pageBounds:n}=e;return o?.getPinnedTopRowCount()?s="top":i.getRowCount()?(s=null,t=n.getFirstRow()):o?.getPinnedBottomRowCount()&&(s="bottom"),s===void 0?null:{rowIndex:t,rowPinned:s}}function f2(e){let t,s=null;const{pinnedRowModel:o,pageBounds:i}=e,n=o?.getPinnedBottomRowCount(),r=o?.getPinnedTopRowCount();return n?(s="bottom",t=n-1):e.rowModel.getRowCount()?t=i.getLastRow():r&&(s="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:s}}function fs(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 Wo(e,t){const s=e.spannedRowRenderer?.getCellByPosition(t);if(s)return s;const o=e.rowRenderer.getRowByPosition(t);return o?o.getCellCtrl(t.column):null}function m2(e,t,s){const{rowModel:o,pinnedRowModel:i}=e;let n;return n??(n=o?.getRowNode(t)),s?n??(n=i?.getPinnedRowById(t,s)):(n??(n=i?.getPinnedRowById(t,"top")),n??(n=i?.getPinnedRowById(t,"bottom"))),n}function Wr(e,t,s=!1){const{rowIndex:o,rowPinned:i}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(o===0)return i==="top"?null:i==="bottom"&&a.isRowsToRender()?{rowIndex:n.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(s){const l=i?void 0:a.getRow(o);return If(e,l,!0)??{rowIndex:o-1,rowPinned:i}}return{rowIndex:o-1,rowPinned:i}}function ih(e,t,s=!1){const{rowIndex:o,rowPinned:i}=t,{pageBounds:n,pinnedRowModel:r,rowModel:a}=e;if(C2(e,t))return i==="bottom"?null:i==="top"&&a.isRowsToRender()?{rowIndex:n.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(s){const l=i?void 0:a.getRow(o);return If(e,l)??{rowIndex:o+1,rowPinned:i}}return{rowIndex:o+1,rowPinned:i}}function If(e,t,s=!1){const{gos:o,rowRenderer:i}=e;if(!t?.sticky||!pp(o))return;const n=i.getStickyTopRowCtrls(),r=i.getStickyBottomRowCtrls(),a=!r.some(u=>u.rowNode.rowIndex===t.rowIndex),l=a?n:r,c=(s?-1:1)*(a?-1:1);let d;for(let u=0;u<l.length;u++)if(l[u].rowNode.rowIndex===t.rowIndex){d=l[u+c];break}return d?{rowIndex:d.rowNode.rowIndex,rowPinned:null}:void 0}function C2(e,t){const{rowPinned:s,rowIndex:o}=t,{pinnedRowModel:i,pageBounds:n}=e;return s==="top"?(i?.getPinnedTopRowCount()??0)-1<=o:s==="bottom"?(i?.getPinnedBottomRowCount()??0)-1<=o:n.getLastRow()<=o}var cn=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}depthFirstSearchChangedPath(e,t){const{rowNode:s,children:o}=e;if(o)for(let i=0;i<o.length;++i)this.depthFirstSearchChangedPath(o[i],t);t(s)}depthFirstSearchEverything(e,t,s){const o=e.childrenAfterGroup;if(o)for(let i=0,n=o.length;i<n;++i){const r=o[i];r.childrenAfterGroup?this.depthFirstSearchEverything(r,t,s):s&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,s=!1){this.active&&!s?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,s=0;for(;!this.mapToItems[t.id];){const o={rowNode:t,children:null};this.mapToItems[t.id]=o,s++,t=t.parent}return s}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let s=e;for(;s;){this.nodeIdsToColumns[s.id]||(this.nodeIdsToColumns[s.id]={});for(const o of t)this.nodeIdsToColumns[s.id][o.getId()]=!0;s=s.parent}}linkPathItems(e,t){let s=e;for(let o=0;o<t;o++){const i=this.mapToItems[s.id],n=this.mapToItems[s.parent.id];n.children||(n.children=[]),n.children.push(i),s=s.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const s=this.createPathItems(e);this.linkPathItems(e,s),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const s=this.nodeIdsToColumns[e.id];return t.filter(i=>s[i.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const s=this.nodeIdsToColumns[e.id];return t.filter(i=>!s[i.getId()])}},v2=class{constructor(e,t){this.beans=e,this.groupThrottled=!1,this.scrollChanged=!1,this.scrollChanging=!1,this.oldVScroll=null,this.groupTimer=null,this.groupTarget=null,this.onGroupThrottle=()=>{this.groupTimer=null,this.groupThrottled=!0,this.beans.dragAndDrop?.nudge()};const s=()=>t.scrollFeature.getVScrollPosition().top;this.autoScroll=new VR({scrollContainer:t.eBodyViewport,scrollAxis:"y",getVerticalPosition:s,setVerticalPosition:o=>t.scrollFeature.setVerticalScrollPosition(o),onScrollCallback:()=>{const o=s();if(this.oldVScroll!==o){this.oldVScroll=o,this.scrollChanging=!0;return}const i=this.scrollChanging;this.scrollChanged=i,this.scrollChanging=!1,i&&(this.beans.dragAndDrop?.nudge(),this.scrollChanged=!1)}})}updateGroup(e,t){this.groupTarget&&this.groupTarget!==e&&this.clearGroup(),e&&(t&&this.groupThrottled&&!e.expanded&&e.childrenAfterSort?.length&&e.isExpandable()&&e.setExpanded(!0,void 0,!0),e.expanded&&e.childrenAfterSort?.length&&(this.groupThrottled=!0,this.groupTarget=e))}startGroup(e){this.groupTarget=e,this.groupTimer===null&&(this.groupTimer=window.setTimeout(this.onGroupThrottle,this.beans.gos.get("rowDragInsertDelay")))}clearGroup(){this.groupThrottled=!1,this.groupTarget=null;const e=this.groupTimer;e!==null&&(this.groupTimer=null,window.clearTimeout(e))}clear(){this.clearGroup(),this.autoScroll.ensureCleared(),this.oldVScroll=null,this.scrollChanged=!1,this.scrollChanging=!1}},w2=class extends A{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.nudger=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{this.nudger=new v2(e,t.gridBodyCtrl)})}destroy(){super.destroy(),this.nudger?.clear(),this.nudger=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){return e?.dropTarget?.allowed===!1||this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){const{rowGroupColsSvc:e,filterManager:t,sortSvc:s}=this.beans;return!!((e?.columns??[]).length||t?.isAnyFilterPresent()||s?.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const s=this.beans.selectionSvc?.getSelectedNodes();if(s&&s.indexOf(t)>=0)return s.slice().sort(y2)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:s,beans:o}=this;if(t){const r=this.getRowNodes(e);e.dragItem.rowNodes=r,ah(r,!0)}this.lastDraggingEvent=e;const i=e.fromNudge,n=this.makeRowsDrop(s,e,i,!1);o.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e),n?.rowDragManaged&&n.moved&&n.allowed&&n.sameGrid&&!n.suppressMoveWhenRowDragging&&(!i&&!this.nudger?.autoScroll.scrolling||this.nudger?.scrollChanged)&&this.dropRows(n),this.nudger?.autoScroll.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,s,o){const{beans:i,gos:n}=this,r=this.newRowsDrop(t,o),a=i.rowModel;if(t.dropTarget=r,t.changed=!1,!r)return null;let{sameGrid:l,rootNode:c,source:d,target:u,rows:h}=r;u??(u=a.getRow(a.getRowCount()-1)??null);const p=!!this.beans.groupStage?.treeData&&l;let f=null;if(u?.footer){const S=Cr(a,-1,u)??Cr(a,1,u);f=u.sibling??c,u=S??null}u?.detail&&(u=u.parent),r.moved&&(r.moved=d!==u);let C=.5;if(u&&(l&&r.moved&&(f||!p)?C=d.rowIndex>u.rowIndex?-.5:.5:C=(r.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!p&&l&&u&&r.moved&&We(n)){const S=x2(a,r);S&&(C=d.rowIndex>S.rowIndex?-.5:.5,u=S,r.moved&&(r.moved=d!==u))}const v=this.nudger;v?.updateGroup(u,s),p&&!f&&v&&(!u||C>=.5&&u.rowIndex===i.pageBounds.getLastRow()?f=c:r.moved&&this.targetShouldBeParent(u,C,h)&&(v.groupThrottled&&(f=u),!s&&(!f||u&&!u.expanded&&u.childrenAfterSort?.length)&&v.startGroup(u)),f??(f=u?.parent??c));let w=!1;if(f){if(f===u&&f!==c){const S=f.expanded?Cr(a,1,u):null;S?.parent===f?(u=S,C=-.5):w=!0}if(u&&!w){let S=u;for(;S&&S!==c&&S!==f;)u=S,S=S.parent}}r.target=u,r.newParent=f,r.moved&&(r.moved=d!==u);const b=C<0?"above":"below";return r.position=r.moved?w?"inside":b:"none",this.validateRowsDrop(r,p,b,o),t.changed||(t.changed=S2(e?.dropTarget,r)),r}newRowsDrop(e,t){const{beans:s,gos:o}=this,i=s.rowModel.rootNode,n=We(o)?o.get("rowDragManaged"):!1,r=o.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:c}=e.dragItem;if(c||(c=l?[l]:[]),l||(l=c[0]),!l||!i)return null;const d=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;n&&(!c.length||this.shouldPreventRowMove()||(r||!a)&&!d)&&(u=!1);const h=$u(s,e).y,p=this.getOverNode(h);return{api:s.gridApi,context:s.gridOptions.context,draggingEvent:e,rowDragManaged:n,suppressMoveWhenRowDragging:r,sameGrid:a,withinGrid:d,rootNode:i,moved:l!==p,y:h,overNode:p,overIndex:p?.rowIndex??-1,position:"none",source:l,target:p??null,newParent:null,rows:c,allowed:u,highlight:!t&&n&&r&&(d||!a)}}validateRowsDrop(e,t,s,o){const{rowDragManaged:i,suppressMoveWhenRowDragging:n}=e;t||(e.newParent=null),n&&!e.moved&&(e.allowed=!1);const r=(!i||e.allowed)&&this.gos.get("isRowValidDropPosition");if(r){t&&e.newParent&&nh(e.rows,e.newParent)&&(e.newParent=null);const a=r(e);if(!a)e.allowed=!1;else if(typeof a=="object"){a.rows!==void 0&&(e.rows=a.rows??[]),t&&a.newParent!==void 0&&(e.newParent=a.newParent),a.target!==void 0&&(e.target=a.target),a.position&&(e.position=a.position),a.allowed!==void 0?e.allowed=a.allowed:i||(e.allowed=!0);const l=e.draggingEvent;a.changed&&l&&(l.changed=!0),!o&&a.highlight!==void 0&&(e.highlight=a.highlight)}}i&&(e.rows=this.filterRows(e)),t&&e.newParent&&nh(e.rows,e.newParent)&&(e.newParent=null),n&&(!e.rows.length||e.position==="none")&&(e.allowed=!1),(!e.allowed||!e.newParent)&&e.position==="inside"&&(e.position=s)}targetShouldBeParent(e,t,s){const o=e.rowIndex,i=.25;if(t<-.5+i)return!1;if(t<.5-i)return!0;let n,r=o+1;const a=this.beans.rowModel;do n=a.getRow(r++);while(n?.footer);const l=e.childrenAfterGroup;if(n&&n.parent===e&&l?.length){const c=new Set(s);for(const d of l)if(d.rowIndex!==null&&!c.has(d))return!0}return!1}addRowDropZone(e){if(!e.getContainer()){G(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){G(56);return}const s=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(i=>e.onDragEnter(this.rowDragEvent("rowDragEnter",i))),onDragLeave:e.onDragLeave&&(i=>e.onDragLeave(this.rowDragEvent("rowDragLeave",i))),onDragging:e.onDragging&&(i=>e.onDragging(this.rowDragEvent("rowDragMove",i))),onDragStop:e.onDragStop&&(i=>e.onDragStop(this.rowDragEvent("rowDragEnd",i))),onDragCancel:e.onDragCancel&&(i=>e.onDragCancel(this.rowDragEvent("rowDragCancel",i)))},o={isInterestedIn:i=>i===2,getIconName:()=>"move",external:!0,...s};t.addDropTarget(o),this.addDestroyFunc(()=>t.removeDropTarget(o))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:s=>{this.onDragEnter(s),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",s))},onDragLeave:s=>{this.onDragLeave(s),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",s))},onDragging:s=>{this.onDragging(s),e?.onDragging?.(this.rowDragEvent("rowDragMove",s))},onDragStop:s=>{this.onDragStop(s),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",s))},onDragCancel:s=>{this.onDragCancel(s),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",s))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:s}=this.beans,i=e>t.getCurrentPagePixelRange().pageLastPixel?-1:s.getRowIndexAtPixel(e);return i>=0?s.getRow(i):void 0}rowDragEvent(e,t){const s=this.beans,{dragItem:o,dropTarget:i,event:n,vDirection:r}=t,a=i?.rootNode===s.rowModel.rootNode,l=a?i.y:$u(s,t).y,c=a?i.overNode:this.getOverNode(l),d=a?i.overIndex:c?.rowIndex??-1;return{api:s.gridApi,context:s.gridOptions.context,type:e,event:n,node:o.rowNode,nodes:o.rowNodes,overIndex:d,overNode:c,y:l,vDirection:r,rowsDrop:i}}dispatchGridEvent(e,t){const s=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(s)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e)}onDragStop(e){const t=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),t?.allowed&&t.rowDragManaged&&(t.suppressMoveWhenRowDragging||!t.sameGrid||this.nudger?.autoScroll.scrolling)&&this.dropRows(t),this.stopDragging(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e)}stopDragging(e){this.nudger?.clear(),this.beans.rowDropHighlightSvc?.fromDrag(null),ah(e.dragItem.rowNodes,!1)}dropRows(e){return e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:s}){const o=si(this.gos),i=this.beans.rowModel,n=s.filter(({data:a,rowPinned:l})=>!i.getRowNode(o?.({data:a,level:0,rowPinned:l})??a.id)).map(({data:a})=>a);if(n.length===0)return!1;const r=t?rh(t)+(e==="above"?0:1):void 0;return i.updateRowData({add:n,addIndex:r}),!0}filterRows({newParent:e,rows:t}){let s;for(let o=0,i=t.length;o<i;++o){let n=!0;const r=t[o];(!r||r.footer||r.rowTop===null&&r!==this.beans.rowModel.getRowNode(r.id)||e&&r.parent!==e&&b2(r,e)||!Rc(r))&&(n=!1),n?s?.push(r):s??(s=t.slice(0,o))}return s??t}csrmMoveRows({position:e,target:t,rows:s,newParent:o,rootNode:i}){let n=!1;const r=new Set;for(const h of s){o&&h.parent!==o&&(h.treeParent=o,n=!0);const p=Rc(h);p&&r.add(p)}if(!n&&r.size===0)return!1;const a=this.beans.focusSvc,l=a.getFocusedCell(),c=l&&Wo(this.beans,l);if(r.size&&this.reorderLeafChildren(r,...this.getMoveRowsBounds(r,t,e==="above"))&&(n=!0),!n)return!1;const d=this.beans.rowModel,u=new mr;return u.reordered=!0,d.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedPath:new cn(!1,i),changedRowNodes:u}),c?c.focusCell():a.clearFocusedCell(),!0}getMoveRowsBounds(e,t,s){const o=this.beans.rowModel.rootNode?._leafs?.length??0;let i=t?rh(t):-1;i<0||i>=o?i=o:s||++i;let n=i,r=Math.min(i,o-1);for(const a of e){const l=a.sourceRowIndex;l<n&&(n=l),l>r&&(r=l)}return[n,i,r]}reorderLeafChildren(e,t,s,o){let i=!1;const n=this.beans.rowModel.rootNode?._leafs;if(!e.size||!n)return!1;let r=t;for(let l=t;l<s;++l){const c=n[l];e.has(c)||(c.sourceRowIndex!==r&&(c.sourceRowIndex=r,n[r]=c,i=!0),++r)}let a=o;for(let l=o;l>=s;--l){const c=n[l];e.has(c)||(c.sourceRowIndex!==a&&(c.sourceRowIndex=a,n[a]=c,i=!0),--a)}for(const l of e)l.sourceRowIndex!==r&&(l.sourceRowIndex=r,n[r]=l,i=!0),++r;return i}},Cr=(e,t,s)=>{if(s){const o=e.getRowCount();let i=s.rowIndex+t;for(;i>=0&&i<o;){const n=e.getRow(i);if(!n||!n.footer&&!n.detail)return n;i+=t}}},b2=(e,t)=>{let s=t;for(;s;){if(s===e)return!0;s=s.parent}return!1},nh=(e,t)=>{for(let s=0,o=e.length;s<o;++s)if(e[s].parent!==t)return!1;return!0},rh=e=>{const t=Rc(e);return t!==void 0?t.sourceRowIndex:-1},Rc=e=>e.data?e:of(e.childrenAfterGroup),S2=(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||!Ns(e.rows,t.rows)),y2=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,ah=(e,t)=>{for(let s=0,o=e?.length||0;s<o;++s){const i=e[s];i.dragging!==t&&(i.dragging=t,i.dispatchRowEvent("draggingChanged"))}},x2=(e,t)=>{let s=null,o=t.target;if(o&&t.rows.indexOf(o)<0)return null;const i=t.source;if(!o||!i)return null;let n=o.rowIndex-i.rowIndex;const r=n<0?-1:1;n=t.suppressMoveWhenRowDragging?Math.abs(n):1;const a=new Set(t.rows);do{const l=Cr(e,r,o);if(!l)break;a.has(l)||(s=l,--n),o=l}while(n>0);return s},R2=class extends A{constructor(){super(...arguments),this.beanName="rowDragSvc"}setupRowDrag(e,t){const s=t.createManagedBean(new w2(e)),o=this.beans.dragAndDrop;o.addDropTarget(s),t.addDestroyFunc(()=>o.removeDropTarget(s)),this.rowDragFeature=s}createRowDragComp(e,t,s,o,i,n){return new d2(e,t,s,o,i,n)}createRowDragCompForRow(e,t){if(As(this.gos))return;const s=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${s("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,s,o,i,n){const r=this.gos;return r.get("rowDragManaged")&&(!We(r)||r.get("pagination"))?void 0:this.createRowDragComp(s,e,t,o,i,n)}},F2=class extends A{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;!e||e?.rowIndex===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const s=e!==this.row,o=e.uiLevel,i=t!==this.position,n=o!==this.uiLevel;this.dragging=!1,(s||i||n)&&(s&&this.clear(),this.uiLevel=o,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:s,target:o,position:i}=t;if(s&&o&&i!=="none"){this.set(o,i),this.dragging=!0;return}}this.dragging&&this.clear()}},kf={moduleName:"Drag",version:K,beans:[a2]},E2={moduleName:"DragAndDrop",version:K,dynamicBeans:{dndSourceComp:t2},icons:{rowDrag:"grip"}},Af={moduleName:"SharedDragAndDrop",version:K,beans:[$y],dependsOn:[kf],userComponents:{agDragAndDropImage:vR},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},D2={moduleName:"RowDrag",version:K,beans:[F2,R2],apiFunctions:{addRowDropZone:s2,removeRowDropZone:o2,getRowDropZoneParams:i2,getRowDropPositionIndicator:n2,setRowDropPositionIndicator:r2},dependsOn:[Af]},P2={moduleName:"HorizontalResize",version:K,beans:[l2],dependsOn:[kf]},M2=":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}}",T2=class extends A{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:s,executeLaterFuncs:o}=this;if(s.length===0&&o.length===0){e(),t();return}const i=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),i(s)},0),window.setTimeout(()=>{t(),i(o)},200)})}};function I2(e,t,s){e.colMoves?.moveColumnByIndex(t,s,"api")}function k2(e,t,s){e.colMoves?.moveColumns(t,s,"api")}var A2=class extends A{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;if(t)for(const s of t)s.isPrimary()&&(s.isAnyFunctionActive()||(s.isAllowValue()?this.columnsToAggregate.push(s):s.isAllowRowGroup()?this.columnsToGroup.push(s):s.isAllowPivot()&&this.columnsToPivot.push(s)))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:s,pivotColsSvc:o}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&s?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&o?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function L2(e,t){!t||t.length<=1||t.filter(o=>e.indexOf(o)<0).length>0||t.sort((o,i)=>{const n=e.indexOf(o),r=e.indexOf(i);return n-r})}function O2(e){const t=[...e];for(const s of e){let o=null,i=s.getParent();for(;i!=null&&i.getDisplayedLeafColumns().length===1;)o=i,i=i.getParent();if(o!=null){const r=!!o.getColGroupDef()?.marryChildren?o.getProvidedColumnGroup().getLeafColumns():o.getLeafColumns();for(const a of r)t.includes(a)||t.push(a)}}return t}function N2(e,t,s,o){const i=o.allCols;let n=null,r=null;for(let a=0;a<e.length;a++){const l=e[a],c=s.getProposedColumnOrder(t,l);if(!s.doesOrderPassRules(c))continue;const d=c.filter(h=>i.includes(h));if(r===null)r=d;else if(!Ns(d,r))break;const u=G2(c);(n===null||u<n.fragCount)&&(n={move:l,fragCount:u})}return n}function Lf(e){const{isFromHeader:t,fromLeft:s,xPosition:o,fromEnter:i,fakeEvent:n,pinned:r,gos:a,colModel:l,colMoves:c,visibleCols:d}=e;let{allMovingColumns:u}=e;t&&(u=O2(u));const h=u.slice();L2(l.getCols(),h);const p=V2({movingCols:h,draggingRight:s,xPosition:o,pinned:r,gos:a,colModel:l,visibleCols:d}),f=H2(h,l);if(p.length===0)return;const C=p[0];if(f!==null&&(t||!i)&&!n&&(!s&&C>=f||s&&C<=f))return;const w=N2(p,h,c,d);if(!w)return;const b=w.move;if(!(b>l.getCols().length-h.length))return{columns:h,toIndex:b}}function Of(e){const{columns:t,toIndex:s}=Lf(e)||{},{finished:o,colMoves:i}=e;return!t||s==null?null:(i.moveColumns(t,s,"uiColumnMoved",o),o?null:{columns:t,toIndex:s})}function H2(e,t){const s=t.getCols(),o=e.map(l=>s.indexOf(l)).sort((l,c)=>l-c),i=o[0];return Me(o)-i!==o.length-1?null:i}function G2(e){function t(o){const i=[];let n=o.getOriginalParent();for(;n!=null;)i.push(n),n=n.getOriginalParent();return i}let s=0;for(let o=0;o<e.length-1;o++){let i=t(e[o]),n=t(e[o+1]);[i,n]=i.length>n.length?[i,n]:[n,i];for(const r of i)n.indexOf(r)===-1&&s++}return s}function B2(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function V2(e){const{movingCols:t,draggingRight:s,xPosition:o,pinned:i,gos:n,colModel:r,visibleCols:a}=e;if(n.get("suppressMovableColumns")||t.some(S=>S.getColDef().suppressMovable))return[];const c=B2(a,i),d=r.getCols(),u=c.filter(S=>t.includes(S)),h=c.filter(S=>!t.includes(S)),p=d.filter(S=>!t.includes(S));let f=0,C=o;if(s){let S=0;for(const y of u)S+=y.getActualWidth();C-=S}if(C>0){for(let S=0;S<h.length;S++){const y=h[S];if(C-=y.getActualWidth(),C<0)break;f++}s&&f++}let v;if(f>0){const S=h[f-1];v=p.indexOf(S)+1}else v=p.indexOf(h[0]),v===-1&&(v=0);const w=[v],b=(S,y)=>S-y;if(s){let S=v+1;const y=d.length-1;for(;S<=y;)w.push(S),S++;w.sort(b)}else{let S=v;const y=d.length-1;let x=d[S];for(;S<=y&&c.indexOf(x)<0;)S++,w.push(S),x=d[S];S=v-1;const R=0;for(;S>=R;)w.push(S),S--;w.sort(b).reverse()}return w}function Fc(e){const{pinned:t,fromKeyboard:s,gos:o,ctrlsSvc:i,useHeaderRow:n,skipScrollPadding:r}=e;let a=i.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(s&&(l-=a.getBoundingClientRect().left),o.get("enableRtl")&&(n&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=i.get("center").getCenterViewportScrollLeft()),l):0}function Ml(e,t){for(const s of e)s.moving=t,s.dispatchColEvent("movingChanged","uiColumnMoved")}var lh=7,Ec=100,er=Ec/2,z2=5,W2=100,_2=class extends A{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!q(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:s}=t||{},o=s?.columns??[];for(const i of o){const n=i.getPinned();if(i.getColDef().lockPinned){if(n==e)return"move";continue}const r=s?.containerType;if(r===e||!e)return"move";if(e&&(!n||r!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,s=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(s,!0,"uiColumnDragged");else{const i=t.visibleState,n=(s||[]).filter(r=>i[r.getId()]&&!r.isVisible());this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(s,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,s=!1,o=!1){const{gos:i,ctrlsSvc:n}=this.beans,r=i.get("suppressMoveWhenColumnDragging");if(o&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!o&&Ge(e.hDirection))return;const a=Fc({x:e.x,pinned:this.pinned,gos:i,ctrlsSvc:n});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,s,a,o):this.handleColumnDragWhileAllowingMovement(e,t,s,a,o)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,s){if(!e?.length)return;const o=e.filter(i=>!i.getColDef().lockVisible);o.length&&this.beans.colModel.setColsVisible(o,t,s)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:s}=e;this.beans.colMoves.moveColumns(t,s,"uiColumnMoved",!0)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,s,o,i){const n=this.getAllMovingColumns(e,!0);if(i){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(n,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:l,fromEnter:t,fakeEvent:s,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,o)}}handleColumnDragWhileAllowingMovement(e,t,s,o,i){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:a,xPosition:o,fromLeft:r,fromEnter:t,fakeEvent:s}),c=Of({...l,finished:i});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){const s=e.dragSource.getDragItem();let o=null;t?(o=s.columnsInSplit,o||(o=s.columns)):o=s.columns;const i=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return o?o.filter(i):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:s,xPosition:o,fromLeft:i,fromEnter:n,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:c,visibleCols:d}=this.beans;return{allMovingColumns:t,isFromHeader:s,fromLeft:i,xPosition:o,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:a,colModel:l,colMoves:c,visibleCols:d}}highlightHoveredColumn(e,t){const{gos:s,colModel:o}=this.beans,i=s.get("enableRtl"),n=o.getCols().filter(d=>d.isVisible()&&d.getPinned()===this.pinned);let r=null,a=null,l=null;for(const d of n){if(a=d.getActualWidth(),r=this.getNormalisedColumnLeft(d,0,i),r!=null){const u=r+a;if(r<=t&&u>=t){l=d;break}}r=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let d=n.length-1;d>=0;d--){const u=n[d],h=n[d].getParent();if(!h){l=u;break}const p=h?.getDisplayedLeafColumns();if(p.length){l=Me(p);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,i),a=l.getActualWidth()}if(this.lastHighlightedColumn?.column!==l&&this.clearHighlighted(),l==null||r==null||a==null)return;let c;t-r<a/2!==i?c=0:c=1,ch(l,c),this.lastHighlightedColumn={column:l,position:c}}getNormalisedXPositionInfo(e,t){const{gos:s,visibleCols:o}=this.beans,i=s.get("enableRtl"),{firstMovingCol:n,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,i);if(!n||!r||a==null)return;const l=o.allCols,c=l.indexOf(n),d=l.indexOf(r),u=a===0!==i,h=c<d||c===d&&!u;let p=0;if(u?h&&(p-=1):h||(p+=1),d+p===c)return;const f=l[d+p];if(!f)return;const C=this.getNormalisedColumnLeft(f,20,i);return{fromLeft:h,xPosition:C}}getColumnMoveAndTargetInfo(e,t,s){const o=this.lastHighlightedColumn||{},{firstMovingCol:i,lastMovingCol:n}=j2(e);if(!i||!n||o.column||!t)return{firstMovingCol:i,...o};const a=this.getPinDirection()==="left";return{firstMovingCol:i,position:a?1:0,column:a!==s?i:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,s){const{gos:o,ctrlsSvc:i}=this.beans,n=e.getLeft();if(n==null)return null;const r=e.getActualWidth();return Fc({x:s?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:s,skipScrollPadding:!0,gos:o,ctrlsSvc:i})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,s=this.failedMoveAttempts>lh;return t&&s||e.some(o=>o.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:s,fromEnter:o,fakeEvent:i,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:s,fromLeft:n,fromEnter:o,fakeEvent:i}),{columns:a,toIndex:l}=Lf(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(ch(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),s=t.getCenterViewportScrollLeft(),o=s+t.getCenterWidth();let i,n;this.gos.get("enableRtl")?(i=e<s+er,n=e>o-er):(n=e<s+er,i=e>o-er),this.needToMoveRight=i,this.needToMoveLeft=n,n||i?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),W2),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*z2,e>Ec&&(e=Ec);let t=null;const s=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=s.scrollHorizontally(-e):this.needToMoveRight&&(t=s.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:o,dragAndDrop:i,gos:n}=this.beans;if(this.failedMoveAttempts<=lh+1||!o)return;if(i.setDragImageCompIcon("pinned"),!n.get("suppressMoveWhenColumnDragging")){const r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,s=!1){const o=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!o.length)return 0;s&&(t=this.getPinDirection());const{pinnedCols:i,dragAndDrop:n}=this.beans;return i?.setColsPinned(o,t,"uiColumnDragged"),s&&n.nudge(),o.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function ch(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function j2(e){const t=e.length;let s,o;for(let i=0;i<t;i++){if(!s){const n=e[i];n.getLeft()!=null&&(s=n)}if(!o){const n=e[t-1-i];n.getLeft()!=null&&(o=n)}if(s&&o)break}return{firstMovingCol:s,lastMovingCol:o}}var U2=class extends A{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,s=this.pinned;e.whenReady(this,o=>{let i;const n=o.gridBodyCtrl.eBodyViewport;switch(s){case"left":i=[[n,o.left.eContainer],[o.bottomLeft.eContainer],[o.topLeft.eContainer]];break;case"right":i=[[n,o.right.eContainer],[o.bottomRight.eContainer],[o.topRight.eContainer]];break;default:i=[[n,o.center.eViewport],[o.bottomCenter.eViewport],[o.topCenter.eViewport]];break}this.eSecondaryContainers=i}),this.moveColumnFeature=this.createManagedBean(new _2(s)),this.bodyDropPivotTarget=this.createManagedBean(new A2(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()}},$2=class extends A{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,s){const o=this.beans.colModel.getCols();if(!o)return;const i=o[e];this.moveColumns([i],t,s)}moveColumns(e,t,s,o=!0){const{colModel:i,colAnimation:n,visibleCols:r,eventSvc:a}=this.beans,l=i.getCols();if(!l)return;if(t>l.length-e.length){G(30,{toIndex:t});return}n?.start();const c=i.getColsForKeys(e);this.doesMovePassRules(c,t)&&(Du(i.getCols(),c,t),r.refresh(s),a.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,toIndex:t,finished:o,source:s})),n?.finish()}doesMovePassRules(e,t){const s=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(s)}doesOrderPassRules(e){const{colModel:t,gos:s}=this.beans;return!(!Dp(e,t.getColTree())||!(i=>{const n=c=>c?c==="left"||c===!0?-1:1:0,r=s.get("enableRtl");let a=r?1:-1,l=!0;for(const c of i){const d=n(c.getColDef().lockPosition);r?d>a&&(l=!1):d<a&&(l=!1),a=d}return l})(e))}getProposedColumnOrder(e,t){const o=this.beans.colModel.getCols().slice();return Du(o,e,t),o}createBodyDropTarget(e,t){return new U2(e,t)}moveHeader(e,t,s,o,i){const{ctrlsSvc:n,gos:r,colModel:a,visibleCols:l,focusSvc:c}=this.beans,d=t.getBoundingClientRect(),u=d.left,h=je(s),p=h?d.width:s.getActualWidth(),f=e==="left"!==r.get("enableRtl"),C=Fc({x:f?u-20:u+p+20,pinned:o,fromKeyboard:!0,gos:r,ctrlsSvc:n}),v=c.focusedHeader;Of({allMovingColumns:h?s.getLeafColumns():[s],isFromHeader:!0,fromLeft:e==="right",xPosition:C,pinned:o,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let w;if(h){const b=s.getDisplayedLeafColumns();w=f?b[0]:Me(b)}else w=s;if(n.getScrollFeature().ensureColumnVisible(w,"auto"),(!i.isAlive()||r.get("ensureDomOrder"))&&v){let b;if(h){const S=s.getGroupId(),y=s.getLeafColumns();if(!y.length)return;const x=y[0].getParent();if(!x)return;b=K2(x,S)}else b=s;b&&c.focusHeaderPosition({headerPosition:{...v,column:b}})}}setDragSourceForHeader(e,t,s){const{gos:o,colModel:i,dragAndDrop:n,visibleCols:r}=this.beans;let a=!o.get("suppressDragLeaveHidesColumns");const l=je(t),c=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>Y2(t,r.allCols):()=>q2(t),dragItemName:s,onDragStarted:()=>{a=!o.get("suppressDragLeaveHidesColumns"),Ml(c,!0)},onDragStopped:()=>Ml(c,!1),onDragCancelled:()=>Ml(c,!1),onGridEnter:h=>{if(a){const{columns:p=[],visibleState:f}=h??{},C=l?w=>!f||f[w.getColId()]:()=>!0,v=p.filter(w=>!w.getColDef().lockVisible&&C(w));i.setColsVisible(v,!0,"uiColumnMoved")}},onGridExit:h=>{if(a){const p=h?.columns?.filter(f=>!f.getColDef().lockVisible)||[];i.setColsVisible(p,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function K2(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function q2(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function Y2(e,t){const s=e.getProvidedColumnGroup().getLeafColumns(),o={};for(const a of s)o[a.getId()]=a.isVisible();const i=[];for(const a of t)s.indexOf(a)>=0&&(i.push(a),zt(s,a));for(const a of s)i.push(a);const n=[],r=e.getLeafColumns();for(const a of i)r.indexOf(a)!==-1&&n.push(a);return{columns:i,columnsInSplit:n,visibleState:o,containerType:n[0]?.pinned}}var Z2={moduleName:"ColumnMove",version:K,beans:[$2,T2],apiFunctions:{moveColumnByIndex:I2,moveColumns:k2},dependsOn:[Af],css:[M2]},X2=class extends A{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const s=this.getHeaderCellForColumn(e);if(!s)return-1;const o=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||o.push(s),this.getPreferredWidthForElements(o)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const s=document.createElement("form");s.style.position="fixed";const o=this.centerRowContainerCtrl.eContainer;for(const n of e)this.cloneItemIntoDummy(n,s);o.appendChild(s);const i=s.offsetWidth;return s.remove(),t=t??this.gos.get("autoSizePadding"),i+t}getHeaderCellForColumn(e){let t=null;for(const s of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const o=s.getHtmlElementForColumnHeader(e);o!=null&&(t=o)}return t}cloneItemIntoDummy(e,t){const s=e.cloneNode(!0);s.style.width="",s.style.position="static",s.style.left="";const o=document.createElement("div"),i=o.classList;["ag-header-cell","ag-header-group-cell"].some(a=>s.classList.contains(a))?(i.add("ag-header","ag-header-row"),o.style.position="static"):i.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(l=>r.classList.contains(l))){for(let l=0;l<r.classList.length;l++){const c=r.classList[l];c!="ag-row-position-absolute"&&i.add(c)}break}r=r.parentElement}o.appendChild(s),t.appendChild(o)}},Nf={moduleName:"AutoWidth",version:K,beans:[X2]};function Q2(e,t,s=!0,o="api"){e.colResize?.setColumnWidths(t,!1,s,o)}var J2=class extends A{constructor(e,t,s,o){super(),this.comp=e,this.eResize=t,this.pinned=s,this.columnGroup=o}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:s}=this.beans,o=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(o),!t.get("suppressAutoSize")&&s&&this.addDestroyFunc(s.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:s,resizeRatios:o,groupAfterColumns:i,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=s,this.resizeRatios=o,this.resizeTakeFromCols=i,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,s="uiColumnResized"){const o=this.normaliseDragChange(t),i=this.resizeStartWidth+o;this.resizeColumnsFromLocalValues(i,s,e)}getInitialValues(e){const t=l=>l.reduce((c,d)=>c+d.getActualWidth(),0),s=(l,c)=>l.map(d=>d.getActualWidth()/c),o=this.getColumnsToResize(),i=t(o),n=s(o,i),r={columnsToResize:o,resizeStartWidth:i,resizeRatios:n};let a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){const l=a.getDisplayedLeafColumns(),c=r.groupAfterColumns=l.filter(u=>u.isResizable()),d=r.groupAfterStartWidth=t(c);r.groupAfterRatios=s(c,d)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),s=this.getInitialValues();t>s.resizeStartWidth&&this.resizeColumns(s,t,e,!0)}resizeColumnsFromLocalValues(e,t,s=!0){if(!this.resizeCols||!this.resizeRatios)return;const o={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(o,e,t,s)}resizeColumns(e,t,s,o=!0){const{columnsToResize:i,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:c}=e,d=[];if(d.push({columns:i,ratios:r,width:t}),a){const u=t-n;d.push({columns:a,ratios:c,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:d,finished:o,source:s}),o&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},eF=class extends A{constructor(e,t,s,o,i){super(),this.pinned=e,this.column=t,this.eResize=s,this.comp=o,this.ctrl=i}postConstruct(){const e=[];let t,s;const o=()=>{if(Be(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:a}=this.beans,l=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),s&&a&&e.push(a.addColumnAutosizeListeners(this.eResize,this.column))},i=()=>{for(const r of e)r();e.length=0},n=()=>{const r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==s)&&(t=r,s=a,i(),o())};n(),this.addDestroyFunc(i),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:s,lastResizeAmount:o,resizeStartWidth:i,beans:n}=this,r=this.normaliseResizeAmount(t),a=i+r,l=[{key:s,newWidth:a}],{pinnedCols:c,ctrlsSvc:d,colResize:u}=n;if(this.column.getPinned()){const h=c?.leftWidth??0,p=c?.rightWidth??0,f=sn(d.getGridBodyCtrl().eBodyViewport)-50;if(h+p+(r-o)>f)return}this.lastResizeAmount=r,u?.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.column.resizing=e,this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const s=this.pinned!=="left",o=this.pinned==="right";return this.gos.get("enableRtl")?s&&(t*=-1):o&&(t*=-1),t}},tF=class extends A{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,s,o){const i=[],{colModel:n,gos:r,visibleCols:a}=this.beans;for(const l of e){const c=n.getColDefCol(l.key)||n.getCol(l.key);if(!c)continue;if(i.push({width:l.newWidth,ratios:[1],columns:[c]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=a.getColAfter(c);if(!u)continue;const h=c.getActualWidth()-l.newWidth,p=u.getActualWidth()+h;i.push({width:p,ratios:[1],columns:[u]})}}i.length!==0&&this.resizeColumnSets({resizeSets:i,finished:s,source:o})}resizeColumnSets(e){const{resizeSets:t,finished:s,source:o}=e;if(!(!t||t.every(d=>sF(d)))){if(s){const d=t&&t.length>0?t[0].columns:null;oi(this.eventSvc,d,s,o)}return}const n=[],r=[];for(const d of t){const{width:u,columns:h,ratios:p}=d,f={},C={};for(const b of h)r.push(b);let v=!0,w=0;for(;v;){if(w++,w>1e3){Pe(31);break}v=!1;const b=[];let S=0,y=u;h.forEach((R,E)=>{if(C[R.getId()])y-=f[R.getId()];else{b.push(R);const T=p[E];S+=T}});const x=1/S;b.forEach((R,E)=>{const D=E===b.length-1;let T;D?T=y:(T=Math.round(p[E]*u*x),y-=T);const k=R.getMinWidth(),F=R.getMaxWidth();T<k?(T=k,C[R.getId()]=!0,v=!0):F>0&&T>F&&(T=F,C[R.getId()]=!0,v=!0),f[R.getId()]=T})}for(const b of h){const S=f[b.getId()];b.getActualWidth()!==S&&(b.setActualWidth(S,o),n.push(b))}}const a=n.length>0;let l=[];if(a){const{colFlex:d,visibleCols:u,colViewport:h}=this.beans;l=d?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(o),u.updateBodyWidths(),h.checkViewportColumns()}const c=r.concat(l);(a||s)&&oi(this.eventSvc,c,s,o,l)}resizeHeader(e,t,s){if(!e.isResizable())return;const o=e.getActualWidth(),i=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(o+t,i),n);this.setColumnWidths([{key:e,newWidth:r}],s,!0,"uiColumnResized")}createResizeFeature(e,t,s,o,i){return new eF(e,t,s,o,i)}createGroupResizeFeature(e,t,s,o){return new J2(e,t,s,o)}};function sF(e){const{columns:t,width:s}=e;let o=0,i=0,n=!0;for(const l of t){const c=l.getMinWidth();o+=c||0;const d=l.getMaxWidth();d>0?i+=d:n=!1}const r=s>=o,a=!n||s<=i;return r&&a}var oF={moduleName:"ColumnResize",version:K,beans:[tF],apiFunctions:{setColumnWidths:Q2},dependsOn:[P2,Nf]},iF=class extends A{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)}},nF=class extends Rd{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,s,o,i){const{column:n,beans:r}=this,{context:a,colNames:l,colHover:c,rangeSvc:d,colResize:u}=r;this.comp=e,i=vn(this,a,i),this.setGui(t,i),this.displayName=l.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(i),this.setupExpandable(i),this.setupTooltip(),this.setupAutoHeight({wrapperElement:o,compBean:i}),this.setupUserComp(),this.addHeaderMouseListeners(i),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,p=n.getProvidedColumnGroup().getLeafColumns();c?.createHoverFeature(i,p,t),d?.createRangeHighlightFeature(i,n,e),i.createManagedBean(new xd(n,t,r)),i.createManagedBean(new iF(e,n)),u?this.resizeFeature=i.createManagedBean(u.createGroupResizeFeature(e,s,h,n)):e.setResizableDisplayed(!1),i.createManagedBean(new gi(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(i,p),i.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(i),i.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.getDefinition();return de(t.gos,{colDef:s,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,s=e.get("groupHeaderHeight");s!=null?s===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(s):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const s of t)e.addManagedListeners(s,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,s)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),s=t[0]===e,o=Me(t)===e;if(!s&&!o)return;const i=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let r=!1,a=!1;if(n){const l=this.beans.gos.get("enableRtl"),c=i===1,d=i===0;s&&(l?a=c:r=d),o&&(l?r=d:a=c)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:s}=this;if(!s)return;const o=s.getInitialValues(t);s.resizeColumns(o,o.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:s,enterpriseMenuFactory:o}=this.beans,i=this.column,n=i.getProvidedColumnGroup(),r=de(s,{displayName:this.displayName,columnGroup:i,setExpanded:l=>{e.setColumnGroupOpened(n,l,"gridInitializing")},setTooltip:(l,c)=>{s.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,c)},showColumnMenu:(l,c)=>o?.showMenuAfterButtonClick(n,l,"columnMenu",c),showColumnMenuAfterMouseClick:(l,c)=>o?.showMenuAfterMouseEvent(n,l,"columnMenu",c),eGridHeader:this.eGui}),a=vS(t,r);a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e){const t=i=>this.handleMouseOverChange(i.type==="mouseenter"),s=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),o=i=>this.handleContextMenuMouseEvent(i,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:s,contextmenu:o})}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const s=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:s,expandableChanged:s})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),s=vf(t,this.gos,null,e);e.isPadding()?(s.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(i=>i.isSpanHeaderHeight())&&s.push("ag-header-span-height")):(s.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&s.push("ag-header-cell-wrap-text"));for(const o of s)this.comp.toggleCss(o,!0)}setupMovingCss(e){const{column:t}=this,o=t.getProvidedColumnGroup().getLeafColumns(),i=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const n of o)e.addManagedListeners(n,{movingChanged:i});i()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===I.ENTER){const s=this.column,o=!s.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(s.getProvidedColumnGroup(),o,"uiColumnExpanded")}}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function rF(e,t,s){e.colGroupSvc?.setColumnGroupOpened(t,s,"api")}function aF(e,t,s){return e.colGroupSvc?.getColumnGroup(t,s)??null}function lF(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function cF(e,t,s){return e.colNames.getDisplayNameForColumnGroup(t,s)||""}function dF(e){return e.colGroupSvc?.getColumnGroupState()??[]}function uF(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function hF(e){e.colGroupSvc?.resetColumnGroupState("api")}function gF(e){return e.visibleCols.treeLeft}function pF(e){return e.visibleCols.treeCenter}function fF(e){return e.visibleCols.treeRight}function mF(e){return e.visibleCols.getAllTrees()}function CF(e,t){for(let s=0;s<t.length;s++){const o=e.indexOf(t[s]);o>=0&&(e[o]=e[e.length-1],e.pop())}}var vF=class extends A{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:s,colModel:o,colGroupSvc:i,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(o,i),i?.updateOpenClosedVisibility(),this.leftCols=Tl(this.treeLeft),this.centerCols=Tl(this.treeCenter),this.rightCols=Tl(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(o),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),s?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(o,this.leftCols,this.rightCols,e),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let s=t.getParent();for(;s;){if(!s.isPadding()){const o=s.getProvidedColumnGroup().getLevel()+1;o>e&&(e=o);break}s=s.getParent()}}return e}updateBodyWidths(){const e=as(this.centerCols),t=as(this.leftCols),s=as(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==s)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=s,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,s,o){let i,n;this.gos.get("enableRtl")?(i=t?t[0]:null,n=s?Me(s):null):(i=t?Me(t):null,n=s?s[0]:null);for(const r of e.getCols())r.setLastLeftPinned(r===i,o),r.setFirstRightPinned(r===n,o)}buildTrees(e,t){const s=e.getColsToShow(),o=s.filter(l=>l.getPinned()=="left"),i=s.filter(l=>l.getPinned()=="right"),n=s.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new kp,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:o,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:i,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),s=[],o=[],i=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?s.push(n):i.push(n):o.push(n)}this.ariaOrderColumns=s.concat(o).concat(i)}getAriaColIndex(e){let t;return je(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)je(t)&&t.checkLeft()}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const o=t.getCols().slice(0),i=this.gos.get("enableRtl");for(const n of[this.leftCols,this.rightCols,this.centerCols]){if(i){let r=as(n);for(const a of n)r-=a.getActualWidth(),a.setLeft(r,e)}else{let r=0;for(const a of n)a.setLeft(r,e),r+=a.getActualWidth()}CF(o,n)}for(const n of o)n.setLeft(null,e)}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:s}}=this;return s.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:s}}=this;return s.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,s,o){const i=[];let n=null;for(let r=0;r<t.length;r++){const a=t[r],l=t.length-r,c=Math.min(a.getColSpan(e),l),d=[a];if(c>1){const h=c-1;for(let p=1;p<=h;p++)d.push(t[r+p]);r+=h}let u;if(s){u=!1;for(const h of d)s(h)&&(u=!0)}else u=!0;u&&(i.length===0&&n&&(o&&o(a))&&i.push(n),i.push(a)),n=a}return i}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,s=t.indexOf(e);return s>0?t[s-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};ao(this.treeCenter,!1,e),ao(this.treeLeft,!1,e),ao(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let s=0;s<t.length;s++){const o=this[t[s]];if(o.length)return e?Me(o):o[0]}return null}getColAfter(e){const t=this.allCols,s=t.indexOf(e);return s<t.length-1?t[s+1]:null}getColsLeftWidth(){return as(this.leftCols)}getDisplayedColumnsRightWidth(){return as(this.rightCols)}isColAtEdge(e,t){const s=this.allCols;if(!s.length)return!1;const o=t==="first";let i;if(je(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;i=o?n[0]:Me(n)}else i=e;return(o?s[0]:Me(s))===i}};function ao(e,t,s){if(e)for(let o=0;o<e.length;o++){const i=e[o];if(je(i)){const n=t?i.getDisplayedChildren():i.getChildren();ao(n,t,s)}s(i)}}function Tl(e){const t=[];return ao(e,!0,s=>{Ls(s)&&t.push(s)}),t}var wF=class extends A{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return gs(null,t,s=>{rt(s)&&e.push({groupId:s.getGroupId(),open:s.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const s=[];gs(null,t,o=>{if(rt(o)){const i=o.getColGroupDef(),n={groupId:o.getGroupId(),open:i?i.openByDefault:void 0};s.push(n)}}),this.setColumnGroupState(s,e)}setColumnGroupState(e,t){const{colModel:s,colAnimation:o,visibleCols:i,eventSvc:n}=this.beans;if(!s.getColTree().length)return;o?.start();const a=[];for(const l of e){const c=l.groupId,d=l.open,u=this.getProvidedColGroup(c);u&&u.isExpanded()!==d&&(u.setExpanded(d),a.push(u))}i.refresh(t,!0),a.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),o?.finish()}setColumnGroupOpened(e,t,s){let o;rt(e)?o=e.getId():o=e||"",this.setColumnGroupState([{groupId:o,open:t}],s)}getProvidedColGroup(e){let t=null;return gs(null,this.beans.colModel.getColTree(),s=>{rt(s)&&s.getId()===e&&(t=s)}),t}getGroupAtDirection(e,t){const s=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),o=e.getDisplayedLeafColumns(),i=t==="After"?Me(o):o[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](i);if(!r)return null;const a=this.getColGroupAtLevel(r,s);if(a!==e)return a}}getColGroupAtLevel(e,t){let s=e.getParent(),o,i;for(;o=s.getProvidedColumnGroup().getLevel(),i=s.getPaddingLevel(),!(o+i<=t);)s=s.getParent();return s}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();ao(e,!1,t=>{je(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(je(e))return e;const s=this.beans.visibleCols.getAllTrees(),o=typeof t=="number";let i=null;return ao(s,!1,n=>{if(je(n)){const r=n;let a;o?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(i=r)}}),i}createColumnGroups(e){const{columns:t,idCreator:s,pinned:o,oldDisplayedGroups:i,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(i),a=[];let l=t;for(;l.length;){const c=l;l=[];let d=0;const u=h=>{const p=d;d=h;const f=c[p],v=(je(f)?f.getProvidedColumnGroup():f).getOriginalParent();if(v==null){for(let b=p;b<h;b++)a.push(c[b]);return}const w=this.createColumnGroup(v,s,r,o,n);for(let b=p;b<h;b++)w.addChild(c[b]);l.push(w)};for(let h=1;h<c.length;h++){const p=c[h],C=(je(p)?p.getProvidedColumnGroup():p).getOriginalParent(),v=c[d],b=(je(v)?v.getProvidedColumnGroup():v).getOriginalParent();C!==b&&u(h)}d<c.length&&u(c.length)}return n||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,s,o,i,n,r){const a=i.getUniqueKey(t.groupId||null,null),l=Eu(this.beans,t,a),c=new ur(l,a,!1,s);this.createBean(c);const d=this.findExistingGroup(t,n);d&&n.splice(d.idx,1);const u=d?.group;u&&c.setExpanded(u.isExpanded());const h=Rp(this.beans,l.children,s+1,e,o,i,n,r);return c.setChildren(h),c}balanceColumnTree(e,t,s,o){const i=[];for(let n=0;n<e.length;n++){const r=e[n];if(rt(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,s,o);a.setChildren(l),i.push(a)}else{let a,l;for(let c=t;c<s;c++){const d=o.getUniqueKey(null,null),u=Eu(this.beans,null,d),h=new ur(u,d,!0,c);this.createBean(h),l&&l.setChildren([h]),l=h,a||(a=l)}if(a&&l)if(i.push(a),e.some(d=>rt(d))){l.setChildren([r]);continue}else{l.setChildren(e);break}i.push(r)}}return i}findDepth(e){let t=0,s=e;for(;s?.[0]&&rt(s[0]);)t++,s=s[0].getChildren();return t}findMaxDepth(e,t){let s=t;for(let o=0;o<e.length;o++){const i=e[o];if(rt(i)){const n=i,r=this.findMaxDepth(n.getChildren(),t+1);s<r&&(s=r)}}return s}balanceTreeForAutoCols(e,t){const s=[];for(const o of e){let i=o;for(let n=t-1;n>=0;n--){const r=new ur(null,`FAKE_PATH_${o.getId()}}_${n}`,!0,n);this.createBean(r),r.setChildren([i]),i.originalParent=r,i=r}t===0&&(o.originalParent=null),s.push(i)}return s}findExistingGroup(e,t){if(e.groupId!=null)for(let o=0;o<t.length;o++){const i=t[o];if(i.getColGroupDef()&&i.getId()===e.groupId)return{idx:o,group:i}}}createColumnGroup(e,t,s,o,i){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),a=sf(n,r);let l=s[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),q(l)?l.reset():(l=new ln(e,n,r,o),i||this.createBean(l)),l}mapOldGroupsById(e){const t={},s=o=>{for(const i of o)if(je(i)){const n=i;t[i.getUniqueId()]=n,s(n.getChildren())}};return e&&s(e),t}setupParentsIntoCols(e,t){for(const s of e??[])if(s.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),s.parent=t,je(s)){const o=s;this.setupParentsIntoCols(o.getChildren(),o)}}},bF={moduleName:"ColumnGroup",version:K,dynamicBeans:{headerGroupCellCtrl:nF},beans:[wF],apiFunctions:{getAllDisplayedColumnGroups:mF,getCenterDisplayedColumnGroups:pF,getColumnGroup:aF,getColumnGroupState:dF,getDisplayNameForColumnGroup:cF,getLeftDisplayedColumnGroups:gF,getProvidedColumnGroup:lF,getRightDisplayedColumnGroups:fF,resetColumnGroupState:hF,setColumnGroupOpened:rF,setColumnGroupState:uF}},SF={tag:"div",cls:"ag-skeleton-container"},yF=class extends ze{constructor(){super(SF)}init(t){const s=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",s),this.addDestroyFunc(()=>en(t.eParentOfValue)),en(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");ti(this.getGui(),s)}setupLoading(t){const s=pt({tag:"div",cls:"ag-skeleton-effect"}),o=t.node.rowIndex;if(o!=null){const r=75+25*(o%2===0?Math.sin(o):Math.cos(o));s.style.width=`${r}%`}this.getGui().appendChild(s);const i=this.getLocaleTextFunc(),n=t.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");ti(this.getGui(),n)}refresh(t){return!1}},xF={moduleName:"CheckboxCellRenderer",version:K,userComponents:{agCheckboxCellRenderer:SR}},RF={moduleName:"SkeletonCellRenderer",version:K,userComponents:{agSkeletonCellRenderer:yF}};function FF(e,t){const s=e.colModel.getColDefCol(t);return s?s.getColDef():null}function EF(e){return e.colModel.getColumnDefs(!0)}function DF(e,t,s){return e.colNames.getDisplayNameForColumn(t,s)||""}function PF(e,t){return e.colModel.getColDefCol(t)}function MF(e){return e.colModel.getColDefCols()}function TF(e,t){return Vt(e,t,"api")}function IF(e){return Nr(e)}function kF(e){_0(e,"api")}function AF(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function LF(e){return e.visibleCols.isPinningLeft()}function OF(e){return e.visibleCols.isPinningRight()}function NF(e,t){return e.visibleCols.getColAfter(t)}function HF(e,t){return e.visibleCols.getColBefore(t)}function GF(e,t,s){e.colModel.setColsVisible(t,s,"api")}function BF(e,t,s){e.pinnedCols?.setColsPinned(t,s,"api")}function VF(e){return e.colModel.getCols()}function zF(e){return e.visibleCols.leftCols}function WF(e){return e.visibleCols.centerCols}function _F(e){return e.visibleCols.rightCols}function jF(e){return e.visibleCols.allCols}function UF(e){return e.colViewport.getViewportColumns()}function Dc(e,t){if(!e)return;const s=e,o={};for(const i of Object.keys(s)){if(t&&t.indexOf(i)>=0||ep.has(i))continue;const n=s[i];typeof n=="object"&&n!==null&&n.constructor===Object?o[i]=Dc(n):o[i]=n}return o}var $F=class extends A{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,s,o,i=!1){const n=e.slice();t?n.sort((l,c)=>s.indexOf(l)-s.indexOf(c)):(s||i)&&n.sort((l,c)=>o.indexOf(l)-o.indexOf(c));const r=this.rowGroupColsSvc?.columns,a=this.pivotColsSvc?.columns;return this.buildColumnDefs(n,r,a)}buildColumnDefs(e,t=[],s=[]){const o=[],i={};for(const n of e){const r=this.createDefFromColumn(n,t,s);let a=!0,l=r,c=n.getOriginalParent(),d=null;for(;c;){let u=null;if(c.isPadding()){c=c.getOriginalParent();continue}const h=i[c.getGroupId()];if(h){h.children.push(l),a=!1;break}if(u=this.createDefFromGroup(c),u&&(u.children=[l],i[u.groupId]=u,l=u,c=c.getOriginalParent()),c!=null&&d===c){a=!1;break}d=c}a&&o.push(l)}return o}createDefFromGroup(e){const t=Dc(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,s){const o=Dc(e.getColDef());return o.colId=e.getColId(),o.width=e.getActualWidth(),o.rowGroup=e.isRowGroupActive(),o.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,o.pivot=e.isPivotActive(),o.pivotIndex=e.isPivotActive()?s.indexOf(e):null,o.aggFunc=e.isValueActive()?e.getAggFunc():null,o.hide=e.isVisible()?void 0:!0,o.pinned=e.isPinned()?e.getPinned():null,o.sort=e.getSort()?e.getSort():null,o.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,o}},KF=class extends A{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const s=this.flexViewportWidth,{visibleCols:o,colDelayRenderSvc:i}=this.beans,n=o.centerCols;let r=-1;if(e.resizingCols){const C=new Set(e.resizingCols);for(let v=n.length-1;v>=0;v--)if(C.has(n[v])){r=v;break}}let a=!1;const l=n.map((C,v)=>{const w=C.getFlex(),b=w!=null&&w>0&&v>r;return a||(a=b),{col:C,isFlex:b,flex:Math.max(0,w??0),initialSize:C.getActualWidth(),min:C.getMinWidth(),max:C.getMaxWidth(),targetSize:0}});if(a?(i?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(i),!s||!a)return[];let c=l.length,d=l.reduce((C,v)=>C+v.flex,0),u=s;const h=(C,v)=>{C.frozenSize=v,C.col.setActualWidth(v,t),u-=v,d-=C.flex,c-=1},p=C=>C.frozenSize!=null;for(const C of l)C.isFlex||h(C,C.initialSize);for(;c>0;){const C=Math.round(d<1?u*d:u);let v,w=0,b=0;for(const x of l){if(p(x))continue;v=x,b+=C*(x.flex/d);const R=b-w,E=Math.round(R);x.targetSize=E,w+=E}v&&(v.targetSize+=C-w);let S=0;for(const x of l){if(p(x))continue;const R=x.targetSize,E=Math.min(Math.max(R,x.min),x.max);S+=E-R,x.violationType=E===R?void 0:E<R?"max":"min",x.targetSize=E}const y=S===0?"all":S>0?"min":"max";for(const x of l)p(x)||(y==="all"||x.violationType===y)&&h(x,x.targetSize)}e.skipSetLeft||o.setLeftValues(t),e.updateBodyWidths&&o.updateBodyWidths();const f=l.filter(C=>C.isFlex&&!C.violationType).map(C=>C.col);if(e.fireResizedEvent){const C=l.filter(w=>w.initialSize!==w.frozenSize).map(w=>w.col),v=l.filter(w=>w.flex).map(w=>w.col);oi(this.eventSvc,C,!0,t,v)}return this.revealColumns(i),f}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){const{flex:t,initialFlex:s}=e.colDef;t!==void 0?e.flex=t:s!==void 0&&(e.flex=s)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}};function $i(e,t,s){if(!t||!e)return;if(!s)return e[t];const o=t.split(".");let i=e;for(let n=0;n<o.length;n++){if(i==null)return;i=i[o[n]]}return i}var qF=["dateTimeString","dateString","text","number","boolean","date"],YF=class extends A{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:e=>!!e.colDef.editable&&e.event.key===I.SPACE}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:s}){return{cellEditorParams:{useFormatter:!0},comparator:(o,i)=>{const n=t.getColDefCol(s),r=n?.getColDef();if(!n||!r)return 0;const a=o==null?"":e({column:n,node:null,value:o}),l=i==null?"":e({column:n,node:null,value:i});return a===l?0:a>l?1:-1},keyCreator:e}},text(){return{}}}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={},s={},o=d=>u=>{const{column:h,node:p,value:f}=u;let C=h.getColDef().valueFormatter;return C===d.groupSafeValueFormatter&&(C=d.valueFormatter),this.beans.valueSvc.formatValue(h,p,f,C)};for(const d of Object.keys(e)){const u=e[d],h={...u,groupSafeValueFormatter:hh(u,this.gos)};t[d]=h,s[d]=o(h)}const i=this.gos.get("dataTypeDefinitions")??{},n={};for(const d of Object.keys(i)){const u=i[d],h=this.processDataTypeDefinition(u,i,[d],e);h&&(t[d]=h,u.dataTypeMatcher&&(n[d]=u.dataTypeMatcher),s[d]=o(h))}const{valueParser:r,valueFormatter:a}=e.object,{valueParser:l,valueFormatter:c}=t.object;this.hasObjectValueParser=l!==r,this.hasObjectValueFormatter=c!==a,this.formatValueFuncs=s,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(n,e)}sortKeysInMatchers(e,t){const s={...e};for(const o of qF)delete s[o],s[o]=e[o]??t[o].dataTypeMatcher;return s}processDataTypeDefinition(e,t,s,o){let i;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=o[n];const a=t[n];if(r&&a&&(r=a),!uh(e,r,n))return;i=dh(r,e)}else{if(s.includes(n)){G(44);return}const r=t[n];if(!uh(e,r,n))return;const a=this.processDataTypeDefinition(r,t,[...s,n],o);if(!a)return;i=dh(a,e)}return{...i,groupSafeValueFormatter:hh(i,this.gos)}}updateColDefAndGetColumnType(e,t,s){let{cellDataType:o}=t;const{field:i}=t;if(o===void 0&&(o=e.cellDataType),(o==null||o===!0)&&(o=this.canInferCellDataType(e,t)?this.inferCellDataType(i,s):!1),!o){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[o];if(!n){G(47,{cellDataType:o});return}return e.cellDataType=o,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,o,n,s),n.columnTypes}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const s=o=>{t.add(o.key)};e.__addEventListener("columnStateUpdated",s),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",s))}canInferCellDataType(e,t){const{gos:s}=this;if(!We(s))return!1;const o={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Il(t,o))return!1;const i=t.type===null?e.type:t.type;if(i){const n=s.get("columnTypes")??{};if(Or(i).some(a=>{const l=n[a.trim()];return l&&Il(l,o)}))return!1}return!Il(e,o)}inferCellDataType(e,t){if(!e)return;let s;const o=this.getInitialData();if(o){const n=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");s=$i(o,e,n)}else this.initWaitForRowData(t);return s==null?void 0:Object.keys(this.dataTypeMatchers).find(n=>this.dataTypeMatchers[n](s))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?._leafs;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:s,eventSvc:o}=this.beans;t&&s&&(s.shouldQueueResizeOperations=!0);const[i]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(i?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&s?.processResizeOperations(),o.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const s=[];this.destroyColumnStateUpdateListeners();const o={},i={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],a=this.colModel.getCol(n);if(!a)return;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))return;const c=a.getColDef();if(t&&c.type&&c.type!==l.type){const d=XF(a,r);d.rowGroup&&d.rowGroupIndex==null&&(o[n]=d),d.pivot&&d.pivotIndex==null&&(i[n]=d),s.push(d)}}t&&s.push(...this.generateColumnStateForRowGroupAndPivotIndexes(o,i)),s.length&&Vt(this.beans,{state:s},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const s={},{rowGroupColsSvc:o,pivotColsSvc:i}=this.beans;return o?.restoreColumnOrder(s,e),i?.restoreColumnOrder(s,t),Object.values(s)}resetColDefIntoCol(e,t){const s=e.getUserProvidedColDef();if(!s)return!1;const o=dc(this.beans,s,e.getColId());return e.setColDef(o,s,t),!0}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const s=this.getDataTypeDefinition(e)?.dataTypeMatcher;return s?s(t):!0}validateColDef(e){const t=s=>G(48,{property:s});if(e.cellDataType==="object"){const{object:s}=this.dataTypeDefinitions;e.valueFormatter===s.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===s.valueParser&&!this.hasObjectValueParser&&t("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:s,beans:o,formatValueFuncs:i}=this,n=s[t];n&&o.colFilter?.setColDefPropsForDataType(e,n,i[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,s,o){const i=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[s.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:s,colId:o,formatValue:i});Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),s=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:o=>Ct(o.newValue&&String(o.newValue)),valueFormatter:o=>o.value==null?"":!(o.value instanceof Date)||isNaN(o.value.getTime())?t("invalidDate","Invalid Date"):Et(o.value,s)??"",dataTypeMatcher:o=>o instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:s=>Ct(s)??void 0,dateFormatter:s=>Et(s??null,t)??void 0,valueParser:s=>hr(String(s.newValue))?s.newValue:null,valueFormatter:s=>hr(String(s.value))?String(s.value):"",dataTypeMatcher:s=>typeof s=="string"&&hr(s)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>t.newValue?.trim?.()===""?null:Number(t.newValue),valueFormatter:t=>t.value==null?"":typeof t.value!="number"||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:sc(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"&&OS(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>sc(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 dh(e,t){const s={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(s.columnTypes=[...Or(e.columnTypes),...Or(t.columnTypes)]),s}function uh(e,t,s){return t?t.baseDataType!==e.baseDataType?(G(46),!1):!0:(G(45,{parentCellDataType:s}),!1)}function hh(e,t){if(e.valueFormatter)return s=>{if(s.node?.group){const o=(s.colDef.pivotValueColumn??s.column).getAggFunc();if(o){if(o==="first"||o==="last")return e.valueFormatter(s);if(e.baseDataType==="number"&&o!=="count"){if(typeof s.value=="number")return e.valueFormatter(s);if(typeof s.value=="object"){if(!s.value)return;if("toNumber"in s.value)return e.valueFormatter({...s,value:s.value.toNumber()});if("value"in s.value)return e.valueFormatter({...s,value:s.value.value})}}return}}else if(t.get("groupHideOpenParents")&&s.column.isRowGroupActive()&&typeof s.value=="string"&&!e.dataTypeMatcher?.(s.value))return;return e.valueFormatter(s)}}function ZF(e,t,s,o){if(!t[s])return!1;const i=e[s];return i===null?(t[s]=!1,!1):o===void 0?!!i:i===o}function Il(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([s,o])=>ZF(e,t,s,o))}function XF(e,t){const s=Ip(e);for(const o of t)delete s[o],o==="rowGroup"?delete s.rowGroupIndex:o==="pivot"&&delete s.pivotIndex;return s}var QF={moduleName:"DataType",version:K,beans:[YF],dependsOn:[xF]},JF={moduleName:"ColumnFlex",version:K,beans:[KF]},Hf={moduleName:"ColumnApi",version:K,beans:[$F],apiFunctions:{getColumnDef:FF,getDisplayNameForColumn:DF,getColumn:PF,getColumns:MF,applyColumnState:TF,getColumnState:IF,resetColumnState:kF,isPinning:AF,isPinningLeft:LF,isPinningRight:OF,getDisplayedColAfter:NF,getDisplayedColBefore:HF,setColumnsVisible:GF,setColumnsPinned:BF,getAllGridColumns:VF,getDisplayedLeftColumns:zF,getDisplayedCenterColumns:WF,getDisplayedRightColumns:_F,getAllDisplayedColumns:jF,getAllDisplayedVirtualColumns:UF,getColumnDefs:EF}};function eE(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,s=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(s,"$1 $2$3").replace(/\./g," ").split(" ").map(i=>i.substring(0,1).toUpperCase()+(i.length>1?i.substring(1,i.length):"")).join(" ")}var tE=class extends A{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,s=!1){if(!e)return null;const o=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:i}=this.beans;return s&&i?i.getHeaderName(e,o):o}getDisplayNameForProvidedColumnGroup(e,t,s){const o=t?.getColGroupDef();return o?this.getHeaderName(o,null,e,t,s):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,s,o,i){const n=e.headerValueGetter;if(n){const r=de(this.gos,{colDef:e,column:t,columnGroup:s,providedColumnGroup:o,location:i});return typeof n=="function"?n(r):typeof n=="string"?this.beans.expressionSvc?.evaluate(n,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return eE(e.field)}return""}},sE=class extends A{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,s=!1){const{visibleCols:o}=this,i=o.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!i)){if(this.scrollWidth=e,this.scrollPosition=t,o.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=o.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(s)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let s;switch(e){case"left":s=this.rowsOfHeadersToRenderLeft[t];break;case"right":s=this.rowsOfHeadersToRenderRight[t];break;default:s=this.rowsOfHeadersToRenderCenter[t];break}return s??[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||oE(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,s=t+e.getActualWidth(),o=this.viewportLeft-200,i=this.viewportRight+200,n=t<o&&s<o,r=t>i&&s>i;return!n&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=n=>{const r=n.getLeft();return q(r)&&r>this.viewportLeft},s=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:o}=this,i=o.centerCols;return o.getColsForRow(e,i,s,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const s=o=>{const i=new Set,n={};for(const r of o){let a=r.getParent();const l=r.isSpanHeaderHeight();for(;a&&!i.has(a);){if(l&&a.isPadding()){a=a.getParent();continue}const d=a.getProvidedColumnGroup().getLevel();n[d]??(n[d]=[]),n[d].push(a),i.add(a),a=a.getParent()}}return n};this.rowsOfHeadersToRenderLeft=s(e),this.rowsOfHeadersToRenderRight=s(t),this.rowsOfHeadersToRenderCenter=s(this.headerColsWithinViewport)}extractViewport(){const e=o=>`${o.getId()}-${o.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),s=this.colsWithinViewportHash!==t;return s&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),s}};function oE(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var iE=class extends A{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class s{refresh(){return!1}getGui(){return this.eGui}init(i){const n=t(i),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=Yc("<span>"+n+"</span>");return}if(n==null){this.eGui=pt({tag:"span"});return}this.eGui=n}}return s}},nE={moduleName:"CellRendererFunction",version:K,beans:[iE]},rE=class extends ky{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:s,dynamicBeans:o,selectors:i}=e;if(s){const n=(r,a,l,c)=>{this.agGridDefaults[r]=a,(l||c)&&(this.agGridDefaultOverrides[r]={params:l,processParams:c})};for(const r of Object.keys(s)){let a=s[r];if(TS(a)&&(a=a.getComp(this.beans)),typeof a=="object"){const{classImp:l,params:c,processParams:d}=a;n(r,l,c,d)}else n(r,a)}}this.registerDynamicBeans(o);for(const n of i??[])this.selectors[n.selector]=n;if(t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const s=(a,l,c,d)=>({componentFromFramework:l,component:a,params:c,processParams:d}),{frameworkOverrides:o}=this.beans,i=o.frameworkComponent(t,this.gos.get("components"));if(i!=null)return s(i,!0);const n=this.jsComps[t];if(n){const a=o.isFrameworkComponent(n);return s(n,a)}const r=this.agGridDefaults[t];if(r){const a=this.agGridDefaultOverrides[t];return s(r,!1,a?.params,a?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?es(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??es(256)}},aE=23,lE=class extends A{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===aE&&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}},cE='.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-virtual-list-item{height:var(--ag-list-item-height);position:absolute;width:100%}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}',dE={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:$e,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:Lt,rangeSelectionBackgroundColor:Yt(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:Yt(.5),rangeHeaderHighlightColor:hy(.08),rowNumbersSelectedColor:Yt(.5),rowHoverColor:Yt(.08),columnHoverColor:Yt(.05),selectedRowBackgroundColor:Yt(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:$e,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:dt(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:dt(.1),iconButtonActiveColor:Lt,iconButtonActiveBackgroundColor:Yt(.28),iconButtonActiveIndicatorColor:Lt,menuBorder:{color:dt(.2)},menuBackgroundColor:tt(.03),menuTextColor:tt(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:dt(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:Lt},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},dialogBorder:{color:dt(.2)},panelBackgroundColor:$e,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:dt(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:dt(.13)},selectCellBackgroundColor:dt(.07),selectCellBorder:{color:dt(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:$e,filterPanelApplyButtonBackgroundColor:Lt,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:cs,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:cs,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:dt(.15),statusBarLabelColor:cs,statusBarLabelFontWeight:500,statusBarValueColor:cs,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"}},uE=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",Gf={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},hE={...Gf,cellBatchEditTextColor:"#f3d0b3"},gE=()=>gt({feature:"batchEditStyle",params:Gf,css:uE}),pE=gE(),Bf=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}",Vf={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},fE=()=>gt({feature:"buttonStyle",params:{...Vf,buttonBackgroundColor:$e,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:Lt}},css:Bf}),mE=fE(),CE=()=>gt({feature:"buttonStyle",params:{...Vf,buttonBorder:{color:cs,width:2,style:"outset"},buttonActiveBorder:{color:cs,width:2,style:"inset"},buttonBackgroundColor:tt(.07),buttonHoverBackgroundColor:$e,buttonVerticalPadding:{calc:"spacing * 0.5"}},css:Bf}),vE=CE(),wE=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",bE=".ag-column-drop-vertical-empty-message{color:var(--ag-subtle-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600;padding-top:var(--ag-spacing)}:where(.ag-ltr) .ag-column-drop-vertical-empty-message{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing));padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-column-drop-vertical-empty-message{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing))}",SE=()=>gt({feature:"columnDropStyle",css:wE}),zf=SE(),yE=()=>gt({feature:"columnDropStyle",css:bE}),xE=yE(),RE={warn:(...e)=>{G(e[0],e[1])},error:(...e)=>{Pe(e[0],e[1])},preInitErr:(...e)=>{Li(e[0],e[2],e[1])}},Wf=()=>xy(RE).withParams(dE).withPart(mE).withPart(zf).withPart(pE),FE='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',EE=()=>gt({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:$e,checkboxUncheckedBorderColor:tt(.3),checkboxCheckedBackgroundColor:Lt,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:$e,checkboxIndeterminateBackgroundColor:tt(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:$e,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:FE}),_f=EE(),Fd=()=>({...Br,...hE,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:tt(.05),rowHoverColor:Yt(.15),selectedRowBackgroundColor:Yt(.2),menuBackgroundColor:tt(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:cs,findMatchColor:$e,findActiveMatchColor:$e,checkboxUncheckedBorderColor:tt(.4),toggleButtonOffBackgroundColor:tt(.4),rowBatchEditBackgroundColor:tt(.1)}),DE=()=>gt({feature:"colorScheme",params:Fd()}),PE=DE(),ME=()=>({...Fd(),backgroundColor:"#1f2836"}),TE=()=>gt({feature:"colorScheme",params:Br,modeParams:{light:Br,dark:Fd(),"dark-blue":ME()}}),jf=TE(),IE=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M22 12h-2v-2h-8v.092c.056 1.352 3.426 2.598 4.472 4.404.682 1.174.438 2.754-.572 3.72C14.29 19.618 12 20.924 12 22h8v-2h2v4H10c0-1.586-.098-3.304 1.016-4.314 1.904-1.632 4.89-3.108 3.54-4.42-1.918-1.68-4.464-2.936-4.554-5.12L10 8h12z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='m6.414 17 2.294 2.292-1.416 1.416L2.586 16l4.706-4.708 1.416 1.416L6.414 15H15V6.414l-2.292 2.294-1.416-1.416L16 2.586l4.708 4.706-1.416 1.416L17 6.414V15h8.586l-2.294-2.292 1.416-1.416L29.414 16l-4.706 4.708-1.416-1.416L25.586 17H17v8.586l2.292-2.294 1.416 1.416L16 29.414l-4.708-4.706 1.416-1.416L15 25.586V17z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 4C9.378 4 4 9.378 4 16s5.378 12 12 12 12-5.378 12-12S22.622 4 16 4m0 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S6 21.52 6 16 10.48 6 16 6m0 8.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M14 25h-2V7h2zm6 0h-2V7h2zm6 0h-2V7h2zM8 25H6V7h2z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M21.929 27.999h-7.828a5.09 5.09 0 0 1-5.086-5.086v-9.812a5.087 5.087 0 0 1 5.086-5.086h7.828a5.09 5.09 0 0 1 5.086 5.086v9.812a5.087 5.087 0 0 1-5.086 5.086m.16-17.984h-8.088a2.94 2.94 0 0 0-2.938 2.938v10.132a2.94 2.94 0 0 0 2.938 2.938h8.088a2.94 2.94 0 0 0 2.936-2.938V12.953a2.94 2.94 0 0 0-2.936-2.938M7.041 26.013h-2.05a4 4 0 0 1-.006-.228V9.065a5.07 5.07 0 0 1 5.064-5.064h12.812q.069 0 .134.002v2.012H9.915a2.876 2.876 0 0 0-2.874 2.874z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 24 24'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m16 14.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14.703 15.096 6.215 4.719a1 1 0 1 1 1.548-1.267l13.058 15.965A5.001 5.001 0 0 1 28 23.916a5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 4.98 4.98 0 0 1 1.23-3.283l-3.238-3.958-3.272 4.001a4.98 4.98 0 0 1 1.265 3.323 5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 5 5 0 0 1 7.13-4.522zM8.991 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M23 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1m-5.723-8.852 1.292 1.579 7.205-8.808a1 1 0 0 0-1.548-1.267z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M9.304 7.89a15.2 15.2 0 0 1 6.404-1.638c.294-.002.292-.002.584 0 5.956.174 11.328 4.088 13.62 9.748 0 0-1.318 3.178-3.224 5.174a13.6 13.6 0 0 1-2.226 1.874L26.414 25 25 26.414l-2.336-2.336C17.866 26.396 11.776 26.15 7.36 22.96a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.218 2.002-3.718a14.6 14.6 0 0 1 3.442-3.334L5.586 7 7 5.586zm-.3 2.528c-2.038 1.344-3.708 3.246-4.724 5.508L4.248 16c2.46 5.762 9.622 9.064 15.63 7.15q.688-.219 1.342-.516l-.912-.912a6.96 6.96 0 0 1-4.19 1.394c-3.862 0-7-3.136-7-7 0-1.57.52-3.022 1.394-4.19zm14.032 11.204a13.25 13.25 0 0 0 4.684-5.548l.032-.074c-1.984-4.646-6.834-7.798-12.006-7.748-1.712.05-3.386.458-4.922 1.158l1.102 1.102a6.97 6.97 0 0 1 4.192-1.396 7.003 7.003 0 0 1 5.606 11.192zm-11.09-8.262a5.003 5.003 0 0 0 6.928 6.928zm8.342 5.514a5.002 5.002 0 0 0-6.928-6.928z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16.292 6.32c5.956.174 11.328 4.086 13.62 9.746 0 0-1.318 3.18-3.224 5.176-4.862 5.088-13.534 5.97-19.328 1.784a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.216 2.002-3.716 2.678-3.64 7.03-5.896 11.618-6.03.294-.004.292-.004.584 0m-.546 2c-4.896.142-9.458 3.202-11.466 7.672l-.032.074c2.46 5.762 9.622 9.066 15.63 7.152 3.458-1.102 6.342-3.738 7.842-7.076l.032-.076C25.768 11.42 20.918 8.27 15.746 8.32m.254.946c3.754 0 6.8 3.048 6.8 6.8 0 3.754-3.046 6.8-6.8 6.8s-6.8-3.046-6.8-6.8c0-3.752 3.046-6.8 6.8-6.8m5 6.768V16c0-2.76-2.24-5-5-5s-5 2.24-5 5v.066c0 2.76 2.24 5 5 5s5-2.24 5-5z'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M26 8.184c-.066 2.658-4.058 5.154-6.742 7.974a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h20zM8 8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.066-2.658 4.058-5.154 6.742-7.974.198-.23.258-.538.258-.842z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.354 8.708 17.06 16l7.294 7.292-1.416 1.416L14.232 16l8.706-8.708zM9.646 8v16h-2V8z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M14 21h-4v-2h4zm12 0H16v-2h10zm-12-4h-4v-2h4zm12 0H16v-2h10zm-16-4H6v-2h4zm16 0H12v-2h14z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m17.768 16-8.706 8.708-1.416-1.416L14.94 16 7.646 8.708l1.416-1.416zm6.586 8h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='m17.621 11-2 2h12.586v6H15.621l2 2-4.414 4.414L3.793 16l9.414-9.414zm-11 5 6.586 6.586L14.793 21l-4-4h15.414v-2H10.793l4-4-1.586-1.586z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M17.138 13.418a1.03 1.03 0 0 0-.298.658s.125.096.226.178c1.372 1.114 2.033 3.039 1.582 4.796a4.7 4.7 0 0 1-1.205 2.123c-1.145 1.151-2.296 2.294-3.445 3.441-1.241 1.232-3.185 1.691-4.864 1.105-1.546-.54-2.756-1.938-3.048-3.572-.267-1.496.246-3.108 1.319-4.186l.578-.578-.03-.092a10.5 10.5 0 0 1-.452-2.3v-.005c-.776.775-1.621 1.489-2.275 2.396-1.817 2.522-1.643 6.323.706 8.669 1.813 1.811 4.708 2.462 7.171 1.517a6.75 6.75 0 0 0 2.336-1.518l3.427-3.424c1.939-1.954 2.533-5.126 1.294-7.674a6.8 6.8 0 0 0-2.071-2.481l-.003-.002zM21.265 4a6.8 6.8 0 0 0-4.734 1.964l-3.427 3.424c-1.961 1.977-2.52 5.092-1.32 7.619a6.8 6.8 0 0 0 2.098 2.537l.003.002c.32-.32.643-.637.96-.96.167-.172.27-.401.286-.64l-.204-.167c-1.603-1.287-2.215-3.68-1.316-5.616a4.7 4.7 0 0 1 .918-1.32c1.145-1.151 2.296-2.294 3.445-3.441 1.239-1.23 3.178-1.694 4.864-1.105 1.83.639 3.16 2.498 3.12 4.493a4.8 4.8 0 0 1-1.391 3.265l-.578.578.03.092c.235.743.387 1.519.452 2.3v.005c.732-.731 1.521-1.406 2.162-2.244 1.192-1.559 1.643-3.651 1.204-5.575a6.8 6.8 0 0 0-3.98-4.703 6.8 6.8 0 0 0-2.529-.506h-.061z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='m7.54 17.4.1 6.98 6.96.1-2.24-2.24L16 18.6 13.4 16l-3.64 3.64zm16.92-2.8-.1-6.98-6.96-.1 2.24 2.24L16 13.4l2.6 2.6 3.64-3.64z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M26 23H6v-2h20zm0-6H6v-2h20zm0-6H6V9h20z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath fill='%23000' d='M16 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='m14.8 24.26-.1-6.96-6.96-.1 2.24 2.24-3.64 3.64 2.6 2.6 3.64-3.64zm2.4-16.52.1 6.96 6.96.1-2.24-2.24 3.64-3.64-2.6-2.6-3.64 3.64z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142m-1.414 6.07h16.97v2.002H7.515z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='m10.044 21.258 4.478-4.198L16 18.444 9 25l-7-6.556 1.478-1.384 4.478 4.198V7h2.088zm14 3.742h-2.088V10.742l-4.478 4.198L16 13.556 23 7q3.5 3.28 7 6.556l-1.478 1.384-4.478-4.198z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16.186 3.646c8.188.154 14.898 9.796 11.17 17.78-3.298 7.066-13.932 9.374-19.848 3.87-3.9-3.632-5.076-9.896-2.684-14.708 2.082-4.19 6.588-6.974 11.362-6.942m-.298 1.998c-6.922.132-12.578 8.308-9.33 15.052 3.342 6.934 15.246 7.646 18.932 0 3.076-6.386-1.988-15.1-9.602-15.052m7.596 6.422c2.864 5.33-1.744 13.186-8.306 12.536a8.6 8.6 0 0 1-3.232-.998l-1.266-.706L22.778 10.8q.351.633.706 1.266m-9.422 10.276c3.296 1.028 7.246-1.006 8.216-4.418a6.6 6.6 0 0 0-.056-3.742zm2.104-14.696a8.8 8.8 0 0 1 3.936 1.038l1.266.706L9.27 21.488c-3.018-5.41-.99-13.37 6.318-13.834q.289-.01.578-.008m-.31 2c-4.06.154-7.23 4.614-6.03 8.46l8.16-8.16a6.8 6.8 0 0 0-2.13-.3'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M20 6.5c0-1-1-3-4-3s-4 2-4 3H8c-2.21 0-4 1.79-4 4v14c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-14c0-2.21-1.79-4-4-4zm-4 .546c.734 0 1.334.572 1.334 1.272S16.734 9.59 16 9.59s-1.334-.572-1.334-1.272.6-1.272 1.334-1.272M24 26.5H8a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h2v4h12v-4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008c-1.358-.022-2.714-.026-4.07-.022v4.034h4.07z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142M15 15l-.001-7.485h2.002L17 15l7.485-.001v2.002L17 17l.001 7.485h-2.002L15 17l-7.485.001v-2.002z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m28.207 16-9.414 9.414L14.379 21l2-2H3.793v-6h12.586l-2-2 4.414-4.414zm-11-5 4 4H5.793v2h15.414l-4 4 1.586 1.586L25.379 16l-6.586-6.586z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='m24.708 19.645-1.416 1.416L16 13.767l-7.292 7.294-1.416-1.416L16 10.939z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='M24.708 10.855 13 22.561l-5.708-5.706 1.416-1.416L13 19.733 23.292 9.439z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6 15h20v2H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M5.35 3.999a.2.2 0 0 0-.14.058c-.388.38-.768.768-1.152 1.152a.21.21 0 0 0-.002.288c7.459 7.506 14.965 14.965 22.447 22.447a.21.21 0 0 0 .288.002q.576-.574 1.151-1.151a.21.21 0 0 0 .002-.288C20.484 19.002 12.979 11.542 5.497 4.06a.2.2 0 0 0-.146-.061zm.611 12.548c-1.933 1.939-2.538 5.119-1.289 7.688a6.79 6.79 0 0 0 4.891 3.672 6.82 6.82 0 0 0 5.893-1.866l1.984-1.984-1.438-1.438-1.986 1.986c-1.486 1.476-3.993 1.81-5.834.629a4.73 4.73 0 0 1-2.024-2.853 4.76 4.76 0 0 1 1.241-4.393l1.986-1.986-1.438-1.438-1.984 1.984zM21.273 3.999a6.78 6.78 0 0 0-4.727 1.963l-1.984 1.984L16 9.384l1.985-1.985a4.74 4.74 0 0 1 2.776-1.338c1.974-.224 4.045.926 4.845 2.834.712 1.699.329 3.778-1.004 5.12L22.616 16l1.439 1.438q1-1 2-2c2.012-2.031 2.557-5.368 1.112-7.982-1.144-2.07-3.432-3.441-5.834-3.459h-.061z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M23.182 5a3.82 3.82 0 0 1 2.83 6.383l-.131.137-2.09 2.088a1 1 0 0 1-.084.099 1 1 0 0 1-.098.084L12.533 24.869a3 3 0 0 1-1.245.746l-4.353 1.32-.003.002a1.5 1.5 0 0 1-1.87-1.867l.003-.004 1.32-4.352v-.003l.06-.174c.13-.344.321-.661.565-.936l.126-.135L18.209 8.39a1 1 0 0 1 .18-.181l2.092-2.09.137-.132A3.82 3.82 0 0 1 23.182 5M8.548 20.883a1 1 0 0 0-.25.415l-1.049 3.451 3.457-1.048.114-.042q.17-.076.301-.206l10.458-10.46-2.572-2.572zM23.182 7c-.482 0-.946.19-1.287.531v.001l-1.474 1.475 2.572 2.572 1.474-1.474.121-.133A1.82 1.82 0 0 0 23.182 7'/%3E%3C/svg%3E")}`,kE=gt({feature:"iconSet",css:IE}),Uf={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},$f={"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>'},AE=(e={})=>{let t="";for(const s of[...Object.keys(Uf),...Object.keys($f)]){const o=LE(s,e.strokeWidth);t+=`.ag-icon-${s}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(o)}'); }
18
+ `}return t},LE=(e,t=1.5)=>{const s=$f[e];if(s)return s;const o=Uf[e];if(!o)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+o+"</svg>"},OE=(e={})=>gt({feature:"iconSet",css:()=>AE(e)}),NE=OE(),HE=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',GE=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}",BE={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},VE=()=>gt({feature:"inputStyle",params:{...BE,inputBackgroundColor:$e,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:Lt},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:tt(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>HE+GE}),Kf=VE(),qf='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}',zE=".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}",Yf={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},WE=()=>gt({feature:"tabStyle",params:{...Yf,tabBarBorder:!0,tabBarBackgroundColor:dt(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:$e},css:qf}),_E=WE(),jE=()=>gt({feature:"tabStyle",params:{...Yf,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabBarHorizontalPadding:{ref:"spacing"},tabBarTopPadding:{ref:"spacing"},tabBarBorder:!0,tabHorizontalPadding:{calc:"spacing * 2"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:{ref:"spacing"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:$e},css:()=>qf+zE}),UE=jE(),$E=()=>Wf().withPart(_f).withPart(jf).withPart(NE).withPart(_E).withPart(Kf).withPart(zf).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),KE=$E(),qE=()=>Wf().withPart(vE).withPart(_f).withPart(jf).withPart(kE).withPart(UE).withPart(Kf).withPart(xE).withParams({accentColor:"#0091ea",borderColor:dt(.2),spacing:4,widgetVerticalSpacing:{calc:"max(8px, spacing)"},borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},checkboxBorderRadius:2,checkboxBorderWidth:1,checkboxUncheckedBackgroundColor:$e,checkboxUncheckedBorderColor:tt(.5),checkboxCheckedBackgroundColor:$e,checkboxCheckedBorderColor:Lt,checkboxCheckedShapeColor:Lt,checkboxIndeterminateBackgroundColor:$e,checkboxIndeterminateBorderColor:tt(.5),checkboxIndeterminateShapeColor:tt(.5),focusShadow:{radius:2,spread:1,color:Lt},headerTextColor:dt(.6),iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",fontSize:12,tabSelectedBackgroundColor:$e,headerFontWeight:"bold",toggleButtonWidth:32,toggleButtonHeight:16,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:tt(.5),sideButtonBorder:!0,sideButtonBarTopPadding:{calc:"spacing * 4"},popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)",statusBarLabelColor:dt(.54),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,panelTitleBarIconColor:cs,colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}),YE=qE(),ZE={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},XE={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},QE={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},gh={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},ph={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},fh={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},kl={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},mh={cssName:"--ag-pinned-row-border",changeKey:"pinnedRowBorderWidthChanged",defaultValue:1,border:!0};function JE(e,t){for(const s of t.sort((o,i)=>o.moduleName.localeCompare(i.moduleName))){const o=s.css;o&&e.set(`module-${s.moduleName}`,o)}}var eD=class extends Iy{constructor(){super(...arguments),this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1}initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(gh),this.getSizeEl(ph),this.getSizeEl(fh),this.getSizeEl(kl),this.getSizeEl(mh),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(mh)}getRowBorderWidth(){return this.getCSSVariablePixelValue(kl)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(gh)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(ph)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(ZE)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(XE),s=this.getCSSVariablePixelValue(QE);return e-1+s*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(fh)}refreshRowHeightVariable(){const{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),s=this.gos.get("rowHeight");if(s==null||isNaN(s)||!isFinite(s))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const o=`${s}px`;return t!=o?(e.style.setProperty("--ag-line-height",o),s):t!=""?Number.parseFloat(t):-1}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const s=this.measureSizeEl(e);return s==="detached"||s==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,s),s)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const s=t.offsetWidth;return s===Al?"no-styles":(this.sizesMeasured=!0,s)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=pt({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const s=this.getMeasurementContainer();t=pt({tag:"div"});const{border:o,noWarn:i}=e;o?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid ${Al}px)`)):t.style.width=`var(${e.cssName}, ${Al}px)`,s.appendChild(t),this.sizeEls.set(e,t);let n=this.measureSizeEl(e);n==="no-styles"&&!i&&G(9,{variable:e});const r=vs(this.beans,t,()=>{const a=this.measureSizeEl(e);a==="detached"||a==="no-styles"||(this.lastKnownValues.set(e,a),a!==n&&(n=a,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>r()),t}fireStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(kl);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&Pe(t?106:239)}getAdditionalCss(){const e=new Map;return e.set("core",[cE]),JE(e,Array.from(Qb())),e}getDefaultTheme(){return KE}themeError(e){Pe(240,{theme:e})}},Al=15538,tD=class extends Ay{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function Zf(e,t,s){const o=e.visibleCols.headerGroupRowCount;if(s>=o)return{column:t,headerRowIndex:s};let i=t.getParent();for(;i&&i.getProvidedColumnGroup().getLevel()>s;)i=i.getParent();const n=t.isSpanHeaderHeight();return!i||n&&i.isPadding()?{column:t,headerRowIndex:o}:{column:i,headerRowIndex:i.getProvidedColumnGroup().getLevel()}}var sD=class extends A{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,s=>{this.gridBodyCon=s.gridBodyCtrl});const t=Qe(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let s;const{colModel:o,colGroupSvc:i,ctrlsSvc:n}=this.beans;if(typeof e=="string"?(s=o.getCol(e),s||(s=i?.getColumnGroup(e)??null)):s=e,!s)return null;const a=n.getHeaderRowContainerCtrl()?.getAllCtrls(),l=Me(a||[]).type==="filter",c=Qt(this.beans)-1;let d=-1,u=s;for(;u;)d++,u=u.getParent();let h=d;return t&&l&&h===c-1&&h++,h===-1?null:{headerRowIndex:h,column:s}}navigateVertically(e,t){const{focusSvc:s,visibleCols:o}=this.beans,{focusedHeader:i}=s;if(!i)return!1;const{headerRowIndex:n}=i,r=i.column,a=Qt(this.beans),l=this.getHeaderRowType(n),c=o.headerGroupRowCount;let{headerRowIndex:d,column:u,headerRowIndexWithoutSpan:h}=e==="UP"?oD(l,r,n):iD(r,n,c),p=!1;return d<0&&(d=0,u=r,p=!0),d>=a?(d=-1,this.currentHeaderRowWithoutSpan=-1):h!==void 0&&(this.currentHeaderRowWithoutSpan=h),!p&&!u?!1:s.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,s){const{focusSvc:o,gos:i}=this.beans,n={...o.focusedHeader};let r,a;this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==i.get("enableRtl")?(a="Before",r=this.findHeader(n,a)):(a="After",r=this.findHeader(n,a));const l=i.getCallback("tabToNextHeader");if(t&&l){const c=o.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a});if(c){const{headerRowIndex:d}=o.focusedHeader||{};d!=null&&d!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=d)}return c}return r||!t?o.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:s}):this.focusNextHeaderRow(n,a,s)}focusNextHeaderRow(e,t,s){const o=this.beans,i=e.headerRowIndex;let n=null,r;const a=Qt(o),l=this.beans.visibleCols.allCols;if(t==="Before"){if(i<=0)return!1;n=Me(l),r=i-1,this.currentHeaderRowWithoutSpan-=1}else n=l[0],r=i+1,this.currentHeaderRowWithoutSpan<a?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:c,headerRowIndex:d}=Zf(this.beans,n,r);return d>=a&&(d=-1),o.focusSvc.focusHeaderPosition({headerPosition:{column:c,headerRowIndex:d},direction:t,fromTab:!0,allowUserOverride:!0,event:s})}scrollToColumn(e,t="After"){if(e.getPinned())return;let s;if(je(e)){const o=e.getDisplayedLeafColumns();s=t==="Before"?Me(o):o[0]}else s=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(s)}findHeader(e,t){const{colGroupSvc:s,visibleCols:o}=this.beans;let i=e.column;if(i instanceof ln){const l=i.getDisplayedLeafColumns();i=t==="Before"?l[0]:l[l.length-1]}const n=t==="Before"?o.getColBefore(i):o.getColAfter(i);if(!n)return;const r=o.headerGroupRowCount;if(e.headerRowIndex>=r)return{headerRowIndex:e.headerRowIndex,column:n};const a=s?.getColGroupAtLevel(n,e.headerRowIndex);return a?a.isPadding()&&n.isSpanHeaderHeight()?{headerRowIndex:o.headerGroupRowCount,column:n}:{headerRowIndex:e.headerRowIndex,column:a??n}:{headerRowIndex:n instanceof xo&&n.isSpanHeaderHeight()?o.headerGroupRowCount:e.headerRowIndex,column:n}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function oD(e,t,s){const o=s-1;if(e!=="filter"){const i=t instanceof xo&&t.isSpanHeaderHeight();let n=t.getParent();for(;n&&(n.getProvidedColumnGroup().getLevel()>o||i&&n.isPadding());)n=n.getParent();if(n)return i?{column:n,headerRowIndex:n.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:o}:{column:n,headerRowIndex:o,headerRowIndexWithoutSpan:o}}return{column:t,headerRowIndex:o,headerRowIndexWithoutSpan:o}}function iD(e,t,s){const o=t+1,i={column:e,headerRowIndex:o,headerRowIndexWithoutSpan:o};if(e instanceof ln){if(o>=s)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:s,headerRowIndexWithoutSpan:o};let r=e.getDisplayedChildren()[0];if(r instanceof ln&&r.isPadding()){const l=r.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(r=l)}i.column=r,r instanceof xo&&r.isSpanHeaderHeight()&&(i.headerRowIndex=s,i.headerRowIndexWithoutSpan=o)}return i}var nD=class extends A{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(BS(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(Ve(this.beans),yf)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=Ve(this.beans);return this.isDomDataPresentInHierarchy(e,Vr)?!0:this.isDomDataPresentInHierarchy(e,zr)}isDomDataPresentInHierarchy(e,t){let s=e;for(;s;){if(gp(this.gos,s,t))return!0;s=s.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:s,column:o}=e,i={rowIndex:t,rowPinned:s,column:o,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:s});return n&&(i.isFullWidthCell=n.isFullWidth()),i}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:s,rowPinned:o,forceBrowserFocus:i=!1,preventScrollOnBrowserFocus:n=!1,sourceEvent:r}=e,a=this.colModel.getCol(t);if(!a){this.focusedCell=null;return}this.focusedCell={rowIndex:s,rowPinned:us(o),column:a};const l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:i,preventScrollOnBrowserFocus:n,sourceEvent:r}),this.previousCellFocusParams=l}isCellFocused(e){return this.focusedCell==null?!1:Tf(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:s,pinned:o}}=e,{column:i,headerRowIndex:n}=this.focusedHeader;return t===i&&s===n&&o==i.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),ro(this.beans))return!1;const{direction:t,fromTab:s,allowUserOverride:o,event:i,fromCell:n,rowWithoutSpanValue:r,scroll:a=!0}=e;let{headerPosition:l}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(l);if(o){const c=this.focusedHeader,d=Qt(this.beans);if(s){const u=this.gos.getCallback("tabToNextHeader");u&&(l=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:c,headerPosition:l,headerRowCount:d}))}else{const u=this.gos.getCallback("navigateToNextHeader");if(u&&i){const h={key:i.key,previousHeaderPosition:c,nextHeaderPosition:l,headerRowCount:d,event:i};l=u(h)}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:i,fromCell:n,rowWithoutSpanValue:r,scroll:a}):!1}focusHeaderPositionFromUserFunc(e){if(ro(this.beans))return!1;const{userFunc:t,headerPosition:s,direction:o,event:i}=e,n=this.focusedHeader,r=Qt(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:o,currentPosition:n,headerPosition:s,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:o,event:i})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:s,currentPosition:o,headerPosition:i,headerRowCount:n}=e,a=t({backwards:s==="Before",previousHeaderPosition:o,nextHeaderPosition:i,headerRowCount:n});return a===!0?o:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:s,fromCell:o,rowWithoutSpanValue:i,event:n,scroll:r=!0}=e,{column:a,headerRowIndex:l}=t,{filterManager:c,ctrlsSvc:d,headerNavigation:u}=this.beans;if(this.focusedHeader&&iR(e.headerPosition,this.focusedHeader))return!1;if(l===-1)return c?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:a,event:n});r&&u?.scrollToColumn(a,s);const p=d.getHeaderRowContainerCtrl(a.getPinned())?.focusHeader(t.headerRowIndex,a,n)||!1;return u&&p&&(i!=null||o)&&(u.currentHeaderRowWithoutSpan=i??-1),p}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=Zf(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;const t=Qt(this.beans)-1,s=Me(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:s},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===us(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&fo(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:s=!0,event:o}=e;if(this.overlays?.isExclusive())return s&&this.focusOverlay(t);if(ma(this.beans))return t&&!ro(this.beans)?this.focusLastHeader():s&&this.focusOverlay(t)?!0:t?!1:ni(this.beans,t);const i=t?f2(this.beans):p2(this.beans);if(i){const n=e.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:a}=i,l=fs(this.beans,i);if(!n||!l||r==null)return!1;if(n.isSuppressNavigable(l)){const c=this.gos.get("enableRtl");let d;return!o||o.key===I.TAB?d=c?I.LEFT:I.RIGHT:d=o.key,this.beans.navigation?.navigateToNextCell(null,d,{rowIndex:r,column:n,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:r,column:n,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(i)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(i,t)||(this.setFocusedCell({rowIndex:r,column:n,rowPinned:us(a),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:r,rowPinned:a,column:n})),!0}return!!(s&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const s=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:s,headerRowIndex:Qt(this.beans)-1}}):this.focusGridView({column:s})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},rD=class extends A{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.horizontalScrollShowing=this.gos.get("alwaysShowHorizontalScroll")===!0,this.verticalScrollShowing=this.gos.get("alwaysShowVerticalScroll")===!0,this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),s=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==s)&&(this.horizontalScrollGap=t,this.verticalScrollGap=s,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),s=typeof e=="number"&&e>=0?e:kS();s!=null&&(this.scrollbarWidth=s,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},aD=class extends A{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:s}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),s.destroy(),super.destroy()}},vr=new Set(["gridPreDestroyed","fillStart","pasteStart"]),lD=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"],Ed=lD.reduce((e,t)=>(e[t]=S0(t),e),{}),Pi=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),cD={tag:"span",cls:"ag-sort-indicator-container",children:[Pi("Order","order"),Pi("Asc","ascending-icon"),Pi("Desc","descending-icon"),Pi("Mixed","mixed-icon"),Pi("None","none-icon")]},Dd=class extends ze{constructor(e){super(),this.eSortOrder=ne,this.eSortAsc=ne,this.eSortDesc=ne,this.eSortMixed=ne,this.eSortNone=ne,e||this.setTemplate(cD)}attachCustomElements(e,t,s,o,i){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=s,this.eSortMixed=o,this.eSortNone=i}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e);const s=this.updateIcons.bind(this),o=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",s),this.addManagedEventListeners({newColumnsLoaded:s,sortChanged:o,columnRowGroupChanged:o}),this.onSortChanged()}addInIcon(e,t,s){if(t==null)return;const o=Ot(e,this.beans,s);o&&t.appendChild(o)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:s,column:o,gos:i,beans:n}=this,r=n.sortSvc.getDisplaySortForColumn(o);if(e&&Be(e,r==="asc",{skipAriaHidden:!0}),t&&Be(t,r==="desc",{skipAriaHidden:!0}),s){const a=!o.getColDef().unSortIcon&&!i.get("unSortIcon"),l=r==null;Be(s,!a&&l,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:s}=this;this.addInIcon("sortUnSort",e,t);const o=t.getColDef().showRowGroup;Zt(s)&&o&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:s}=this;if(e){const o=t.sortSvc.getDisplaySortForColumn(s)==="mixed";Be(e,o,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:s}}=this;if(!e)return;const o=s.getColumnsWithSortingOrdered(),i=s.getDisplaySortIndexForColumn(t)??-1,n=o.some(a=>s.getDisplaySortIndexForColumn(a)??!1),r=i>=0&&n;Be(e,r,{skipAriaHidden:!0}),i>=0?e.textContent=(i+1).toString():mt(e)}},dD={selector:"AG-SORT-INDICATOR",component:Dd},dn=["asc","desc",null],uD=class extends A{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,s){const o=this.getNextSortDirection(e);this.setSortForColumn(e,o,t,s)}progressSortFromEvent(e,t){const o=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,o,"uiColumnSorted")}setSortForColumn(e,t,s,o){t!=="asc"&&t!=="desc"&&(t=null);const{gos:i,showRowGroupCols:n}=this.beans,r=Zt(i);let a=[e];if(r&&e.getColDef().showRowGroup){const u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(h=>h.isSortable());u&&(a=[e,...u])}for(const d of a)this.setColSort(d,t,o);const l=(s||i.get("alwaysMultiSort"))&&!i.get("suppressMultiSort"),c=[];if(!l){const d=this.clearSortBarTheseColumns(a,o);c.push(...d)}this.updateSortIndex(e),c.push(...a),this.dispatchSortChangedEvents(o,c)}updateSortIndex(e){const{gos:t,colModel:s,showRowGroupCols:o}=this.beans,i=Zt(t),n=o?.getShowRowGroupCol(e.getId()),r=i&&n||e,a=this.getColumnsWithSortingOrdered();s.forAllCols(d=>this.setColSortIndex(d,null));const l=a.filter(d=>i&&d.getColDef().showRowGroup?!1:d!==r);(r.getSort()?[...l,r]:l).forEach((d,u)=>this.setColSortIndex(d,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{t.getSort()&&(e=!0)}),e}dispatchSortChangedEvents(e,t){const s={type:"sortChanged",source:e};t&&(s.columns=t),this.eventSvc.dispatchEvent(s)}clearSortBarTheseColumns(e,t){const s=[];return this.beans.colModel.forAllCols(o=>{e.includes(o)||(o.getSort()&&s.push(o),this.setColSort(o,void 0,t))}),s}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??dn,s=t.indexOf(e.getSort()),o=s<0,i=s==t.length-1;return o||i?t[0]:t[s+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:s,rowGroupColsSvc:o}=this.beans;let i=[];if(t.forAllCols(c=>{c.getSort()&&i.push(c)}),t.isPivotMode()){const c=Zt(e);i=i.filter(d=>{const u=!!d.getAggFunc(),h=!d.isPrimary(),p=c?s?.getShowRowGroupCol(d.getId()):d.getColDef().showRowGroup;return u||h||p})}const n=o?.columns.filter(c=>!!c.getSort())??[],r={};i.forEach((c,d)=>r[c.getId()]=d),i.sort((c,d)=>{const u=c.getSortIndex(),h=d.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){const p=r[c.getId()],f=r[d.getId()];return p>f?1:-1}else return h==null?-1:1});const a=Zt(e)&&!!n.length;a&&(i=[...new Set(i.map(c=>s?.getShowRowGroupCol(c.getId())??c))]);const l=new Map;if(i.forEach((c,d)=>l.set(c,d)),a)for(const c of n){const d=s.getShowRowGroupCol(c.getId());l.set(c,l.get(d))}return l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=Zt(this.gos),s=!!e.getColDef().showRowGroup;return t&&s}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();const o=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,i=o[0].getSort();return o.every(r=>r.getSort()==i)?i:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,s){let o=0;e.addManagedListeners(t,{movingChanged:()=>{o=Date.now()}}),s&&e.addManagedElementListeners(s,{click:n=>{const r=t.isMoving(),l=Date.now()-o<50;r||l||this.progressSortFromEvent(t,n)}});const i=()=>{const n=t.getSort();if(e.toggleCss("ag-header-cell-sorted-asc",n==="asc"),e.toggleCss("ag-header-cell-sorted-desc",n==="desc"),e.toggleCss("ag-header-cell-sorted-none",!n),t.getColDef().showRowGroup){const l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(c=>t.getSort()==c.getSort());e.toggleCss("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:i,columnRowGroupChanged:i})}initCol(e){const{sort:t,initialSort:s,sortIndex:o,initialSortIndex:i}=e.colDef;t!==void 0?(t==="asc"||t==="desc")&&(e.sort=t):(s==="asc"||s==="desc")&&(e.sort=s),o!==void 0?o!==null&&(e.sortIndex=o):i!==null&&(e.sortIndex=i)}updateColSort(e,t,s){t!==void 0&&(t==="desc"||t==="asc"?this.setColSort(e,t,s):this.setColSort(e,void 0,s))}setColSort(e,t,s){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",s)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new Dd(e)}getSortIndicatorSelector(){return dD}},Xo={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function Ch(e){return`"${e}"`}var hD=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}}),gD={aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t})=>t?typeof e=="string"?Xo[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:Xo[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?Xo[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(s=>t.includes(s))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},pD=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:s})=>s?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,s)=>s.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:s})=>s==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:s})=>s==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:s})=>s==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const s=t.headerValueGetter;return typeof s=="function"||typeof s=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return es(262);if(t.smallLeft)return es(263);if(t.smallRight)return es(264)}return null}},sortingOrder:{validate:t=>{const s=t.sortingOrder;if(Array.isArray(s)&&s.length>0){const o=s.filter(i=>!dn.includes(i));if(o.length>0)return`sortingOrder must be an array with elements from [${dn.map(Mr).join()}], currently it includes [${o.map(Mr).join()}]`}else if(!Array.isArray(s)||s.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${s}`;return null}},type:{validate:t=>{const s=t.type;return s instanceof Array?s.some(i=>typeof i!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof s=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:s})=>s?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:s,cellSelection:o,suppressRowTransform:i,enableCellSpan:n,rowDragEntireRow:r,enableCellTextSelection:a})=>typeof s=="object"&&s?.mode==="singleRow"&&s?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":o?"colDef.spanRows is not supported with cellSelection.":i?"colDef.spanRows is not supported with suppressRowTransform.":n?r?"colDef.spanRows is not supported with rowDragEntireRow.":a?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:s={}},o){const i=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),n=[];for(const r of t.groupHierarchy??[]){if(typeof r=="object"){o.validation?.validateColDef(r);continue}!i.has(r)&&!(r in s)&&n.push(Ch(r))}if(n.length>0){const r=`The following parts of colDef.groupHierarchy are not recognised: ${n.join(", ")}.`,a=`Choose one of ${[...i].map(Ch).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${r}
19
+ ${a}`}return null}}}),fD={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0},mD=()=>Object.keys(fD),CD=()=>({objectName:"colDef",allProperties:mD(),docsUrl:"column-properties/",deprecations:hD(),validations:pD()}),vD=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],wD=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],bD=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],Xf=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],SD=["theme","rowSelection"],yD=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],Qf=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows"],xD=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],RD=()=>[...bD,...wD,...vD,...Xf,...xD,...Qf,...yD,...SD],FD=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}});function Ut(e,t,s){return typeof t=="number"||t==null?t==null||t>=s?null:`${e}: value should be greater than or equal to ${s}`:`${e}: value should be a number`}var ED={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},DD=()=>{const e={autoSizePadding:{validate({autoSizePadding:s}){return Ut("autoSizePadding",s,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:s}){return Ut("cacheBlockSize",s,1)}},cacheOverflowSize:{validate({cacheOverflowSize:s}){return Ut("cacheOverflowSize",s,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:s=>{const o=s.domLayout,i=["autoHeight","normal","print"];return o&&!i.includes(o)?`domLayout must be one of [${i.join()}], currently it's ${o}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:s,pinnedTopRowData:o,pinnedBottomRowData:i}){return s&&(o||i)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:s,isRowPinnable:o,pinnedTopRowData:i,pinnedBottomRowData:n}){return o&&(i||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!s&&o?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:s,isRowPinned:o,pinnedTopRowData:i,pinnedBottomRowData:n}){return o&&(i||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!s&&o?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:s={}},o,i){for(const n of Object.keys(s))i.validation?.validateColDef(s[n]);return null}},icons:{validate:({icons:s})=>{if(s){if(s.smallDown)return es(262);if(s.smallLeft)return es(263);if(s.smallRight)return es(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:s}){return Ut("infiniteInitialRowCount",s,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:s=>{if(typeof s.ssrmExpandAllAffectsAllRows=="boolean"){if(s.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(s.ssrmExpandAllAffectsAllRows&&typeof s.getRowId!="function")return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:s}){return Ut("keepDetailRowsCount",s,1)}},paginationPageSize:{validate({paginationPageSize:s}){return Ut("paginationPageSize",s,1)}},paginationPageSizeSelector:{validate:s=>{const o=s.paginationPageSizeSelector;return typeof o=="boolean"||o==null||o.length?null:`'paginationPageSizeSelector' cannot be an empty array.
20
+ If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:s}){return Ut("rowBuffer",s,0)}},rowClass:{validate:s=>typeof s.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:s}){return s&&typeof s=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':s&&typeof s!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":s&&s.mode!=="multiRow"&&s.mode!=="singleRow"?`Selection mode "${s.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:s=>{const o=s.rowStyle;return o&&typeof o=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:s}){return Ut("serverSideInitialRowCount",s,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:s=>{const o=s.sortingOrder;if(Array.isArray(o)&&o.length>0){const i=o.filter(n=>!dn.includes(n));if(i.length>0)return`sortingOrder must be an array with elements from [${dn.map(Mr).join()}], currently it includes [${i.map(Mr).join()}]`}else if(!Array.isArray(o)||o.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${o}`;return null}},tooltipHideDelay:{validate:s=>s.tooltipHideDelay&&s.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:s=>s.tooltipShowDelay&&s.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:s=>{const o=s.rowModelType??"clientSide";switch(o){case"clientSide":{const{treeDataChildrenField:i,treeDataParentIdField:n,getDataPath:r,getRowId:a}=s;if(!i&&!n&&!r)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(i){if(r)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(r)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const i=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${o} row model.`;return s.isServerSideGroup&&s.getServerSideGroupKey?null:i}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:s}){return Ut("viewportRowModelBufferSize",s,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:s}){return Ut("viewportRowModelPageSize",s,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:s,showOpenedGroup:o}){return s?.field&&o?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":s?.valueGetter&&o?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:s=>{const o=s.renderingMode,i=["default","legacy"];return o&&!i.includes(o)?`renderingMode must be one of [${i.join()}], currently it's ${o}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:s})=>{if(!s)return null;const o=["fitCellContents","fitGridWidth","fitProvidedWidth"],i=s.type;return i!=="fitCellContents"&&i!=="fitGridWidth"&&i!=="fitProvidedWidth"?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${o.map(n=>'"'+n+'"').join(", ")}, currently it's ${i}`:i==="fitProvidedWidth"&&typeof s.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${s.width}`:null}}},t={};for(const s of Qf)t[s]={expectedType:"boolean"};for(const s of Xf)t[s]={expectedType:"number"};return ht(t,e),t},PD=()=>({objectName:"gridOptions",allProperties:[...RD(),...Object.values(Ed)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:FD(),validations:DD()}),MD=0,TD=0,vh="__ag_grid_instance",ID=class extends A{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=TD++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new uo,this.globalEventHandlerFactory=e=>(t,s)=>{if(!this.isAlive())return;const o=vr.has(t);if(o&&!e||!o&&e||!kD(t))return;const i=(n,r)=>{const a=Ed[n],l=this.gridOptions[a];typeof l=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(r))};if(this.gridReadyFired)i(t,s);else if(t==="gridReady"){i(t,s),this.gridReadyFired=!0;for(const n of this.queueEvents)i(n.eventName,n.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:s})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??sp[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return q(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(s=>e(this.addCommon(s)))}updateGridOptions({options:e,force:t,source:s="api"}){const o={id:MD++,properties:[]},i=[],{gridOptions:n,validation:r}=this;for(const a of Object.keys(e)){const l=sd.applyGlobalGridOption(a,e[a]);r?.warnOnInitialPropertyUpdate(s,a);const c=t||typeof l=="object"&&s==="api",d=n[a];if(c||d!==l){n[a]=l;const u={type:a,currentValue:l,previousValue:d,changeSet:o,source:s};i.push(u)}}this.validateGridOptions(this.gridOptions),o.properties=i.map(a=>a.type);for(const a of i)go(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const s of Object.keys(e)){const o=e[s];if(o==null||o===!1)continue;let i=t[s];typeof i=="function"&&(i=i(e,this.gridOptions,this.beans)),i&&this.assertModuleRegistered(i,s)}}validateGridOptions(e){this.validateOptions(e,ED),this.validation?.processGridOptions(e)}validateColDef(e,t,s){(s||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,gD),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const s=Array.isArray(e)?e.some(o=>this.isModuleRegistered(o)):this.isModuleRegistered(e);return s||Pe(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),s}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:od(),rowModelType:this.get("rowModelType"),isUmd:t0()}}isModuleRegistered(e){return nc(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[vh]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const s=t[vh];if(q(s))return s===this.instanceId;t=t.parentElement}return!1}};function kD(e){return!!Ed[e]}function Jf(e){const t={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:t},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:t},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:t},e?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var AD=Jf(!0),LD=Jf(!1),OD=class extends ze{constructor(){super(...arguments),this.eFilter=ne,this.eFilterButton=ne,this.eSortIndicator=ne,this.eMenu=ne,this.eLabel=ne,this.eText=ne,this.eSortOrder=ne,this.eSortAsc=ne,this.eSortDesc=ne,this.eSortMixed=ne,this.eSortNone=ne,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const s={...e};ht(s,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(s)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const s=e.template;return s?s?.trim?s.trim():s:t?AD:LD}init(e){this.params=e;const{sortSvc:t,touchSvc:s,rowNumbersSvc:o,userCompFactory:i}=this.beans,n=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),s?.setupForHeader(this),this.setMenu(),this.setupSort(),o?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(i,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const s=CS(e,t,t);s&&(this.isLoadingInnerComponent=!0,s.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderComponent=o,this.eText&&this.eText.appendChild(o.getGui())):this.destroyBean(o))}))}setDisplayName(e){const{displayName:t}=e,s=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||s===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=ui(t))}addInIcon(e,t,s){const o=Ot(e,this.beans,s);o&&t.appendChild(o)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){Is(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:s}=this,o=Ft(e);this.addInIcon(o?"menu":"menuAlt",t,s.column),t.classList.toggle("ag-header-menu-icon",!o);const i=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=i,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(i)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:s}=this;t||this.toggleMenuAlwaysShow(!0),s.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:s,beans:o,eMenu:i,eFilterButton:n}=this,r=t.column,a=Ft(s);if(e&&!a){if(o.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??i??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(i??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:s}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:o,eSortOrder:i,eSortAsc:n,eSortDesc:r,eSortMixed:a,eSortNone:l}=this;o.attachCustomElements(i,n,r,a,l)}this.eSortIndicator.setupSort(s),this.currentSort&&e.setupHeader(this,s,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const s=()=>{const o=t.column.isFilterActive();Be(e,o,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,s,"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,s,o){if(!e)return Is(t),!1;const i=this.params.column;return this.addInIcon(o,t,i),this.addManagedListeners(i,{filterChanged:s}),s(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:s}=this;return e?t??s??this.getGui():s??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}},ND={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},HD=class extends ze{constructor(){super(ND),this.agOpened=ne,this.agClosed=ne,this.agLabel=ne,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:s}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),s?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&G(89)}workOutInnerHeaderGroupComponent(e,t){const s=wS(e,t,t);s&&(this.isLoadingInnerComponent=!0,s.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderGroupComponent=o,this.agLabel.appendChild(o.getGui())):this.destroyBean(o))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:s},beans:o}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const i=l=>{if(ps(l))return;const c=!s.isExpanded();o.colGroupSvc.setColumnGroupOpened(s.getProvidedColumnGroup(),c,"uiColumnExpanded")};this.addTouchAndClickListeners(o,t,i),this.addTouchAndClickListeners(o,e,i);const n=l=>{mo(l)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:i}),this.updateIconVisibility();const r=s.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,s){e.touchSvc?.setupForHeaderGroupElement(this,t,s),this.addManagedElementListeners(t,{click:s})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:s}}=this;if(s.isExpandable()){const o=s.isExpanded();Be(e,o),Be(t,!o)}else Be(e,!1),Be(t,!1)}addInIcon(e,t){const s=Ot(e,this.beans,null);s&&t.appendChild(s)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:s}=this;Be(t,!1),Be(s,!1)}}setupLabel(e){const{displayName:t,columnGroup:s}=e,o=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;q(t)&&!o&&(this.agLabel.textContent=ui(t)),this.toggleCss("ag-sticky-label",!s.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},GD={moduleName:"ColumnHeaderComp",version:K,userComponents:{agColumnHeader:OD},icons:{menu:"menu",menuAlt:"menu-alt"}},BD={moduleName:"ColumnGroupHeaderComp",version:K,userComponents:{agColumnGroupHeader:HD},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},VD=class extends A{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&G(92)}createTask(e,t,s,o,i=!1){this.verify();let n=s;o&&this.batchFrameworkComps&&(n="f1");const r={task:e,index:t,createOrder:++this.taskCount,deferred:i};this.addTaskToList(this[n],r),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((s,o)=>s.deferred!==o.deferred?s.deferred?-1:1:s.index!==o.index?t*(o.index-s.index):o.createOrder-s.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:s,f1:o,destroyTasks:i,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:a}=n,l=t.list,c=s.list,d=o.list,u=Date.now();let h=0;const p=e<=0,f=r.getScrollFeature();for(;p||h<e;){if(!f.scrollGridIfNeeded()){let v;if(l.length)this.sortTaskList(t),v=l.pop().task;else if(c.length)this.sortTaskList(s),v=c.pop().task;else if(d.length)a.wrapOutgoing(()=>{for(;(p||h<e)&&!f.scrollGridIfNeeded();){if(d.length)this.sortTaskList(o),v=d.pop().task,v();else break;h=Date.now()-u}}),v=()=>{};else if(i.length)v=i.pop();else break;v()}h=Date.now()-u}l.length||c.length||d.length||i.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);ws(this.beans,e)}isQueueEmpty(){return!this.ticking}},zD={moduleName:"AnimationFrame",version:K,beans:[VD]},WD=class extends A{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return Ot(e,this.beans,t?.column)}},_D=class extends A{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!no())return;const t=(s,o,i)=>{const{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget(i?.target??null);r?.column&&r.dispatchCellContextMenuEvent(i??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,i,n,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!no()||Xg("dblclick"))return!1;const o=Date.now(),i=o-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=o,i})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:s,menuSvc:o}=this.beans;if(t.get("suppressTouch"))return;const{params:i,eMenu:n,eFilterButton:r}=e,a=new qs(e.getGui(),!0);e.addDestroyFunc(()=>a.destroy());const l=e.shouldSuppressMenuHide(),c=l&&q(n)&&i.enableMenu;let d=a;if(c&&(d=new qs(n,!0),e.addDestroyFunc(()=>d.destroy())),i.enableMenu||o?.isHeaderContextMenuEnabled(i.column)){const u=c?"tap":"longTap",h=p=>i.showColumnMenuAfterMouseClick(p.touchStart);e.addManagedListeners(d,{[u]:h}),e.addManagedListeners(a,{longTap:h})}if(i.enableSorting){const u=h=>{const p=h.touchStart.target;l&&(n?.contains(p)||r?.contains(p))||s?.progressSort(i.column,!1,"uiColumnSorted")};e.addManagedListeners(a,{tap:u})}if(i.enableFilterButton&&r){const u=new qs(r,!0);e.addManagedListeners(u,{tap:()=>i.showFilter(r)}),e.addDestroyFunc(()=>u.destroy())}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const s=new qs(t.eGridHeader,!0),o=i=>t.showColumnMenuAfterMouseClick(i.touchStart);e.addManagedListeners(s,{longTap:o}),e.addDestroyFunc(()=>s.destroy())}}setupForHeaderGroupElement(e,t,s){const o=new qs(t,!0);e.addManagedListeners(o,{tap:s}),e.addDestroyFunc(()=>o.destroy())}mockContextMenu(e,t,s){if(!no())return;const o=new qs(t),i=n=>{on(this.beans,n.touchEvent)&&s(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(o,{longTap:i}),e.addDestroyFunc(()=>o.destroy())}},jD={moduleName:"Touch",version:K,beans:[_D]},UD=class extends A{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,s=!1){return s?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const s=e===I.UP,o=e===I.DOWN,i=e===I.LEFT;let n,r;const{pageBounds:a,gos:l,visibleCols:c,pinnedRowModel:d}=this.beans,{rowPinned:u}=t;if(s||o)u&&d?s?r=0:r=u==="top"?d.getPinnedTopRowCount()-1:d.getPinnedBottomRowCount()-1:r=s?a.getFirstRow():a.getLastRow(),n=t.column;else{const h=l.get("enableRtl");r=t.rowIndex,n=(i!==h?c.allCols:[...c.allCols].reverse()).find(f=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:f}))}return n?{rowIndex:r,rowPinned:u,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let s=t,o=!1;for(;!o;){switch(e){case I.UP:s=this.getCellAbove(s);break;case I.DOWN:s=this.getCellBelow(s);break;case I.RIGHT:s=this.gos.get("enableRtl")?this.getCellToLeft(s):this.getCellToRight(s);break;case I.LEFT:s=this.gos.get("enableRtl")?this.getCellToRight(s):this.getCellToLeft(s);break;default:s=null,G(8,{key:e});break}s?o=this.isCellGoodToFocusOn(s):o=!0}return s}isCellGoodToFocusOn(e){const t=e.column;let s;const{pinnedRowModel:o,rowModel:i}=this.beans;switch(e.rowPinned){case"top":s=o?.getPinnedTopRow(e.rowIndex);break;case"bottom":s=o?.getPinnedBottomRow(e.rowIndex);break;default:s=i.getRow(e.rowIndex);break}return s?!this.isSuppressNavigable(t,s):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,s=ih(this.beans,t,!0);return s?{rowIndex:s.rowIndex,column:e.column,rowPinned:s.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,s=Wr(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return s?{rowIndex:s.rowIndex,column:e.column,rowPinned:s.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:s}=this.beans,o=t.allCols;let i=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=o[0];const a=ih(this.beans,e,!0);if(Ge(a)||!a.rowPinned&&!(s?.isRowInPage(a.rowIndex)??!0))return null;i=a?a.rowIndex:null,n=a?a.rowPinned:null}return{rowIndex:i,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:s,pagination:o}=t,i=s.allCols;let n=e.rowIndex,r=e.rowPinned,a=s.getColBefore(e.column);if(!a){a=Me(i);const l=Wr(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(Ge(l)||!l.rowPinned&&!(o?.isRowInPage(l.rowIndex)??!0))return null;n=l?l.rowIndex:null,r=l?l.rowPinned:null}return{rowIndex:n,column:a,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:s}=e.colDef;if(typeof s=="boolean")return s;if(typeof s=="function"){const o=e.createColumnFunctionCallbackParams(t);return s(o)}return!1}};function $D(e){return e.focusSvc.getFocusedCell()}function KD(e){return e.focusSvc.clearFocusedCell()}function qD(e,t,s,o){e.focusSvc.setFocusedCell({rowIndex:t,column:s,rowPinned:o,forceBrowserFocus:!0})}function YD(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function ZD(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function XD(e,t,s=!1){const o=e.headerNavigation?.getHeaderPositionForColumn(t,s);o&&e.focusSvc.focusHeaderPosition({headerPosition:o})}var QD=class extends A{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new em,this.rowValidations=new tm,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const s=this.getEditRow(e);t?s.delete(t):s.clear(),s.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const s=e&&this.edits.get(e);if(s)return s;if(t.checkSiblings){const o=e.pinnedSibling;if(o)return this.getEditRow(o)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;const s=this.getEditRow(e),o=e.pinnedSibling,i=t&&o&&this.getEditRow(o);if(!s&&!i)return;const n=Object.assign({},e.data),r=(a,l)=>a.forEach(({pendingValue:c},d)=>{c!==Bt&&(l[d.getColId()]=c)});return s&&r(s,n),i&&r(i,n),n}getEdit(e,t){const s=this._getEdit(e);return t&&s?{...s}:s}_getEdit(e){if(!this.suspendEdits&&this.edits.size!==0)return e.rowNode&&e.column&&this.getEditRow(e.rowNode)?.get(e.column)}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((s,o)=>{const i=new Map;s.forEach(({editorState:n,...r},a)=>i.set(a,{...r})),t.set(o,i)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,s)=>{const o=new Map;t.forEach((i,n)=>o.set(n,{...i})),this.edits.set(s,o)})}setEdit(e,t){(this.edits.size===0||!this.edits.has(e.rowNode))&&this.edits.set(e.rowNode,new Map);const s=this._getEdit(e),o=Object.assign({editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...s,...t});return this.getEditRow(e.rowNode).set(e.column,o),o}clearEditValue(e){const{rowNode:t,column:s}=e;if(t)if(s){const o=this._getEdit(e);o&&(o.editorValue=void 0,o.pendingValue=o.sourceValue,o.state="changed")}else this.getEditRow(t)?.forEach(o=>{o.editorValue=void 0,o.pendingValue=o.sourceValue,o.state="changed"})}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((s,o)=>{for(const i of s.keys()){const{editorState:n,...r}=s.get(i);t.push({rowNode:o,column:i,...r})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:s,column:o}=e,{withOpenEditor:i}=t;if(s){const n=this.getEditRow(s,t);return n?o?i?this.getEdit(e)?.state==="editing":n.has(o)??!1:n.size!==0?i?Array.from(n.values()).some(({state:r})=>r==="editing"):!0:!1:!1}return i?this.getEditPositions().some(({state:n})=>n==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:s,column:o}=e;o&&!t.has(o)&&t.set(o,{editorValue:void 0,pendingValue:Bt,sourceValue:this.beans.valueSvc.getValue(o,s,!1,"api"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(s,t)}stop(e){this.hasEdits(e)&&(e?this.removeEdits(e):this.clear())}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},em=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:s}=e||{};return this.cellValidations?.get(t)?.get(s)}hasCellValidation(e){return!e?.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:s,column:o}=e;this.cellValidations.has(s)||this.cellValidations.set(s,new Map),this.cellValidations.get(s).set(o,t)}clearCellValidation(e){const{rowNode:t,column:s}=e;this.cellValidations.get(t)?.delete(s)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},tm=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function Pd(e,t={}){const{rowIndex:s,rowId:o,rowCtrl:i,rowPinned:n}=t;if(i)return i;const{rowModel:r,rowRenderer:a}=e;let{rowNode:l}=t;return l||(o?l=m2(e,o,n):s!=null&&(l=r.getRow(s))),a.getRowCtrls(l?[l]:[])?.[0]}function He(e,t={}){const{cellCtrl:s,colId:o,columnId:i,column:n}=t;if(s)return s;const r=e.colModel.getCol(o??i??Pc(n)),a=t.rowCtrl??Pd(e,t),l=a?.getCellCtrl(r)??void 0;if(l)return l;const c=t.rowNode??a?.rowNode;if(c)return e.rowRenderer.getCellCtrls([c],[r])?.[0]}function wh(e){const{editSvc:t}=e;t?.isBatchEditing()?Qo(e):t?.stopEditing(void 0,{source:"api"})}function JD(e,t,s){const{gos:o,popupSvc:i}=t;if(!o.get("stopEditingWhenCellsLoseFocus"))return;const n=r=>{const a=r.relatedTarget;if(gc(a)===null){wh(t);return}let l=s.some(c=>c.contains(a))&&o.isElementInThisInstance(a);l||(l=!!i&&(i.getActivePopups().some(c=>c.contains(a))||i.isElementWithinCustomPopup(a))),l||wh(t)};for(const r of s)e.addManagedElementListeners(r,{focusout:n})}function Pc(e){if(e)return typeof e=="string"?e:e.getColId()}var Bt=Symbol("unedited");function sm(e,t={}){const s=[],o=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns);for(const i of o){const n=i.comp?.getCellEditor();n&&s.push({ctrl:i,editor:an(n)})}return s}var e3=(e,t={})=>sm(e,t).map(s=>s.editor);function t3(e,t,s,o,i,n){t.length===0&&s?.rowNode&&s?.column&&ri(e,s,{key:o,event:i,cellStartedEdit:n});const{valueSvc:r,editSvc:a,editModelSvc:l}=e,{rowNode:c,column:d}=s??{};for(const u of t){const{rowNode:h,column:p}=u,f=He(e,u);if(!f){if(h&&p){const v=r.getValue(p,h,void 0,"api"),S=(s?.rowNode===h&&s?.column===p&&o||void 0)??a?.getCellDataValue(u,!1)??r.getValueForDisplay(p,h)?.value??v??Bt;l?.setEdit(u,{pendingValue:S,sourceValue:v,state:"editing"})}continue}const C=n&&c===f.rowNode&&f.column===d;ri(e,{rowNode:c,column:f.column},{key:C?o:null,event:C?i:null,cellStartedEdit:C&&n})}}function ds({pendingValue:e,sourceValue:t}){return e===Bt&&(e=t),e!==t}function ri(e,t,s){const o=e.gos.get("enableGroupEdit"),{key:i,event:n,cellStartedEdit:r,silent:a}=s??{},l=He(e,t),c=l?.comp?.getCellEditor(),d=im(e,t,i,r&&!a),u=e.editModelSvc?.getEdit(t);let h=d.value;if(h===void 0&&(h=u?.sourceValue),e.editModelSvc?.setEdit(t,{editorValue:h,state:"editing"}),c){c.refresh?.(d);return}const p=t.column.getColDef(),f=Op(e.userCompFactory,p,d),C=f?.popupFromSelector!=null?f.popupFromSelector:!!p.cellEditorPopup,v=f?.popupPositionFromSelector!=null?f.popupPositionFromSelector:p.cellEditorPopupPosition;if(nm(f.params,n),l){l.editCompDetails=f,l.onEditorAttachedFuncs.push(()=>l.rangeFeature?.unsetComp()),l.comp?.setEditDetails(f,C,v,e.gos.get("reactiveCustomComponents")),l?.rowCtrl?.refreshRow({suppressFlash:!0});const w=e.editModelSvc?.getEdit(t,!0);!a&&!w?.editorState?.cellStartedEditing&&(e.editSvc?.dispatchCellEvent(t,n,"cellEditingStarted",o?{value:h}:{}),e.editModelSvc?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}}function om(e,t,s){const o={editorValueExists:!1};if(Md(e)&&(t.getValidationErrors?.()?.length??0)>0||s?.isCancelling)return o;if(s?.isStopping){const n=t?.isCancelAfterEnd?.();if(n)return{...o,isCancelAfterEnd:n}}return{editorValue:t.getValue(),editorValueExists:!0}}function im(e,t,s,o){const{valueSvc:i,gos:n,editSvc:r}=e,a=e.gos.get("enableGroupEdit"),l=He(e,t),c=t.rowNode?.rowIndex??void 0,d=r?.isBatchEditing(),u=e.colModel.getCol(t.column.getId()),{rowNode:h,column:p}=t,f=l.comp?.getCellEditor(),C=r?.getCellDataValue(t,!1)??(f?om(e,f)?.editorValue:void 0),v=C===Bt?i.getValueForDisplay(u,h)?.value:C;return de(n,{value:a?C:v,eventKey:s??null,column:p,colDef:p.getColDef(),rowIndex:c,node:h,data:h.data,cellStartedEdit:o??!1,onKeyDown:l?.onKeyDown.bind(l),stopEditing:w=>{r.stopEditing(t,{source:d?"ui":"api",suppressNavigateAfterEdit:w}),_r(e,t)},eGridCell:l?.eGui,parseValue:w=>i.parseValue(u,h,w,l?.value),formatValue:l?.formatValue.bind(l),validate:()=>{r?.validateEdit()}})}function Mc(e,t){const{editModelSvc:s}=e;s?.getEditMap().forEach((o,i)=>{o.forEach((n,r)=>{!t&&(n.state==="editing"||n.pendingValue===Bt)||!ds(n)&&(n.state!=="editing"||t)&&s?.removeEdits({rowNode:i,column:r})})})}function s3(e,t){const s=t.comp?.getCellEditor();if(!s?.refresh)return;const{eventKey:o,cellStartedEdit:i}=t.editCompDetails.params,{column:n}=t,r=im(e,t,o,i),a=n.getColDef(),l=Op(e.userCompFactory,a,r);s.refresh(nm(l.params,o))}function nm(e,t){return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function Qs(e,t){for(const s of e.editModelSvc?.getEditPositions()??[]){const o=He(e,s);if(!o)continue;const i=o.comp?.getCellEditor();if(!i)continue;const{editorValue:n,editorValueExists:r,isCancelAfterEnd:a}=om(e,i,t);a&&e.editModelSvc?.setEdit(s,{editorState:{isCancelAfterEnd:a}}),wr(e,s,n,void 0,!r,t)}}function wr(e,t,s,o,i,n){const{editModelSvc:r,valueSvc:a}=e;if(!r)return;const{rowNode:l,column:c}=t;if(!(l&&c))return;let d=r.getEdit(t,!0);d?.sourceValue||(d=r.setEdit(t,{sourceValue:a.getValue(c,l,void 0,"api"),pendingValue:d?d.editorValue:Bt})),r.setEdit(t,{editorValue:i?d.sourceValue:s}),n?.persist&&o3(e,t)}function o3(e,t){const{editModelSvc:s}=e,o=s?.getEdit(t,!0);s?.setEdit(t,{pendingValue:o?.editorValue})}function Qo(e,t,s){t||(t=e.editModelSvc?.getEditPositions());for(const o of t??[])_r(e,o,s)}function _r(e,t,s){const o=e.gos.get("enableGroupEdit"),{editModelSvc:i}=e,n=He(e,t),r=i?.getEdit(t,!0);if(!n){r&&i?.setEdit(t,{state:"changed"});return}const{comp:a}=n;if(a&&!a.getCellEditor()){if(n?.refreshCell(),r){i?.setEdit(t,{state:"changed"});const c=o?bh(s,r):{valueChanged:!1,newValue:void 0,oldValue:r.sourceValue};Sh(e,t,c,s)}return}if(Md(e)){const c=a?.getCellEditor()?.getValidationErrors?.(),d=i?.getCellValidationModel();c?.length?d?.setCellValidation(t,{errorMessages:c}):d?.clearCellValidation(t)}i?.setEdit(t,{state:"changed"}),a?.setEditDetails(),a?.refreshEditStyles(!1,!1),n?.refreshCell({force:!0,suppressFlash:!0});const l=i?.getEdit(t);if(l&&l.state==="changed"){const c=o?bh(s,l):{valueChanged:ds(l)&&!s?.cancel,newValue:s?.cancel||l.editorState.isCancelAfterEnd?void 0:l?.editorValue??r?.pendingValue,oldValue:l?.sourceValue};Sh(e,t,c,s)}}function bh(e,t){return e?.cancel?{valueChanged:!1,oldValue:t.sourceValue,newValue:void 0,value:t.sourceValue}:{valueChanged:!1,oldValue:t.sourceValue,newValue:t.pendingValue,value:t.sourceValue}}function Sh(e,t,s,{silent:o,event:i}={}){const{editSvc:n,editModelSvc:r}=e,a=r?.getEdit(t),{editorState:l}=a||{},{isCancelBeforeStart:c}=l||{};!o&&!c&&(n?.dispatchCellEvent(t,i,"cellEditingStopped",s),r?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function Md(e){const{gos:t,colModel:s}=e,o=!!t.get("getFullRowEditValidationErrors"),i=s.getColumnDefs()?.filter(r=>r.editable).some(({cellEditorParams:r})=>{const{minLength:a,maxLength:l,getValidationErrors:c,min:d,max:u}=r||{};return a!==void 0||l!==void 0||c!==void 0||d!==void 0||u!==void 0}),n=e.gridApi.getCellEditorInstances().some(r=>r.getValidationElement||r.getValidationErrors);return i||o||n}function Co(e,t){if(!(t||Md(e)))return;const s=sm(e),o=new em,{ariaAnnounce:i,localeSvc:n,editModelSvc:r,gos:a}=e,l=a.get("editType")==="fullRow",d=Jg(n)("ariaValidationErrorPrefix","Cell Editor Validation");for(const h of s){const{ctrl:p,editor:f}=h,{rowNode:C,column:v}=p,w=f.getValidationErrors?.()??[],b=f.getValidationElement?.(!1)||!f.isPopup?.()&&p.eGui;if(b){const S=w!=null&&w.length>0,y=S?w.join(". "):"";fb(b,S),S&&i.announceValue(`${d} ${w}`,"editorValidation"),b instanceof HTMLInputElement?b.setCustomValidity(y):b.classList.toggle("invalid",S)}w?.length>0&&o.setCellValidation({rowNode:C,column:v},{errorMessages:w})}Qs(e,{persist:!1}),r?.setCellValidationModel(o);const u=new Set;for(const{ctrl:h}of s)u.add(h.rowCtrl);if(l){const h=i3(e);r?.setRowValidationModel(h)}for(const h of u.values()){h.rowEditStyleFeature?.applyRowStyles();for(const p of h.getAllCellCtrls())p.tooltipFeature?.refreshTooltip(!0),p.editorTooltipFeature?.refreshTooltip(!0),p.editStyleFeature?.applyCellStyles?.()}}var i3=e=>{const t=new tm,s=e.gos.get("getFullRowEditValidationErrors"),o=e.editModelSvc?.getEditMap();if(!o)return t;for(const i of o.keys()){const n=o.get(i);if(!n)continue;const r=[],{rowIndex:a,rowPinned:l}=i;for(const d of n.keys()){const u=n.get(d);if(!u)continue;const{editorValue:h,pendingValue:p,sourceValue:f}=u,C=h??(p===Bt?void 0:p)??f;r.push({column:d,colId:d.getColId(),rowIndex:a,rowPinned:l,oldValue:f,newValue:C})}const c=s?.({editorsState:r})??[];c.length>0&&t.setRowValidation({rowNode:i},{errorMessages:c})}return t};function n3(e){Co(e,!0);const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const s=[];return t.forEach((o,i)=>{o.forEach(({errorMessages:n},r)=>{s.push({column:r,rowIndex:i.rowIndex,rowPinned:i.rowPinned,messages:n??null})})}),s}function r3(e,t,s,{rowNode:o,column:i},n){return de(e.gos,{type:s,node:o,data:o.data,value:n,column:i,colDef:i.getColDef(),rowPinned:o.rowPinned,event:t,rowIndex:o.rowIndex})}function a3(e,t=!1){return e===I.DELETE?!0:!t&&e===I.BACKSPACE?Gp():!1}var l3=class extends A{constructor(e,t,s,o){super(),this.cellCtrl=e,this.rowNode=s,this.rowCtrl=o,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case I.ENTER:this.onEnterKeyDown(e);break;case I.F2:this.onF2KeyDown(e);break;case I.ESCAPE:this.onEscapeKeyDown(e);break;case I.TAB:this.onTabKeyDown(e);break;case I.BACKSPACE:case I.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case I.DOWN:case I.UP:case I.RIGHT:case I.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){const{cellCtrl:s,beans:o}=this;if(!o.editSvc?.isEditing(s,{withOpenEditor:!0})){if(e.shiftKey&&s.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const i=s.getFocusedCellPosition();o.navigation?.navigateToNextCell(e,t,i,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:s}=this.beans;if(!t)return;const o=t.extendLatestRangeInDirection(e);o&&(e.key===I.LEFT||e.key===I.RIGHT?s?.ensureColumnVisible(o.column):s?.ensureRowVisible(o.rowIndex))}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:s,beans:o,rowNode:i}=this,{gos:n,rangeSvc:r,eventSvc:a,editSvc:l}=o;if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),a3(e,n.get("enableCellEditingOnBackspace"))&&!l?.isEditing(s,{withOpenEditor:!0})){if(r&&As(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(s.isCellEditable()){const{column:c}=s,d=this.beans.valueSvc.getDeleteValue(c,i);i.setDataValue(c,d,"cellClear")}}else l?.isEditing(s,{withOpenEditor:!0})||o.editSvc?.startEditing(s,{startedEdit:!0,event:t});a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){const{cellCtrl:t,beans:s}=this,{editSvc:o,navigation:i}=s,n=o?.isEditing(t,{withOpenEditor:!0}),r=t.rowNode,a=o?.isRowEditing(r,{withOpenEditor:!0}),l=c=>{o?.startEditing(c,{startedEdit:!0,event:e,source:"edit"})&&e.preventDefault()};if(n||a){if(this.isCtrlEnter(e)){o?.applyBulkEdit(t,s?.rangeSvc?.getCellRanges()||[]);return}if(Co(s),o?.checkNavWithValidation(void 0,e)==="block-stop")return;o?.isEditing(t,{withOpenEditor:!0})?o?.stopEditing(t,{event:e,source:"edit"}):a&&!t.isCellEditable()?o?.stopEditing({rowNode:r},{event:e,source:"edit"}):l(t)}else if(s.gos.get("enterNavigatesVertically")){const c=e.shiftKey?I.UP:I.DOWN;i?.navigateToNextCell(null,c,t.cellPosition,!1)}else{if(o?.hasValidationErrors())return;o?.hasValidationErrors(t)&&o.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===I.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:s}}=this;s?.isEditing()&&(Co(this.beans),s?.checkNavWithValidation(void 0,e)==="block-stop")||s?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:s}}=this;s?.checkNavWithValidation(t,e)==="block-stop"&&s.revertSingleCellEdit(t),s?.stopEditing(t,{event:e,cancel:!0})}processCharacter(e){const s=e.target!==this.eGui,{beans:{editSvc:o},cellCtrl:i}=this;if(s||o?.isEditing(i,{withOpenEditor:!0}))return;if(e.key===I.SPACE)this.onSpaceKeyDown(e);else if(o?.isCellEditable(i,"ui")){if(o?.hasValidationErrors()&&!o?.hasValidationErrors(i))return;o?.startEditing(i,{startedEdit:!0,event:e,source:"api"}),!i.editCompDetails?.params?.suppressPreventDefault&&e.preventDefault()}}onSpaceKeyDown(e){const{gos:t,editSvc:s}=this.beans,{rowNode:o}=this.cellCtrl;!s?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&oo(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,o,"spaceKey"),e.preventDefault()}},c3=class extends A{constructor(e,t,s){super(),this.cellCtrl=e,this.column=s,this.beans=t}onMouseEvent(e,t){if(!ps(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:s,editSvc:o,editModelSvc:i,frameworkOverrides:n,gos:r}=this.beans,a=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:c,cellPosition:d,rowNode:u}=l,h=pr(r,c,u,e);s&&a&&!h&&s.getCellRangeCount(d)>1&&s.intersectLastRange(!0);const p=l.createEvent(e,"cellClicked");p.isEventHandlingSuppressed=h,t.dispatchEvent(p);const f=c.getColDef();if(f.onCellClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{f.onCellClicked(p)})},0),!h&&i?.getState(l)!=="editing"){const C=o?.isEditing(),v=i?.getCellValidationModel().getCellValidationMap().size??0,w=i?.getRowValidationModel().getRowValidationMap().size??0;if(C&&(v>0||w>0))return;o?.shouldStartEditing(l,e)?o?.startEditing(l,{event:e}):o?.shouldStopEditing(l,e)&&(this.beans.gos.get("editType")==="fullRow"?o?.stopEditing(l,{event:e,source:"edit"}):o?.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){const{column:t,beans:s,cellCtrl:o}=this,{eventSvc:i,frameworkOverrides:n,editSvc:r,editModelSvc:a,gos:l}=s,c=pr(l,o.column,o.rowNode,e),d=t.getColDef(),u=o.createEvent(e,"cellDoubleClicked");if(u.isEventHandlingSuppressed=c,i.dispatchEvent(u),typeof d.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{d.onCellDoubleClicked(u)})},0),!c&&r?.shouldStartEditing(o,e)&&a?.getState(o)!=="editing"){const h=r?.isEditing(),p=a?.getCellValidationModel().getCellValidationMap().size??0,f=a?.getRowValidationModel().getRowValidationMap().size??0;if(h&&(p>0||f>0))return;r?.startEditing(o,{event:e})}}onMouseDown(e){const{ctrlKey:t,metaKey:s,shiftKey:o}=e,i=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:c,focusSvc:d,gos:u,editSvc:h}=r,{column:p,rowNode:f,cellPosition:C}=n,v=pr(u,p,f,e),w=()=>{const x=n.createEvent(e,"cellMouseDown");x.isEventHandlingSuppressed=v,a.dispatchEvent(x)};if(v){w();return}if(this.isRightClickInExistingRange(e))return;const b=l&&!l.isEmpty(),S=this.containsWidget(i),y=hs(p);if(c&&y&&!c.handleMouseDownOnCell(C,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!o||!b){const x=h?.isEditing(n),E=u.get("enableCellTextSelection")&&e.defaultPrevented,D=(Hs()||E)&&!x&&!Vi(i)&&!S;n.focusCell(D,e)}if(o&&b&&!d.isCellFocused(C)){e.preventDefault();const x=d.getFocusedCell();if(x){const{column:R,rowIndex:E,rowPinned:D}=x;h?.isEditing(x)&&h?.stopEditing(x),d.setFocusedCell({column:R,rowIndex:E,rowPinned:D,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}if(!S){if(l){y&&e.preventDefault();const x=Fu(r,e)&&y;if(o)l.extendLatestRangeToCell(C);else if(!x){const R=t||s;l.setRangeToCell(C,R)}}w()}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const s=t.isCellInAnyRange(this.cellCtrl.cellPosition),o=Fu(this.beans,e);if(s&&o)return!0}return!1}containsWidget(e){return to(e,"ag-selection-checkbox",3)||to(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:s}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),s?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:s}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),s?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,s=t.contains(e.target),o=t.contains(e.relatedTarget);return s&&o}},d3=class extends A{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();Ns(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,s=e.getColSpan(t),o=[];if(s===1)o.push(e);else{let i=e;const n=e.getPinned();for(let r=0;i&&r<s&&(o.push(i),i=this.beans.visibleCols.getColAfter(i),!(!i||Ge(i)||n!==i.getPinned()));r++);}return o}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=Me(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,s=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const o=t.bodyWidth;return s+o+(e||0)}return s+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const s=io(this.beans)*this.rowSpan;this.eContent.style.height=`${s}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},u3="ag-cell",h3="ag-cell-auto-height",g3="ag-cell-normal-height",p3="ag-cell-focus",f3="ag-cell-first-right-pinned",m3="ag-cell-last-left-pinned",C3="ag-cell-not-inline-editing",v3="ag-cell-wrap-text",w3=0,Jo=class extends A{constructor(e,t,s,o){super(),this.column=e,this.rowNode=t,this.rowCtrl=o,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=s,this.gos=s.gos,this.editSvc=s.editSvc,this.hasEdit=!!s.editSvc;const{colId:i}=e;this.instanceId=i+"-"+w3++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new d3(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.editStyleFeature=e.editSvc?.createCellStyleFeature(this,e),this.mouseListener=new c3(this,e,this.column),this.keyboardListener=new l3(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&As(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this)),hs(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),Co(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,s,o,i,n,r){if(this.comp=e,this.eGui=t,this.printLayout=i,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(o,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer(),n&&this.isCellEditable()||this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0})?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const a of this.onCompAttachedFuncs)a();this.onCompAttachedFuncs=[]}}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:s,ctrlsSvc:o,eventSvc:i}=e,n=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const a=Iu(s,n,r);if(o.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let l;const c=new Re(u=>{l=u}),[d]=this.addManagedListeners(i,{bodyScrollEnd:()=>{l(),d()}});return{loadingComp:a,onReady:c}}return{loadingComp:a,onReady:Re.resolve()}}showValue(e,t){const{beans:s,column:o,rowNode:i,rangeFeature:n}=this,{userCompFactory:r}=s;let a=this.getValueToDisplay(),l;const c=i.stub&&i.groupData?.[o.getId()]==null,d=o.getColDef();if(c||this.isCellRenderer()){const u=this.createCellRendererParams();!c||hs(o)?l=Tu(r,d,u):l=Iu(r,d,u)}if(!l&&!c&&s.findSvc?.isMatch(i,o)){const u=this.createCellRendererParams();l=Tu(r,{...o.getColDef(),cellRenderer:"agFindCellRenderer"},u)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(i,{checkSiblings:!0})){const u=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:a});u&&(u.compDetails?l=u.compDetails:u.valueToDisplay&&(a=u.valueToDisplay))}this.comp.setRenderDetails(l,a,e),this.customRowDragComp?.refreshVisibility(),!t&&n&&ws(s,()=>n?.refreshHandle()),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){const e="ag-cell-value",t=this.column.getColDef().cellRenderer==="agCheckboxCellRenderer";let s="";return t&&(s=" ag-allow-overflow"),`${e}${s}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&xn(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:s}=this.beans.gridOptions,o=Tr(t),i=bs(this.column);return s==="custom"&&o!=="selectionColumn"&&i?!1:e.checkboxSelection||i&&typeof t=="object"&&$o(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),s=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),o=this.includeDndSource!=this.isIncludeControl(e.dndSource),i=this.isAutoHeight!=this.column.isAutoHeight();return t||s||o||i}onPopupEditorClosed(){const{editSvc:e}=this.beans;e?.isEditing(this,{withOpenEditor:!0})&&e?.stopEditing(this,{source:e?.isBatchEditing()?"ui":"api"})}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:s,rowNode:o,comp:i,eGui:n,beans:{valueSvc:r,gos:a,editSvc:l}}=this;return de(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(s,o).value,setValue:d=>l?.setDataValue({rowNode:o,column:s},d)||o.setDataValue(s,d),formatValue:this.formatValue.bind(this),data:o.data,node:o,pinned:s.getPinned(),colDef:s.getColDef(),column:s,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:i.getParentOfValue(),registerRowDragger:(d,u,h,p)=>this.registerRowDragger(d,u,p),setTooltip:(d,u)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,u),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){const{editSvc:t,comp:s}=this;!s?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell({force:e,suppressFlash:t,newData:s}={}){const{editStyleFeature:o,customStyleFeature:i,rowCtrl:{rowEditStyleFeature:n},beans:{cellFlashSvc:r,filterManager:a},column:l,comp:c,suppressRefreshCell:d,tooltipFeature:u}=this;if(d)return;const{field:h,valueGetter:p,showRowGroup:f,enableCellChangeFlash:C}=l.getColDef(),v=h==null&&p==null&&f==null,w=e||v||s,b=!!c,S=this.updateAndFormatValue(b),y=w||S;if(b){if(y){this.showValue(!!s,!1);const x=a?.isSuppressFlashingCellsBecauseFiltering();!t&&!x&&C&&r?.flashCell(this),o?.applyCellStyles?.(),i?.applyUserStyles(),i?.applyClassesFromColDef(),n?.applyRowStyles()}u?.refreshTooltip(),i?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,s=this.valueFormatted,{value:o,valueFormatted:i}=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode,!0);return this.value=o,this.valueFormatted=i,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=s:!0}valuesAreEqual(e,t){const s=this.column.getColDef();return s.equals?s.equals(e,t):e===t}addDomData(e){const t=this.eGui;po(this.beans.gos,t,Vr,this),e.addDestroyFunc(()=>po(this.beans.gos,t,Vr,null))}createEvent(e,t){const{rowNode:s,column:o,value:i,beans:n}=this;return r3(n,e,t,{rowNode:s,column:o},i)}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature?.getColSpanningList()??[]}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:s}=this;wf(e,t,s.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);_g(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){const s=this.editSvc?.allowedFocusTargetOnValidation(this);s&&s!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:s},comp:o}=this;if(!o||t?.isEditing(this)||!this.isCellFocused()||!s.shouldTakeFocus())return;const i=()=>{if(!this.isAlive())return;const n=o.getFocusableElement();this.isCellFocused()&&n.focus({preventScroll:!0})};if(e){setTimeout(i,0);return}i()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(hs(this.column)&&(e=!0),Rt(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(f3,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(m3,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(ma(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const s=this.isCellFocused(),o=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss(p3,s),s&&e?.forceBrowserFocus){let i=this.comp.getFocusableElement();if(o){const n=qo(i,null,!0);n.length&&(i=n[0])}i.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}s&&e&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:us(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(u3,!0),e.toggleCss(C3,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(h3,t),e.toggleCss(g3,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(v3,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),s=this.createEvent(e,"cellContextMenu"),{beans:o}=this;o.eventSvc.dispatchEvent(s),t.onCellContextMenu&&window.setTimeout(()=>{o.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(s)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(Ve(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,s){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const o=this.createRowDragComp(e,t,s);o&&(this.customRowDragComp=o,this.addDestroyFunc(()=>{this.beans.context.destroyBean(o),this.customRowDragComp=null}),o.refreshVisibility())}createRowDragComp(e,t,s){const o=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,s);if(o)return this.beans.context.createBean(o),o}cellEditorAttached(){for(const e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}};function Td(e,t,s,o,i,n){if(s==null&&t==null)return;const r={},a={},l=(c,d)=>{for(const u of c.split(" "))u.trim()!=""&&d(u)};if(s){const c=Object.keys(s);for(let d=0;d<c.length;d++){const u=c[d],h=s[u];let p;typeof h=="string"?p=e?e.evaluate(h,o):!0:typeof h=="function"&&(p=h(o)),l(u,f=>{p?r[f]=!0:a[f]=!0})}}if(t&&n)for(const c of Object.keys(t))l(c,d=>{r[d]||(a[d]=!0)});n&&Object.keys(a).forEach(n),Object.keys(r).forEach(i)}function yh(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var b3=class extends A{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const s=this.gos,o=r=>{if(typeof r=="string")e.push(r);else if(Array.isArray(r))for(const a of r)e.push(a)},i=s.get("rowClass");i&&o(i);const n=s.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},a=n(r);o(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,s=>{e.push(s)},()=>{})}processRowClassRules(e,t,s){const{gos:o,expressionSvc:i}=this.beans,n=de(o,{data:e.data,node:e,rowIndex:e.rowIndex});Td(i,void 0,o.get("rowClassRules"),n,t,s)}processStylesFromGridOptions(e){const t=this.gos,s=t.get("rowStyle"),o=t.getCallback("getRowStyle");let i;if(o){const n={data:e.data,node:e,rowIndex:e.rowIndex};i=o(n)}if(i||s)return Object.assign({},s,i)}},S3=0,jr=class extends A{constructor(e,t,s,o,i){super(),this.rowNode=e,this.useAnimationFrameForCreate=o,this.printLayout=i,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+S3++,this.rowId=Bi(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=yh(this.rowNode),this.setRowType(),this.setAnimateFlags(s),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this,t),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Bi(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,s,o){const{context:i,focusSvc:n}=this.beans;o=vn(this,i,o);const r={rowComp:e,element:t,containerType:s,compBean:o};this.allRowGuis.push(r),this.updateGui(s,r),this.initialiseRowComp(r);const a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,c=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!c&&!a.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const d=this.fullWidthGui?.element;d&&!this.beans.editSvc?.isEditing(this)&&n.isRowFocused(a.rowIndex,a.rowPinned)&&n.shouldTakeFocus()&&setTimeout(()=>d.focus({preventScroll:!0}),0)}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";for(const s of this.allRowGuis)s.element.style.display=t}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),oo(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const s=e.rowComp,o=this.getInitialRowClasses(e.containerType);for(const i of o)s.toggleCss(i,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&oc(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(s),this.setRowCompRowBusinessKey(s),po(t,e.element,zr,this),e.compBean.addDestroyFunc(()=>po(t,e.element,zr,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Bi(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(ic(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(ic(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const s=this.createBean(t,this.beans.context);this.rowDragComps.push(s),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(o=>o!==s),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(s,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),s=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(s)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:s,beans:{visibleCols:o}}=this,i=!!e||!o.isPinningLeft(),n=!!t,r=!!s||!o.isPinningRight();return i&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),s=this.gos.get("masterDetail")&&this.rowNode.detail,o=this.beans.colModel.isPivotMode(),i=Cp(this.gos,this.rowNode,o);e?this.rowType="FullWidthLoading":s?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":i?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:s}=this.beans;if(!s?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(s.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new Jo(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,s=null){const o={list:[],map:{}},i=(c,d,u)=>{u!=null?o.list.splice(u,0,d):o.list.push(d),o.map[c]=d},n=[];for(const c of t){const d=c.getInstanceId();let u=e.map[d];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(c)),u&&i(d,u)}for(const c of e.list){const d=c.column.getInstanceId();if(o.map[d]!=null)continue;!this.isCellEligibleToBeRemoved(c,s)?n.push([d,c]):c.destroy()}if(n.length)for(const[c,d]of n){const u=o.list.findIndex(p=>p.column.getLeft()>d.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);i(c,d,h)}const{focusSvc:r,visibleCols:a}=this.beans,l=r.getFocusedCell();if(l&&l.column.getPinned()==s){const c=l.column.getInstanceId();if(!o.map[c]&&a.allCols.includes(l.column)){const u=this.createFocusedCellCtrl();if(u){const h=o.list.findIndex(f=>f.column.getLeft()>u.column.getLeft()),p=h===-1?void 0:Math.max(h-1,0);i(c,u,p)}}}return o}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,s=e.getFocusedCell();if(!s)return;const o=t?.getCellSpan(s.column,this.rowNode);if(o){if(o.firstNode!==this.rowNode||!o.doesSpanContain(s))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(s.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(const t of this.allRowGuis){const s=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(s,e)}}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const s=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,s);const o=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,o,"left");const i=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,i,"right")}}isCellEligibleToBeRemoved(e,t){const{column:i}=e;if(i.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{visibleCols:n,editSvc:r}=this.beans,a=r?.isEditing(e),l=e.isCellFocused();return a||l?!(n.allCols.indexOf(i)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||ot(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=q(this.rowNode.oldRowTop),{visibleCols:s}=this.beans,o=s.isPinningLeft(),i=s.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=o,n.right=i}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=o,n.right=i}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,a)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,a).params):!0,t=e(this.fullWidthGui,null),s=e(this.centerGui,null),o=e(this.leftGui,"left"),i=e(this.rightGui,"right");return t&&s&&o&&i}addListeners(){const{beans:e,gos:t,rowNode:s}=this,{expansionSvc:o,eventSvc:i,context:n,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...o?.getRowExpandedListeners(this)??{}}),s.detail&&this.addManagedListeners(s.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(s,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(i,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:a})=>{a&&!s.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(const l of this.allRowGuis)this.addRowDraggerToRow(l);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,n)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(const t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}for(const s of this.getAllCellCtrls())s.refreshCell(e);for(const s of this.allRowGuis)this.setRowCompRowId(s.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(s.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:"none",s=t==="above",o=t==="inside",i=t==="below",r=this.gos.get("treeData")&&(i||s),a=this.rowNode.uiLevel.toString();for(const l of this.allRowGuis){const c=l.rowComp;c.toggleCss("ag-row-highlight-above",s),c.toggleCss("ag-row-highlight-inside",o),c.toggleCss("ag-row-highlight-below",i),c.toggleCss("ag-row-highlight-indent",r),r?l.element.style.setProperty("--ag-row-highlight-level",a):l.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const e=this.rowNode.dragging;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:us(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:s,column:o}=t;if(!(s.element===e.target))return;const r=this.rowNode,{focusSvc:a,navigation:l}=this.beans,c=a.getFocusedCell(),d={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:c?.column??o};l?.navigateToNextCell(e,e.key,d,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||ps(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),s=t?t.element:null,o=s===e.target,i=Ve(this.beans);let n=!1;s&&i&&(n=s.contains(i)&&i.classList.contains("ag-cell"));let r=null;!o&&!n&&(r=Ro(this.beans,s,!1,e.shiftKey)),(this.isFullWidth()&&o||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>Cs(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(const s of this.allRowGuis)Rt(s.element,"tabindex",t)}onFullWidthRowFocused(e){const t=this.rowNode,s=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1;let o;if(this.fullWidthGui)o=this.fullWidthGui.element;else{const n=this.beans.colModel.getCol(e?.column)?.pinned;n?o=n==="right"?this.rightGui?.element:this.leftGui?.element:o=this.centerGui?.element}o&&(o.classList.toggle("ag-full-width-focus",s),s&&e?.forceBrowserFocus&&o.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const s={list:[],map:{}};for(const o of e.list)o!==t&&(s.list.push(o),s.map[o.column.getInstanceId()]=o);return s}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:s}=this;return de(this.gos,{type:e,node:s,data:s.data,rowIndex:s.rowIndex,rowPinned:s.rowPinned,event:t})}createRowEventWithSource(e,t){const s=this.createRowEvent(e,t);return s.source=this,s}onRowDblClick(e){if(ps(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),s=this.getColumnForFullWidth(t);if(!(!t||!s))return{rowGui:t,column:s}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=to(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:s}=this.beans;t?.removeAllCellRanges();const o=this.findFullWidthInfoForEvent(e);if(!o)return;const{rowGui:i,column:n}=o,r=i.element,a=e.target,l=this.rowNode;let c=e.defaultPrevented||Hs();r&&r.contains(a)&&Vi(a)&&(c=!1),s.setFocusedCell({rowIndex:l.rowIndex,column:n,rowPinned:l.rowPinned,forceBrowserFocus:c})}isSuppressMouseEvent(e){const{gos:t,rowNode:s}=this;if(this.isFullWidth()){const i=this.findFullWidthRowGui(e.target);return Cx(t,i?.rowComp.getFullWidthCellRendererParams(),s,e)}const o=bd(t,e.target);return o!=null&&pr(t,o.column,s,e)}onRowClick(e){if(ps(e)||this.lastMouseDownOnDragger)return;const s=this.isSuppressMouseEvent(e),{eventSvc:o,selectionSvc:i}=this.beans,n=this.createRowEventWithSource("rowClicked",e);n.isEventHandlingSuppressed=s,o.dispatchEvent(n),!s&&i?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:s,rowNode:o}=this,i=de(s,{fullWidth:!0,data:o.data,node:o,value:o.key,valueFormatted:o.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,a,l,c)=>this.addFullWidthRowDragging(r,a,l,c),setTooltip:(r,a)=>{s.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(r,a)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return xS(n,i);case"FullWidthGroup":{const{value:r,valueFormatted:a}=this.beans.valueSvc.getValueForDisplay(void 0,this.rowNode,!0);return i.value=r,i.valueFormatted=a,yS(n,i)}case"FullWidthLoading":return SS(n,i);default:return bS(n,i)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,s="",o){const{rowDragSvc:i,context:n}=this.beans;if(!i||!this.isFullWidth())return;const r=i.createRowDragComp(()=>s,this.rowNode,void 0,e,t,o);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){const e=yh(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,s="ag-row-level-"+this.rowLevel;for(const o of this.allRowGuis)o.rowComp.toggleCss(t,!0),o.rowComp.toggleCss(s,!1)}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(const s of this.allRowGuis)s.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(const s of this.allRowGuis)s.rowComp.toggleCss("ag-row-last",t)}}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(const t of e)for(const s of this.allRowGuis)s.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0)},e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,s=>s.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),s=this.isFullWidth(),{rowNode:o,beans:i}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(o.rowIndex%2===0?"ag-row-even":"ag-row-odd"),o.isRowPinned()&&(n.push("ag-row-pinned"),i.pinnedRowModel?.isManual()&&n.push("ag-row-pinned-manual")),!o.isRowPinned()&&o.pinnedSibling&&n.push("ag-row-pinned-source"),o.isSelected()&&n.push("ag-row-selected"),o.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),o.stub&&n.push("ag-row-loading"),s&&n.push("ag-full-width-row"),i.expansionSvc?.addExpandedCss(n,o),o.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=i;return r&&(r.processClassesFromGridOptions(n,o),r.preProcessRowClassRules(n,o)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),s&&(t==="left"&&n.push("ag-cell-last-left-pinned"),t==="right"&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:s}=e,{rowNode:o,beans:i,gos:n}=this;s.addManagedListeners(t,{pointerenter:r=>{r.pointerType==="mouse"&&o.dispatchRowEvent("mouseEnter")},pointerleave:r=>{r.pointerType==="mouse"&&o.dispatchRowEvent("mouseLeave")}}),s.addManagedListeners(o,{mouseEnter:()=>{!i.dragSvc?.dragging&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),o.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(s=>s.element);for(const s of t)s.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),s=this.applyPaginationOffset(t.top,!0)-100,o=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(s,e),o)}forEachGui(e,t){if(e)t(e);else for(const s of this.allRowGuis)t(s)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,s=this.beans.environment.getDefaultRowHeight(),i=hp(this.gos)?ks(this.beans,this.rowNode).height:void 0,n=i?`${Math.min(s,i)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,n&&r.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&Uo(this.gos)&&!t.sticky)if(t.rowTop!=null){const i=this.roundRowTopToBounds(t.rowTop);this.setRowTop(i)}else for(const i of this.allRowGuis)i.rowComp.toggleCss("ag-opacity-zero",!0);this.fullWidthGui?.element.contains(Ve(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const s=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(s),this.beans.eventSvc.dispatchEvent(s),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const e=t=>{for(const s of t.list)s.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const s=this.beans.pageBounds.getPixelOffset();return e+s*(t?1:-1)}setRowTop(e){if(!this.printLayout&&q(e)){const t=this.applyPaginationOffset(e),i=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(i)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let s;if(t.sticky)s=t.stickyRowTop;else{const o=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,i=this.applyPaginationOffset(o);s=t.isRowPinned()?i:this.beans.rowContainerHeight.getRealPixelPosition(i)}return s+"px"}setRowTopStyle(e){for(const t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let s=null;for(const o of this.getAllCellCtrls())o.column==e&&(s=o);if(s!=null||t)return s;for(const o of this.getAllCellCtrls())o?.getColSpanningList().indexOf(e)>=0&&(s=o);return s}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const s=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),o=this.rowNode.rowIndex%2===0,i=s+this.rowNode.rowIndex+1;this.forEachGui(e,n=>{n.rowComp.setRowIndex(t),n.rowComp.toggleCss("ag-row-even",o),n.rowComp.toggleCss("ag-row-odd",!o),Wg(n.element,i)})}},y3=class extends A{constructor(){super(),this.beanName="navigation",this.onPageDown=bu(this.onPageDown,100),this.onPageUp=bu(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const s=e.key,o=e.altKey,i=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=jx(this.gos,e);let a=!1;switch(s){case I.PAGE_HOME:case I.PAGE_END:!i&&!o&&(this.onHomeOrEndKey(s),a=!0);break;case I.LEFT:case I.RIGHT:case I.UP:case I.DOWN:if(!r)return!1;i&&!o&&!n&&(this.onCtrlUpDownLeftRight(s,r),a=!0);break;case I.PAGE_DOWN:case I.PAGE_UP:!i&&!o&&(a=this.handlePageUpDown(s,r,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,s){return s&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===I.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:s,focusIndex:o,focusColumn:i,isAsync:n,rowPinned:r}){const{scrollFeature:a}=this.gridBodyCon;q(s)&&!s.isPinned()&&a.ensureColumnVisible(s),q(e)&&a.ensureIndexVisible(e,t),n||a.ensureIndexVisible(o);const{focusSvc:l,rangeSvc:c}=this.beans;l.setFocusedCell({rowIndex:o,column:i,rowPinned:r,forceBrowserFocus:!0}),c?.setRangeToCell({rowIndex:o,rowPinned:r,column:i})}onPageDown(e){const t=this.beans,s=Ll(t),o=this.getViewportHeight(),{pageBounds:i,rowModel:n,rowAutoHeight:r}=t,a=i.getPixelOffset(),l=s.top+o,c=n.getRowIndexAtPixel(l+a);r?.active?this.navigateToNextPageWithAutoHeight(e,c):this.navigateToNextPage(e,c)}onPageUp(e){const t=this.beans,s=Ll(t),{pageBounds:o,rowModel:i,rowAutoHeight:n}=t,r=o.getPixelOffset(),a=s.top,l=i.getRowIndexAtPixel(a+r);n?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,s=!1){const{pageBounds:o,rowModel:i}=this.beans,n=this.getViewportHeight(),r=o.getFirstRow(),a=o.getLastRow(),l=o.getPixelOffset(),c=i.getRow(e.rowIndex),d=s?c?.rowHeight-n-l:n-l,u=c?.rowTop+d;let h=i.getRowIndexAtPixel(u+l);if(h===e.rowIndex){const f=s?-1:1;t=h=e.rowIndex+f}let p;s?(p="bottom",h<r&&(h=r),t<r&&(t=r)):(p="top",h>a&&(h=a),t>a&&(t=a)),this.isRowTallerThanView(i.getRow(h))&&(t=h,p="top"),this.navigateTo({scrollIndex:t,scrollType:p,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,s=!1){this.navigateTo({scrollIndex:t,scrollType:s?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const o=this.getNextFocusIndexForAutoHeight(e,s);this.navigateTo({scrollIndex:t,scrollType:s?"bottom":"top",scrollColumn:null,focusIndex:o,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const s=t?-1:1,o=this.getViewportHeight(),{pageBounds:i,rowModel:n}=this.beans,r=i.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=r;){const c=n.getRow(l);if(c){const d=c.rowHeight??0;if(a+d>o)break;a+=d}l+=s}return Math.max(0,Math.min(l,r))}getViewportHeight(){const e=this.beans,t=Ll(e),s=this.beans.scrollVisibleSvc.getScrollbarWidth();let o=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(o-=s),o}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const s=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),o=this.getNormalisedPosition(s),{rowIndex:i,rowPinned:n,column:r}=o??s,a=r;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:a,focusIndex:i,focusColumn:a,rowPinned:n})}onHomeOrEndKey(e){const t=e===I.PAGE_HOME,{visibleCols:s,pageBounds:o,rowModel:i}=this.beans,n=s.allCols,r=t?o.getFirstRow():o.getLastRow(),a=i.getRow(r);if(!a)return;const l=(t?n:[...n].reverse()).find(c=>!c.isSuppressNavigable(a));l&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:l,focusIndex:r,focusColumn:l})}onTabKeyDown(e,t){const s=t.shiftKey,o=this.tabToNextCellCommon(e,s,t),i=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:a,gos:l}=i;if(o!==!1){o?t.preventDefault():o===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(s);return}if(s){const{rowIndex:c,rowPinned:d}=e.getRowPosition();(d?c===0:c===r.getFirstRow())&&(l.get("headerHeight")===0||ro(i)?ni(i,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof Jo&&e.focusCell(!0),(a.focusOverlay(!1)||ni(i,s))&&t.preventDefault()}tabToNextCell(e,t){const s=this.beans,{focusSvc:o,rowRenderer:i}=s,n=o.getFocusedCell();if(!n)return!1;let r=Wo(s,n);return!r&&(r=i.getRowByPosition(n),!r?.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t,"api")}tabToNextCellCommon(e,t,s,o="ui"){const{editSvc:i,focusSvc:n}=this.beans;let r;const a=e instanceof Jo?e:e.getAllCellCtrls()?.[0];return i?.isEditing()?r=i?.moveToNextCell(a,t,s,o):r=this.moveToNextCellNotEditing(e,t,s),r===null?r:r||!!n.focusedHeader}moveToNextCellNotEditing(e,t,s){const o=this.beans.visibleCols.allCols;let i;if(e instanceof jr){if(i={...e.getRowPosition(),column:t?o[0]:Me(o)},this.gos.get("embedFullWidthRows")&&s){const r=e.findFullWidthInfoForEvent(s);r&&(i.column=r.column)}}else i=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(i,{backwards:t,startEditing:!1});if(n===!1)return null;if(n instanceof Jo)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return q(n)}findNextCellToFocusOn(e,{backwards:t,startEditing:s,skipToNextEditableCell:o}){let i=e;const n=this.beans,{cellNavigation:r,gos:a,focusSvc:l,rowRenderer:c,rangeSvc:d}=n;for(;;){e!==i&&(e=i),t||(i=this.getLastCellOfColSpan(i)),i=r.getNextTabbedCell(i,t);const u=a.getCallback("tabToNextCell");if(q(u)){const C=u({backwards:t,editing:s,previousCellPosition:e,nextCellPosition:i||null});if(C===!0)i=e;else{if(C===!1)return!1;i={rowIndex:C.rowIndex,column:C.column,rowPinned:C.rowPinned}}}if(!i)return null;if(i.rowIndex<0){const f=Qt(n);return l.focusHeaderPosition({headerPosition:{headerRowIndex:f+i.rowIndex,column:i.column},fromCell:!0}),null}const h=a.get("editType")==="fullRow";if(s&&(!h||o)&&!this.isCellEditable(i))continue;this.ensureCellVisible(i);const p=Wo(n,i);if(!p){const f=c.getRowByPosition(i);if(!f||!f.isFullWidth()||s)continue;return{...f.getRowPosition(),column:i?.column}}if(!r.isSuppressNavigable(p.column,p.rowNode))return p.setFocusedCellPosition(i),d?.setRangeToCell(i),p}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:s,rowModel:o}=this.beans;return t==="top"?s?.getPinnedTopRow(e):t==="bottom"?s?.getPinnedBottomRow(e):o.getRow(e)}navigateToNextCell(e,t,s,o){let i=s,n=!1;const r=this.beans,{cellNavigation:a,focusSvc:l,gos:c}=r;for(;i&&(i===s||!this.isValidNavigateCell(i));)c.get("enableRtl")?t===I.LEFT&&(i=this.getLastCellOfColSpan(i)):t===I.RIGHT&&(i=this.getLastCellOfColSpan(i)),i=a.getNextCellToFocus(t,i),n=Ge(i);if(n&&e&&e.key===I.UP&&(i={rowIndex:-1,rowPinned:null,column:s.column}),o){const u=c.getCallback("navigateToNextCell");if(q(u)){const p=u({key:t,previousCellPosition:s,nextCellPosition:i||null,event:e});q(p)?i={rowPinned:p.rowPinned,rowIndex:p.rowIndex,column:p.column}:i=null}}if(!i)return;if(i.rowIndex<0){const u=Qt(r);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+i.rowIndex,column:s.column},event:e||void 0,fromCell:!0});return}const d=this.getNormalisedPosition(i);d?this.focusPosition(d):this.tryToFocusFullWidthRow(i)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const s=Wo(this.beans,e);return s?(e=s.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:s,rowRenderer:o,focusSvc:i,eventSvc:n}=this.beans,r=s.allCols;if(!o.getRowByPosition(e)?.isFullWidth())return!1;const l=i.getFocusedCell(),c={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Me(r):r[0])};this.focusPosition(c);const d=t??(l!=null&&h2(c,l));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:c.rowIndex,rowPinned:c.rowPinned,column:c.column,isFullWidthCell:!0,fromBelow:d}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:s}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),s?.setRangeToCell(e)}isValidNavigateCell(e){return!!fs(this.beans,e)}getLastCellOfColSpan(e){const t=Wo(this.beans,e);if(!t)return e;const s=t.getColSpanningList();return s.length===1?e:{rowIndex:e.rowIndex,column:Me(s),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=pp(this.gos),s=this.beans.rowModel.getRow(e.rowIndex),o=t&&s?.sticky,{scrollFeature:i}=this.gridBodyCon;!o&&Ge(e.rowPinned)&&i.ensureIndexVisible(e.rowIndex),e.column.isPinned()||i.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function Ll(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var x3={moduleName:"KeyboardNavigation",version:K,beans:[y3,UD,sD],apiFunctions:{getFocusedCell:$D,clearFocusedCell:KD,setFocusedCell:qD,setFocusedHeader:XD,tabToNextCell:YD,tabToPreviousCell:ZD}},R3=class extends A{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:s}=this.beans;t?t.calculatePages():e.calculateBounds(0,s.getRowCount()-1)}},F3=class extends A{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,s=e?.rowTop??0,o=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:s,pageLastPixel:o}}calculateBounds(e,t){const{rowModel:s}=this.beans,o=s.getRowBounds(e);o&&(o.rowIndex=e),this.topRowBounds=o;const i=s.getRowBounds(t);i&&(i.rowIndex=t),this.bottomRowBounds=i,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},E3=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",D3=class extends A{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const s of this.elements)s&&(Be(s,t),Jt(s,e))}},P3=class extends A{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:s}=this.beans,o=ot(e,"print"),i=o?0:t.getColsLeftWidth(),n=o?0:t.getDisplayedColumnsRightWidth();i!=this.leftWidth&&(this.leftWidth=i,s.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,s.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=sn(e);if(t<=50)return;const s=this.getPinnedColumnsOverflowingViewport(t-50),o=this.gos.getCallback("processUnpinnedColumns"),{columns:i,hasLockedPinned:n}=s;let r=i;!r.length&&!n||(o&&(r=o({columns:r,viewportWidth:t})),r?.length&&(r=r.filter(a=>!hs(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new D3(e,t)}setColsPinned(e,t,s){const{colModel:o,colAnimation:i,visibleCols:n,gos:r}=this.beans;if(!o.cols||!e?.length)return;if(ot(r,"print")){G(37);return}i?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];for(const c of e){if(!c)continue;const d=o.getCol(c);d&&d.getPinned()!==a&&(this.setColPinned(d,a),l.push(d))}l.length&&(n.refresh(s),Mp(this.eventSvc,l,s)),i?.finish()}initCol(e){const{pinned:t,initialPinned:s}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,s)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const s=e.pinned==="left",o=e.pinned==="right";e.hidden=!0;const i=()=>{const n=s?this.leftWidth:this.rightWidth;if(n==null)return;const r=n==0,a=e.hidden!==r,l=this.gos.get("enableRtl"),c=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(l&&s||!l&&o)?n+c:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),a&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:i,rightPinnedWidthChanged:i,scrollVisibilityChanged:i,scrollbarWidthChanged:i})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:o,rightWidth:i}=this,n=sn(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(o+i+e>n)if(n>o+i)e=n-o-i;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,s=this.leftWidth??0,o=t+s;let i=!1;if(o<e)return{columns:[],hasLockedPinned:i};const{visibleCols:n}=this.beans,r=[...n.leftCols],a=[...n.rightCols];let l=0,c=0;const d=0,u=[];let h=o-d-e;for(;(c<r.length||l<a.length)&&h>0;){if(l<a.length){const p=a[l++];if(p.colDef.lockPinned){i=!0;continue}h-=p.getActualWidth(),u.push(p)}if(c<r.length&&h>0){const p=r[c++];if(p.colDef.lockPinned){i=!0;continue}h-=p.getActualWidth(),u.push(p)}}return{columns:u,hasLockedPinned:i}}},M3={moduleName:"PinnedColumn",version:K,beans:[P3],css:[E3]},T3=class extends A{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=st(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=Qe(e),s=this.descriptionContainer=t.createElement("div");s.classList.add("ag-aria-description-container"),Vg(s,"polite"),pb(s,"additions text"),gb(s,!0),e.eGridDiv.appendChild(s)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}​`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(mt(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},I3={moduleName:"Aria",version:K,beans:[T3]},k3=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",xh="ag-delay-render",A3=class extends A{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(xh)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;const{renderStatus:t,ctrlsSvc:s}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}s.getGridBodyCtrl().eGridBody.classList.remove(xh),this.alreadyRevealed=!0}},L3={moduleName:"ColumnDelayRender",version:K,beans:[A3],css:[k3]};function O3(e){e.overlays?.showLoadingOverlay()}function N3(e){e.overlays?.showNoRowsOverlay()}function H3(e){e.overlays?.hideOverlay()}var G3=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",B3={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},rm=class extends ze{constructor(){super(B3),this.eOverlayWrapper=ne,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(G3)}handleKeyDown(e){if(e.key!==I.TAB||e.defaultPrevented||ps(e))return;const t=this.beans;if(Ro(t,this.eOverlayWrapper,!1,e.shiftKey))return;let o=!1;e.shiftKey?o=t.focusSvc.focusGridView({column:Me(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):o=ni(t,!1),o&&e.preventDefault()}updateLayoutClasses(e,t){const s=this.eOverlayWrapper.classList,{AUTO_HEIGHT:o,NORMAL:i,PRINT:n}=gr;s.toggle(o,t.autoHeight),s.toggle(i,t.normal),s.toggle(n,t.print)}postConstruct(){this.createManagedBean(new vd(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,s,o){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),s&&this.isGridFocused()){const i=Ve(this.beans);i&&!Ng(this.beans)&&(this.elToFocusAfter=i)}e.then(i=>{if(this.activePromise!==e){this.activeOverlay!==i&&(this.destroyBean(i),i=null);return}if(this.activePromise=null,!!i){if(this.activeOverlay!==i&&(this.eOverlayWrapper.appendChild(i.getGui()),this.activeOverlay=i,o)){const n=i;this.updateListenerDestroyFunc=this.addManagedPropertyListener(o,({currentValue:r})=>{n.refresh?.(de(this.gos,{...r??{}}))})}s&&this.isGridFocused()&&fo(this.eOverlayWrapper)}})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.isGridFocused()&&(t=null);const s=this.updateListenerDestroyFunc;s&&(s(),this.updateListenerDestroyFunc=null),this.destroyBean(e),mt(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=Ve(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},V3={selector:"AG-OVERLAY-WRAPPER",component:rm},z3=class extends A{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=We(this.gos),this.isServerSide=!this.isClientSide&&yo(this.gos);const e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.refreshWrapperPadding.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.eWrapper=e,this.updateOverlayVisibility()}isVisible(){return this.state!==0&&!!this.eWrapper}isExclusive(){return this.state===1&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos,t=e.get("loading");!t&&(t!==void 0||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){G(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return V3}getOverlayWrapperCompClass(){return rm}updateOverlayVisibility(){if(!this.eWrapper){this.state=0;return}const{state:e,isClientSide:t,isServerSide:s,beans:{gos:o,colModel:i,rowModel:n}}=this;let r=this.gos.get("loading");r!==void 0&&(this.showInitialOverlay=!1),this.showInitialOverlay&&r===void 0&&!o.get("suppressLoadingOverlay")&&(r=!o.get("columnDefs")||!i.ready||!o.get("rowData")&&t),r?e!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&n.isEmpty()&&!o.get("suppressNoRowsOverlay")?e!==2&&this.doShowNoRowsOverlay():(e===1||!s&&e!==0)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(ES(this.beans.userCompFactory,de(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(DS(this.beans.userCompFactory,de(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,s){const o=e?.newAgStackInstance()??null;this.eWrapper?.showOverlay(o,t,this.isExclusive(),s),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){const e=this.eWrapper;if(!e)return;let t=0;this.state===2&&(t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},W3={moduleName:"Overlay",version:K,userComponents:{agLoadingOverlay:hR,agNoRowsOverlay:pR},apiFunctions:{showLoadingOverlay:O3,showNoRowsOverlay:N3,hideOverlay:H3},beans:[z3]},_3=class extends A{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=IS(),go(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;go(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),s=e/t;return this.maxScrollY*s}},j3=400,U3=class extends A{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{for(const n of this.getAllCellCtrls())n.onCellSelectionChanged()},t=()=>{for(const n of this.getAllCellCtrls())n.updateRangeBordersIfRangeCount()},s=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},o=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>o()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{As(this.gos)?s():o()}),As(this.gos)&&s()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",o=>this.onSuppressCellFocusChanged(o.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:o,previousValue:i})=>{(!i&&o||i&&!o)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:s}=this.beans;if(s&&this.addManagedPropertyListener("showOpenedGroup",()=>{const o=s.getShowRowGroupCols();o.length&&this.refreshCells({columns:o,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const o=this.gridBodyCtrl;o.setStickyTopHeight(0),o.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=ot(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new $3(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),s=this.cachedRowCtrls?.getEntries()??[];t.length>0||s.length>0?this.allRowCtrls=[...e,...t,...s]:this.allRowCtrls=e}isCellBeingRendered(e,t){const s=this.rowCtrlsByRowIndex[e];return!t||!s?!!s:s.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!s.getCellCtrl(t)||!s.isRowRendered()}updateCellFocus(e){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(e?.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t)for(const s of this.getAllCellCtrls())t.onFlashCells(s,e)},columnHoverChanged:()=>{for(const e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(const e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.getCols();for(const t of e){const s=l=>{for(const c of this.getAllCellCtrls())c.column===t&&l(c)},o=()=>{s(l=>l.onLeftChanged())},i=()=>{s(l=>l.onWidthChanged())},n=()=>{s(l=>l.onFirstRightPinnedChanged())},r=()=>{s(l=>l.onLastLeftPinnedChanged())},a=()=>{s(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",o),t.__addEventListener("widthChanged",i),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",o),t.__removeEventListener("widthChanged",i),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",a)})}}onDomLayoutChanged(){const e=ot(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),s=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,s&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];for(const s of this.getAllRowCtrls()){const o=s.getCellCtrl(e,!0)?.eGui;o&&t.push(o)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,s){const{pinnedRowModel:o,beans:i,printLayout:n}=this,r=Object.fromEntries(e.map(l=>[l.rowNode.id,l]));o?.forEachPinnedRow(t,(l,c)=>{const d=e[c];d&&o.getPinnedRowById(d.rowNode.id,t)===void 0&&(d.destroyFirstPass(),d.destroySecondPass()),l.id in r&&s?(e[c]=r[l.id],delete r[l.id]):e[c]=new jr(l,i,!1,!1,n)});const a=(t==="top"?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount())??0;e.length=a}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const s=o=>{const i=o[e.rowIndex];i&&i.rowNode===e&&(i.destroyFirstPass(),i.destroySecondPass(),o[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":s(this.topRowCtrls);break;case"bottom":s(this.bottomRowCtrls);break;default:s(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(const o of e??[])this.redrawRow(o,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const s=!e.domLayoutChanged&&!!e.recycleRows,o=e.animate&&Uo(this.gos),i=s?this.getRowsToRecycle():null;s||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n,gos:r}=this;if(n){n.checkStickyRows();const a=n.extraTopHeight+n.extraBottomHeight;a&&this.updateContainerHeights(a)}this.recycleRows(i,o),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?s:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,s=this.gos.get("suppressScrollOnNewData");t&&!s&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let s=this.pageBounds.getCurrentPageHeight();s===0&&(s=1),t.setModelHeight(s+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(es(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,s=this.findPositionToFocus(e);if(!s){t.focusHeaderPosition({headerPosition:{headerRowIndex:Qt(this.beans)-1,column:e.column}});return}if(e.rowIndex!==s.rowIndex||e.rowPinned!=s.rowPinned){t.setFocusedCell({...s,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(de(this.gos,{...s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:s}=this.beans;let o=e;for(o.rowPinned==null&&t&&s&&!t.isRowInPage(o.rowIndex)&&(o={rowPinned:null,rowIndex:s.getFirstRow()});o;){if(o.rowPinned==null&&s)if(o.rowIndex<s.getFirstRow()){if(o=Wr(this.beans,{rowPinned:null,rowIndex:0}),!o)return null}else o.rowIndex>s.getLastRow()&&(o={rowPinned:null,rowIndex:s.getLastRow()});const i=this.getRowByPosition(o);if(i?.isAlive())return{...i.getRowPosition(),column:e.column};o=Wr(this.beans,o)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),s=t.length;for(let o=0;o<s;o++){const i=t[o].getAllCellCtrls(),n=i.length;for(let r=0;r<n;r++)e.push(i[r])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),s=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...s,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,s){const o=this.rowCtrlsByRowIndex[t];o&&o.addEventListener(e,s)}refreshCells({rowNodes:e,columns:t,force:s,suppressFlash:o}={}){const i={force:s,newData:!1,suppressFlash:o};for(const n of this.getCellCtrls(e,t))n.refreshOrDestroyCell(i);this.refreshFullWidth(e)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const s of this.getRowCtrls(e)){if(!s.isFullWidth())continue;s.refreshFullWidth()||(t=!0,this.redrawRow(s.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=Tc(e),s=this.getAllRowCtrls();return!e||!t?s:s.filter(o=>{const i=o.rowNode;return Ic(i,t)})}getCellCtrls(e,t){let s;q(t)&&(s={},t.forEach(i=>{const n=this.colModel.getCol(i);q(n)&&(s[n.getId()]=!0)}));const o=[];for(const i of this.getRowCtrls(e))for(const n of i.getAllCellCtrls()){const r=n.column.getId();s&&!s[r]||o.push(n)}return o}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const s of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[s].rowNode.id==null&&e.push(s);this.removeRowCtrls(e);const t={};for(const s of Object.values(this.rowCtrlsByRowIndex)){const o=s.rowNode;t[o.id]=s}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const s of e){const o=this.rowCtrlsByRowIndex[s];o&&(o.destroyFirstPass(t),o.destroySecondPass()),delete this.rowCtrlsByRowIndex[s]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:s}=this.beans,{afterScroll:o}=e;let i;const n=this.stickyRowFeature;n&&(i=t?.getFocusCellToUseAfterRefresh()||void 0);const r=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(n){l=n.checkStickyRows();const d=n.extraTopHeight+n.extraBottomHeight;d&&this.updateContainerHeights(d)}const c=this.firstRenderedRow!==r||this.lastRenderedRow!==a;if(!(o&&!l&&!c)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,o),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(o&&!l),i!=null)){const d=t?.getFocusCellToUseAfterRefresh();i!=null&&d==null&&(s?.flushAllFrames(),this.restoreFocusedCell(i))}}removeRowCompsNotToDraw(e,t){const s={};for(const n of e)s[n]=!0;const i=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!s[n]);this.removeRowCtrls(i,t)}calculateIndexesToDraw(e){const t=[];for(let r=this.firstRenderedRow;r<=this.lastRenderedRow;r++)t.push(r);const s=this.beans.pagination,o=this.beans.focusSvc?.getFocusedCell()?.rowIndex;o!=null&&(o<this.firstRenderedRow||o>this.lastRenderedRow)&&(!s||s.isRowInPage(o))&&o<this.rowModel.getRowCount()&&t.push(o);const i=r=>{const a=r.rowNode.rowIndex;a==null||a===o||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(a)};for(const r of Object.values(this.rowCtrlsByRowIndex))i(r);if(e)for(const r of Object.values(e))i(r);t.sort((r,a)=>r-a);const n=[];for(let r=0;r<t.length;r++){const a=t[r],l=this.rowModel.getRow(a);l&&!l.sticky&&n.push(a)}return n}recycleRows(e,t=!1,s=!1){const o=this.calculateIndexesToDraw(e);(this.printLayout||s)&&(t=!1),this.removeRowCompsNotToDraw(o,!t);for(const i of o)this.createOrUpdateRowCtrl(i,e,t,s);if(e){const{animationFrameSvc:i}=this.beans;i?.active&&s&&!this.printLayout?i.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),s=e.isPinningRight();(this.pinningLeft!==t||s!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=s,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];for(const t of this.getFullWidthRowCtrls()){const s=t.rowNode.rowIndex;e.push(s.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=Tc(e);return this.getAllRowCtrls().filter(s=>{if(!s.isFullWidth())return!1;const o=s.rowNode;return!(t!=null&&!Ic(o,t))})}createOrUpdateRowCtrl(e,t,s,o){let i,n=this.rowCtrlsByRowIndex[e];if(n||(i=this.rowModel.getRow(e),q(i)&&q(t)&&t[i.id]&&i.alreadyRendered&&(n=t[i.id],t[i.id]=null)),!n)if(i||(i=this.rowModel.getRow(e)),q(i))n=this.createRowCon(i,s,o);else return;i&&(i.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n}destroyRowCtrls(e,t){const s=[];if(e){for(const o of Object.values(e))if(o){if(this.cachedRowCtrls&&o.isCacheable()){this.cachedRowCtrls.addRow(o);continue}if(o.destroyFirstPass(!t),t){const i=o.instanceId;this.zombieRowCtrls[i]=o,s.push(()=>{o.destroySecondPass(),delete this.zombieRowCtrls[i]})}else o.destroySecondPass()}}t&&(s.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const o of s)o()},j3))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=io(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:s}=this;e.updateOffset();let o,i;if(!s.isRowsToRender())o=0,i=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),o=t.getFirstRow(),i=t.getLastRow();else{const d=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let p=!1,f,C;do{const y=t.getPixelOffset(),{pageFirstPixel:x,pageLastPixel:R}=t.getCurrentPagePixelRange(),E=e.divStretchOffset,D=u.getVScrollPosition(),T=D.top,k=D.bottom;h?(f=x+E,C=R+E):(f=Math.max(T+y-d,x)+E,C=Math.min(k+y+d,R)+E),this.firstVisibleVPixel=Math.max(T+y,x)+E,this.lastVisibleVPixel=Math.min(k+y,R)+E,p=this.ensureAllRowsInRangeHaveHeightsCalculated(f,C)}while(p);let v=s.getRowIndexAtPixel(f),w=s.getRowIndexAtPixel(C);const b=t.getFirstRow(),S=t.getLastRow();v<b&&(v=b),w>S&&(w=S),o=v,i=w}const n=ot(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);n&&!r&&i-o>a&&(i=o+a);const l=o!==this.firstRenderedRow,c=i!==this.lastRenderedRow;(l||c)&&(this.firstRenderedRow=o,this.lastRenderedRow=i,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:o,lastRow:i}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,ws(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const s=this.pinnedRowModel?.ensureRowHeightsValid(),o=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:i,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,i.getFirstRow(),i.getLastRow());return(r||o)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),o||r||s?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const o=e.rowNode,i=this.focusSvc.isRowFocused(o.rowIndex,o.rowPinned),n=this.editSvc?.isEditing(e),r=o.detail;return i||n||r?!!this.isRowPresent(o):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,s){const o=this.cachedRowCtrls?.getRow(e)??null;if(o)return o;const i=s&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new jr(e,this.beans,t,i,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(o=>o.rowNode),t=this.getStickyTopRowCtrls().map(o=>o.rowNode),s=this.getStickyBottomRowCtrls().map(o=>o.rowNode);return[...t,...e,...s]}getRowByPosition(e){let t;const{rowIndex:s}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[s];break;case"bottom":t=this.bottomRowCtrls[s];break;default:t=this.rowCtrlsByRowIndex[s],t||(t=this.getStickyTopRowCtrls().find(o=>o.rowNode.rowIndex===s)||null,t||(t=this.getStickyBottomRowCtrls().find(o=>o.rowNode.rowIndex===s)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const o=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!o}},$3=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e?.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,s=this.entriesMap[t];delete this.entriesMap[t],zt(this.entriesList,s)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],zt(this.entriesList,e)}getEntries(){return this.entriesList}};function Tc(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const s of e){const o=s.id;switch(s.rowPinned){case"top":t.top[o]=s;break;case"bottom":t.bottom[o]=s;break;default:t.normal[o]=s;break}}return t}function Ic(e,t){const s=e.id;switch(e.rowPinned){case"top":return t.top[s]!=null;case"bottom":return t.bottom[s]!=null;default:return t.normal[s]!=null}}var K3=class extends A{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=Zt(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=Zt(e))}doFullSort(e,t){const s=e.map((o,i)=>({currentPos:i,rowNode:o}));return s.sort(this.compareRowNodes.bind(this,t)),s.map(o=>o.rowNode)}compareRowNodes(e,t,s){const o=t.rowNode,i=s.rowNode;for(let n=0,r=e.length;n<r;n++){const a=e[n],l=a.sort==="desc",c=this.getValue(o,a.column),d=this.getValue(i,a.column);let u;const h=this.getComparator(a,o);if(h?u=h(c,d,o,i,l):u=rb(c,d,this.isAccentedSort),!isNaN(u)&&u!==0)return a.sort==="asc"?u:u*-1}return t.currentPos-s.currentPos}getComparator(e,t){const s=e.column,o=s.getColDef().comparator;if(o!=null)return o;if(!s.getColDef().showRowGroup)return;const i=!t.group&&s.getColDef().field;if(!i)return;const n=this.beans.colModel.getColDefCol(i);if(n)return n.getColDef().comparator}getValue(e,t){const{valueSvc:s,colModel:o,showRowGroupCols:i,gos:n}=this.beans;if(!this.primaryColumnsSortGroups)return s.getValue(t,e,!1);if(e.rowGroupColumn===t){if(mp(n,o.isPivotActive())){const c=e.data?e:of(e.childrenAfterGroup);return c&&s.getValue(t,c,!1)}const l=i?.getShowRowGroupCol(t.getId());return l?e.groupData?.[l.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return s.getValue(t,e,!1)}};function q3(e){e.sortSvc?.onSortChanged("api")}var am={moduleName:"Sort",version:K,beans:[uD,K3],apiFunctions:{onSortChanged:q3},userComponents:{agSortIndicator:Dd},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},Y3=class extends A{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:s}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),s.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),go(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,Ko(e.source))}}};function Z3(e){e.valueCache?.expire()}function X3(e,t){const{colKey:s,rowNode:o,useFormatter:i}=t,n=e.colModel.getColDefCol(s)??e.colModel.getCol(s);if(Ge(n))return null;const r=e.valueSvc.getValueForDisplay(n,o,i);return i?r.valueFormatted??ui(r.value):r.value}var Q3="paste",J3=class extends A{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;We(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:s}=this.beans;if(e.source===Q3||t.get("suppressChangeDetection"))return;const o=e.node,i=[o],n=this.clientSideRowModel,r=n?.rootNode;if(r&&!o.isRowPinned()){const a=t.get("aggregateOnlyChangedColumns"),l=new cn(a,r);l.addParentNode(o.parent,[e.column]),n.doAggregate(l),l.forEachChangedNodeDepthFirst(c=>{i.push(c),c.sibling&&i.push(c.sibling)})}s.refreshCells({rowNodes:i})}},eP=class extends A{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);Pe(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(s){return Pe(16,{expression:e,params:t,e:s}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const s=this.createFunctionBody(e),o=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",s);return t[e]=o,o}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},tP=class extends A{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,s){if(this.active){const o=this.cacheVersion;e.__cacheVersion!==o&&(e.__cacheVersion=o,e.__cacheData={}),e.__cacheData[t]=s}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},sP={moduleName:"ValueCache",version:K,beans:[tP],apiFunctions:{expireValueCache:Z3}},oP={moduleName:"Expression",version:K,beans:[eP]},iP={moduleName:"ChangeDetection",version:K,beans:[J3]},nP={moduleName:"CellApi",version:K,apiFunctions:{getCellValue:X3}},rP=class extends A{constructor(){super(...arguments),this.beanName="valueSvc",this.hasEditSvc=!1,this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.hasEditSvc=!!e.editSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=yo(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t,s=!1,o=!1,i="ui"){const{showRowGroupColValueSvc:n}=this.beans,r=!e&&t.group,a=e?.colDef.showRowGroup,l=!this.isTreeData||t.footer;if(n&&l&&(r||a)){const C=n.getGroupValue(t,e);if(C==null)return{value:null,valueFormatted:null};if(!s)return{value:C.value,valueFormatted:null};const v=n.formatAndPrefixGroupColValue(C,e,o);return{value:C.value,valueFormatted:v}}if(!e)return{value:t.key,valueFormatted:null};const c=t.leafGroup&&this.colModel.isPivotMode(),d=t.group&&t.expanded&&!t.footer&&!c,u=this.gos.get("groupSuppressBlankHeader")||!t.sibling,h=d&&!u,p=this.getValue(e,t,h,i),f=s&&!(o&&e.colDef.useValueFormatterForExport===!1);return{value:p,valueFormatted:f?this.formatValue(e,t,p):null}}getValue(e,t,s=!1,o="ui"){if(this.initialised||this.init(),!t)return;const i=e.getColDef(),n=i.field,r=e.getColId(),a=t.data;if(this.hasEditSvc&&o==="ui"){const C=this.editSvc;if(C.isEditing()){const v=C.getCellDataValue({rowNode:t,column:e},!0);if(v!==void 0)return v}}let l;const c=i.showRowGroup;if(typeof c=="string"&&(this.beans.rowGroupColsSvc?.getColumnIndex(c)??-1)>t.level)return null;const d=typeof c!="string"||!t.group,u=t.groupData&&r in t.groupData,h=!s&&t.aggData&&t.aggData[r]!==void 0,p=this.isSsrm&&s&&!!i.aggFunc,f=this.isSsrm&&t.footer&&t.field&&(i.showRowGroup===!0||i.showRowGroup===t.field);if(this.isTreeData&&h)l=t.aggData[r];else if(this.isTreeData&&i.valueGetter)l=this.executeValueGetter(i.valueGetter,a,e,t);else if(this.isTreeData&&n&&a)l=$i(a,n,e.isFieldContainsDots());else if(u)l=t.groupData[r];else if(h)l=t.aggData[r];else if(i.valueGetter&&!p){if(!d)return l;l=this.executeValueGetter(i.valueGetter,a,e,t)}else if(f)l=$i(a,t.field,e.isFieldContainsDots());else if(n&&a&&!p){if(!d)return l;l=$i(a,n,e.isFieldContainsDots())}if(this.cellExpressions&&typeof l=="string"&&l.indexOf("=")===0){const C=l.substring(1);l=this.executeValueGetter(C,a,e,t)}return l}parseValue(e,t,s,o){const i=e.getColDef(),n=i.valueParser;if(q(n)){const r=de(this.gos,{node:t,data:t?.data,oldValue:o,newValue:s,colDef:i,column:e});return typeof n=="function"?n(r):this.expressionSvc?.evaluate(n,r)}return s}getDeleteValue(e,t){return q(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t).value)??null:null}formatValue(e,t,s,o,i=!0){const{expressionSvc:n}=this.beans;let r=null,a;const l=e.getColDef();if(o?a=o:i&&(a=l.valueFormatter),a){const c=t?t.data:null,d=de(this.gos,{value:s,node:t,data:c,colDef:l,column:e});typeof a=="function"?r=a(d):r=n?n.evaluate(a,d):null}else if(l.refData)return l.refData[s]||"";return r==null&&Array.isArray(s)&&(r=s.join(", ")),r}setValue(e,t,s,o){const i=this.colModel.getColDefCol(t);if(!e||!i)return!1;Ge(e.data)&&(e.data={});const{field:n,valueSetter:r}=i.getColDef();if(Ge(n)&&Ge(r))return G(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(i,s))return G(135),!1;const a=de(this.gos,{node:e,data:e.data,oldValue:this.getValue(i,e,void 0,o),newValue:s,colDef:i.getColDef(),column:i});a.newValue=s;let l;if(q(r)?typeof r=="function"?l=r(a):l=this.expressionSvc?.evaluate(r,a):l=this.setValueUsingField(e.data,n,s,i.isFieldContainsDots()),l===void 0&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const c=this.getValue(i,e);return this.dispatchCellValueChangedEvent(e,a,c,o),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,a,c,o),!0}dispatchCellValueChangedEvent(e,t,s,o){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:s,value:s,source:o})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,s,o){if(!t)return!1;let i=!1;if(!o)i=e[t]===s,i||(e[t]=s);else{const n=t.split(".");let r=e;for(;n.length>0&&r;){const a=n.shift();n.length===0?(i=r[a]===s,i||(r[a]=s)):r=r[a]}}return!i}executeValueGetterWithValueCache(e,t,s,o){const i=s.getColId(),n=this.valueCache.getValue(o,i);if(n!==void 0)return n;const r=this.executeValueGetterWithoutValueCache(e,t,s,o);return this.valueCache.setValue(o,i,r),r}executeValueGetterWithoutValueCache(e,t,s,o){const i=de(this.gos,{data:t,node:o,column:s,colDef:s.getColDef(),getValue:this.getValueCallback.bind(this,o)});let n;return typeof e=="function"?n=e(i):n=this.expressionSvc?.evaluate(e,i),n}getValueCallback(e,t){const s=this.colModel.getColDefCol(t);return s?this.getValue(s,e):null}getKeyForNode(e,t){const s=this.getValue(e,t),o=e.getColDef().keyCreator;let i=s;if(o){const n=de(this.gos,{value:s,colDef:e.getColDef(),column:e,node:t,data:t.data});i=o(n)}return typeof i=="string"||i==null||(i=String(i),i==="[object Object]"&&G(121)),i}},aP={moduleName:"CommunityCore",version:K,beans:[aD,KR,rE,X0,_3,vF,tD,ID,K0,F3,R3,U3,rP,nD,eD,rD,lE,Y3,tE,sE,WD],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:qR,destroy:YR,isDestroyed:ZR,getGridOption:XR,setGridOption:QR,updateGridOptions:Mf,isModuleRegistered:JR},dependsOn:[QF,Z2,oF,am,GD,bF,BD,W3,iP,zD,x3,M3,I3,jD,nE,JF,oP,RF,L3]},lm={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},Ol=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],lP={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:Ol,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...Ol,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...Ol,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},cP={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function dP(e,t){const s=[];for(const o of Array.isArray(e)?e:[e]){const i=lP[o];if(i)for(const n of i){const r=cP[n];(!r||r===t)&&s.push(n)}else s.push(o)}return s}var cm=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
21
+
22
+ import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
23
+
24
+ ModuleRegistry.registerModules([ AllCommunityModule ]);
25
+ `,uP=e=>{const t=e.map(o=>`import { ${Ki(o)} } from '${lm[o]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(o=>o==="IntegratedCharts"||o==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
26
+ ${t.join(`
27
+ `)}
28
+
29
+ ModuleRegistry.registerModules([ ${e.map(o=>Ki(o,!0)).join(", ")} ]);
30
+
31
+ For more info see: ${jo}/modules/`};function Ki(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function hP(e,t){const s=t.filter(n=>n==="IntegratedCharts"||n==="Sparklines");let o="";return!globalThis?.agCharts&&s.length>0?o=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
32
+ `:t.some(n=>lm[n])&&(o=o+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
33
+ `),o}function dm({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var Rh=({reasonOrId:e,moduleName:t,gridScoped:s,gridId:o,rowModelType:i,additionalText:n,isUmd:r})=>{const a=dP(t,i),l=typeof e=="string"?e:mP[e];if(r)return hP(l,a);const c=a.filter(h=>h==="IntegratedCharts"||h==="Sparklines"),d=c.length>0?`${c.map(h=>Ki(h)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map(h=>Ki(h)).join(", "):Ki(a[0])} is not registered${s?" for gridId: "+o:""}. ${d} Check if you have registered the module:
34
+ `}
35
+ ${uP(a)}`+(n?`
36
+
37
+ ${n}`:"")},Fh=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
38
+
39
+ import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
40
+ import { ModuleRegistry } from 'ag-grid-community';
41
+ import { ${e} } from 'ag-grid-enterprise';
42
+
43
+ ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
44
+ `,gP=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,pP={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:s})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",s],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions:
45
+ "alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.
46
+ Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
47
+ To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}
48
+ ${gP(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e})=>`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:s,pageSizeOptions:o})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${s?"":" the default"} paginationPageSizeSelector=[${o?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:s,jsComps:o})=>{const i=[],n=[...Object.keys(s??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(o??[]).filter(a=>!!o[a])],r=fc({inputValue:t,allSuggestions:n,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return i.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
49
+ `),r.length>0&&i.push(` Did you mean: [${r.slice(0,3)}]?
50
+ `),i.push("If using a custom component check it has been registered correctly."),i},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${jo}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{const s=fc({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,s.length>0?` Did you mean: [${s.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join(`
51
+ `)},110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
52
+ Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:s})=>["duplicate group keys for row data, keys should be unique",e,t,...s??[]],187:({rowId:e,firstData:t,secondData:s})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",s],188:e=>`getRowId callback must be provided for Server Side Row Model ${e?.feature||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:Rh,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${jo}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,229:({index:e})=>["invalid row index for ensureIndexVisible: ",e],230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.
53
+ Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows.
54
+ Your code probably called a grid API method while the grid was in the render stage.
55
+ To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
56
+ To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>Fh("IntegratedChartsModule"),258:()=>Fh("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:s,gridId:o,rowModelType:i})=>Rh({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Xo[t],gridId:o,gridScoped:s,rowModelType:i}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${jo}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>cm(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:dm,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`};function fP(e,t){const s=pP[e];if(!s)return[`Missing error text for error id ${e}!`];const o=s(t),n=`
57
+ See ${dp(e,t)}`;return Array.isArray(o)?o.concat(n):[o,n]}var mP={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},Eh=new WeakMap,Dh=new WeakMap,CP=1,vP=class{create(e,t,s,o,i,n){const r=sd.applyGlobalGridOptions(t),a=r.gridId??String(CP++),l=this.getRegisteredModules(i,a,r.rowModelType),c=this.createBeansList(r.rowModelType,l,a),d=this.createProvidedBeans(e,r,i);if(!c)return;const h={providedBeanInstances:d,beanClasses:c,id:a,beanInitComparator:_R,beanDestroyComparator:jR,derivedBeans:[zR],destroyCallback:()=>{Dh.delete(f),Eh.delete(e),Zb(a),n?.()}},p=new My(h);this.registerModuleFeatures(p,l),s(p),p.getBean("syncSvc").start(),o?.(p);const f=p.getBean("gridApi");return Eh.set(e,f),Dh.set(f,e),f}getRegisteredModules(e,t,s){return nn(aP,void 0,!0),e?.modules?.forEach(o=>nn(o,t)),Xb(t,Ph(s))}registerModuleFeatures(e,t){const s=e.getBean("registry"),o=e.getBean("apiFunctionSvc");for(const i of t){s.registerModule(i);const n=i.apiFunctions;if(n){const r=Object.keys(n);for(const a of r)o?.addFunction(a,n[a])}}}createProvidedBeans(e,t,s){let o=s?s.frameworkOverrides:null;Ge(o)&&(o=new Df);const i={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:s?s.globalListener:null,globalSyncListener:s?s.globalSyncListener:null,frameworkOverrides:o};return s?.providedBeanInstances&&Object.assign(i,s.providedBeanInstances),i}createBeansList(e,t,s){const o={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},i=Ph(e),n=o[i];if(!n){Li(201,{rowModelType:i},`Unknown rowModelType ${i}.`);return}if(!e0()){Li(272,void 0,cm());return}if(!e){const a=Object.entries(o).filter(([l,c])=>nc(c,s,l));if(a.length==1){const[l,c]=a[0];if(l!==i){const d={moduleName:c,rowModelType:l};Li(275,d,dm(d));return}}}if(!nc(n,s,i)){Li(200,{reasonOrId:`rowModelType = '${i}'`,moduleName:n,gridScoped:od(),gridId:s,rowModelType:i},`Missing module ${n}Module for rowModelType ${i}.`);return}const r=new Set;for(const a of t)for(const l of a.beans??[])r.add(l);return Array.from(r)}};function Ph(e){return e??"clientSide"}function Gs(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function va(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function wP(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var bP=class extends A{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?Bb(t):Vb(e.get("localeText"))}};function SP(e,t=!1){const s=[],o=[],i=[],n=[],r=[],a=[],l=[],c=[],d=[];let u=0;for(let h=0;h<e.length;h++){const{colId:p,sort:f,sortIndex:C,rowGroup:v,rowGroupIndex:w,aggFunc:b,pivot:S,pivotIndex:y,pinned:x,hide:R,width:E,flex:D}=e[h];d.push(p),f&&(s[C??u++]={colId:p,sort:f}),v&&(o[w??0]=p),typeof b=="string"&&i.push({colId:p,aggFunc:b}),S&&(n[y??0]=p),x&&(x==="right"?a:r).push(p),R&&l.push(p),(D!=null||E)&&c.push({colId:p,flex:D??void 0,width:E})}return{sort:s.length?{sortModel:Nl(s)}:void 0,rowGroup:o.length?{groupColIds:Nl(o)}:void 0,aggregation:i.length?{aggregationModel:i}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:Nl(n)}:void 0,columnPinning:r.length||a.length?{leftColIds:r,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:c.length?{columnSizingModel:c}:void 0,columnOrder:d.length?{orderedColIds:d}:void 0}}function Nl(e){return e.filter(t=>t!=null)}function yP(e){const t=[];for(const{groupId:s,open:o}of e)o&&t.push(s);return t.length?{openColumnGroupIds:t}:void 0}var xP=class{wrap(e,t,s,o){const i=this.createWrapper(e,o);for(const n of t??[])this.createMethod(i,n,!0);for(const n of s??[])this.createMethod(i,n,!1);return i}createMethod(e,t,s){e.addMethod(t,this.createMethodProxy(e,t,s))}createMethodProxy(e,t,s){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(s&&G(49,{methodName:t}),null)}}};function Hl(e){return e.get("tooltipShowMode")==="whenTruncated"}function RP(e,t){if(typeof e!="number")return"";const s=t(),o=s("thousandSeparator",","),i=s("decimalSeparator",".");return e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${o}`)}var FP=class extends A{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},EP=class{constructor(e){const{colModel:t,rowGroupColsSvc:s,colNames:o,valueSvc:i,gos:n,processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c}=e;this.colModel=t,this.rowGroupColsSvc=s,this.colNames=o,this.valueSvc=i,this.gos=n,this.processCellCallback=r,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=c}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,s,o,i){const n=t===0&&Cp(this.gos,i,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||i.group)&&(e.isRowGroupDisplayed(i.rowGroupColumn?.getColId()??"")||n))return{value:this.processRowGroupCallback(de(this.gos,{column:e,node:i}))??""};if(this.processCellCallback)return{value:this.processCellCallback(de(this.gos,{accumulatedRowIndex:s,column:e,node:i,value:this.valueSvc.getValueForDisplay(e,i,void 0,void 0).value,type:o,parseValue:h=>this.valueSvc.parseValue(e,i,h,this.valueSvc.getValue(e,i,void 0)),formatValue:h=>this.valueSvc.formatValue(e,i,h)??h}))??""};const r=this.gos.get("treeData"),a=this.valueSvc,l=i.level===-1&&i.footer,c=e.colDef.showRowGroup===!0&&(i.group||r);if(!l&&(n||c)){let h="",p=i;for(;p&&p.level!==-1;){const{value:f,valueFormatted:C}=a.getValueForDisplay(n?void 0:e,p,!0,!0);h=` -> ${C??f??""}${h}`,p=p.parent}return{value:h,valueFormatted:h}}const{value:d,valueFormatted:u}=a.getValueForDisplay(e,i,!0,!0);return{value:d??"",valueFormatted:u}}getHeaderName(e,t){return e?e(de(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}};function DP(e,t){const s=document.defaultView||window;if(!s){G(52);return}const o=document.createElement("a"),i=s.URL.createObjectURL(t);o.setAttribute("href",i),o.setAttribute("download",e),o.style.display="none",document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:s})),o.remove(),s.setTimeout(()=>{s.URL.revokeObjectURL(i)},0)}var PP={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},ft="clientSide",it="serverSide",Oo="infinite",MP={onGroupExpandedOrCollapsed:[ft],refreshClientSideRowModel:[ft],isRowDataEmpty:[ft],forEachLeafNode:[ft],forEachNodeAfterFilter:[ft],forEachNodeAfterFilterAndSort:[ft],resetRowHeights:[ft,it],applyTransaction:[ft],applyTransactionAsync:[ft],flushAsyncTransactions:[ft],getBestCostNodeSelection:[ft],getServerSideSelectionState:[it],setServerSideSelectionState:[it],applyServerSideTransaction:[it],applyServerSideTransactionAsync:[it],applyServerSideRowData:[it],retryServerSideLoads:[it],flushServerSideAsyncTransactions:[it],refreshServerSide:[it],getServerSideGroupLevelState:[it],refreshInfiniteCache:[Oo],purgeInfiniteCache:[Oo],getInfiniteRowCount:[Oo],isLastRowIndexKnown:[Oo,it],expandAll:[ft,it],collapseAll:[ft,it],onRowHeightChanged:[ft,it],setRowCount:[Oo,it],getCacheBlockState:[Oo,it]},TP={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 IP(e,t,s){const o=TP[e];if(o){const{version:n,new:r,old:a,message:l}=o,c=a??e;return(...d)=>{const u=r?`Please use ${r} instead. `:"";return _i(`Since ${n} api.${c} is deprecated. ${u}${l??""}`),t.apply(t,d)}}const i=MP[e];return i?(...n)=>{const r=s.rowModel.getType();if(!i.includes(r)){_o(`api.${e} can only be called when gridOptions.rowModelType is ${i.join(" or ")}`);return}return t.apply(t,n)}:t}var kP={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},AP={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},LP={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},OP=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),NP=class extends A{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,o0(fP)}warnOnInitialPropertyUpdate(e,t){e==="api"&&PP[t]&&G(22,{key:t})}processGridOptions(e){this.processOptions(e,PD())}validateApiFunction(e,t){return IP(e,t,this.beans)}missingUserComponent(e,t,s,o){const i=Xo[t];i?this.gos.assertModuleRegistered(i,`AG Grid '${e}' component: ${t}`):G(101,{propertyName:e,componentName:t,agGridDefaults:s,jsComps:o})}missingDynamicBean(e){const t=kP[e];return t?es(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){GP.has(e)&&G(10,{eventType:e})}validateIcon(e){if(OP.has(e)&&G(43,{iconName:e}),AP[e])return;const t=LP[e];if(t){Pe(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:od(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}G(134,{iconName:e})}isProvidedUserComp(e){return!!Xo[e]}validateColDef(e){this.processOptions(e,CD())}processOptions(e,t){const{validations:s,deprecations:o,allProperties:i,propertyExceptions:n,objectName:r,docsUrl:a}=t;i&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(o)],i,r,a);const l=new Set;if(Object.keys(e).forEach(d=>{const u=o[d];if(u){const{message:b,version:S}=u;l.add(`As of v${S}, ${String(d)} is deprecated. ${b??""}`)}const h=e[d];if(h==null||h===!1)return;const p=s[d];if(!p)return;const{dependencies:f,validate:C,supportedRowModels:v,expectedType:w}=p;if(w){const b=typeof h;if(b!==w){l.add(`${String(d)} should be of type '${w}' but received '${b}' (${h}).`);return}}if(v){const b=this.gridOptions.rowModelType??"clientSide";if(!v.includes(b)){l.add(`${String(d)} is not supported with the '${b}' row model. It is only valid with: ${v.join(", ")}.`);return}}if(f){const b=this.checkForRequiredDependencies(d,f,e);if(b){l.add(b);return}}if(C){const b=C(e,this.gridOptions,this.beans);if(b){l.add(b);return}}}),l.size>0)for(const d of l)_i(d)}checkForRequiredDependencies(e,t,s){const i=Object.entries(t).filter(([n,r])=>{const a=s[n];return!r.required.includes(a)});return i.length===0?null:i.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${r.reason??""}`).join(`
58
+ `)}checkProperties(e,t,s,o,i){const n=["__ob__","__v_skip","__metadata__"],r=HP(Object.getOwnPropertyNames(e),[...n,...t,...s],s),a=Object.keys(r);for(const l of a){const c=r[l];let d=`invalid ${o} property '${l}' did you mean any of these: ${c.slice(0,8).join(", ")}.`;s.includes("context")&&(d+=`
59
+ If you are trying to annotate ${o} with application data, use the '${o}.context' property instead.`),_i(d)}if(a.length>0&&i){const l=this.beans.frameworkOverrides.getDocLink(i);_i(`to see all the valid ${o} properties please check: ${l}`)}}};function HP(e,t,s){const o={},i=e.filter(n=>!t.some(r=>r===n));if(i.length>0)for(const n of i)o[n]=fc({inputValue:n,allSuggestions:s}).values;return o}var GP=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),BP={moduleName:"Validation",version:K,beans:[NP]};function um(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var VP=class extends A{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){const t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const s=(o,i)=>{o.hasChildren()&&e&&!i?o.childrenAfterFilter=o.childrenAfterGroup.filter(n=>{const r=n.childrenAfterFilter&&n.childrenAfterFilter.length>0,a=n.data&&this.filterManager.doesRowPassFilter({rowNode:n});return r||a}):o.childrenAfterFilter=o.childrenAfterGroup,um(o)};if(this.doingTreeDataFiltering()){const o=(n,r)=>{if(n.childrenAfterGroup)for(let a=0;a<n.childrenAfterGroup.length;a++){const l=n.childrenAfterGroup[a],c=r||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?o(n.childrenAfterGroup[a],c):s(l,c)}s(n,r)},i=n=>o(n,!1);t.executeFromRootNode(i)}else{const o=i=>s(i,!1);t.forEachChangedNodeDepthFirst(o,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},zP=class extends Rd{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,s,o,i){this.comp=e;const n=vn(this,this.beans.context,i);this.eButtonShowMainFilter=s,this.eFloatingFilterBody=o,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n);const r=()=>this.onColDefChanged(n);n.addManagedListeners(this.column,{colDefChanged:r}),n.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&r()}}),n.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.colDef;return de(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=Ot("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new gi(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();ti(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(Ve(t)===this.eGui)return;const i=Ro(t,this.eGui,null,e.shiftKey);if(i){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),i.focus();return}const n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let s=this.column;do if(s=e?t.getColBefore(s):t.getColAfter(s),!s)break;while(!s.getColDef().filter||!s.getColDef().floatingFilter);return s}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case I.UP:case I.DOWN:case I.LEFT:case I.RIGHT:if(t)return;mo(e);case I.ENTER:t&&fo(this.eGui)&&e.preventDefault();break;case I.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const s=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),o=!!e.relatedTarget&&to(e.relatedTarget,"ag-floating-filter");if(s&&o&&e.target===this.eGui){const i=this.lastFocusEvent,n=!!(i&&i.key===I.TAB);if(i&&n){const r=i.shiftKey;fo(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new xd(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!Ft(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:s,gos:o}=this,i=n=>{if(n?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const r=this.comp.getFloatingFilterComp();r&&r.then(a=>{if(a){if(o.get("enableFilterHandlers")){const d=n;let u="filter";d?.afterFloatingFilter?u="ui":d?.afterDataChange?u="dataChanged":n?.source==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}const l=t?.getCurrentFloatingFilterParentModel(s),c=n?{...n,columns:n.columns??[],source:n.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,c)}})};[this.destroySyncListener]=e.addManagedListeners(s,{filterChanged:i}),t?.isFilterActive(s)&&i(null)}setupWidth(e){const t=()=>{const s=`${this.column.getActualWidth()}px`;this.comp.setWidth(s)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const s=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const o=this.beans.colFilter,i=this.active?o?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,n=this.comp.getFloatingFilterComp();!n||!i?this.updateCompDetails(e,i,s):n.then(r=>{!r||o?.areFilterCompsDifferent(this.userCompDetails??null,i)?this.updateCompDetails(e,i,s):this.updateFloatingFilterParams(i,"colDef")})}updateCompDetails(e,t,s){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),s&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let s=e.params;this.comp.getFloatingFilterComp()?.then(o=>{typeof o?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(s={...s,model:Xe(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),o.refresh(s))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function WP(e,t){const s=e.colModel.getCol(t);if(!s){Pe(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:s,positionBy:"auto"})}function _P(e){e.menuSvc?.hidePopupMenu()}var jP={moduleName:"SharedMenu",version:K,beans:[dR],apiFunctions:{showColumnMenu:WP,hidePopupMenu:_P}},UP=class extends By{postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getDefaultPopupParent(){return this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:s,event:o}=e,i=t.getBoundingClientRect(),n=this.getParentRect();this.setAlignedTo(t,s);let r=!1;const a=()=>{const l=this.keepXYWithinBounds(s,i.top-n.top,0),c=s.clientWidth>0?s.clientWidth:200;r||(s.style.minWidth=`${c}px`,r=!0);const u=n.right-n.left-c;let h;return this.gos.get("enableRtl")?(h=f(),h<0&&(h=p(),this.setAlignedStyles(s,"left")),h>u&&(h=0,this.setAlignedStyles(s,"right"))):(h=p(),h>u&&(h=f(),this.setAlignedStyles(s,"right")),h<0&&(h=0,this.setAlignedStyles(s,"left"))),{x:h,y:l};function p(){return i.right-n.left-2}function f(){return i.left-n.left-c}};this.positionPopup({ePopup:s,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e,"subMenu",s,t,o instanceof MouseEvent?o:void 0)})}callPostProcessPopup(e,t,s,o,i){const n=this.gos.getCallback("postProcessPopup");if(n){const{column:r,rowNode:a}=e;n({column:r,rowNode:a,ePopup:s,type:t,eventSource:o,mouseEvent:i})}}getActivePopups(){return this.popupList.map(e=>e.element)}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const s of this.popupList)t.applyThemeClasses(s.wrapper)}}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return ps(e)}},wa={moduleName:"Popup",version:K,beans:[UP]},$P=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function KP(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function qP(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function YP(e,t){const s=e.colModel.getColDefCol(t);if(s)return e.colFilter?.destroyFilter(s,"api")}function ZP(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function XP(e){return e.filterManager?.getFilterModel()??{}}function QP(e,t,s){const{gos:o,colModel:i,colFilter:n}=e;s&&!o.get("enableFilterHandlers")&&(G(288),s=!1);const r=i.getColDefCol(t);return r?n?.getModelForColumn(r,s)??null:null}function JP(e,t,s){return e.filterManager?.setColumnFilterModel(t,s)??Promise.resolve()}function e5(e,t){const s=e.colModel.getCol(t);if(!s){Pe(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:s,containerType:"columnFilter",positionBy:"auto"})}function t5(e){e.menuSvc?.hideFilterMenu()}function s5(e,t){const s=e.colModel.getCol(t);if(!s){Pe(12,{colKey:t});return}return e.colFilter?.getHandler(s,!0)}function o5(e,t){const{colModel:s,colFilter:o,gos:i}=e;if(!i.get("enableFilterHandlers")){G(287);return}const{colId:n,action:r}=t;if(n){const a=s.getColById(n);a&&o?.updateModel(a,r)}else o?.updateAllModels(r)}var i5={filterHandler:()=>({doesFilterPass:()=>!0})},n5=class extends A{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={...nf},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)});const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",s){const{colModel:o,dataTypeSvc:i,filterManager:n}=this.beans;if(i?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const r=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((c,d)=>{const u=e[d];r.push(this.setModelOnFilterWrapper(c,u)),l.delete(d)}),l.forEach(c=>{const d=o.getColDefCol(c)||o.getCol(c);if(!d){G(62,{colId:c});return}if(!d.isFilterAllowed()){G(63,{colId:c});return}const u=this.getOrCreateFilterWrapper(d,!0);if(!u){G(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))});Re.all(r).then(()=>{const l=this.getModel(!0),c=[];this.allColumnFilters.forEach((d,u)=>{const h=a?a[u]:null,p=l?l[u]:null;Ji(h,p)||c.push(d.column)}),c.length>0?n?.onFilterChanged({columns:c,source:t}):s&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:s,initialModel:o,beans:{colModel:i}}=this;if(s.forEach((n,r)=>{const a=this.getModelFromFilterWrapper(n);q(a)&&(t[r]=a)}),!e)for(const n of Object.keys(o)){const r=o[n];q(r)&&!s.has(n)&&i.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}setState(e,t,s="api"){if(this.state.clear(),t)for(const o of Object.keys(t)){const i=t[o];this.state.set(o,{model:Xe(this.model,o),state:i})}this.setModel(e,s,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let s=!1;return e.forEach((o,i)=>{const n=o.state;n!=null&&(s=!0,t[i]=n)}),s?t:void 0}getModelFromFilterWrapper(e){const s=e.column.getColId();if(e.isHandler)return Xe(this.model,s);const o=e.filter;return o?typeof o.getModel!="function"?(G(66),null):o.getModel():Xe(this.initialModel,s)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=c=>c?c.isFilterActive?c.isFilterActive():(G(67),!1):!1,{colModel:t,gos:s}=this.beans,o=!!lc(s),i=c=>{if(!c.isPrimary())return!0;const u=!t.isPivotActive();return!c.isValueActive()||!u?!1:t.isPivotMode()?!0:o},n=[],r=[],a=(c,d,u)=>{d&&(i(c)?n.push(u):r.push(u))},l=[];return this.allColumnFilters.forEach(c=>{const d=c.column,u=d.getColId();if(c.isHandler)l.push(Re.resolve().then(()=>{a(d,this.isHandlerActive(d),{colId:u,isHandler:!0,handler:c.handler,handlerParams:c.handlerParams})}));else{const h=xs(c);h&&l.push(h.then(p=>{a(d,e(p),{colId:u,isHandler:!1,comp:p})}))}}),Re.all(l).then(()=>{this.activeAggregateFilters=n,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){const s=[];return this.allColumnFilters.forEach(o=>{const i=o.column;if(o.isHandler)s.push(Re.resolve().then(()=>{this.setColFilterActive(i,this.isHandlerActive(i),e,t)}));else{const n=xs(o);n&&s.push(n.then(r=>{this.setColFilterActive(i,r.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),Re.all(s)}doFiltersPass(e,t,s){const{data:o,aggData:i}=e,n=s?this.activeAggregateFilters:this.activeColumnFilters,r=s?i:o,a=this.model;for(let l=0;l<n.length;l++){const c=n[l],{colId:d,isHandler:u}=c;if(d!==t)if(u){const{handler:h,handlerParams:p}=c;if(!h.doesFilterPass({node:e,data:r,model:Xe(a,d),handlerParams:p}))return!1}else{const h=c.comp;if(typeof h.doesFilterPass!="function"){Pe(91);continue}if(!h.doesFilterPass({node:e,data:r}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:s}=this.beans,o=()=>{this.isAlive()&&s?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(o,0):o()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:s}=e,o=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",s).then(()=>{this.allColumnFilters.forEach(i=>{const{column:n,isHandler:r}=i;o!==n.getColId()&&(r&&i.handler.onAnyFilterChanged?.(),xs(i,r)?.then(a=>{typeof a?.onAnyFilterChanged=="function"&&a.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(s=>{const o=s.isHandler;o&&s.handler.onNewRowsLoaded?.();const i=xs(s,o);i&&t.push(i.then(n=>{n.onNewRowsLoaded?.()}))}),Re.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:s,colModel:o}=this.beans;return(i,n)=>{const r=n?o.getCol(n):e;return r?s.getValue(r,i,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const s=t?.filter;return s?s.isFilterActive():Xe(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=q(Xe(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?xs(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const s=xs(t);return s?s.then(o=>({comp:o,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const s=this.getOrCreateFilterWrapper(e,t);return s?.isHandler?s.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let s=this.cachedFilter(e);return!s&&t&&(s=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,s)),s}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return w0(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":cx(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,s,o,i,n){const r=()=>{const c=this.createFilterCompParams(e,i,n),d=o(c,i);return RS(this.beans.userCompFactory,t,d,s)},a=r();return a?{compDetails:a,createFilterUi:c=>(c?r():a).newAgStackInstance()}:null}createFilterInstance(e,t,s,o){const i=this.beans.selectableFilter;i?.isSelectable(t)&&(t=i.getFilterDef(e,t));const{handler:n,handlerParams:r,handlerGenerator:a}=this.createHandler(e,t,s)??{},l=this.createFilterComp(e,t,s,o,!!n,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:n,handlerGenerator:a,handlerParams:r};const{compDetails:c,createFilterUi:d}=l;return this.isGlobalButtons&&(c.params?.buttons?.length||G(281,{colId:e.getColId()})),{compDetails:c,handler:n,handlerGenerator:a,handlerParams:r,createFilterUi:d}}createBaseFilterParams(e,t){const{filterManager:s,rowModel:o}=this.beans;return de(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:i=>s?.doesRowPassOtherFilters(e.getColId(),i)??!0,rowModel:o})}createFilterCompParams(e,t,s,o){const i=this.filterChangedCallbackFactory(e),n=this.createBaseFilterParams(e,o);if(n.filterChangedCallback=i,n.filterModifiedCallback=o?()=>{}:r=>this.filterModified(e,r),t){const r=n,a=e.getColId(),l=Xe(this.model,a);r.model=l,r.state=this.state.get(a)??{model:l},r.onModelChange=(c,d)=>{this.updateStoredModel(a,c),this.refreshHandlerAndUi(e,c,"ui",!1,d).then(()=>{i({...d,source:"columnFilter"})})},r.onStateChange=c=>{this.updateState(e,c),this.updateOrRefreshFilterUi(e)},r.onAction=(c,d,u)=>{this.updateModel(e,c,d),this.dispatchLocalEvent({type:"filterAction",column:e,action:c,event:u})},r.getHandler=()=>this.getHandler(e,!0),r.onUiChange=c=>this.filterUiChanged(e,c),r.source=s}return n}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,s){const o=t(),i={created:!0,create:t,filterParams:e.params,compDetails:e,promise:o};return o.then(s),i}createFilterWrapper(e){const{compDetails:t,handler:s,handlerGenerator:o,handlerParams:i,createFilterUi:n}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),r=e.getColId();if(s)return delete this.initialModel[r],s.init?.({...i,source:"init",model:Xe(this.model,r)}),{column:e,isHandler:!0,handler:s,handlerGenerator:o,handlerParams:i,filterUi:this.createFilterUiForHandler(t,n)};if(n){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,n,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,s){const{gos:o,frameworkOverrides:i,registry:n}=this.beans;let r;const a=p=>{const f=p.filter;if(Ap(f)){const C=f.handler;return C||(r=f.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return typeof f=="string"?f:void 0},l=o.get("enableFilterHandlers"),c=l?a(t):void 0,d=p=>()=>this.createBean(n.createDynamicBean(p,!0));let u,h;if(typeof c=="string"){const p=o.get("filterHandlers")?.[c];p!=null?u=p:Xy.has(c)&&(u=d(c),h=c)}else u=c;if(!u){let p;const{compName:f,jsComp:C,fwComp:v}=Np(i,t);f?p=f:C==null&&v==null&&t.filter===!0&&(p=s),h=this.handlerMap[p],h&&(u=d(h))}return u?{filterHandler:u,handlerNameOrCallback:r??h}:l?(We(o)&&G(277,{colId:e.getColId()}),i5):void 0}createHandler(e,t,s){const o=this.createHandlerFunc(e,t,s);if(!o)return;const i=dl(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:n,filterHandler:r}=o,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,r,i);return{handler:a,handlerParams:l,handlerGenerator:n??r}}createHandlerFromFunc(e,t,s){const o=e.getColDef(),i=t(de(this.gos,{column:e,colDef:o})),n=this.createHandlerParams(e,s);return{handler:i,handlerParams:n}}createHandlerParams(e,t){const s=e.getColDef(),o=e.getColId(),i=this.filterChangedCallbackFactory(e);return de(this.gos,{colDef:s,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:n=>this.beans.filterManager?.doesRowPassOtherFilters(o,n)??!0,onModelChange:(n,r)=>{this.updateStoredModel(o,n),this.refreshHandlerAndUi(e,n,"handler",!1,r).then(()=>{i({...r,source:"columnFilter"})})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:s,groupFilter:o}=this.beans;this.allColumnFilters.forEach((n,r)=>{let a;n.column.isPrimary()?a=t.getColDefCol(r):a=t.getCol(r),!(a&&a===n.column)&&(e.push(n.column),this.disposeFilterWrapper(n,"columnChanged"),this.disposeColumnListener(r))});const i=o&&e.every(n=>o.isGroupFilter(n));e.length>0&&!i&&s?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const s=this.beans.groupFilter;return s?.isGroupFilter(e)?s.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:s,frameworkOverrides:o,selectableFilter:i}=this.beans,n=h=>{const p=this.getOrCreateFilterUi(e);p?.then(f=>{h(an(f))})},r=e.getColDef(),a=i?.isSelectable(r)?i.getFilterDef(e,r):r,l=px(o,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",c=this.gos.get("enableFilterHandlers"),d=dl(s,a,this.createFilterCompParams(e,c,"init",!0)),u=de(this.gos,{column:e,filterParams:d,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:n,showParentFilter:t});if(c){const h=u,p=e.getColId(),f=this.filterChangedCallbackFactory(e);h.onUiChange=C=>this.floatingFilterUiChanged(e,C),h.model=Xe(this.model,p),h.onModelChange=(C,v)=>{this.updateStoredModel(p,C),this.refreshHandlerAndUi(e,C,"floating",!0,v).then(()=>{f({...v,source:"columnFilter"})})},h.getHandler=()=>this.getHandler(e,!0),h.source="init"}return MS(s,r,u,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,s,o){const i="paramsUpdated";if(e.isHandler){const n=t.getColId();delete this.initialModel[n],this.state.delete(n);const r=e.filterUi,a=this.createFilterUiForHandler(s,o);e.filterUi=a;const l=this.eventSvc;r?.created?r.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:i,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:i,column:t})}else this.destroyFilter(t,i)}destroyFilter(e,t="api"){const s=e.getColId(),o=this.allColumnFilters.get(s);this.disposeColumnListener(s),delete this.initialModel[s],o&&this.disposeFilterWrapper(o,t).then(i=>{i&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let s=!1;const{column:o,isHandler:i,filterUi:n}=e,r=o.getColId();i&&(s=this.isHandlerActive(o),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const a=()=>{this.setColFilterActive(o,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:o})};if(n){if(n.created)return n.promise.then(l=>(s=i?s:!!l?.isFilterActive(),this.destroyBean(l),a(),s));a()}return Re.resolve(s)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const s=this.allColumnFilters.get(e);if(!s)return;const o=this.beans,i=s.column,n=i.getColDef(),r=i.isFilterAllowed(),a=this.getDefaultFilter(i),l=o.selectableFilter,c=l?.isSelectable(n)?l.getFilterDef(i,n):n,d=r?this.createHandlerFunc(i,c,this.getDefaultFilter(i)):void 0,u=!!d,h=s.isHandler;if(h!=u){this.destroyFilter(i,"paramsUpdated");return}const{compDetails:p,createFilterUi:f}=(r?this.createFilterComp(i,c,a,v=>v,u,"colDef"):null)??{compDetails:null,createFilterUi:null},C=p?.params??dl(o.userCompFactory,c,this.createFilterCompParams(i,u,"colDef"));if(h){const v=d?.handlerNameOrCallback??d?.filterHandler,w=Xe(this.model,e);if(s.handlerGenerator!=v){const b=s.handler,{handler:S,handlerParams:y}=this.createHandlerFromFunc(i,d.filterHandler,C);s.handler=S,s.handlerParams=y,s.handlerGenerator=v,delete this.model[e],S.init?.({...y,source:"init",model:null}),this.destroyBean(b),w!=null&&this.beans.filterManager?.onFilterChanged({columns:[i],source:t})}else{const b=this.createHandlerParams(i,p?.params);s.handlerParams=b,s.handler.refresh?.({...b,source:"colDef",model:w})}}if(this.areFilterCompsDifferent(s.filterUi?.compDetails??null,p)||!s.filterUi||!p){this.destroyFilterUi(s,i,p,f);return}s.filterUi.filterParams=C,xs(s,h)?.then(v=>{(v?.refresh?v.refresh(C):!0)===!1?this.destroyFilterUi(s,i,p,f):this.dispatchLocalEvent({type:"filterParamsChanged",column:i,params:C})})}refreshHandlerAndUi(e,t,s,o,i){const n=this.cachedFilter(e);if(!n)return o&&this.getOrCreateFilterWrapper(e,!0),Re.resolve();if(!n.isHandler)return Re.resolve();const{filterUi:r,handler:a,handlerParams:l}=n;return Qy(()=>{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 Re.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},s,i)}setColumnFilterWrapper(e,t){const s=e.getColId();this.allColumnFilters.set(s,t),this.allColumnListeners.set(s,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(s)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:s}=e,{componentClass:o}=t;return!(s===o||s?.render&&o?.render&&s.render===o.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const s=this.getOrCreateFilterUi(t);return s?new Promise(o=>{s.then(i=>{o(an(i))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:s})=>{this.setModelForColumn(e,t).then(()=>s())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:o,model:i}=this,n=e.getColId(),r=o.get(n);return r?r.model??null:Xe(i,n)}const s=this.cachedFilter(e);return s?this.getModelFromFilterWrapper(s):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let s=()=>{};const o=new Promise(i=>{s=i});return this.columnModelUpdates.push({key:e,model:t,resolve:s}),o}return new Promise(s=>{this.setModelForColumnLegacy(e,t).then(o=>s(o))})}getStateForColumn(e){return this.state.get(e)??{model:Xe(this.model,e)}}setModelForColumnLegacy(e,t){const s=this.beans.colModel.getColDefCol(e),o=s?this.getOrCreateFilterWrapper(s,!0):null;return o?this.setModelOnFilterWrapper(o,t):Re.resolve()}setColDefPropsForDataType(e,t,s){const o=e.filter,i=o===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):o;if(typeof i!="string")return;let n,r;const a=this.beans,{filterParams:l,filterValueGetter:c}=e;i==="agMultiColumnFilter"?{filterParams:n,filterValueGetter:r}=a.multiFilter?.getParamsForDataType(l,c,t,s)??{}:{filterParams:n,filterValueGetter:r}=rx(i,l,c,t,s,a,this.getLocaleTextFunc()),e.filterParams=n,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,s,o){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",s)),e.dispatchColEvent("filterChanged",s,o)}setModelOnFilterWrapper(e,t,s){return new Re(o=>{if(e.isHandler){const n=e.column,r=n.getColId(),a=this.model[r];if(this.updateStoredModel(r,t),s&&t===a){o();return}this.refreshHandlerAndUi(n,t,"api").then(()=>o());return}const i=xs(e);if(i){i.then(n=>{if(typeof n?.setModel!="function"){G(65),o();return}(n.setModel(t)||Re.resolve()).then(()=>o())});return}o()})}updateStoredModel(e,t){q(t)?this.model[e]=t:delete this.model[e];const s=this.state.get(e),o={model:t,state:s?.state};this.state.set(e,o)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(s=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:s,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,s){const o=e.getColId(),i=this.cachedFilter(e),n=()=>i?.filterUi;Vu(t,n,()=>Xe(this.model,o),()=>this.state.get(o),r=>this.updateState(e,r),r=>n()?.filterParams?.onModelChange(r,s),i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0)}updateAllModels(e,t){const s=[];this.allColumnFilters.forEach((o,i)=>{const n=this.beans.colModel.getColDefCol(i);n&&Vu(e,()=>o.filterUi,()=>Xe(this.model,i),()=>this.state.get(i),r=>this.updateState(n,r),r=>{this.updateStoredModel(i,r),this.dispatchLocalEvent({type:"filterAction",column:n,action:e}),s.push(this.refreshHandlerAndUi(n,r,"ui"))},o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0)}),s.length&&Re.all(s).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();af(()=>this.cachedFilter(e)?.filterUi,()=>Xe(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:s}=this;for(const i of s)if(i.source==="COLUMN_MENU")return!1;let o=!1;for(const i of e.keys()){const n=e.get(i);if(n.valid===!1)return!1;(n.model??null)!==Xe(t,i)&&(o=!0)}return o}hasUnappliedModel(e){const{model:t,state:s}=this;return(s.get(e)?.model??null)!==Xe(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const s=this.beans.filterPanelSvc;return s?.isActive?!!s.getState(e.getColId()):!1}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function r5(e){return!!e.filterManager?.isAnyFilterPresent()}function a5(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var l5=class extends A{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:o})=>this.onAdvFilterEnabledChanged(o),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:s}=this;this.alwaysPassFilter=s.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=s.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,s="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,s)}setFilterModel(e,t="api",s){if(this.isAdvFilterEnabled()){s||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){lc(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:s,columns:o=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):Re.resolve()).then(()=>{const i={source:t,type:"filterChanged",columns:o};s&&ht(i,s),this.eventSvc.dispatchEvent(i),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!lc(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(){G(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()}},c5=class extends A{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,s,o){e&&!e.isColumn||this.showPopup(e,i=>{this.popupSvc?.positionPopupUnderMouseEvent({column:e,type:s,mouseEvent:t,ePopup:i})},s,t.target,Ft(this.gos),o)}showMenuAfterButtonClick(e,t,s,o){if(e&&!e.isColumn)return;let i=-1,n="left";const r=Ft(this.gos);!r&&this.gos.get("enableRtl")&&(i=1,n="right");const a=r?void 0:4*i,l=r?void 0:4;this.showPopup(e,c=>{this.popupSvc?.positionPopupByComponent({type:s,eventSource:t,ePopup:c,nudgeX:a,nudgeY:l,alignSide:n,keepWithinBounds:!0,position:"under",column:e})},s,t,r,o)}showPopup(e,t,s,o,i,n){const r=e?this.createBean(new ix(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){Pe(57);return}const a=pt({tag:"div",cls:`ag-menu${i?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:C=>this.trapFocusWithin(C,a)}),a.appendChild(r?.getGui());let l;const c=()=>r?.afterGuiDetached(),d=b0(this.gos)?o??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=C=>{qu(e,!1,"contextMenu");const v=C instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),v&&o&&Cs(o)&&Wp(o)?.focus({preventScroll:!0}),c(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,s,e),n?.()},h=this.getLocaleTextFunc(),p=i&&s!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),f=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(a),anchorToElement:d,ariaLabel:p});f&&(this.hidePopup=l=f.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:s,hidePopup:l})}),qu(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,s,e)}trapFocusWithin(e,t){e.key!==I.TAB||e.defaultPrevented||Ro(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),fo(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()}},d5=class extends A{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,s){if(!t)return;const o=e.getColDef(),{selectableFilter:i,valueSvc:n}=this.beans,r=s??i?.getFilterValueGetter(e.getColId())??o.filterValueGetter;return r?this.executeFilterValueGetter(r,t.data,e,t,o):n.getValue(e,t)}executeFilterValueGetter(e,t,s,o,i){const{expressionSvc:n,valueSvc:r}=this.beans,a=de(this.gos,{data:t,node:o,column:s,colDef:i,getValue:r.getValueCallback.bind(r,o)});return typeof e=="function"?e(a):n?.evaluate(e,a)}},u5={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},h5=class extends ze{constructor(){super(u5,[ga]),this.eFloatingFilterText=ne}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const s=e,o=s.getHandler();if(o.getModelAsString){const i=o.getModelAsString(s.model);this.eFloatingFilterText.setValue(i)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const s=t.getModelAsString(e);this.eFloatingFilterText.setValue(s)}})}refresh(e){this.init(e)}},Id=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const s=e.filterOptions??t;this.filterOptions!==s&&(this.filterOptions=s,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const s=[["displayKey"],["displayName"],["predicate","test"]],o=i=>i.some(n=>t[n]!=null)?!0:(G(72,{keys:i}),!1);if(!s.every(o)){this.filterOptions=e.filter(i=>i===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const s=t[0];if(typeof s=="string")return s;if(s.displayKey)return s.displayKey;G(73)}else G(74)}getCustomOption(e){return this.customFilterOptions[e]}};function qi(e,t,s){return s==null?e.splice(t):e.splice(t,s)}function Ur(e){return e==null||typeof e=="string"&&e.trim().length===0}function g5(e){return e==="AND"||e==="OR"?e:"AND"}function p5(e,t,s){if(e==null)return;const{predicate:o}=e;if(o!=null&&!t.some(i=>i==null))return o(t,s)}function f5(e,t){let s=e.length;return s>t&&(e.splice(t),G(78),s=t),s}function un(e,t){const s=t.getCustomOption(e);if(s){const{numberOfInputs:i}=s;return i??1}return e&&["empty","notBlank","blank"].indexOf(e)>=0?0:e==="inRange"?2:1}var kd=class extends gx{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 Id;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=g5(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions();const t=this.getGui();this.isReadOnly()?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,s)=>{const o=s===0?e:this.optionsFactory.defaultOption;t.setValue(o,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const s=!e.operator,o=!t.operator;if(!s&&o||s&&!o)return!1;let n;if(s){const r=e,a=t;n=this.areSimpleModelsEqual(r,a)}else{const r=e,a=t;n=r.operator===a.operator&&Ns(r.conditions,a.conditions,(l,c)=>this.areSimpleModelsEqual(l,c))}return n}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),Re.resolve();if(e.operator){const o=e;let i=o.conditions;i==null&&(i=[],G(77));const n=f5(i,this.maxNumConditions),r=this.getNumConditions();if(n<r)this.removeConditionsAndOperators(n);else if(n>r)for(let l=r;l<n;l++)this.createJoinOperatorPanel(),this.createOption();const a=o.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),i.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{const o=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(o.type,!0),this.setConditionIntoUi(o,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),Re.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(G(79),t=1),this.maxNumConditions=t;let s=e.numAlwaysVisibleConditions??1;s<1&&(G(80),s=1),s>t&&(G(81),s=t),this.numAlwaysVisibleConditions=s}createOption(){const e=this.getGui(),t=this.createManagedBean(new hd);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const s=this.createEValue();this.eConditionBodies.push(s),e.appendChild(s),this.putOptionsIntoDropdown(t),this.resetType(t);const o=this.getNumConditions()-1;this.forEachPositionInput(o,i=>this.resetInput(i)),this.addChangedListeners(t,o)}createJoinOperatorPanel(){const e=pt({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),s=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const o=this.eJoinPanels.length-1,i=this.joinOperatorId++;this.resetJoinOperatorAnd(t,o,i),this.resetJoinOperatorOr(s,o,i),this.isReadOnly()||(t.onValueChange(this.listener),s.onValueChange(this.listener))}createJoinOperator(e,t,s){const o=this.createManagedBean(new jS);e.push(o);const i="ag-filter-condition-operator";return o.addCss(i),o.addCss(`${i}-${s}`),t.appendChild(o.getGui()),o}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const s of t)e.addOption(s);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,s=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:s?this.getLocaleTextFunc()(s.displayKey,s.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let s=0;s<this.getNumConditions();s++)this.isConditionUiComplete(s)?e=s:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const s=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<s){this.removeConditionsAndOperators(s+1);const o=e+1,i=s-o;i>0&&this.removeConditionsAndOperators(o,i),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((o,i)=>{const n=this.isConditionDisabled(i,e);o.setDisabled(n||this.filterListOptions.length<=1),i===1&&(tn(this.eJoinPanels[0],n),this.eJoinAnds[0].setDisabled(n),this.eJoinOrs[0].setDisabled(n))}),this.eConditionBodies.forEach((o,i)=>{Be(o,this.isConditionBodyVisible(i))});const s=(t??this.getJoinOperator())==="OR";for(const o of this.eJoinAnds)o.setValue(!s,!0);for(const o of this.eJoinOrs)o.setValue(s,!0);this.forEachInput((o,i,n,r)=>{this.setElementDisplayed(o,i<r),this.setElementDisabled(o,this.isConditionDisabled(n,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:s,eConditionBodies:o,eJoinPanels:i,eJoinAnds:n,eJoinOrs:r}=this;this.removeComponents(s,e,t),this.removeElements(o,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(i,a,t),this.removeComponents(n,a,t),this.removeComponents(r,a,t)}removeElements(e,t,s){const o=qi(e,t,s);for(const i of o)Is(i)}removeComponents(e,t,s){const o=qi(e,t,s);for(const i of o)Is(i.getGui()),this.destroyBean(i)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const s=this.getInputs(0)[0];s instanceof Xs&&this.isConditionBodyVisible(0)?t=s.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column))return;e.onStateChange({model:e.model});let t=-1,s=-1,o=!1;const i=this.getJoinOperator();for(let r=this.getNumConditions()-1;r>=0;r--)if(this.isConditionUiComplete(r))t===-1&&(t=r,s=r);else{const a=r>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(r-1),l=r<t;(a||l)&&(this.removeConditionsAndOperators(r,1),o=!0,l&&s--)}let n=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(s===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(s,i),o&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=s}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}getPlaceholderText(e,t){let s=this.translate(e);if(typeof this.filterPlaceholder=="function"){const o=this.eTypes[t].getValue(),i=this.translate(o);s=this.filterPlaceholder({filterOptionKey:o,filterOption:i,placeholder:s})}else typeof this.filterPlaceholder=="string"&&(s=this.filterPlaceholder);return s}resetPlaceholder(){const e=this.getLocaleTextFunc();this.forEachInput((t,s,o,i)=>{if(!(t instanceof Xs))return;const n=s===0&&i>1?"inRangeStart":s===0?"filterOoo":"inRangeEnd",r=s===0&&i>1?e("ariaFilterFromValue","Filter from value"):s===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value");t.setInputPlaceholder(this.getPlaceholderText(n,o)),t.setInputAriaLabel(r)})}setElementValue(e,t,s){e instanceof Xs&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){Mu(e)&&Be(e.getGui(),t)}setElementDisabled(e,t){Mu(e)&&tn(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Xs&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,s)=>{this.forEachPositionTypeInput(s,t,e)})}forEachPositionInput(e,t){const s=this.getConditionType(e);this.forEachPositionTypeInput(e,s,t)}forEachPositionTypeInput(e,t,s){const o=un(t,this.optionsFactory),i=this.getInputs(e);for(let n=0;n<i.length;n++){const r=i[n];r!=null&&s(r,n,e,o)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return un(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(s=>s==null))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,s)=>this.resetJoinOperatorAnd(t,s,this.joinOperatorId+s)),this.eJoinOrs.forEach((t,s)=>this.resetJoinOperatorOr(t,s,this.joinOperatorId+s)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const s=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(s).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,s){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),s)}resetJoinOperatorOr(e,t,s){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),s)}resetJoinOperator(e,t,s,o,i){this.updateJoinOperatorDisabled(e.setValue(s,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${i}`).setLabel(o),t)}updateJoinOperatorsDisabled(){const e=(t,s)=>this.updateJoinOperatorDisabled(t,s);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const s=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((o,i,n)=>{n===t&&this.setElementValue(o,s[i]!=null?s[i]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,s,o)=>{this.setElementValue(t,s===0&&o===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,s=>{this.attachElementOnChange(s,this.listener)}))}hasInvalidInputs(){return!1}isReadOnly(){return!!this.params.readOnly}},hm=class{constructor(e,t,s,o,i,n){this.alive=!0,this.context=e,this.eParent=i;const r=FS(t,s,o);r&&r.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;i.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:c}=this;l&&a.setDate(l),c!=null&&a.setDisabled?.(c),n?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){Be(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)}},Ad=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function gm(e,t){const{dateFrom:s,dateTo:o,type:i}=e||{};return[s&&Ct(s,void 0,!0)||null,o&&Ct(o,void 0,!0)||null].slice(0,un(i,t))}var Mh=1e3,Th=1/0,m5=class extends kd{constructor(){super("dateFilter",gm,Ad),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=Mh,this.maxValidYear=Th,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,c)=>{const d=e[l];if(d!=null)if(isNaN(d))G(82,{param:l});else return d==null?c:Number(d);return c},s=t("minValidYear",Mh),o=t("maxValidYear",Th);this.minValidYear=s,this.maxValidYear=o,s>o&&G(83);const{minValidDate:i,maxValidDate:n}=e,r=i instanceof Date?i:Ct(i);this.minValidDate=r;const a=n instanceof Date?n:Ct(n);this.maxValidDate=a,r&&a&&r>a&&G(84)}createDateCompWrapper(e){const{beans:{userCompFactory:t,context:s,gos:o},params:i}=this,n=new hm(s,t,i.colDef,de(o,{onDateChanged:()=>this.onUiChanged(),filterParams:i,location:"filter"}),e);return this.addDestroyFunc(()=>n.destroy()),n}setElementValue(e,t){e.setDate(t)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=pt({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,s,o){const i=pt({tag:"div",cls:`ag-filter-${o} ag-filter-date-${o}`});t.push(i),e.appendChild(i),s.push(this.createDateCompWrapper(i))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),qi(this.eConditionPanelsFrom,e,t),qi(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,s){const o=qi(e,t,s);for(const i of o)i.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:s,minValidYear:o,maxValidYear:i}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<o)return!1;if(s){if(e>s)return!1}else if(e.getUTCFullYear()>i)return!1;return!0}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachInput((s,o,i,n)=>{i!==e||!t||o>=n||(t=t&&this.isValidDateValue(s.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),s={},o=this.getValues(e),i=this.params.useIsoSeparator?"T":" ";return o.length>0&&(s.dateFrom=Et(o[0],!0,i)),o.length>1&&(s.dateTo=Et(o[1],!0,i)),{dateFrom:null,dateTo:null,filterType:this.filterType,type:t,...s}}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),s=e("ariaFilterValue","Filter Value");this.forEachInput(o=>{o.setInputPlaceholder(t),o.setInputAriaLabel(s)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(s,o,i,n)=>{o<n&&t.push(s.getDate())}),t}translate(e){return e==="lessThan"?super.translate("before"):e==="greaterThan"?super.translate("after"):super.translate(e)}},pm=class extends A{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,s=new Id;this.optionsFactory=s,s.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(s,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,s=this.optionsFactory;s.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:s,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:s}=t,o=[];if(s){const r=t;o.push(...r.conditions??[])}else o.push(t);const i=s&&s==="OR"?"some":"every",n=this.params.getValue(e.node);return o[i](r=>this.individualConditionPasses(e,r,n))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:s,maxNumConditions:o}}=e;if(t==null)return;let n=df(t)?t.conditions:[t];const r=s?.map(d=>typeof d=="string"?d:d.displayKey)??this.defaultOptions;if(!(!n||n.every(d=>r.find(u=>u===d.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const c=this.filterType;if((n&&!n.every(d=>d.filterType===c)||t.filterType!==c)&&(n=n.map(d=>({...d,filterType:c})),l=!0),typeof o=="number"&&n&&n.length>o&&(n=n.slice(0,o),l=!0),l){const d=n.length>1?{...t,filterType:c,conditions:n}:{...n[0],filterType:c};this.params={...e,model:d},e.onModelChange(d)}}individualConditionPasses(e,t,s){const o=this.optionsFactory,i=this.mapValuesFromModel(t,o),n=o.getCustomOption(t.type),r=p5(n,i,s);return r??(s==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(i,s,t,e))}},fm=class extends pm{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:s,includeBlanksInGreaterThan:o,includeBlanksInLessThan:i,includeBlanksInRange:n}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(s)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(o)return!0;break;case"lessThan":case"lessThanOrEqual":if(i)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,s){const o=s.type;if(!this.isValid(t))return o==="notEqual"||o==="notBlank";const i=this.comparator(),n=e[0]!=null?i(e[0],t):0;switch(o){case"equals":return n===0;case"notEqual":return n!==0;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const r=i(e[1],t);return this.params.filterParams.inRangeInclusive?n>=0&&r<=0:n>0&&r<0}case"blank":return Ur(t);case"notBlank":return!Ur(t);default:return G(76,{filterModelType:o}),!0}}},mm={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},C5={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Ld=class extends A{constructor(e,t,s){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=s}getModelAsString(e,t){const s=this.getLocaleTextFunc(),o=t==="filterToolPanel";if(!e)return o?Ps(this,"filterSummaryInactive"):null;if(e.operator!=null){const n=e,a=(n.conditions??[]).map(c=>this.getModelAsString(c,t)),l=n.operator==="AND"?"andCondition":"orCondition";return a.join(` ${Ps(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return o?Ps(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):s(e.type,e.type);{const n=e,r=this.optionsFactory.getCustomOption(n.type),{displayKey:a,displayName:l,numberOfInputs:c}=r||{};return a&&l&&c===0?s(a,l):this.conditionToString(n,o,n.type==="inRange"||c===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:s}=e;this.optionsFactory=t,this.filterParams=s}conditionForToolPanel(e,t,s,o,i,n){let r;const a=this.getTypeKey(e);return a&&(r=Ps(this,a)),i&&n&&(r=this.getLocaleTextFunc()(i,n)),r!=null?t?`${r} ${Ps(this,"filterSummaryInRangeValues",[s(),o()])}`:`${r} ${s()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},Cm=class extends Ld{constructor(e,t){super(e,t,s=>{const{dataTypeSvc:o,valueSvc:i}=this.beans,n=t.column,r=o?.getDateFormatterFunction(n),a=r?r(s??void 0):s;return i.formatValue(n,null,a)}),this.filterTypeKeys=mm}conditionToString(e,t,s,o,i){const{type:n}=e,r=Ct(e.dateFrom),a=Ct(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):h=>pc(h,l),d=()=>r!==null?c(r):"null",u=()=>a!==null?c(a):"null";if(t){const h=this.conditionForToolPanel(n,s,d,u,o,i);if(h!=null)return h}return s?`${d()}-${u()}`:r!=null?c(r):`${n}`}};function v5(e,t){const s=t;return s<e?-1:s>e?1:0}var w5=class extends fm{constructor(){super(gm,Ad),this.filterType="date",this.FilterModelFormatterClass=Cm}comparator(){return this.params.filterParams.comparator??v5}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}},vm=class extends ze{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 Id;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const s=this.optionsFactory.defaultOption;t||(this.lastType=s),this.readOnly=!!e.filterParams.readOnly;const o=this.isTypeEditable(s);this.setEditable(o)}refresh(e){this.params=e;const t=e,s=this.reactive;if((!s||t.source==="colDef")&&this.updateParams(e),s){const{source:o,model:i}=t;if(o==="dataChanged"||o==="ui")return;this.onModelUpdated(i)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}hasSingleInput(e){const t=this.optionsFactory.getCustomOption(e)?.numberOfInputs;return t==null||t==1}isTypeEditable(e){const t=["inRange","empty","blank","notBlank"];return!!e&&!this.readOnly&&this.hasSingleInput(e)&&t.indexOf(e)<0}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},b5={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"}]},S5=class extends vm{constructor(){super(b5,[ga]),this.eReadOnlyText=ne,this.eDateWrapper=ne,this.FilterModelFormatterClass=Cm,this.filterType="date",this.defaultOptions=Ad}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?Ct(e.dateFrom):null;this.dateComp.setDate(s),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){Be(this.eDateWrapper,e),Be(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const s=t.model,o=Et(e),i=o==null?null:{...s??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:o};t.onModelChange(i,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=Cd(e,this.defaultDebounceMs);return de(this.gos,{onDateChanged:st(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:s,params:o}=this;this.dateComp=new hm(e,t,o.column.getColDef(),this.getDateComponentParams(),s,i=>{i.setInputAriaLabel(this.getAriaLabel(o))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},y5={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},x5=class extends ze{constructor(){super(y5,[ga]),this.eDateInput=ne,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(e){const t=this.eDateInput.getInputElement(),s=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=s&&Hs();const{minValidYear:o,maxValidYear:i,minValidDate:n,maxValidDate:r,buttons:a,includeTime:l,colDef:c}=e.filterParams||{},d=this.beans.dataTypeSvc,u=l??d?.getDateIncludesTimeFlag?.(c.cellDataType)??!1;if(s?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text",n&&o&&G(85),r&&i&&G(86),n&&r){const[h,p]=[n,r].map(f=>f instanceof Date?f:Ct(f));h&&p&&h.getTime()>p.getTime()&&G(87)}n?n instanceof Date?t.min=pc(n):t.min=n:o&&(t.min=`${o}-01-01`),r?r instanceof Date?t.max=pc(r):t.max=r:i&&(t.max=`${i}-12-31`),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return Ct(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,s=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(Et(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}},Od=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function kc(e){const{allowedCharPattern:t}=e??{};return t??null}function Ac(e){return e==null||isNaN(e)?null:e}function wm(e,t){const{filter:s,filterTo:o,type:i}=e||{};return[Ac(s),Ac(o)].slice(0,un(i,t))}var R5=class extends kd{constructor(){super("numberFilter",wm,Od),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}setElementValue(e,t,s){const{numberFormatter:o}=this.params,i=!s&&o?o(t??null):t;super.setElementValue(e,i)}createEValue(){const e=kc(this.params),t=pt({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(t,this.eValuesFrom,"from",e),this.createFromToElement(t,this.eValuesTo,"to",e),t}createFromToElement(e,t,s,o){const i=this.createManagedBean(o?new Fo({allowedCharPattern:o}):new ud);i.addCss(`ag-filter-${s}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui())}removeEValues(e,t){const s=o=>this.removeComponents(o,e,t);s(this.eValuesFrom),s(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(s,o,i,n)=>{o<n&&t.push(Ac(this.stringToFloat(s.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}stringToFloat(e){if(typeof e=="number")return e;let t=us(e);t!=null&&t.trim()===""&&(t=null);const s=this.params.numberParser;return s?s(t):t==null||t.trim()==="-"?null:Number.parseFloat(t)}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(s.filter=o[0]),o.length>1&&(s.filterTo=o[1]),s}getInputs(e){const{eValuesFrom:t,eValuesTo:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(e=!0)}),e}},bm=class extends Ld{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=mm}conditionToString(e,t,s,o,i){const{filter:n,filterTo:r,type:a}=e,l=this.formatValue.bind(this);if(t){const c=this.conditionForToolPanel(a,s,()=>l(n),()=>l(r),o,i);if(c!=null)return c}return s?`${l(n)}-${l(r)}`:n!=null?l(n):`${a}`}},F5=class extends fm{constructor(){super(wm,Od),this.filterType="number",this.FilterModelFormatterClass=bm}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},Sm=class extends A{constructor(e){super(),this.params=e,this.eInput=ne,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new Fo(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const s=o=>this.onValueChanged(o);this.addManagedListeners(t,{input:s,keydown:s})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t}){const{eInput:s}=this;s.setInputAriaLabel(e),t!==void 0&&s.setAutoComplete(t)}};function Lc(e){const t=e?.trim();return t===""?e:t}function ym(e,t){const{filter:s,filterTo:o,type:i}=e||{};return[s||null,o||null].slice(0,un(i,t))}var E5={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},xm=class extends vm{constructor(){super(...arguments),this.eFloatingFilterInputContainer=ne,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(E5)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const t=e.browserAutoComplete??!1,{inputSvc:s,defaultDebounceMs:o,readOnly:i}=this;if(s.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=fa(e.filterParams),!i){const n=Cd(e.filterParams,o),r=st(this,this.syncUpWithParentFilter.bind(this),n);s.setValueChangedListener(r)}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,s=t.getValue();mt(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(s,!0)}syncUpWithParentFilter(e){const t=e.key===I.ENTER,s=this.reactive;if(s&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:o,params:i,lastType:n}=this;let r=o.getValue();if(i.filterParams.trimInput&&(r=Lc(r),o.setValue(r,!0)),s){const a=i,l=a.model,c=this.convertValue(r),d=c==null?null:{...l??{filterType:this.filterType,type:n??this.optionsFactory.defaultOption},filter:c};a.onModelChange(d,{afterFloatingFilter:!0})}else i.parentFilterInstance(a=>{a?.onFloatingFilterChanged(n||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},D5=class extends A{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new ud),this.eTextInput=this.createManagedBean(new Fo),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),s=this.eTextInput.getGui();e.appendChild(t),e.appendChild(s),this.setupListeners(t,o=>this.onValueChanged(o)),this.setupListeners(s,o=>this.onValueChanged(o))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},P5=class extends xm{constructor(){super(...arguments),this.FilterModelFormatterClass=bm,this.filterType="number",this.defaultOptions=Od}updateParams(e){kc(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=kc(e.filterParams),this.allowedCharPattern?this.createManagedBean(new Sm({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new D5)}convertValue(e){return e?Number(e):null}},Nd=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],M5=class extends kd{constructor(){super("textFilter",ym,Nd),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(s.filter=o[0]),o.length>1&&(s.filterTo=o[1]),s}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(s,o,i,n)=>{o<n&&t.push(us(s.getValue()))}),t}createEValue(){const e=pt({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:s}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,s,"to"),e}createFromToElement(e,t,s){const o=this.createManagedBean(new Fo);o.addCss(`ag-filter-${s}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeEValues(e,t){const s=n=>this.removeComponents(n,e,t),{eValuesFrom:o,eValuesTo:i}=this;s(o),s(i)}},Rm=class extends Ld{constructor(){super(...arguments),this.filterTypeKeys=C5}conditionToString(e,t,s,o,i){const{filter:n,filterTo:r,type:a}=e;if(t){const l=d=>()=>Ps(this,"filterSummaryTextQuote",[d]),c=this.conditionForToolPanel(a,s,l(n),l(r),o,i);if(c!=null)return c}return s?`${n}-${r}`:n!=null?`${n}`:`${a}`}},T5=({filterOption:e,value:t,filterText:s})=>{if(s==null)return!1;switch(e){case"contains":return t.includes(s);case"notContains":return!t.includes(s);case"equals":return t===s;case"notEqual":return t!=s;case"startsWith":return t.indexOf(s)===0;case"endsWith":{const o=t.lastIndexOf(s);return o>=0&&o===t.length-s.length}default:return!1}},I5=e=>e,k5=e=>e==null?null:e.toString().toLowerCase(),A5=class extends pm{constructor(){super(ym,Nd),this.filterType="text",this.FilterModelFormatterClass=Rm}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??T5,this.formatter=t.textFormatter??(t.caseSensitive?I5:k5)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,s,o){const i=e.map(h=>this.formatter(h))||[],n=this.formatter(t),{api:r,colDef:a,column:l,context:c,filterParams:{textFormatter:d}}=this.params;if(s.type==="blank")return Ur(t);if(s.type==="notBlank")return!Ur(t);const u={api:r,colDef:a,column:l,context:c,node:o.node,data:o.data,filterOption:s.type,value:n,textFormatter:d};return i.some(h=>this.matcher({...u,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=s=>{const o={...s},{filter:i,filterTo:n}=s;return i&&(o.filter=Lc(i)??null),n&&(o.filterTo=Lc(n)??null),o};return df(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},L5=class extends xm{constructor(){super(...arguments),this.FilterModelFormatterClass=Rm,this.filterType="text",this.defaultOptions=Nd}createFloatingFilterInputService(){return this.createManagedBean(new Sm)}};function O5(e){return!!e.quickFilter?.isFilterPresent()}function N5(e){return e.quickFilter?.getText()}function H5(e){e.quickFilter?.resetCache()}var G5=class extends A{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",s=>this.setFilter(s.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:s,pivotResultCols:o}=this.beans,i=t.isPivotMode(),n=e?.getColumns(),r=t.getColDefCols();let a=(i&&!s.get("applyQuickFilterBeforePivotOrAgg")?o?.getPivotResultCols()?.list:r)??[];n&&(a=a.concat(n)),this.colsToUse=s.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(s=>t?this.doesRowPassCache(e,s):this.doesRowPassNoCache(e,s))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return q(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){G(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),s=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,s&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(s=>{const o=this.getTextForColumn(s,e);return q(o)&&o.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let s;e?(this.checkGenerateAggText(t),s=t.quickFilterAggregateText):s=this.getAggText(t);const{quickFilterParts:o,matcher:i}=this;return i(o,s)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let s=this.beans.filterValueSvc.getValue(e,t);const o=e.getColDef();if(o.getQuickFilterText){const i=de(this.gos,{value:s,node:t,data:t.data,column:e,colDef:o});s=o.getQuickFilterText(i)}return q(s)?s.toString().toUpperCase():null}getAggText(e){const t=[];for(const s of this.colsToUse){const o=this.getTextForColumn(s,e);q(o)&&t.push(o)}return t.join(`
60
+ `)}},B5={moduleName:"ClientSideRowModelFilter",version:K,rowModels:["clientSide"],beans:[VP]},Hd={moduleName:"FilterCore",version:K,beans:[l5],apiFunctions:{isAnyFilterPresent:r5,onFilterChanged:a5},css:[$P],dependsOn:[B5]},Fm={moduleName:"FilterValue",version:K,beans:[d5]},ba={moduleName:"ColumnFilter",version:K,beans:[n5,c5],dynamicBeans:{headerFilterCellCtrl:zP},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:KP,getColumnFilterInstance:qP,destroyFilter:YP,setFilterModel:ZP,getFilterModel:XP,getColumnFilterModel:QP,setColumnFilterModel:JP,showColumnFilter:e5,hideColumnFilter:t5,getColumnFilterHandler:s5,doFilterAction:o5},dependsOn:[Hd,wa,Fm,jP]},V5={moduleName:"CustomFilter",version:K,userComponents:{agReadOnlyFloatingFilter:h5},dependsOn:[ba]},z5={moduleName:"TextFilter",version:K,dependsOn:[ba],userComponents:{agTextColumnFilter:{classImp:M5,params:{useForm:!0}},agTextColumnFloatingFilter:L5},dynamicBeans:{agTextColumnFilterHandler:A5}},W5={moduleName:"NumberFilter",version:K,dependsOn:[ba],userComponents:{agNumberColumnFilter:{classImp:R5,params:{useForm:!0}},agNumberColumnFloatingFilter:P5},dynamicBeans:{agNumberColumnFilterHandler:F5}},_5={moduleName:"DateFilter",version:K,dependsOn:[ba],userComponents:{agDateColumnFilter:{classImp:m5,params:{useForm:!0}},agDateInput:x5,agDateColumnFloatingFilter:S5},dynamicBeans:{agDateColumnFilterHandler:w5}},j5={moduleName:"QuickFilterCore",version:K,rowModels:["clientSide"],beans:[G5],dependsOn:[Hd,Fm]},U5={moduleName:"QuickFilter",version:K,apiFunctions:{isQuickFilterPresent:O5,getQuickFilter:N5,resetQuickFilter:H5},dependsOn:[j5]},$5={moduleName:"ExternalFilter",version:K,dependsOn:[Hd]},K5=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",Gl=(e,t,s)=>{const{editModelSvc:o}=e,i=o?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,n=o?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=i||n;return r?.length?r.join(s("tooltipValidationErrorSeparator",". ")):void 0},q5=class extends A{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,s,o){e&&t.destroyBean(e);const i=this.gos,n=Hl(i),{column:r,eGui:a}=t,l=r.getColDef();!o&&n&&!l.headerComponent&&(o=rr(()=>a.querySelector(".ag-header-cell-text")));const c="header",u=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),h=s??u,p={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>s??l?.headerTooltipValueGetter?.(de(i,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})};let f=this.createTooltipFeature(p);return f&&(f=t.createBean(f),t.setRefreshFunction("tooltip",()=>f.refreshTooltip())),f}setupHeaderGroupTooltip(e,t,s,o){e&&t.destroyBean(e);const i=this.gos,n=Hl(i),{column:r,eGui:a}=t,l=r.getColGroupDef();!o&&n&&!l?.headerGroupComponent&&(o=rr(()=>a.querySelector(".ag-header-group-text")));const c="headerGroup",u=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),h=s??u,p={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>s??l?.headerTooltipValueGetter?.(de(i,{location:c,colDef:l,column:r,value:h,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>{const C={column:r};return l&&(C.colDef=l),C}},f=this.createTooltipFeature(p);return f&&t.createBean(f)}enableCellTooltipFeature(e,t,s){const{beans:o}=this,{gos:i,editSvc:n}=o,{column:r,rowNode:a}=e;let l="cell";const c=()=>{const p=!!!n?.isEditing(e)&&Gl(o,e,this.getLocaleTextFunc());if(p)return l="cellEditor",p;l="cell";const f=r.getColDef(),C=a.data;if(f.tooltipField&&q(C))return $i(C,f.tooltipField,r.isTooltipFieldContainsDots());const v=f.tooltipValueGetter;return v?v(de(i,{location:"cell",colDef:r.getColDef(),column:r,rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,value:e.value,valueFormatted:e.valueFormatted})):null},d=Hl(i);s||(d&&!e.isCellRenderer()?s=()=>{const h=!!n?.isEditing(e);if(!h&&Gl(o,e,this.getLocaleTextFunc()))return!0;if(!r.isTooltipEnabled())return!1;const C=rr(()=>{const v=e.eGui;return v.children.length===0?v:v.querySelector(".ag-cell-value")});return!h&&C()}:s=()=>!n?.isEditing(e));const u={getGui:()=>e.eGui,getLocation:()=>l,getTooltipValue:t!=null?()=>t:c,shouldDisplayTooltip:s,getAdditionalParams:()=>({column:r,colDef:r.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(u,o)}setupFullWidthRowTooltip(e,t,s,o){const i={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>s,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:o},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(i,n);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){const{beans:s}=this,{context:o}=s,i=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!i)return;const n={getGui:()=>i,getTooltipValue:()=>Gl(s,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:a}=s,l=a?.getRowValidationModel()?.getRowValidationMap(),c=a?.getCellValidationModel()?.getCellValidationMap(),d=!!l&&l.size>0,u=!!c&&c.size>0;return d||u}},r=this.createTooltipFeature(n,s);if(r)return e.createBean(r,o)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=q(t.tooltipField)||q(t.tooltipValueGetter)||q(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},Y5=class extends Ny{createTooltipComp(e,t){PS(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},Em={moduleName:"Tooltip",version:K,beans:[q5],dynamicBeans:{tooltipFeature:Jp,highlightTooltipFeature:Hy,tooltipStateManager:Y5},userComponents:{agTooltipComponent:Vy},dependsOn:[wa],css:[K5]},Bo=class{constructor(e){this.cellValueChanges=e}},Bl=class extends Bo{constructor(e,t,s,o){super(e),this.initialRange=t,this.finalRange=s,this.ranges=o}},Z5=10,Ih=class{constructor(e){this.actionStack=[],this.maxStackSize=e||Z5,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}},X5=class extends A{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&&Tf(this.activeCellEdit,t),o=this.activeRowEdit!==null&&g2(this.activeRowEdit,t);if(!(s||o||this.isPasting||this.isRangeInAction))return;const{rowPinned:n,rowIndex:r,column:a,oldValue:l,value:c}=e,d={rowPinned:n,rowIndex:r,columnId:a.getColId(),newValue:c,oldValue:l};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const s=e.get("undoRedoCellEditingLimit");if(s<=0)return;this.undoStack=new Ih(s),this.redoStack=new Ih(s),this.addListeners();const o=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:i=>{i.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:o,newColumnsLoaded:o,columnGroupOpened:o,columnRowGroupChanged:o,columnMoved:o,columnPinned:o,columnVisible:o,rowDragEnd:o}),t.whenReady(this,i=>{this.gridBodyCtrl=i.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:s,redoStack:o}=this;t.dispatchEvent({type:"undoStarted",source:e});const i=this.undoRedo(s,o,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:i})}redo(e){const{eventSvc:t,undoStack:s,redoStack:o}=this;t.dispatchEvent({type:"redoStarted",source:e});const i=this.undoRedo(o,s,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:i})}undoRedo(e,t,s,o,i){if(!e)return!1;const n=e.pop();return n?.cellValueChanges?(this.processAction(n,r=>r[o],i),n instanceof Bl?this.processRange(n.ranges||[n[s]]):this.processCell(n.cellValueChanges),t.push(n),!0):!1}processAction(e,t,s){for(const o of e.cellValueChanges){const{rowIndex:i,rowPinned:n,columnId:r}=o,a={rowIndex:i,rowPinned:n},l=fs(this.beans,a);l.displayed&&l.setDataValue(r,t(o),s)}}processRange(e){let t;const s=this.beans.rangeSvc;s.removeAllCellRanges(!0),e.forEach((o,i)=>{if(!o)return;const n=o.startRow,r=o.endRow;i===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:o.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:o.startColumn,columns:o.columns};s.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:s,rowPinned:o}=t,i={rowIndex:s,rowPinned:o},n=fs(this.beans,i),r={rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:s,rowPinned:o}=e,{colModel:i,focusSvc:n,rangeSvc:r}=this.beans,a=i.getCol(s);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const c={rowIndex:t,column:a,rowPinned:o};n.setFocusedCell({...c,forceBrowserFocus:!0}),r?.setRangeToCell(c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new Bo(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 Bo(this.cellValueChanges);this.pushActionsToUndoStack(s)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new Bo(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new Bl(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&&As(s)?e=new Bl(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new Bo(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 Bo(t??[]);this.pushActionsToUndoStack(s),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},Q5=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",J5={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},e4=class extends Ca{constructor(){super(J5,[dd]),this.eEditor=ne}initialiseEditor(e){const t=e.value??void 0,s=this.eEditor;s.setValue(t),s.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(s,{fieldValueChanged:i=>this.setAriaLabel(i.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),s=ua(t,e),o=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${o} (${s})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,s=this.getValue();return t?t({value:s,internalErrors:null,cellEditorParams:e}):null}},Sa=class extends Ca{constructor(e){super(),this.cellEditorInput=e,this.eEditor=ne}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:s}=this,{cellStartedEdit:o,eventKey:i,suppressPreventDefault:n}=e;s.getInputElement().setAttribute("title",""),t.init(s,e);let r,a=!0;o?(this.focusAfterAttached=!0,i===I.BACKSPACE||i===I.DELETE?r="":i&&i.length===1?n?a=!1:r=i:(r=t.getStartValue(),i!==I.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===I.PAGE_UP||c===I.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Hs()||t.getFocusableElement().focus();const s=t.getInputElement();this.highlightAllOnFocus?s.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),s=e.getInputElement();t.focus(),s.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},t4={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},s4=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return t4}getAgComponents(){return[jp]}init(e,t){this.eEditor=e,this.params=t;const{min:s,max:o,step:i,colDef:n}=t;s!=null&&e.setMin(s),o!=null&&e.setMax(o),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:s}=this,{min:o,max:i,getValidationErrors:n}=s;let r=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(o){const l=o instanceof Date?o:new Date(o);if(t<l){const c=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${c}`,[c]))}}if(i){const l=i instanceof Date?i:new Date(i);if(t>l){const c=l.toLocaleDateString();r.push(a("maxDateValidation",`Date must be before ${c}`,[c]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:s,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,s=e.getDate();return!q(s)&&!q(t.value)?t.value:s??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Et(e,this.includeTime??!1)}},o4=class extends Sa{constructor(){super(new s4(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},i4={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},n4=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return i4}getAgComponents(){return[jp]}init(e,t){this.eEditor=e,this.params=t;const{min:s,max:o,step:i,colDef:n}=t;s!=null&&e.setMin(s),o!=null&&e.setMax(o),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,s=e.getInputElement().value,o=this.formatDate(this.parseDate(s??void 0)),{min:i,max:n,getValidationErrors:r}=t;let a=[];if(o){const l=new Date(o),c=this.getLocaleTextFunc();if(i){const d=new Date(i);if(l<d){const u=d.toLocaleDateString();a.push(c("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const d=new Date(n);if(l>d){const u=d.toLocaleDateString();a.push(c("maxDateValidation",`Date must be before ${u}`,[u]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,s=this.formatDate(t.getDate());return!q(s)&&!q(e.value)?e.value:e.parseValue(s??"")}getStartValue(){return Et(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):Ct(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):Et(e??null,this.includeTime??!1)??void 0}},r4=class extends Sa{constructor(){super(new n4(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},a4={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},l4=class extends Ca{constructor(){super(a4,[$S]),this.eEditor=ne}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:s,eventKey:o,maxLength:i,cols:n,rows:r}=e;this.focusAfterAttached=s,t.getInputElement().setAttribute("title",""),t.setMaxLength(i||200).setCols(n||60).setRows(r||10);let a;s?(this.focusAfterAttached=!0,o===I.BACKSPACE||o===I.DELETE?a="":o&&o.length===1?a=o:(a=this.getStartValue(e),o!==I.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}onKeyDown(e){const t=e.key;(t===I.LEFT||t===I.UP||t===I.RIGHT||t===I.DOWN||e.shiftKey&&t===I.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:s}=this,o=this.getLocaleTextFunc();e.setInputAriaLabel(o("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),s&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:s}=t,o=e.getValue();return!q(o)&&!q(s)?s:t.parseValue(o)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:s}=e,o=this.getLocaleTextFunc(),i=this.getValue();let n=[];return typeof i=="string"&&t!=null&&i.length>t&&n.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),s?s({value:i,internalErrors:n,cellEditorParams:e}):n}},c4={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},d4=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return c4}getAgComponents(){return[KS]}init(e,t){this.eEditor=e,this.params=t;const{max:s,min:o,precision:i,step:n}=t;s!=null&&e.setMax(s),o!=null&&e.setMin(o),i!=null&&e.setPrecision(i),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:s,getValidationErrors:o}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let a=[];return typeof n=="number"&&(t!=null&&n<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),s!=null&&n>s&&a.push(r("maxValueValidation",`Must be less than or equal to ${s}.`,[String(s)]))),a.length||(a=null),o?o({value:n,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===I.UP||e.key===I.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,s=e.getValue();if(!q(s)&&!q(t.value))return t.value;let o=t.parseValue(s);if(o==null)return o;if(typeof o=="string"){if(o==="")return null;o=Number(o)}return isNaN(o)?null:o}getStartValue(){return this.params.value}setCaret(){Hs()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},u4=class extends Sa{constructor(){super(new d4(()=>this.getLocaleTextFunc()))}},h4={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},g4=class extends Ca{constructor(){super(h4,[iy]),this.eEditor=ne,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:s,gos:o}=this,{values:i,value:n,eventKey:r}=e;if(Ge(i)){G(58);return}this.startedByEnter=r!=null?r===I.ENTER:!1;let a=!1;i.forEach(u=>{const h={value:u},p=s.formatValue(e.column,null,u),f=p!=null;h.text=f?p:u,t.addOption(h),a=a||n===u}),a?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:d}=e;l!=null&&t.setPickerGap(l),d!=null&&t.setPickerMaxHeight(d),c!=null&&t.setPickerMaxWidth(c),o.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:s}=e,o=this.getValue();let i=[];if(t&&!t.includes(o)){const n=this.getLocaleTextFunc();i.push(n("invalidSelectionValidation","Invalid selection."))}else i=null;return s?s({value:o,internalErrors:i,cellEditorParams:e}):i}},p4={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},f4=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return p4}getAgComponents(){return[ga]}init(e,t){this.eEditor=e,this.params=t;const s=t.maxLength;s!=null&&e.setMaxLength(s)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:s}=e,o=this.getValue(),i=this.getLocaleTextFunc();let n=[];return t!=null&&typeof o=="string"&&o.length>t&&n.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),s?s({value:o,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,s=e.getValue();return!q(s)&&!q(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(){Hs()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),s=q(t)&&t.length||0;s&&e.getInputElement().setSelectionRange(s,s)}},kh=class extends Sa{constructor(){super(new f4(()=>this.getLocaleTextFunc()))}};function m4(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function C4(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Dm(e,t,s="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,s),"ensureVisible")}function Pm(e,t,s){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,s),"ensureVisible")}function v4(e,t,s=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,s),"ensureVisible")}function w4(e){e.undoRedo?.undo("api")}function b4(e){e.undoRedo?.redo("api")}function S4(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function y4(e){const t=e.editModelSvc?.getEditMap(),s=[];return t?.forEach((o,i)=>{const{rowIndex:n,rowPinned:r}=i;o.forEach((a,l)=>{const{editorValue:c,pendingValue:d,sourceValue:u,state:h}=a,p=ds(a);let f=c??d;f===Bt&&(f=void 0);const C={newValue:f,oldValue:u,state:h,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:n,rowPinned:r};(h==="editing"||h==="changed"&&p)&&s.push(C)})}),s}function x4(e,t=!1){const{editSvc:s}=e;if(s?.isBatchEditing()){if(t)for(const o of e.editModelSvc?.getEditPositions()??[])o.state==="editing"&&s.revertSingleCellEdit(o);else Qs(e,{persist:!0});Qo(e,void 0,{cancel:t})}else s?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function R4(e,t){const s=He(e,t);return e.editSvc?.isEditing(s)??!1}function F4(e,t){const{key:s,colKey:o,rowIndex:i,rowPinned:n}=t,{editSvc:r,colModel:a}=e,l=a.getCol(o);if(!l){G(12,{colKey:o});return}const d=fs(e,{rowIndex:i,rowPinned:n||null});if(!d){G(290,{rowIndex:i,rowPinned:n});return}if(!l.isCellEditable(d))return;n==null&&Pm(e,i),Dm(e,o),r?.startEditing({rowNode:d,column:l},{event:s?new KeyboardEvent("keydown",{key:s}):void 0,source:"api"})}function E4(e){return e.editSvc?.validateEdit()||null}function D4(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function P4(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var M4={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},T4=class extends ad{constructor(e){super(M4),this.params=e}postConstruct(){po(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,s=o=>{Sc(this.gos,o,t.node,t.column,!0)||t.onKeyDown(o)};this.addManagedElementListeners(e,{keydown:s})}};function I4(e,{column:t},s,o,i="ui"){if(s instanceof KeyboardEvent&&(s.key===I.TAB||s.key===I.ENTER||s.key===I.F2||s.key===I.BACKSPACE&&o))return!0;if(s?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const r=t?.getColDef(),a=k4(e.gos,r),l=s?.type;return l==="click"&&s?.detail===1&&a===1||l==="dblclick"&&s?.detail===2&&a===2?!0:i==="api"?o??!1:!1}function k4(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function Oc(e,{rowNode:t,column:s},o="ui"){const i=s.getColDef().editable,n=e.editModelSvc;return s.isColumnFunc(t,i)||!!n&&n.hasEdits({rowNode:t,column:s},{withOpenEditor:!0})}function A4(e,t,s="ui"){const o=Oc(e,t,s);return o===!0||s==="ui"?o:e.colModel.getCols().some(n=>Oc(e,{rowNode:t.rowNode,column:n},s))}var $r=(e,t=!1)=>{if(e!==void 0)return ds(e)||t&&e.state==="editing"};function Mm(e,t,s=!1){return $r(e.editModelSvc?.getEdit(t),s)}var Tm=(e,t,s)=>{if(e)for(let o=0,i=e.length;o<i;++o){const n=e[o];if(n.data&&($r(t?.getEdit({rowNode:n,column:s}))||$r(t?.getEdit({rowNode:n.pinnedSibling,column:s})))||Tm(n.childrenAfterGroup,t,s))return!0}};function Im(e,t){const{column:s,rowNode:o}=t;return e.gos.get("groupTotalRow")&&!o?.footer?!1:Tm(o?.childrenAfterGroup,e.editModelSvc,s)}function km(e,{rowNode:t,column:s}){if(t=t.pinnedSibling,!!t)return $r(e.editModelSvc?.getEdit({rowNode:t,column:s}))}var L4=class extends A{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){const{cellCtrl:e,editSvc:t,beans:s}=this;if(t?.isBatchEditing()&&t.isEditing()){const i=Mm(s,e)||Im(s,e)||km(s,e);this.applyBatchingStyle(i)}else this.applyBatchingStyle(!1);const o=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",o)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},O4=class extends A{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){const{rowCtrl:e,editModelSvc:t,beans:s}=this;let o=e.rowNode,i=t?.getEditRow(o);const n=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:o});if(!i&&o.pinnedSibling&&(o=o.pinnedSibling,i=t?.getEditRow(o)),i){const r=Array.from(i.keys()).some(a=>{const l={rowNode:o,column:a};return Mm(s,l,!0)||Im(s,l)||km(s,l)});this.applyStyle(n,r);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){const s=this.editSvc?.isBatchEditing()??!1,o=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:i})=>{i.toggleCss("ag-row-editing",o&&t),i.toggleCss("ag-row-batch-edit",o&&t&&s),i.toggleCss("ag-row-inline-editing",t),i.toggleCss("ag-row-not-inline-editing",!t),i.toggleCss("ag-row-editing-invalid",o&&t&&e)})}},N4=({rowModel:e,pinnedRowModel:t,editModelSvc:s},o)=>{const i=new Set;e.forEachNode(n=>o.has(n)&&i.add(n)),t?.forEachPinnedRow("top",n=>o.has(n)&&i.add(n)),t?.forEachPinnedRow("bottom",n=>o.has(n)&&i.add(n));for(const n of o)i.has(n)||s.removeEdits({rowNode:n});return i},H4=({editModelSvc:e},t,s)=>{for(const o of t)e?.getEditRow(o)?.forEach((i,n)=>!s.has(n)&&e.removeEdits({rowNode:o,column:n}))},G4=e=>()=>{const t=new Set(e.colModel.getCols()),s=e.editModelSvc.getEditMap(!0),o=new Set(s.keys());H4(e,N4(e,o),t)},B4=new Set(["undo","redo","paste","bulk","rangeSvc"]),V4=new Set(["ui","api"]),Am={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},z4=new Set(Object.keys(Am)),W4=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),tr={cancel:!0,source:"api"},_4={cancel:!1,source:"api"},No={checkSiblings:!0},Mi={force:!0,suppressFlash:!0},j4=class extends A{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1,this.stopping=!1,this.committing=!1}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:o})=>{this.stopEditing(void 0,tr),this.createStrategy(o)});const t=G4(e),s=()=>{const o=this.model.getCellValidationModel().getCellValidationMap().size>0,i=this.model.getRowValidationModel().getRowValidationMap().size>0;return o||i?this.stopEditing(void 0,tr):this.isEditing()&&(this.isBatchEditing()?Qo(e,this.model.getEditPositions()):this.stopEditing(void 0,_4)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:s,filterChanged:s,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(e){e?(this.batch=!0,this.stopEditing(void 0,tr)):(this.stopEditing(void 0,tr),this.batch=!1)}createStrategy(e){const{beans:t,gos:s,strategy:o}=this,i=Ah(s,e);if(o){if(o.beanName===i)return o;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(i,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,s,o="ui"){const i=I4(this.beans,e,t,s,o);return i&&(this.strategy??(this.strategy=this.createStrategy())),i}shouldStopEditing(e,t,s="ui"){return this.strategy?.shouldStop(e,t,s)??null}shouldCancelEditing(e,t,s="ui"){return this.strategy?.shouldCancel(e,t,s)??null}validateEdit(){return n3(this.beans)}isEditing(e,t){return this.model.hasEdits(e,t??No)}isRowEditing(e,t){return(e&&this.model.hasRowEdits(e,t))??!1}startEditing(e,t){const{startedEdit:s=!0,event:o=null,source:i="ui",ignoreEventKey:n=!1,silent:r}=t;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(e,"api"))return;const a=He(this.beans,e);if(a&&!a.comp){a.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const l=this.shouldStartEditing(e,o,s,i);if(l===!1&&i!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,i)&&!t.continueEditing&&this.stopEditing(void 0,{source:i}),l&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start({position:e,event:o,source:i,ignoreEventKey:n,startedEdit:s,silent:r})}stopEditing(e,t){const{event:s,cancel:o,source:i="ui",forceCancel:n,forceStop:r}=t||{},{beans:a,model:l}=this;if(z4.has(i)&&this.isBatchEditing())return this.bulkRefresh(e),!1;const c=this.committing?Am[i]:i;if(!(this.committing||this.isEditing(e)||this.isBatchEditing()&&l.hasEdits(e,No))||!this.strategy||this.stopping)return!1;this.stopping=!0;const u=He(a,e);u&&(u.onEditorAttachedFuncs=[]);let h=l.getEditMap(!0),p=!1;const f=!o&&(!!this.shouldStopEditing(e,s,c)||this.committing&&!this.batch)||(r??!1),C=o&&!!this.shouldCancelEditing(e,s,c)||(n??!1);if(f||C){Qs(a,{persist:!0,isCancelling:C||o,isStopping:f});const v=l.getEditMap(),w=this.processEdits(v,o,i);this.strategy?.stop(o,s);for(const b of w)l.clearEditValue(b);this.bulkRefresh(void 0,h);for(const b of l.getEditPositions(v)){const S=He(a,b),y=ds(b);S?.refreshCell({force:!0,suppressFlash:!y})}h=v,p||(p=f)}else if(s instanceof KeyboardEvent&&this.batch&&this.strategy?.midBatchInputsAllowed(e)&&this.isEditing(e,{withOpenEditor:!0})){const{key:v}=s,w=v===I.ENTER,b=v===I.ESCAPE,S=v===I.TAB;(w||S||b)&&(w||S?Qs(a,{persist:!0}):b&&this.revertSingleCellEdit(u),this.isBatchEditing()?this.strategy?.cleanupEditors():Qo(a,l.getEditPositions(),{event:s,cancel:b}),s.preventDefault(),this.bulkRefresh(e,h,{suppressFlash:!0}),h=l.getEditMap())}else Qs(a,{persist:!0}),h=l.getEditMap();return p&&e&&this.model.removeEdits(e),this.navigateAfterEdit(t,u?.cellPosition),Mc(a),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),C&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(h.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),p&&f&&this.dispatchBatchEvent("batchEditingStopped",h)),this.stopping=!1,p}navigateAfterEdit(e,t){if(!e||!t)return;const{event:s,suppressNavigateAfterEdit:o}=e;if(!(s instanceof KeyboardEvent)||o)return;const{key:n,shiftKey:r}=s,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(n!==I.ENTER||!a)return;const l=r?I.UP:I.DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t=!1,s){const o=Array.from(e.keys()),i=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const r of o){const a=e.get(r);for(const l of a.keys()){const c=a.get(l),d={rowNode:r,column:l},u=ds(c);!t&&u&&!i&&(this.setNodeDataValue(r,l,c.pendingValue,void 0,s)||n.push(d))}}return n}setNodeDataValue(e,t,s,o,i="edit"){const{beans:n}=this,r=He(n,{rowNode:e,column:t}),a=V4.has(i)?"edit":i;r&&(r.suppressRefreshCell=!0),this.commitNextEdit();const l=e.setDataValue(t,s,a);return r&&(r.suppressRefreshCell=!1),o&&r?.refreshCell(Mi),l}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefresh();let s=Mi;t?.forceRefreshOfEditCellsOnly&&(s={...U4(e),...Mi}),this.beans.rowRenderer.refreshCells(s)}dispatchEditValuesChanged({rowNode:e,column:t},s={}){if(!e||!t||!s)return;const{pendingValue:o,sourceValue:i}=s,{rowIndex:n,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:a,newValue:o,oldValue:i,value:o,colDef:t.getColDef()})}bulkRefresh(e={},t,s={}){const{beans:o,gos:i}=this,{editModelSvc:n,rowModel:r}=o;We(i)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),s):t&&n?.getEditMap(!1)?.forEach((a,l)=>{for(const c of a.keys())this.refCell({rowNode:l,column:c},a.get(c),s)}))}refCell({rowNode:e,column:t},s,o={}){const{beans:i,gos:n}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const c=e.sibling;c&&a.add(c);let d=e.parent;for(;d;)d.sibling?.footer&&n.get("groupTotalRow")||!d.parent&&d.sibling&&n.get("grandTotalRow")?a.add(d.sibling):a.add(d),d=d.parent;for(const u of r)this.dispatchEditValuesChanged({rowNode:u,column:t},s);for(const u of r)He(i,{rowNode:u,column:t})?.refreshCell(o);for(const u of a)He(i,{rowNode:u,column:t})?.refreshCell(o)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{rowNode:s}=e,{gos:o,beans:i}=this;if(s.group){if(o.get("treeData")){if(!s.data&&!o.get("enableGroupEdit"))return!1}else if(!o.get("enableGroupEdit"))return!1}const n=Ah(o)==="fullRow"?A4(i,e,t):Oc(i,e,t);return n&&(this.strategy??(this.strategy=this.createStrategy())),n}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,s=!0){if(this.hasValidationErrors(e)){const o=He(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),s&&(!o?.hasBrowserFocus()&&o?.focusCell(),o?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(o&&this.revertSingleCellEdit(o),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const s=He(this.beans,e);s?.comp?.getCellEditor()&&(Qo(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),ri(this.beans,e,{silent:!0}),Co(this.beans),s?.refreshCell(Mi),t&&(s?.focusCell(),s?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){Co(this.beans);const t=He(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,o="ui"){let i;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,s)==="block-stop";return e instanceof Jo&&n&&(i=this.strategy?.moveToNextEditingCell(e,t,s,o,r)),i===null||(i=i||!!this.beans.focusSvc.focusedHeader,i===!1&&!r&&this.stopEditing()),i}getCellDataValue({rowNode:e,column:t},s=!0){if(!e||!t)return;let o=this.model.getEdit({rowNode:e,column:t});const i=e.pinnedSibling;if(i){const r=this.model.getEdit({rowNode:i,column:t});r&&(o=r)}const n=s?o?.editorValue??o?.pendingValue:o?.pendingValue;return n===Bt||!o?o?.sourceValue??this.valueSvc.getValue(t,e,!1,"api"):n}addStopEditingWhenGridLosesFocus(e){JD(this,this.beans,e)}createPopupEditorWrapper(e){return new T4(e)}commitNextEdit(){this.committing=!0}setDataValue(e,t,s){try{if((!this.isEditing()||this.committing)&&!W4.has(s))return;const{beans:o}=this;this.strategy??(this.strategy=this.createStrategy());const i=this.isBatchEditing()?"ui":this.committing?s??"api":"api";if(!s||B4.has(s))return wr(o,e,t,s,void 0,{persist:!0}),this.setNodeDataValue(e.rowNode,e.column,t,!0,s);const n=this.model.getEdit(e);if(n){if(n.pendingValue===t)return!1;if(n.sourceValue!==t)return wr(o,e,t,s,void 0,{persist:!0}),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0;if(n.sourceValue===t)return o.editModelSvc?.removeEdits(e),this.dispatchEditValuesChanged(e,{...n,pendingValue:t}),!0}return wr(o,e,t,s,void 0,{persist:!0}),this.stopEditing(e,{source:i,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(e){s3(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){if(!this.batch||!this.model.hasRowEdits(e.rowNode,No))return;const{rowNode:o,column:i}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:l}=n;return l.data=this.model.getEditRowDataValue(o,No),{compDetails:n}}const a=this.model.getEditRow(e.rowNode,No);if(r!==void 0&&a?.has(i))return{valueToDisplay:this.valueSvc.getValue(i,o)}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,s,o){this.strategy?.dispatchCellEvent(e,t,s,o)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return de(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},s){if(!s||s.length===0)return;const{beans:o,rangeSvc:i,valueSvc:n}=this;Qs(o,{persist:!0});const r=this.model.getEditMap(!0),a=r.get(e)?.get(t)?.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),s.forEach(c=>{if(i?.forEachRowInRange(c,d=>{const u=fs(o,d);if(u===void 0)return;const h=r.get(u)??new Map;for(const p of c.columns)if(p&&this.isCellEditable({rowNode:u,column:p},"api")){const f=n.getValue(p,u,!0,"api");let C=n.parseValue(p,u??null,a,f);Number.isNaN(C)&&(C=null),h.set(p,{editorValue:void 0,pendingValue:C,sourceValue:f,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}h.size>0&&r.set(u,h)}),this.setEditMap(r),this.batch){this.cleanupEditors(),Mc(o),this.bulkRefresh();return}this.commitNextEdit(),this.stopEditing(void 0,{source:"bulk"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})}),this.bulkRefresh();const l=He(o,{rowNode:e,column:t});l&&l.focusCell(!0)}createCellStyleFeature(e,t){return new L4(e,t)}createRowStyleFeature(e,t){return new O4(e,t)}setEditingCells(e,t){const{beans:s}=this,{colModel:o,valueSvc:i}=s,n=new Map;for(let{colId:r,column:a,colKey:l,rowIndex:c,rowPinned:d,newValue:u,state:h}of e){const p=r?o.getCol(r):l?o.getCol(l):a;if(!p)continue;const f=fs(s,{rowIndex:c,rowPinned:d});if(!f)continue;const C=i.getValue(p,f,!0,"api");if(!t?.forceRefreshOfEditCellsOnly&&!ds({pendingValue:u,sourceValue:C})&&h!=="editing")continue;let v=n.get(f);v||(v=new Map,n.set(f,v)),u===void 0&&(u=Bt),v.set(p,{editorValue:void 0,pendingValue:u,sourceValue:C,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(n,t)}onCellFocused(e){const t=He(this.beans,e);if(!t||!this.isEditing(t,No))return;const s=this.model.getEdit(t);if(!s||!ds(s))return;const i=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(i,"pendingChange")}allowedFocusTargetOnValidation(e){return He(this.beans,e)}};function U4(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 Ah(e,t){return t??e.get("editType")??"singleCell"}var Lm=class extends A{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const s=e.previousParams,{editSvc:o,beans:i}=this,n=e.type==="cellFocused"?e.sourceEvent:null;s&&(t=He(i,s));const{gos:r,editModelSvc:a}=i,l=e.type==="cellFocusCleared";if(o.isEditing(void 0,{withOpenEditor:!0})){const{column:c,rowIndex:d,rowPinned:u}=e,h={column:c,rowNode:fs(i,{rowIndex:d,rowPinned:u})},p=r.get("invalidEditValueMode")==="block";if(p)return;const f=!p,C=!!a?.getCellValidationModel().hasCellValidation(h),v=f&&C;(s||l?o.stopEditing(void 0,{cancel:v,source:l&&f?"api":void 0,event:n}):!0)||(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stop(e,t){const s=this.model.getEditPositions(),o={all:[],pass:[],fail:[]};for(const i of s){if(o.all.push(i),(this.model.getCellValidationModel().getCellValidation(i)?.errorMessages?.length??0)>0){o.fail.push(i);continue}o.pass.push(i)}if(e)for(const i of s)_r(this.beans,i,{cancel:e}),this.model.stop(i);else{const i=this.processValidationResults(o);if(i.destroy.length>0)for(const n of i.destroy)_r(this.beans,n,{event:t,cancel:e}),this.model.stop(n);if(i.keep.length>0)for(const n of i.keep){const r=He(this.beans,n);this.editSvc?.cellEditingInvalidCommitBlocks()||r&&this.editSvc.revertSingleCellEdit(r)}}return!0}cleanupEditors({rowNode:e}={},t){Qs(this.beans,{persist:!1});const s=this.model.getEditPositions(),o=[];if(e)for(const i of s)i.rowNode!==e&&o.push(i);else for(const i of s)o.push(i);Qo(this.beans,o),Mc(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,s=t?.getCellEditor();if(s?.focusIn)s.focusIn();else{const o=this.beans.gos.get("editType")==="fullRow";e.focusCell(o),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:s=!1,startedEdit:o,position:i,cells:n=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!s&&t.key||void 0;t3(this.beans,n,i,r,t,o)}dispatchCellEvent(e,t,s,o){const i=He(this.beans,e);i&&this.eventSvc.dispatchEvent({...i.createEvent(t??null,s),...o})}dispatchRowEvent(e,t,s){if(s)return;const o=Pd(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStop(e,t,s="ui"){const o=this.editSvc.isBatchEditing();return o&&s==="api"?!0:o&&(s==="ui"||s==="edit")?!1:s==="api"?!0:t instanceof KeyboardEvent&&!o?t.key===I.ENTER:null}shouldCancel(e,t,s="ui"){const o=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!o&&t.key===I.ESCAPE||o&&s==="api"||s==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const s=[];if(e.forEach((o,i)=>{o.forEach((n,r)=>{n.state==="editing"&&s.push({...n,rowNode:i,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),s.length>0){const o=s.at(-1),i=o.pendingValue===Bt?void 0:o.pendingValue;this.start({position:o,event:new KeyboardEvent("keydown",{key:i}),source:"api"});const n=He(this.beans,o);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},$4=class extends Lm{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,s="ui"){const{rowNode:o}=e||{};if(!Pd(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,s);return n!==null?n:this.rowNode?o!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:s,startedEdit:o,event:i,ignoreEventKey:n}=e,{rowNode:r}=t;this.rowNode!==r&&super.cleanupEditors(t),this.dispatchRowEvent({rowNode:r},"rowEditingStarted",s),this.startedRows.push(r);const a=this.beans.visibleCols.allCols,l=[];for(const c of a){if(!c.isCellEditable(r))continue;const d={rowNode:r,column:c};l.push(d),this.model.hasEdits(d)||this.model.start(d)}this.rowNode=r,this.setupEditors({cells:l,position:t,startedEdit:o,event:i,ignoreEventKey:n})}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){const{rowNode:s}=this;if(s&&!this.model.hasRowEdits(s))return!1;const o=[];if(e||this.model.getEditMap().forEach((i,n)=>{if(!(!i||i.size===0)){for(const r of i.values())if(ds(r)){o.push(n);break}}}),Co(this.beans),!e&&this.editSvc?.checkNavWithValidation({rowNode:s})==="block-stop")return!1;super.stop(e,t);for(const i of o)this.dispatchRowEvent({rowNode:i},"rowValueChanged");return this.cleanupEditors({rowNode:s},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,s=e.previousParams;if(s?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const o=He(this.beans,s);this.gos.get("invalidEditValueMode")==="block"&&o&&(this.model.getCellValidationModel().getCellValidation(o)||this.model.getRowValidationModel().getRowValidation(o))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(const s of this.startedRows)this.dispatchRowEvent({rowNode:s},"rowEditingStopped");this.startedRows.length=0}moveToNextEditingCell(e,t,s,o="ui",i=!1){const n=e.cellPosition;let r;this.model.suspend(!0);try{r=this.beans.navigation?.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const a=r.cellPosition,l=e.isCellEditable(),c=r.isCellEditable(),d=a&&n.rowIndex===a.rowIndex&&n.rowPinned===a.rowPinned;l&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return c&&!i?u?r.focusCell(!0,s):(r.comp?.getCellEditor()||ri(this.beans,r,{event:s,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,s)):(c&&i&&this.setFocusInOnEditor(r),r.focusCell(!0,s)),!d&&!i&&(this.editSvc?.stopEditing({rowNode:e.rowNode},{event:s}),this.cleanupEditors(r,!0),u?r.focusCell(!0,s):this.editSvc.startEditing(r,{startedEdit:!0,event:s,source:o,ignoreEventKey:!0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:s},o)=>{if(s!=="editing")return;const i=He(this.beans,{rowNode:t,column:o});i&&!i.comp?.getCellEditor()&&ri(this.beans,i,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},K4=class extends Lm{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,s="ui"){const o=super.shouldStop(e,t,s);if(o!==null)return o;const{rowNode:i,column:n}=e||{};return(!this.rowNode||!this.column)&&i&&n?null:this.rowNode!==i||this.column!==n}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:s,event:o,ignoreEventKey:i}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:s,event:o,ignoreEventKey:i})}dispatchRowEvent(e,t,s){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stop(e,t){return super.stop(e,t),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:s}=this.beans,{rowIndex:o,column:i,rowPinned:n}=e,r=fs(this.beans,{rowIndex:o,rowPinned:n}),a=Pc(i),l=t.getCol(a),c=e.previousParams;if(c){const d=Pc(c.column);if(c?.rowIndex===o&&d===a&&c?.rowPinned===n)return}s?.isEditing({rowNode:r,column:l},{withOpenEditor:!0})&&e.type==="cellFocused"||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,s,o="ui",i=!1){const n=this.beans.focusSvc.getFocusedCell();n&&(e=Wo(this.beans,n)??e);const r=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),i||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:s}));try{a=this.beans.navigation?.findNextCellToFocusOn(r,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const c=a.cellPosition,d=e.isCellEditable(),u=a.isCellEditable(),h=c&&r.rowIndex===c.rowIndex&&r.rowPinned===c.rowPinned;d&&!i&&this.setFocusOutOnEditor(e);const p=this.gos.get("suppressStartEditOnTab");if(!h&&!i&&(super.cleanupEditors(a,!0),p?a.focusCell(!0,s):this.editSvc.startEditing(a,{startedEdit:!0,event:s,source:o,ignoreEventKey:!0})),u&&!i){if(a.focusCell(!1,s),p)a.focusCell(!0,s);else if(!a.comp?.getCellEditor()){const f=this.editSvc?.isEditing(a,{withOpenEditor:!0});ri(this.beans,a,{event:s,cellStartedEdit:!0,silent:f}),this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else u&&i&&this.setFocusInOnEditor(a),a.focusCell(!0,s);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},Bs={moduleName:"EditCore",version:K,beans:[QD,j4],apiFunctions:{getEditingCells:y4,getEditRowValues:S4,getCellEditorInstances:e3,startEditingCell:F4,stopEditing:x4,isEditing:R4,validateEdit:E4},dynamicBeans:{singleCell:K4,fullRow:$4},dependsOn:[wa,Em],css:[Q5]},q4={moduleName:"UndoRedoEdit",version:K,beans:[X5],apiFunctions:{undoCellEditing:w4,redoCellEditing:b4,getCurrentUndoSize:D4,getCurrentRedoSize:P4},dependsOn:[Bs]},Y4={moduleName:"TextEditor",version:K,userComponents:{agCellEditor:kh,agTextCellEditor:kh},dependsOn:[Bs]},Z4={moduleName:"NumberEditor",version:K,userComponents:{agNumberCellEditor:{classImp:u4}},dependsOn:[Bs]},X4={moduleName:"DateEditor",version:K,userComponents:{agDateCellEditor:o4,agDateStringCellEditor:r4},dependsOn:[Bs]},Q4={moduleName:"CheckboxEditor",version:K,userComponents:{agCheckboxCellEditor:e4},dependsOn:[Bs]},J4={moduleName:"SelectEditor",version:K,userComponents:{agSelectCellEditor:g4},dependsOn:[Bs]},eM={moduleName:"LargeTextEditor",version:K,userComponents:{agLargeTextCellEditor:l4},dependsOn:[Bs]},tM={moduleName:"CustomEditor",version:K,dependsOn:[Bs]},sM=class extends A{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Ko(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),T0(e))}createColumns(e,t){const s=()=>{Lr(this.beans,this.columns?.tree),this.columns=null},o=e.treeDepth,n=(this.columns?.treeDepth??-1)==o,r=this.generateSelectionCols();if(M0(r,this.columns?.list??[])&&n)return;s();const{colGroupSvc:l}=this.beans,c=l?.findDepth(e.tree)??0,d=l?.balanceTreeForAutoCols(r,c)??[];this.columns={list:r,tree:d,treeDepth:c,map:{}},t(h=>{if(!h)return null;const p=h.filter(f=>!bs(f));return[...r,...p]})}updateColumns(e){const t=Ko(e.source);for(const s of this.columns?.list??[]){const o=this.createSelectionColDef(e.currentValue);s.setColDef(o,null,t),Vt(this.beans,{state:[{...o,colId:s.getColId()}]},t)}}getColumn(e){return this.columns?.list.find(t=>ji(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,s=e.get("rowSelection");if(typeof s!="object"||!oo(e))return!1;const o=(t.autoColSvc?.getColumns()?.length??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&o)return!1;const i=!!$o(s),n=cr(s);return i||n}createSelectionColDef(e){const{gos:t}=this,s=e??t.get("selectionColumnDef"),o=t.get("enableRtl"),{rowSpan:i,spanRows:n,...r}=s??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:o?"right":"left",comparator(a,l,c,d){const u=c.isSelected(),h=d.isSelected();return u===h?0:u?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...r,colId:Sp,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const s=new xo(e,null,t,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(e,t,s){const o=t&&typeof t!="string"?$o(t):void 0,i=e&&typeof e!="string"?$o(e):void 0,n=o!==i,r=t&&typeof t!="string"?cr(t):void 0,a=e&&typeof e!="string"?cr(e):void 0,l=r!==a,c=Tr(e),d=Tr(t);(n||l||c!==d)&&this.beans.colModel.refreshAll(s)}destroy(){Lr(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,s){if(!this.columns?.list.length)return;const o=e.length+t.length+s.length;if(o===0)return;const i=this.columns.list[0];if(!i.isVisible())return;const n=()=>{let l;switch(i.pinned){case"left":case!0:l=e;break;case"right":l=s;break;default:l=t}l&&zt(l,i)};(this.beans.rowNumbersSvc?.getColumn(yp)?2:1)===o&&n()}};function oM(e,t){if(!t.nodes.every(r=>r.rowPinned&&!xn(r)?(G(59),!1):r.id===void 0?(G(60),!1):!0))return;const{nodes:o,source:i,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:o,source:i??"api",newValue:n})}function iM(e,t,s="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:s,selectAll:t})}function nM(e,t,s="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:s,selectAll:t})}function rM(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function aM(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function lM(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function cM(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function dM(e){return e.selectionSvc?.getSelectedNodes()??[]}function uM(e){return e.selectionSvc?.getSelectedRows()??[]}var hM=class extends LR{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=Ir(e),this.groupSelectsDescendants=rn(e),this.groupSelectsFiltered=Ar(e)==="filteredDescendants",this.masterSelectsDetail=Ru(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=rn(e),s=Ir(e),o=Ar(e)==="filteredDescendants";this.masterSelectsDetail=Ru(e)==="detail",(t!==this.groupSelectsDescendants||o!==this.groupSelectsFiltered||s!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=o,this.mode=s)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,s){if(this.isRowSelectionBlocked(t))return 0;const o=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,s);if(o==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in o)return o.reset?this.resetNodes():this.selectRange(o.deselect,!1,s),this.selectRange(o.select,!0,s);{const i=o.checkFilteredNodes?Nm(o.node):o.newValue;return this.setNodesSelected({nodes:[o.node],newValue:i,clearSelection:o.clearSelection,keepDescendants:o.keepDescendants,event:e,source:s})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:s,nodes:o,event:i,source:n,keepDescendants:r=!1}){if(o.length===0)return 0;const{gos:a}=this;if(!oo(a)&&e)return G(132),0;if(o.length>1&&!this.isMultiSelect())return G(130),0;let l=0;for(let c=0;c<o.length;c++){const d=o[c],u=Ho(d);if(u.rowPinned&&!xn(u)){G(59);continue}if(u.id===void 0){G(60);continue}this.groupSelectsFiltered&&u.group&&!a.get("treeData")||this.selectRowNode(u,e,i,n)&&(this.detailSelection.delete(u.id),l++),this.groupSelectsDescendants&&u.childrenAfterGroup?.length&&(l+=this.selectChildren(u,e,n))}return s||(o.length===1&&n==="api"&&this.selectionCtx.setRoot(Ho(o[0])),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(Ho(o[0]),r,n)),l>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),l}selectRange(e,t,s){let o=0;return e.forEach(i=>{const n=Ho(i);if(n.group&&this.groupSelectsDescendants)return;this.selectRowNode(n,t,void 0,s)&&o++}),o>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)),o}selectChildren(e,t,s){const o=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return o?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:s,nodes:o}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((s,o)=>{e(s)&&t.set(o,s)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:s,rowModel:o}=this.beans;if(!We(s))return!1;const i=o.rootNode;if(!i)return!1;t||(t=new cn(!0,i),t.active=!1);let n=!1;return t.forEachChangedNodeDepthFirst(r=>{if(r!==i){const a=this.calculateSelectedFromChildren(r);n=this.selectRowNode(r,a===null?!1:a,void 0,e)||n}}),n}clearOtherNodes(e,t,s){const o=new Map;let i=0;return this.selectedNodes.forEach(n=>{const r=n.id==e.id;if((t?!pM(e,n):!0)&&!r){const l=this.selectedNodes.get(n.id);i+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&n.parent&&o.set(n.parent.id,n.parent)}}),o.forEach(n=>{const r=this.calculateSelectedFromChildren(n);this.selectRowNode(n,r===null?!1:r,void 0,s)}),i}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new Os(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(!We(e))return;const s=t.getTopLevelNodes();if(s===null)return;const o=[];function i(n){for(let r=0,a=n.length;r<a;r++){const l=n[r];l.isSelected()?o.push(l):l.group&&l.childrenAfterGroup&&i(l.childrenAfterGroup)}}return i(s),o}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const s=We(this.gos);let o=!1;const i=n=>{const r=this.selectRowNode(Ho(n),!1,void 0,e);o||(o=r)};if(t==="currentPage"||t==="filtered"){if(!s){Pe(102);return}this.getNodesToSelect(t).forEach(i)}else this.selectedNodes.forEach(i),this.reset(e);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const n=this.updateGroupsFromChildrenSelections(e);o||(o=n)}o&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,s=0;return this.getNodesToSelect(e).forEach(o=>{this.groupSelectsDescendants&&o.group||(o.isSelected()?t++:o.selectable&&s++)}),{selectedCount:t,notSelectedCount:s}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:s}=this.getSelectedCounts(e);return Om(t,s)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],s=i=>t.push(i);if(e==="currentPage")return this.forEachNodeOnPage(i=>{if(!i.group){s(i);return}if(!i.expanded&&!i.footer){const n=r=>{s(r),r.childrenAfterFilter?.forEach(n)};n(i);return}this.groupSelectsDescendants||s(i)}),t;const o=this.beans.rowModel;return e==="filtered"?(o.forEachNodeAfterFilter(s),t):(o.forEachNode(s),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:s}=this.beans,o=t.getFirstRow(),i=t.getLastRow();for(let n=o;n<=i;n++){const r=s.getRow(n);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:s}=this;if(!oo(t)){G(132);return}if(p0(t)&&!kr(t)){G(130);return}if(!this.canSelectAll())return;const{source:o,selectAll:i}=e;let n=!1;if(this.getNodesToSelect(i).forEach(r=>{const a=this.selectRowNode(Ho(r),!0,void 0,o);n||(n=a)}),s.selectAll=!0,We(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(o);n||(n=r)}n&&this.dispatchSelectionChanged(o)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,s){if(e||(e=[]),!Array.isArray(e)){Pe(103);return}const o=new Set(e),i=[];this.beans.rowModel.forEachNode(n=>{o.has(n.id)&&i.push(n)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:i,source:t})}canSelectAll(){return We(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:s}=this.beans;if(!oo(t))return;const o="selectableChanged",i=e!==void 0,n=We(t)&&this.groupSelectsDescendants,r=[],a=l=>{if(i&&!l.group)return;if(n&&l.group){const d=l.childrenAfterGroup?.some(u=>u.selectable)??!1;this.setRowSelectable(l,d,!0);return}!this.updateRowSelectable(l,!0)&&l.isSelected()&&r.push(l)};if(n){if(e===void 0){const l=s.rootNode;e=l?new cn(!1,l):void 0}e?.forEachChangedNodeDepthFirst(a,!i,!i)}else s.forEachNode(a);r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:o}),!i&&n&&this.updateGroupsFromChildrenSelections?.(o)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const s=e.detailNode?.detailGridInfo?.api;if(!s)return;const o=gM(s);if(e.isSelected()!==o&&this.selectRowNode(e,o,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!o){const n=this.detailSelection.get(e.id)??new Set;for(const r of s.getSelectedNodes())n.add(r.id);this.detailSelection.set(e.id,n)}}setDetailSelectionState(e,t,s){if(this.masterSelectsDetail){if(!kr(t)){G(269);return}switch(e.isSelected()){case!0:{s.selectAll();break}case!1:{s.deselectAll();break}case void 0:{const o=this.detailSelection.get(e.id);if(o){const i=[];for(const n of o){const r=s.getRowNode(n);r&&i.push(r)}s.setNodesSelected({nodes:i,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function Ho(e){return xn(e)?e.pinnedSibling:e.footer?e.sibling:e}function gM(e){let t=0,s=0;return e.forEachNode(o=>{o.isSelected()?t++:o.selectable&&s++}),Om(t,s)}function Om(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function pM(e,t){let s=t.parent;for(;s;){if(s===e)return!0;s=s.parent}return!1}function Nm(e){const t=e.isSelected()===!1,s=e.childrenAfterFilter?.some(Nm)??!1;return t||s}var fM={moduleName:"SharedRowSelection",version:K,beans:[sM],apiFunctions:{setNodesSelected:oM,selectAll:iM,deselectAll:nM,selectAllFiltered:rM,deselectAllFiltered:aM,selectAllOnCurrentPage:lM,deselectAllOnCurrentPage:cM,getSelectedNodes:dM,getSelectedRows:uM}},mM={moduleName:"RowSelection",version:K,rowModels:["clientSide","infinite","viewport"],beans:[hM],dependsOn:[fM]};function CM(e){e.expansionSvc?.expandAll(!0)}function vM(e){e.expansionSvc?.expandAll(!1)}function Hm(e){e.rowModel?.onRowHeightChanged()}function Gm(e){if(e.rowAutoHeight?.active){G(3);return}e.rowModel?.resetRowHeights()}function wM(e,t,s){const o=wP(e);if(o){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){Pe(238);return}o.setRowCount(t,s);return}Pe(28);return}va(e)?.setRowCount(t,s)}function bM(e){return yo(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function SM(e){return e.rowModel.isLastRowIndexKnown()}var yM={moduleName:"CsrmSsrmSharedApi",version:K,apiFunctions:{expandAll:CM,collapseAll:vM}},xM={moduleName:"RowModelSharedApi",version:K,apiFunctions:{onRowHeightChanged:Hm,resetRowHeights:Gm}},RM={moduleName:"SsrmInfiniteSharedApi",version:K,apiFunctions:{setRowCount:wM,getCacheBlockState:bM,isLastRowIndexKnown:SM}},FM=class extends A{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(o=>{if(!o){Pe(18),t||Pe(20);return}if(this.isGridApi(o))return o;const i=o;return"current"in i?i.current?.api:(i.api||Pe(19),i.api)}).filter(o=>!!o&&!o.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const s=[];return e.columns?e.columns.forEach(o=>{s.push(t(o))}):e.column&&s.push(t(e.column)),s}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":G(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const s of e.columnGroups){let o=null;s&&(o=t.getProvidedColGroup(s.getGroupId())),!(s&&!o)&&t.setColumnGroupOpened(o,s.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let s=null;const o=this.beans,{colResize:i,ctrlsSvc:n,colModel:r}=o;if(t&&(s=r.getColDefCol(t.getColId())),t&&!s)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const u=e.api.getColumnState().map(h=>({colId:h.colId}));Vt(o,{state:u,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const u=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));Vt(o,{state:u},"alignedGridChanged")}break;case"columnPinned":{const u=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));Vt(o,{state:u},"alignedGridChanged")}break;case"columnResized":{const d=e,u={};for(const h of a)u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of d.flexColumns??[])u[h.getId()]&&delete u[h.getId()];i?.setColumnWidths(Object.values(u),!1,d.finished,"alignedGridChanged");break}}const c=n.getGridBodyCtrl().isVerticalScrollShowing();for(const d of this.getAlignedGridApis())d.setGridOption("alwaysShowVerticalScroll",c)}},EM={moduleName:"AlignedGrids",version:K,beans:[FM],dependsOn:[Hf]},DM=class extends A{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},Lh(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){const{selectionSvc:t,pinnedRowModel:s,groupStage:o}=this.beans;t?.reset("rowDataChanged"),s?.isManual()&&s.reset(),this.dispatchRowDataUpdateStarted(e),this.allNodesMap=Object.create(null),this.nextId=0;const i=Lh(this.rootNode),n=new Array(e.length);i._leafs=n;let r=0;const a=o?.getNestedDataGetter(),l=a?new Set:null,c=(d,u)=>{const h=d.level+1;for(let p=0,f=u.length;p<f;++p){const C=u[p];if(!C)continue;const v=this.createRowNode(C,h);if(v.sourceRowIndex=r,n[r++]=v,l&&!l.has(C)){l.add(C),v.treeParent=d;const w=a(C);w&&c(v,w)}}};c(i,e),n.length=r}setImmutableRowData(e,t){const{rootNode:s,gos:o}=this;this.dispatchRowDataUpdateStarted(t);const i=si(o),n=e.changedRowNodes,{adds:r,updates:a}=n,l=new Set,c=[],d=this.beans.groupStage?.getNestedDataGetter();let u=o.get("suppressMaintainUnsortedOrder")?void 0:!1,h=-1,p=!1;const f=(w,b)=>{if(!u&&u!==void 0){const S=w.sourceRowIndex;u=S<=h,h=S}w.data!==b&&(w.updateData(b),r.has(w)||a.add(w),!w.selectable&&w.isSelected()&&c.push(w))},C=(w,b,S)=>{for(let y=0,x=b.length;y<x;++y){const R=b[y];if(!R)continue;let E=this.getRowNode(i({data:R,level:S}));if(E?(f(E,R),p||(p=!!d&&E.treeParent!==w)):(E=this.createRowNode(R,S),r.add(E)),!d||l.has(E)){l.add(E);continue}l.add(E),E.treeParent=w;const D=d(R);D&&C(E,D,S+1)}};C(s,t,0);const v=this.deleteUnusedNodes(l,n,c)||u||r.size>0;if(v){const w=s._leafs??(s._leafs=[]);u===void 0?kM(w,l,n):IM(w,l)&&(n.reordered=!0)}(v||p||a.size)&&(e.rowDataUpdated=!0,this.deselect(c))}deleteUnusedNodes(e,{removals:t},s){const o=this.rootNode._leafs;for(let i=0,n=o.length;i<n;i++){const r=o[i];e.has(r)||(t.add(r),r.isSelected()&&s.push(r),this.deleteNode(r))}return t.size>0}updateRowData(e,t){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return G(268),{remove:[],update:[],add:[]};const s=[],o=si(this.gos),i=this.executeRemove(o,e,t,s),n=this.executeUpdate(o,e,t,s),r=this.executeAdd(e,t);return this.deselect(s),{remove:i,update:n,add:r}}executeRemove(e,{remove:t},{adds:s,updates:o,removals:i},n){const r=this.rootNode._leafs,a=r?.length,l=t?.length;if(!l||!a)return[];let c=0,d=a,u=0,h;const p=new Array(l);for(let f=0;f<l;++f){const C=this.lookupNode(e,t[f]);if(!C)continue;const v=C.sourceRowIndex;v<d&&(d=v),v>u&&(u=v),C.isSelected()&&n.push(C),this.deleteNode(C),s.delete(C)?(h??(h=new Set),h.add(C)):(o.delete(C),i.add(C)),p[c++]=C}return p.length=c,c&&TM(r,d,u,i,h),p}executeUpdate(e,{update:t},{adds:s,updates:o},i){const n=t?.length;if(!n)return[];const r=new Array(n);let a=0;for(let l=0;l<n;l++){const c=t[l],d=this.lookupNode(e,c);d&&(d.updateData(c),!d.selectable&&d.isSelected()&&i.push(d),r[a++]=d,s.has(d)||o.add(d))}return r.length=a,r}executeAdd(e,t){var s;const o=(s=this.rootNode)._leafs??(s._leafs=[]),i=o.length,n=e.add,r=n?.length;if(!r)return[];const a=i+r;let l=this.sanitizeAddIndex(o,e.addIndex);if(l<i){for(let u=i-1,h=a-1;u>=l;--u){const p=o[u];p.sourceRowIndex=h,o[h--]=p}t.reordered=!0}o.length=a;const c=new Array(r),d=t.adds;for(let u=0;u<r;u++){const h=this.createRowNode(n[u],0);d.add(h),h.sourceRowIndex=l,o[l]=h,c[u]=h,l++}return c}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){const t="rowDataChanged",s=this.beans.selectionSvc;e.length&&s?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),s?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:s?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t){const s=new Os(this.beans);s.parent=this.rootNode,s.level=t,s.group=!1,s.expanded=!1,s.setDataAndId(e,String(this.nextId++));const o=s.id,i=this.allNodesMap;return i[o]&&G(2,{nodeId:o}),i[o]=s,s}deleteNode(e){e.clearRowTopAndRowIndex();const t=e.id,s=this.allNodesMap;s[t]===e&&delete s[t];const o=e.pinnedSibling;o&&this.beans.pinnedRowModel?.pinRow(o,null)}lookupNode(e,t){if(!e)return MM(this.rootNode._leafs,t);const s=e({data:t,level:0}),o=this.allNodesMap[s];return o||(Pe(4,{id:s}),null)}sanitizeAddIndex(e,t){const s=e.length;if(typeof t!="number"||t<0||t>=s||Number.isNaN(t))return s;t=Math.ceil(t);const o=this.gos;return t>0&&o.get("treeData")&&o.get("getDataPath")&&(t=PM(e,t)),t}},PM=(e,t)=>{for(let s=0,o=e.length;s<o;s++)if(e[s]?.rowIndex==t-1)return s+1;return t},Lh=e=>{e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",e._leafs?.length!==0&&(e._leafs=[]);const t=[],s=[],o=[],i=[];e.childrenAfterGroup=t,e.childrenAfterSort=s,e.childrenAfterAggFilter=o,e.childrenAfterFilter=i;const n=e.sibling;return n&&(n.childrenAfterGroup=t,n.childrenAfterSort=s,n.childrenAfterAggFilter=o,n.childrenAfterFilter=i,n.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},MM=(e,t)=>{if(e)for(let s=0,o=e.length;s<o;s++){const i=e[s];if(i.data===t)return i}return Pe(5,{data:t}),null},TM=(e,t,s,o,i)=>{t=Math.max(0,t);for(let n=t,r=e.length;n<r;++n){const a=e[n];n<=s&&(o.has(a)||i?.has(a))||(a.sourceRowIndex=t,e[t++]=a)}e.length=t},IM=(e,t)=>{const s=t.size;e.length=s;let o=0,i=!1,n=!1;for(const r of t){const a=r.sourceRowIndex;a===o?n||(n=i):(a>=0?n=!0:i=!0,r.sourceRowIndex=o,e[o]=r),++o}return n},kM=(e,t,{removals:s,adds:o})=>{const i=e.length;e.length=t.size;let n=0;for(let r=0;r<i;++r){const a=e[r];s.has(a)||(n!==r&&(a.sourceRowIndex=n,e[n]=a),++n)}for(const r of o)r.sourceRowIndex<0&&(r.sourceRowIndex=n,e[n++]=r);e.length=n},Bm=e=>{const t=e.childrenAfterSort,s=e.sibling;if(s&&(s.childrenAfterSort=t),!!t)for(let o=0,i=t.length-1;o<=i;o++){const n=t[o],r=o===0,a=o===i;n.firstChild!==r&&(n.firstChild=r,n.dispatchRowEvent("firstChildChanged")),n.lastChild!==a&&(n.lastChild=a,n.dispatchRowEvent("lastChildChanged")),n.childIndex!==o&&(n.childIndex=o,n.dispatchRowEvent("childIndexChanged"))}},AM=class extends A{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e){const t=this.beans.sortSvc.getSortOptions(),s=t.length>0&&!!e.changedRowNodes&&this.gos.get("deltaSort");this.sort(t,s,e.changedRowNodes,e.changedPath)}sort(e,t,s,o){const{gos:i,colModel:n,rowGroupColsSvc:r,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:c}=this.beans,d=i.get("groupMaintainOrder"),u=n.getCols().some(b=>b.isRowGroupActive()),h=r?.columns,p=n.isPivotMode(),f=i.getCallback("postSortRows");let C=!1,v;const w=b=>{const S=p&&b.leafGroup;let y=d&&u&&!b.leafGroup;y&&(v??(v=this.shouldSortContainsGroupCols(e)),y&&(y=!v));let x=null;if(y){let R=!1;if(h){const E=b.level+1;E<h.length&&(R=h[E].getSort()===null)}R||(x=NM(b))}else!e.length||S||(t&&s?x=LM(a,b,s,o,e):x=a.doFullSort(b.childrenAfterAggFilter,e));if(x||(x=b.childrenAfterAggFilter?.slice(0)??[]),C||(C=b.childrenAfterSort?.[0]!==x[0]),b.childrenAfterSort=x,Bm(b),f){const R={nodes:b.childrenAfterSort};f(R)}};if(o?.forEachChangedNodeDepthFirst(w),C&&i.get("groupHideOpenParents")){const b=c?.getShowRowGroupCols();b?.length&&l.refreshCells({columns:b,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(Zt(this.gos)){for(let s=0;s<t;++s){const o=e[s].column;if(o.isPrimary()&&o.isRowGroupActive())return!0}return!1}for(let s=0;s<t;++s)if(e[s].column.getColDef().showRowGroup)return!0;return!1}},LM=(e,t,s,o,i)=>{const n=t.childrenAfterAggFilter,r=t.childrenAfterSort;if(!r)return e.doFullSort(n,i);const a=new Set,l=[],{updates:c,adds:d}=s;for(let h=0,p=n.length;h<p;++h){const f=n[h];c.has(f)||d.has(f)||o&&!o.canSkip(f)?l.push({currentPos:l.length,rowNode:f}):a.add(f)}const u=r.filter(h=>a.has(h)).map((h,p)=>({currentPos:p,rowNode:h}));return l.sort((h,p)=>e.compareRowNodes(i,h,p)),OM(e,i,l,u)},OM=(e,t,s,o)=>{let i=0,n=0;const r=s.length,a=o.length,l=new Array(r+a);let c=0;for(;i<r&&n<a;){const d=s[i],u=o[n];e.compareRowNodes(t,d,u)<0?(l[c++]=d.rowNode,++i):(l[c++]=u.rowNode,++n)}for(;i<r;)l[c++]=s[i++].rowNode;for(;n<a;)l[c++]=o[n++].rowNode;return l},NM=e=>{const t=e.childrenAfterSort,s=e.childrenAfterAggFilter,o=t?.length,i=s?.length;if(!o||!i)return null;const n=new Array(i),r=new Set;for(let l=0;l<i;++l)r.add(s[l]);let a=0;for(let l=0;l<o;++l){const c=t[l];r.delete(c)&&(n[a++]=c)}if(r.size===0&&a===o)return t;for(const l of r)n[a++]=l;return n.length=a,n},HM=class extends A{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowDataUpdatedPending=!1,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingModel=!1,this.rowNodesCountReady=!1,this.stages=[],this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=st(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new Os(e);this.rootNode=t,this.nodeManager=this.createBean(new DM(t));const s=this.refreshModel.bind(this,{step:"group"}),o=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:o,columnRowGroupChanged:s,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:s,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,s=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(o=>!!o);this.stages=s;for(let o=s.length-1;o>=0;--o)for(const i of s[o].refreshProps)t.set(i,o);this.addManagedPropertyListeners([...t.keys()],o=>{const i=o.changeSet?.properties;i&&this.onPropChange(i)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,s,o){let i,n=!1;do{i=!1;const r=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(r,s),c=Math.min(a,o);for(let d=l;d<=c;d++){const u=this.getRow(d);if(u.rowHeightEstimated){const h=ks(this.beans,u);u.setRowHeight(h.height),i=!0,n=!0}}i&&this.setRowTopAndRowIndex()}while(i);return n}onPropChange(e){const{nodeManager:t,gos:s,beans:o}=this,i=o.groupStage;if(!t)return;const n=new Set(e),r=i?.onPropChange(n);let a;n.has("rowData")?a=s.get("rowData"):r&&(a=i?.extractData()),a&&!Array.isArray(a)&&(a=null,G(1));const l={step:"nothing",changedProps:n};a&&(!r&&!this.isEmpty()&&a.length>0&&s.exists("getRowId")&&!s.get("resetRowDataOnUpdate")?(l.keepRenderedRows=!0,l.animate=!s.get("suppressAnimationFrame"),l.changedRowNodes=new mr,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0));const c=l.rowDataUpdated?"group":this.getRefreshedStage(e);c&&(l.step=c,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:s}=this,o=t.length;let i=o;for(let n=0,r=e.length;n<r&&i;++n)i=Math.min(i,s.get(e[n])??i);return i<o?t[i].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:s}=this,o=t.environment.getDefaultRowHeight();let i=0;const n=ot(this.gos,"normal");for(let r=0,a=s.length;r<a;++r){const l=s[r],c=l.id;if(c!=null&&e?.add(c),l.rowHeight==null){const d=ks(t,l,n,o);l.setRowHeight(d.height,d.estimated)}l.setRowTop(i),l.setRowIndex(r),i+=l.rowHeight}}clearRowTopAndRowIndex(e,t){const s=e.active,o=r=>{r?.id!=null&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},i=r=>{o(r),o(r.detailNode),o(r.sibling);const a=r.childrenAfterGroup;if(!r.hasChildren()||!a)return;const l=r.level==-1;if(!(s&&!l&&!r.expanded))for(let d=0,u=a.length;d<u;++d)i(a[d])},n=this.rootNode;n&&i(n)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const o=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+o}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:s,rowsToDisplay:o}=this;if(!s||!o.length||o[0]===s)return e;const n=s.childrenAfterSort,r=l=>{let c=n[l];if(this.gos.get("groupHideOpenParents"))for(;c.expanded&&c.childrenAfterSort&&c.childrenAfterSort.length>0;)c=c.childrenAfterSort[0];return c.rowIndex},a=t.footerSvc;return a?a?.getTopDisplayIndex(o,e,n,r):r(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:s}=this;if(!t||!s.length||s[0]===t)return e;let i=this.getRow(e);i.footer&&(i=i.sibling);let n=i.parent;for(;n&&n!==t;)i=n,n=i.parent;const r=t.childrenAfterSort?.indexOf(i)??-1;return r>=0?r:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:Uo(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const o=t.length===0||t.some(i=>i.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:o,keepRenderedRows:!0,animate:Uo(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:Uo(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new cn(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:s,rowDataUpdated:o}=e;return!(!t||s||!o||t.removals.size||t.adds.size)}refreshModel(e){const{nodeManager:t,beans:s,eventSvc:o,started:i,refreshingModel:n}=this;if(!t)return;const r=!!e.rowDataUpdated,a=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&r));if(i&&r&&o.dispatchEvent({type:"rowDataUpdated"}),!i||n||s.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)){this.rowDataUpdatedPending||(this.rowDataUpdatedPending=r);return}switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.refreshingModel=!0,s.masterDetailSvc?.refreshModel(e),r&&e.step!=="group"&&s.colFilter?.refreshModel(),e.step){case"group":this.doGrouping(e);case"filter":this.doFilter(a);case"pivot":this.doPivot(a);case"aggregate":this.doAggregate(a);case"filter_aggregates":this.doFilterAggregates(a);case"sort":this.doSort(e.changedRowNodes,a);case"map":this.doRowsToDisplay()}const l=new Set;this.setRowTopAndRowIndex(l),this.clearRowTopAndRowIndex(a,l),this.refreshingModel=!1,o.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let s=!1,o=!1;const i=[],n=rn(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(o)return;if(s&&(r===t||r===e)&&(o=!0,n&&r.group)){Vm(i,r);return}if(!s){if(r!==t&&r!==e)return;s=!0,t===e&&(o=!0)}(!r.group||!n)&&i.push(r)}),i}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,s=t.length;if(this.isEmpty()||s===0)return-1;let o=0,i=s-1;if(e<=0)return 0;if(t[i].rowTop<=e)return i;let r=-1,a=-1;for(;;){const l=Math.floor((o+i)/2),c=t[l];if(this.isRowInPixel(c,e)||(c.rowTop<e?o=l+1:c.rowTop>e&&(i=l-1),r===o&&a===i))return l;r=o,a=i}}isRowInPixel(e,t){const s=e.rowTop,o=s+e.rowHeight;return s<=t&&o>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let s=0,o=t.length;s<o;++s)e(t[s],s)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let s=0,o=t.length;s<o;++s)e(t[s],s)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,s=>s.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,s=>s.childrenAfterSort)}forEachPivotNode(e,t,s){const{colModel:o,rowGroupColsSvc:i}=this.beans;if(!o.isPivotMode())return;if(!i?.columns.length){e(this.rootNode,0);return}const n=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,r=>r.leafGroup?null:r[n])}depthFirstSearchRowNodes(e,t=!1,s=n=>n.childrenAfterGroup,o=this.rootNode,i=0){let n=i;if(!o)return n;const r=o===this.rootNode;if(r||e(o,n++),o.hasChildren()&&!o.footer){const a=s(o);if(a){const l=this.beans.footerSvc;n=l?.addTotalRows(n,o,e,t,r,"top")??n;for(const c of a)n=this.depthFirstSearchRowNodes(e,t,s,c,n);return l?.addTotalRows(n,o,e,t,r,"bottom")??n}}return n}doAggregate(e){const t=this.rootNode;t&&this.beans.aggStage?.execute({rowNode:t,changedPath:e})}doFilterAggregates(e){const t=this.rootNode,s=this.beans.filterAggStage;if(s){s.execute({rowNode:t,changedPath:e});return}t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const s=this.beans.sortStage;if(s){s.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t});return}t.forEachChangedNodeDepthFirst(o=>{o.childrenAfterSort=o.childrenAfterAggFilter.slice(0),Bm(o)})}doGrouping(e){const t=this.rootNode,o=this.beans.groupStage?.execute({rowNode:t,changedRowNodes:e.changedRowNodes,changedPath:e.changedPath,afterColumnsChanged:!!e.afterColumnsChanged});if(o===void 0){const i=t._leafs;t.childrenAfterGroup=i,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=i)}(o||e.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute({rowNode:this.rootNode,changedPath:e});return}e.forEachChangedNodeDepthFirst(s=>{s.childrenAfterFilter=s.childrenAfterGroup,um(s)},!0)}doPivot(e){this.beans.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return typeof t=="object"?t:typeof e=="string"&&e.indexOf(vc)===0?this.beans.groupStage?.getNode(e):void 0}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const s=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),s)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:s,asyncTransactions:o}=this;if(!e)return;t.valueCache?.onDataChanged();const i=[],n=[],r=new mr;for(const{rowDataTransaction:a,callback:l}of o??[]){this.rowNodesCountReady=!0;const c=e.updateRowData(a,r);i.push(c),l&&n.push(l.bind(null,c))}this.commitTransactions(r),n.length>0&&setTimeout(()=>{for(let a=0,l=n.length;a<l;a++)n[a]()},0),i.length>0&&s.dispatchEvent({type:"asyncTransactionsFlushed",results:i}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const s=new mr,o=t.updateRowData(e,s);return this.commitTransactions(s),o}commitTransactions(e){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{beans:e,rootNode:t}=this,s=e.flattenStage;if(s){this.rowsToDisplay=s.execute({rowNode:t});return}const o=this.rootNode.childrenAfterSort??[];for(const i of o)i.setUiLevel(0);this.rowsToDisplay=o}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const s=e.sibling;s?.setRowHeight(s.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const s=t.detailNode;s?.setRowHeight(s.rowHeight,!0);const o=t.sibling;o?.setRowHeight(o.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},Vm=(e,t)=>{const s=t.childrenAfterGroup;if(s)for(let o=0,i=s.length;o<i;++o){const n=s[o];n.data&&e.push(n),n.group&&Vm(e,n)}};function GM(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function BM(e,t){const s=Gs(e);s&&((!t||t==="everything")&&(t="group"),s.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function VM(e){return Gs(e)?.isEmpty()??!0}function zM(e,t){Gs(e)?.forEachLeafNode(t)}function WM(e,t){Gs(e)?.forEachNodeAfterFilter(t)}function _M(e,t){Gs(e)?.forEachNodeAfterFilterAndSort(t)}function jM(e,t){return e.frameworkOverrides.wrapIncoming(()=>Gs(e)?.updateRowData(t))}function UM(e,t,s){e.frameworkOverrides.wrapIncoming(()=>Gs(e)?.batchUpdateRowData(t,s))}function $M(e){e.frameworkOverrides.wrapIncoming(()=>Gs(e)?.flushAsyncTransactions())}function KM(e){return e.selectionSvc?.getBestCostNodeSelection()}var qM={moduleName:"ClientSideRowModel",version:K,rowModels:["clientSide"],beans:[HM,AM],dependsOn:[am]},YM={moduleName:"ClientSideRowModelApi",version:K,apiFunctions:{onGroupExpandedOrCollapsed:GM,refreshClientSideRowModel:BM,isRowDataEmpty:VM,forEachLeafNode:zM,forEachNodeAfterFilter:WM,forEachNodeAfterFilterAndSort:_M,applyTransaction:jM,applyTransactionAsync:UM,flushAsyncTransactions:$M,getBestCostNodeSelection:KM,resetRowHeights:Gm,onRowHeightChanged:Hm},dependsOn:[yM,xM]},ZM=class extends A{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:s,columnKeys:o,skipRowGroups:i,exportRowNumbers:n}=t,r=this.getColumnsToExport({allColumns:s,skipRowGroups:i,columnKeys:o,exportRowNumbers:n});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,s,o){const i=t.shouldRowBeSkipped||(()=>!1),r=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!r,l=this.colModel.isPivotMode()?o.leafGroup:!o.group,c=!!o.footer,d=o.allChildrenCount===1&&o.childrenAfterGroup?.length===1&&h0(this.gos,o);if(!l&&!c&&(t.skipRowGroups||d||a)||t.onlySelected&&!o.isSelected()||t.skipPinnedTop&&o.rowPinned==="top"||t.skipPinnedBottom&&o.rowPinned==="bottom"||o.stub||o.level===-1&&!l&&!c||i(de(this.gos,{node:o})))return;const p=e.onNewBodyRow(o);if(s.forEach((f,C)=>{p.onColumn(f,C,o)}),t.getCustomContentBelowRow){const f=t.getCustomContentBelowRow(de(this.gos,{node:o}));f&&e.addCustomContent(f)}}appendContent(e){return t=>{const s=e.appendContent;return s&&t.addCustomContent(s),t}}prependContent(e){return t=>{const s=e.prependContent;return s&&t.addCustomContent(s),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return s=>{if(!e.skipColumnGroupHeaders){const o=new kp,{colGroupSvc:i}=this.beans,n=i?i.createColumnGroups({columns:t,idCreator:o,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(n,s,e.processGroupHeaderCallback)}return s}}exportHeaders(e,t){return s=>{if(!e.skipColumnHeaders){const o=s.onNewHeaderRow();t.forEach((i,n)=>{o.onColumn(i,n,void 0)})}return s}}processPinnedTopRows(e,t){return s=>{const o=this.processRow.bind(this,s,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="top").sort((i,n)=>i.rowIndex-n.rowIndex).map(i=>this.pinnedRowModel?.getPinnedTopRow(i.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",o),s}}processRows(e,t){return s=>{const o=this.rowModel,i=We(this.gos),n=yo(this.gos),r=!i&&e.onlySelected,a=this.processRow.bind(this,s,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(c=>c.rowPinned==null).sort((c,d)=>c.rowIndex-d.rowIndex).map(c=>o.getRow(c.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())i?o.forEachPivotNode(a,!0,l==="filteredAndSorted"):n?o.forEachNodeAfterFilterAndSort(a,!0):o.forEachNode(a);else if(e.onlySelectedAllPages||r){const c=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(c),c.forEach(a)}else l==="all"?o.forEachNode(a):i||n?o.forEachNodeAfterFilterAndSort(a,!0):o.forEachNode(a);return s}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:s}=this.beans;if(!t||!s)return;const o=t.getSortOptions(),i=(n,r)=>n.rowIndex!=null&&r.rowIndex!=null?n.rowIndex-r.rowIndex:n.level===r.level?n.parent?.id===r.parent?.id?s.compareRowNodes(o,{rowNode:n,currentPos:n.rowIndex??-1},{rowNode:r,currentPos:r.rowIndex??-1}):i(n.parent,r.parent):n.level>r.level?i(n.parent,r):i(n,r.parent);e.sort(i)}processPinnedBottomRows(e,t){return s=>{const o=this.processRow.bind(this,s,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="bottom").sort((i,n)=>i.rowIndex-n.rowIndex).map(i=>this.pinnedRowModel?.getPinnedBottomRow(i.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",o),s}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:s=!1,exportRowNumbers:o=!1,columnKeys:i}=e,{colModel:n,gos:r,visibleCols:a}=this,l=n.isPivotMode(),c=h=>bs(h)?!1:!hs(h)||o;if(i?.length)return n.getColsForKeys(i).filter(c);const d=r.get("treeData");let u=[];return t&&!l?u=n.getCols():u=a.allCols,u=u.filter(h=>c(h)&&(s&&!d?!nd(h):!0)),u}recursivelyAddHeaderGroups(e,t,s){const o=[];for(const i of e){const n=i;if(n.getChildren)for(const r of n.getChildren()??[])o.push(r)}e.length>0&&je(e[0])&&this.doAddHeaderHeader(t,e,s),o&&o.length>0&&this.recursivelyAddHeaderGroups(o,t,s)}doAddHeaderHeader(e,t,s){const o=e.onNewHeaderGroupingRow();let i=0;for(const n of t){const r=n;let a;s?a=s(de(this.gos,{columnGroup:r})):a=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const c=(r.isExpandable()?r.getLeafColumns():[]).reduce((d,u,h,p)=>{let f=Me(d);return u.getColumnGroupShow()==="open"?(!f||f[1]!=null)&&(f=[h],d.push(f)):f&&f[1]==null&&(f[1]=h-1),h===p.length-1&&f&&f[1]==null&&(f[1]=h),d},[]);o.onColumn(r,a||"",i++,r.getLeafColumns().length-1,c)}}},XM={moduleName:"SharedExport",version:K,beans:[ZM]},Oh=`\r
61
+ `,QM=class extends EP{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,Oh),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((s,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(s.data.value||""),s.mergeAcross&&this.appendEmptyCells(s.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,s,o){s!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,s){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,t,t,"csv",s);this.result+=this.putInQuotes(o.valueFormatted??o.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(G(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Oh),this.isFirstLine=!1}},JM=class extends FP{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){G(51);return}const t=this.getMergedParams(e),s=this.getData(t),o=new Blob(["\uFEFF",s],{type:"text/plain"}),i=typeof t.fileName=="function"?t.fileName(de(this.gos,{})):t.fileName;DP(this.getFileName(i),o)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const s=t?Object.assign({},e):this.getMergedParams(e);return this.getData(s)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:s,rowGroupColsSvc:o,valueSvc:i,gos:n}=this,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:u}=e;return new QM({colModel:t,colNames:s,valueSvc:i,gos:n,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:u||",",rowGroupColsSvc:o})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function eT(e,t){return e.csvCreator?.getDataAsCsv(t)}function tT(e,t){e.csvCreator?.exportDataAsCsv(t)}var sT={moduleName:"CsvExport",version:K,beans:[JM],apiFunctions:{getDataAsCsv:eT,exportDataAsCsv:tT},dependsOn:[XM]},oT=class extends A{constructor(e,t,s){super(),this.id=e,this.parentCache=t,this.params=s,this.state="needsLoading",this.version=0,this.startRow=e*s.blockSize,this.endRow=this.startRow+s.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,s){this.successCommon(e,{rowData:t,rowCount:s})}isRequestMostRecentAndLive(e){const t=e===this.version,s=this.isAlive();return t&&s}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:s,beans:o,rowNodes:i}=this;for(let n=0;n<e;n++){const r=s+n,a=new Os(o);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),i.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:s,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:s,pageStatus:o}}}setDataAndId(e,t,s){q(t)?e.setDataAndId(t,s.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(Ge(this.params.datasource.getRows)){G(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:s,params:{sortModel:o,filterModel:i},gos:n}=this;return{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,s),failCallback:this.pageLoadFailed.bind(this,s),sortModel:o,filterModel:i,context:de(n,{}).context}}forEachNode(e,t,s){this.rowNodes.forEach((o,i)=>{this.startRow+i<s&&e(o,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const s=e-this.startRow;return this.rowNodes[s]}processServerResult(e){const{rowNodes:t,beans:s}=this;t.forEach((i,n)=>{const r=e.rowData?e.rowData[n]:void 0;!i.id&&i.alreadyRendered&&r&&(t[n]=new Os(s),t[n].setRowIndex(i.rowIndex),t[n].setRowTop(i.rowTop),t[n].setRowHeight(i.rowHeight),i.clearRowTopAndRowIndex()),this.setDataAndId(t[n],r,this.startRow+n)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){for(const e of this.rowNodes)e.clearRowTopAndRowIndex();super.destroy()}},iT=2,nT=class extends A{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const s=Math.floor(e/this.params.blockSize);let o=this.blocks[s];if(!o){if(t)return;o=this.createBlock(s)}return o.getRow(e)}createBlock(e){const t=this.params,s=this.createBean(new oT(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()&&(go(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e),s=(r,a)=>a.lastAccessed-r.lastAccessed;t.sort(s);const o=this.params.maxBlocksInCache>0,i=o?this.params.maxBlocksInCache-1:null,n=iT-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=n,c=o?a>=i:!1;if(l||c){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:s,endRow:o}=e;return t.rowIndex>=s&&t.rowIndex<o}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:s}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,s-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:s,overflowSize:o}=this.params,n=(e.id+1)*s+o;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,q(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const s of this.getBlocksInOrder())s.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(s,o)=>s.id-o.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const s=[];let o=-1,i=!1;const n={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(i&&o+1!==l.id){r=!0;continue}o=l.id,l.forEachNode(c=>{const d=c===e||c===t;(i||d)&&s.push(c),d&&(i=!i)},n,this.rowCount)}return r||i?[]:s}},rT=class extends A{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new Os(e);this.rootNode=t,t.level=-1,this.rowHeight=io(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=io(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!Ji(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;si(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:s,rowNodeBlockLoader:o,eventSvc:i,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:s?.getSortModel()??[],rowNodeBlockLoader:o,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:io(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new nT(this.cacheParams)),i.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(s=>{s.id===e&&(t=s)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),s=this.getRowCount()-1;return t>s?s:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function aT(e){va(e)?.refreshCache()}function lT(e){va(e)?.purgeCache()}function cT(e){return va(e)?.getRowCount()}var dT=class extends A{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=g0(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=st(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){zt(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){go(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(s=>s.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const s of t)s.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:s,state:o}=t.getBlockStateJson();e[s]=o}),e}printCacheStatus(){go(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},uT={moduleName:"InfiniteRowModelCore",version:K,rowModels:["infinite"],beans:[rT,dT]},hT={moduleName:"InfiniteRowModel",version:K,apiFunctions:{refreshInfiniteCache:aT,purgeInfiniteCache:lT,getInfiniteRowCount:cT},dependsOn:[uT,RM]},gT="↑",pT="↓",fT={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},mT=class extends ze{constructor(){super(fT),this.eValue=ne,this.eDelta=ne,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const s=Math.abs(t),o=e.formatValue(s),i=q(o)?o:s,n=t>=0,r=this.eDelta;n?r.textContent=gT+i:r.textContent=pT+i,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),mt(this.eDelta)}refresh(e,t=!1){const{value:s,valueFormatted:o}=e,{eValue:i,lastValue:n,beans:r}=this;if(s===n||(q(o)?i.textContent=o:q(s)?i.textContent=s:mt(i),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=s&&typeof s=="object"&&"toNumber"in s?s.toNumber():s,l=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return n&&i.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=s,!0}},CT=".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}",vT={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},wT=class extends ze{constructor(){super(vT),this.eCurrent=ne,this.refreshCount=0,this.registerCSS(CT)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:s}=this,o=pt({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=s.textContent,this.getGui().insertBefore(o,s),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let s=e.value;if(Ge(s)&&(s=""),s===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=s;const o=this.eCurrent;return q(e.valueFormatted)?o.textContent=e.valueFormatted:q(e.value)?o.textContent=s:mt(o),!0}},bT=class extends A{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,s=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const i=this.animations[t];i.delete(e);const n=Date.now(),r=n+s,a=n+s+o,l={phase:"flash",flashEndTime:r,fadeEndTime:a};i.set(e,l);const c=`ag-cell-${t}`,d=`${c}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(c,!0),u.toggleCss(d,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),s)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const s of Object.keys(this.animations)){const o=this.animations[s],i=`ag-cell-${s}`,n=`${i}-animation`;for(const[r,a]of o){if(!r.isAlive()||!r.comp){o.delete(r);continue}const{phase:l,flashEndTime:c,fadeEndTime:d}=a,u=l==="flash"?c:d;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:p,eGui:{style:f}}=r;switch(l){case"flash":p.toggleCss(i,!1),p.toggleCss(n,!0),f.transition=`background-color ${d-c}ms`,f.transitionDelay=`${c-e}ms`,t=Math.min(d,t??1/0),a.phase="fade";break;case"fade":p.toggleCss(i,!1),p.toggleCss(n,!1),f.removeProperty("transition"),f.removeProperty("transition-delay"),o.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const s=u2(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 ST(e,t={}){const{cellFlashSvc:s}=e;s&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))s.flashCell(o,t)})}var yT={moduleName:"HighlightChanges",version:K,beans:[bT],userComponents:{agAnimateShowChangeCellRenderer:mT,agAnimateSlideCellRenderer:wT},apiFunctions:{flashCells:ST}};function xT(e){return e.stateSvc?.getState()??{}}function RT(e,t,s){return e.stateSvc?.setState(t,s)}function Nh(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=FT(e)),e.version=K,e}function FT(e){return e.cellSelection=ET(e,"rangeSelection"),e}function ET(e,t){if(e&&typeof e=="object")return e[t]}var DT=class extends A{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=st(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=st(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=st(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=We(e);const o=Nh(e.get("initialState")??{}),i=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>n(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&s?.hideColumns("columnState");const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:c})=>{c==="gridInitializing"&&(r(),n(()=>{this.setupStateOnColumnsInitialised(o,!!i),s?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),n(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{l?.(),n(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const s=Nh(e);delete s.partialColumnState,this.cachedState=s,this.startSuppressEvents();const o="api",i=t?new Set(t):void 0;this.setGridReadyState(s,o,i),this.setColumnsInitialisedState(s,o,!!i,i),this.setRowCountState(s,o,i),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(s,o,i),this.stopSuppressEvents(o)})}setGridReadyState(e,t,s){t==="api"&&!s?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,s,o){this.setColumnState(e,t,s,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const s=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:s("aggregation"),columnMoved:s("columnOrder"),columnPinned:s("columnPinning"),columnResized:s("columnSizing"),columnVisible:s("columnVisibility"),columnPivotChanged:s("pivot"),columnPivotModeChanged:s("pivot"),columnRowGroupChanged:s("rowGroup"),sortChanged:s("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,s){const{filter:o,rowGroupExpansion:i,ssrmRowGroupExpansion:n,rowSelection:r,pagination:a}=e,l=(d,u)=>!s?.has(d)&&(u||t==="api");l("filter",o)&&this.setFilterState(o),l("rowGroupExpansion",i)&&this.setRowGroupExpansionState(n,i,t),l("rowSelection",r)&&this.setRowSelectionState(r,t),l("pagination",a)&&this.setPaginationState(a,t);const c=this.updateCachedState.bind(this);c("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(c("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),c("rowGroupExpansion",void 0)):(c("rowGroupExpansion",this.getRowGroupExpansionState()),c("ssrmRowGroupExpansion",void 0)),c("rowSelection",this.getRowSelectionState()),c("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),s=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},o=()=>t("filter",this.getFilterState()),{gos:i,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:s,columnRowGroupChanged:s,rowDataUpdated:()=>{(i.get("groupDefaultExpanded")!==0||i.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(s)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:r=>{(r.newPage||r.newPageSize)&&t("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:o})}setFirstDataRenderedState(e,t,s){const{scroll:o,cellSelection:i,focusedCell:n,columnOrder:r,rowPinning:a}=e,l=(u,h)=>!s?.has(u)&&(h||t==="api");l("focusedCell",n)&&this.setFocusedCellState(n),l("cellSelection",i)&&this.setCellSelectionState(i),l("scroll",o)&&this.setScrollState(o),l("rowPinning",a)&&this.setRowPinningState(a),this.setColumnPivotState(!!r?.orderedColIds,t);const c=this.updateCachedState.bind(this);c("sideBar",this.getSideBarState()),c("focusedCell",this.getFocusedCellState());const d=this.getRangeSelectionState();c("rangeSelection",d),c("cellSelection",d),c("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),s=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:s,cellFocusCleared:s,cellSelectionChanged:o=>{if(o.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState()),pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())})}getColumnState(){const e=this.beans;return SP(Nr(e),e.colModel.isPivotMode())}setColumnState(e,t,s,o){const{sort:i,rowGroup:n,aggregation:r,pivot:a,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:u}=e;let h=!1;const p=(F,M)=>{const L=!o?.has(F)&&!!(M||t==="api");return h||(h=L),L},f={},C=F=>{let M=f[F];return M||(M={colId:F},f[F]=M,M)},v={},w=p("sort",i);w&&i?.sortModel.forEach(({colId:F,sort:M},L)=>{const B=C(F);B.sort=M,B.sortIndex=L}),(w||!s)&&(v.sort=null,v.sortIndex=null);const b=p("rowGroup",n);b&&n?.groupColIds.forEach((F,M)=>{const L=C(F);L.rowGroup=!0,L.rowGroupIndex=M}),(b||!s)&&(v.rowGroup=null,v.rowGroupIndex=null);const S=p("aggregation",r);S&&r?.aggregationModel.forEach(({colId:F,aggFunc:M})=>{C(F).aggFunc=M}),(S||!s)&&(v.aggFunc=null);const y=p("pivot",a);y&&(a?.pivotColIds.forEach((F,M)=>{const L=C(F);L.pivot=!0,L.pivotIndex=M}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(y||!s)&&(v.pivot=null,v.pivotIndex=null);const x=p("columnPinning",l);if(x){for(const F of l?.leftColIds??[])C(F).pinned="left";for(const F of l?.rightColIds??[])C(F).pinned="right"}(x||!s)&&(v.pinned=null);const R=p("columnVisibility",c);if(R)for(const F of c?.hiddenColIds??[])C(F).hide=!0;(R||!s)&&(v.hide=null);const E=p("columnSizing",d);if(E)for(const{colId:F,flex:M,width:L}of d?.columnSizingModel??[]){const B=C(F);B.flex=M??null,B.width=L}(E||!s)&&(v.flex=null);const D=u?.orderedColIds,T=!!D?.length&&!o?.has("columnOrder"),k=T?D.map(F=>C(F)):Object.values(f);(k.length||h)&&(this.columnStates=k,Vt(this.beans,{state:k,applyOrder:T,defaultState:v},t))}setColumnPivotState(e,t){const s=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const i=this.beans,{pivotResultCols:n,colGroupSvc:r}=i;if(n?.isPivotResultColsPresent()){if(s){const a=[];for(const l of s)n.getPivotResultCol(l.colId)&&a.push(l);Vt(i,{state:a,applyOrder:e},t)}o&&r?.setColumnGroupState(o,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return yP(t)}setColumnGroupState(e,t,s){const o=this.beans.colGroupSvc;if(!o||s?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const i=new Set(e.columnGroup?.openColumnGroupIds),r=o.getColumnGroupState().map(({groupId:a})=>{const l=i.has(a);return l&&i.delete(a),{groupId:a,open:l}});for(const a of i)r.push({groupId:a,open:!0});r.length&&(this.columnGroupStates=r),o.setColumnGroupState(r,t)}getFilterState(){const e=this.beans.filterManager;let t=e?.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const s=e?.getFilterState(),o=e?.getAdvFilterModel()??void 0;return t||o||s?{filterModel:t,columnFilterState:s,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:s,columnFilterState:o,advancedFilterModel:i}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};(s!==void 0||o!==void 0)&&t?.setFilterState(s??null,o??null,"columnFilter"),i!==void 0&&t?.setAdvFilterModel(i??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:s,type:o,startRow:i,endRow:n,columns:r,startColumn:a}=t;return{id:s,type:o,startRow:i,endRow:n,colIds:r.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:s,colModel:o,visibleCols:i}=this.beans;if(!As(t)||!s)return;const n=[];for(const r of e?.cellRanges??[]){const a=[];for(const c of r.colIds){const d=o.getCol(c);d&&a.push(d)}if(!a.length)continue;let l=o.getCol(r.startColId);if(!l){const c=i.allCols,d=new Set(a);l=c.find(u=>d.has(u))}n.push({...r,columns:a,startColumn:l})}s.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:s}=e?.getVScrollPosition()??{top:0};return s||t?{top:s,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:s}=e??{top:0,left:0},{frameworkOverrides:o,rowRenderer:i,animationFrameSvc:n,ctrlsSvc:r}=this.beans;o.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(s),r.getScrollFeature()?.setVerticalScrollPosition(t),i.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:s,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:s,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:s}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:i,rowPinned:n}=e;t.setFocusedCell({column:s.getCol(o),rowIndex:i,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const s=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!s&&!o))return{page:s,pageSize:o}}setPaginationState(e,t){const{pagination:s,gos:o}=this.beans;if(!s)return;const{pageSize:i,page:n}=e??{page:0,pageSize:o.get("paginationPageSize")},r=t==="gridInitializing";i&&!o.get("paginationAutoPageSize")&&s.setPageSize(i,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?s.setPage(n):s.goToPage(n))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,s){const o=this.beans.expansionSvc;if(!o)return;const i=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};o.setExpansionState(i,s)}updateColumnState(e){const t=this.getColumnState();let s=!1;const o=this.cachedState;for(const i of Object.keys(t)){const n=t[i];Ji(n,o[i])||(s=!0)}this.cachedState={...o,...t},s&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const s=this.cachedState[e];this.setCachedStateValue(e,t),Ji(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")}},PT={moduleName:"GridState",version:K,beans:[DT],apiFunctions:{getState:xT,setState:RT}};function MT(e){return e.rowModel.isLastRowIndexKnown()}function TT(e){return e.pagination?.getPageSize()??100}function IT(e){return e.pagination?.getCurrentPage()??0}function kT(e){return e.pagination?.getTotalPages()??1}function AT(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function LT(e){e.pagination?.goToNextPage()}function OT(e){e.pagination?.goToPreviousPage()}function NT(e){e.pagination?.goToFirstPage()}function HT(e){e.pagination?.goToLastPage()}function GT(e,t){e.pagination?.goToPage(t)}var BT=class extends A{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,s=()=>{const o=Math.max(io(t),1),i=Math.floor(e/o);t.pagination.setPageSize(i,"autoCalculated")};this.isBodyRendered?st(this,s,50)():(s(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},Ti="paginationPageSizeSelector",VT={tag:"span",cls:"ag-paging-page-size"},zT=class extends ze{constructor(){super(VT),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(Ti,()=>{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(){mt(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(Ti)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),s=!t||!e.includes(t);if(s){const i=this.gos.exists("paginationPageSize"),n=this.gos.get(Ti)!==!0;G(94,{pageSizeSet:i,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||G(95,{paginationPageSizeOption:t,paginationPageSizeSelector:Ti}),e.unshift("")}const o=String(s?"":t);this.selectPageSizeComp?(Ns(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=s}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const s=this.getLocaleTextFunc(),o=s("pageSizeSelectorLabel","Page Size:"),i=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new hd).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(i).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(Ti);return!Array.isArray(t)||!t?.length?e:[...t].sort((s,o)=>s-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},WT={selector:"AG-PAGE-SIZE-SELECTOR",component:zT},_T=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",jT=class extends NR{constructor(){super(),this.btFirst=ne,this.btPrevious=ne,this.btNext=ne,this.btLast=ne,this.lbRecordCount=ne,this.lbFirstRowOnPage=ne,this.lbLastRowOnPage=ne,this.lbCurrent=ne,this.lbTotal=ne,this.pageSizeComp=ne,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(_T)}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(),[WT]);const{btFirst:t,btPrevious:s,btNext:o,btLast:i}=this;this.activateTabIndex([t,s,o,i]),t.insertAdjacentElement("afterbegin",Ot(e?"last":"first",this.beans)),s.insertAdjacentElement("afterbegin",Ot(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",Ot(e?"previous":"next",this.beans)),i.insertAdjacentElement("afterbegin",Ot(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):eR(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:s}=e;this.addManagedListeners(t,{click:s,keydown:o=>{(o.key===I.ENTER||o.key===I.SPACE)&&(o.preventDefault(),s())}})}Jx(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}):RP(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),s=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=this.isZeroPagesToDisplay(),i=e===s-1;this.nextButtonDisabled=i||o,this.lastButtonDisabled=!t||o||e===s-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){mb(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),s=this.pagination.getMasterRowCount(),o=e?s:null,i=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=n*i+1,a=r+n-1,e&&a>o&&(a=o));const l=r+n-1,c=!e&&s<l,d=this.formatNumber(r);this.lbFirstRowOnPage.textContent=d;let u;const h=this.getLocaleTextFunc();c?u=h("pageLastRowUnknown","?"):u=this.formatNumber(a),this.lbLastRowOnPage.textContent=u;const f=t>0?i+1:0,C=this.formatNumber(f);this.lbCurrent.textContent=C;let v,w;if(e)v=this.formatNumber(t),w=this.formatNumber(o);else{const b=h("more","more");v=b,w=b}this.lbTotal.textContent=v,this.lbRecordCount.textContent=w,this.announceAriaStatus(d,u,w,C,v)}announceAriaStatus(e,t,s,o,i){const n=this.getLocaleTextFunc(),r=n("page","Page"),a=n("to","to"),l=n("of","of"),c=`${e} ${a} ${t} ${l} ${s}`,d=`${r} ${o} ${l} ${i}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnounce?.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnounce?.announceValue(d,"paginationPage"))}},UT={selector:"AG-PAGINATION",component:jT},$T=class extends A{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 UT}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 q(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:q(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:q(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:q(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const s=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}s!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const s=this.pageSize,o=t-1;this.totalPages=Math.floor(o/s)+1,this.adjustCurrentPageIfInvalid();const i=this.currentPage,n=s*i;let r=s*(i+1)-1;if(r>o&&(r=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:s}=this,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*s,this.bottomDisplayedRowIndex=t*(s+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:s=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:s,newPageSize:o,keepRenderedRows:t})}},KT={moduleName:"Pagination",version:K,beans:[$T,BT],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:MT,paginationGetPageSize:TT,paginationGetCurrentPage:IT,paginationGetTotalPages:kT,paginationGetRowCount:AT,paginationGoToNextPage:LT,paginationGoToPreviousPage:OT,paginationGoToFirstPage:NT,paginationGoToLastPage:HT,paginationGoToPage:GT},dependsOn:[wa]};function qT(e,t={}){const s=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(s))}function zm(e,t,s,o,i){t&&(o&&t.parent&&t.parent.level!==-1&&zm(e,t.parent,s,o,i),t.setExpanded(s,void 0,i))}function YT(e,t){return e.rowModel.getRowNode(t)}function ZT(e,t,s,o){e.rowRenderer.addRenderedRowListener(t,s,o)}function XT(e){return e.rowRenderer.getRenderedNodes()}function QT(e,t,s){e.rowModel.forEachNode(t,s)}function JT(e){return e.rowRenderer.firstRenderedRow}function e6(e){return e.rowRenderer.lastRenderedRow}function t6(e,t){return e.rowModel.getRow(t)}function s6(e){return e.rowModel.getRowCount()}var o6={moduleName:"RowApi",version:K,apiFunctions:{redrawRows:qT,setRowNodeExpanded:zm,getRowNode:YT,addRenderedRowListener:ZT,getRenderedNodes:XT,forEachNode:QT,getFirstDisplayedRowIndex:JT,getLastDisplayedRowIndex:e6,getDisplayedRowAtIndex:t6,getDisplayedRowCount:s6}},i6={moduleName:"ScrollApi",version:K,apiFunctions:{getVerticalPixelRange:m4,getHorizontalPixelRange:C4,ensureColumnVisible:Dm,ensureIndexVisible:Pm,ensureNodeVisible:v4}};function n6(e,t,s){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,i=`aria-${t}`;s===null?o.removeAttribute(i):o.setAttribute(i,s)}function r6(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function a6(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function l6(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function c6(e){e.animationFrameSvc?.flushAllFrames()}function d6(e){return{rowHeight:io(e),headerHeight:yn(e)}}function u6(e,t={}){const s=[];for(const n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const r=n.getCellRenderer();r!=null&&s.push(an(r))}if(t.columns?.length)return s;const o=[],i=Tc(t.rowNodes);for(const n of e.rowRenderer.getAllRowCtrls()){if(i&&!Ic(n.rowNode,i)||!n.isFullWidth())continue;const r=n.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){const l=r[a];l!=null&&o.push(an(l))}}return[...o,...s]}var h6={moduleName:"RenderApi",version:K,apiFunctions:{setGridAriaProperty:n6,refreshCells:r6,refreshHeader:a6,isAnimationFrameQueueEmpty:l6,flushAllAnimationFrames:c6,getSizesForCurrentTheme:d6,getCellRendererInstances:u6}};function g6(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function Wm({colAutosize:e,visibleCols:t},s,o){Array.isArray(s)?e?.autoSizeCols({colKeys:s,skipHeader:o,source:"api"}):e?.autoSizeCols({...s,colKeys:s.colIds??t.allCols,source:"api"})}function p6(e,t){t&&typeof t=="object"?Wm(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}var f6=class extends A{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let s=!1;const o=t.type;if(o==="fitGridWidth"||o==="fitProvidedWidth")s=!0;else if(o==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const i=e.get("rowData");s=i!=null&&i.length>0&&We(e)}s&&this.beans.colDelayRenderSvc?.hideColumns(o)}}autoSizeCols(e){const{eventSvc:t,visibleCols:s}=this.beans;this.innerAutoSizeCols(e).then(o=>{const i=c=>oi(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return i(o);const n=Hh(this.beans),r=c=>s.leftCols.some(d=>ji(d,c)),a=c=>s.rightCols.some(d=>ji(d,c)),l=e.colKeys.filter(c=>!bs(c)&&!hs(c)&&!r(c)&&!a(c));this.sizeColumnsToFit(n,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(c=>({...c,key:c.colId})),colKeys:l,onlyScaleUp:!0}),i(o)})}innerAutoSizeCols(e){return new Promise((t,s)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,s));const{colKeys:o,skipHeader:i,skipHeaderGroups:n,stopAtGroup:r,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:c=[],source:d="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:p,autoWidthCalc:f,visibleCols:C}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,s)});return}this.timesDelayed=0;const v=new Set;let w=-1;const b=Object.fromEntries(c.map(({colId:x,...R})=>[x,R])),S=i??this.gos.get("skipHeaderOnAutoSize"),y=n??S;for(;w!==0;){w=0;const x=[];for(const R of o){if(!R||P0(R))continue;const E=p.getCol(R);if(!E||v.has(E))continue;const D=f.getPreferredWidthForColumn(E,S);if(D>0){const T=b[E.colId]??{};T.minWidth??(T.minWidth=l),T.maxWidth??(T.maxWidth=a);const k=m6(E,D,T);E.setActualWidth(k,d),v.add(E),w++}x.push(E)}x.length&&C.refresh(d)}y||this.autoSizeColumnGroupsByColumns(o,d,r),t(v)})}autoSizeColumn(e,t,s){this.autoSizeCols({colKeys:[e],skipHeader:s,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,s){const{colModel:o,ctrlsSvc:i}=this.beans,n=new Set,r=o.getColsForKeys(e);for(const l of r){let c=l.getParent();for(;c&&c!=s;)c.isPadding()||n.add(c),c=c.getParent()}let a;for(const l of n){for(const c of i.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(l),a)break;a?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const s=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",s)};e.addEventListener("dblclick",o);const i=new qs(e);return i.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),i.destroy()}}addColumnGroupResize(e,t,s){const o=this.gos.get("skipHeaderOnAutoSize"),i=()=>{const n=[],r=t.getDisplayedLeafColumns();for(const a of r)a.getColDef().suppressAutoSize||n.push(a.getColId());n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),s()};return e.addEventListener("dblclick",i),()=>e.removeEventListener("dblclick",i)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const s=Hh(this.beans);if(s>0){this.sizeColumnsToFit(s,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):G(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",s,o){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,s,o));return}const i={};for(const{key:f,...C}of o?.columnLimits??[])i[typeof f=="string"?f:f.getColId()]=C;const n=this.beans.visibleCols.allCols;if(e<=0||!n.length)return;const r=as(n);if(o?.onlyScaleUp&&r>e||e===r&&n.every(C=>{if(C.colDef.suppressSizeToFit)return!0;const v=i?.[C.getId()],w=v?.minWidth??o?.defaultMinWidth,b=v?.maxWidth??o?.defaultMaxWidth,S=C.getActualWidth();return(w==null||S>=w)&&(b==null||S<=b)}))return;const l=[],c=[];for(const f of n){const C=o?.colKeys?.some(v=>ji(f,v))??!0;f.getColDef().suppressSizeToFit||!C?c.push(f):l.push(f)}const d=l.slice(0);let u=!1;const h=f=>{zt(l,f),c.push(f)};for(const f of l){f.resetActualWidth(t);const C=i?.[f.getId()],v=C?.minWidth??o?.defaultMinWidth,w=C?.maxWidth??o?.defaultMaxWidth,b=f.getActualWidth();typeof v=="number"&&b<v?f.setActualWidth(v,t,!0):typeof w=="number"&&b>w&&f.setActualWidth(w,t,!0)}for(;!u;){u=!0;const f=e-as(c);if(f<=0)for(const C of l){const v=i?.[C.getId()]?.minWidth??o?.defaultMinWidth??C.minWidth;C.setActualWidth(v,t,!0)}else{const C=f/as(l);let v=f;for(let w=l.length-1;w>=0;w--){const b=l[w],S=i?.[b.getId()],y=S?.minWidth??o?.defaultMinWidth,x=S?.maxWidth??o?.defaultMaxWidth,R=b.getMinWidth(),E=b.getMaxWidth(),D=typeof y=="number"&&y>R?y:R,T=typeof x=="number"&&x<E?x:E;let k=Math.round(b.getActualWidth()*C);k<D?(k=D,h(b),u=!1):k>T?(k=T,h(b),u=!1):w===0&&(k=v),b.setActualWidth(k,t,!0),v-=k}}}for(const f of d)f.fireColumnWidthChangedEvent(t);const p=this.beans.visibleCols;p.setLeftValues(t),p.updateBodyWidths(),!s&&oi(this.eventSvc,d,!0,t)}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,s=e.get("autoSizeStrategy");s?.type!=="fitGridWidth"&&s?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const o=s.type;if(o==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:n,defaultMaxWidth:r}=s,a=i?.map(({colId:l,minWidth:c,maxWidth:d})=>({key:l,minWidth:c,maxWidth:d}));this.sizeColumnsToFitGridBody({defaultMinWidth:n,defaultMaxWidth:r,columnLimits:a})}else o==="fitProvidedWidth"&&this.sizeColumnsToFit(s.width,"sizeColumnsToFit");t?.revealColumns(o)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const s="autosizeColumns";e?this.autoSizeCols({...t,source:s,colKeys:e}):this.autoSizeAllColumns({...t,source:s}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function m6(e,t,s={}){const o=s.minWidth??e.getMinWidth();t<o&&(t=o);const i=s.maxWidth??e.getMaxWidth();return t>i&&(t=i),t}function Hh({ctrlsSvc:e,scrollVisibleSvc:t}){const s=e.getGridBodyCtrl(),i=s.isVerticalScrollShowing()?t.getScrollbarWidth():0;return sn(s.eGridBody)-i}var C6={moduleName:"ColumnAutoSize",version:K,beans:[f6],apiFunctions:{sizeColumnsToFit:g6,autoSizeColumns:Wm,autoSizeAllColumns:p6},dependsOn:[Nf]},v6=".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 w6(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function b6(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function S6(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function y6(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function x6(e,t,s){return e.pinnedRowModel?.forEachPinnedRow(t,s)}var R6={moduleName:"PinnedRow",version:K,beans:[MR],css:[v6],apiFunctions:{getPinnedTopRowCount:w6,getPinnedBottomRowCount:b6,getPinnedTopRow:S6,getPinnedBottomRow:y6,forEachPinnedRow:x6},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},F6=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}},E6=class extends A{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:s,pinnedRowModel:o,rowModel:i,valueSvc:n,pagination:r}}=this,{colDef:a}=t,l=this.getNodeMap(e),c=new Map,d=s.getCallback("isFullWidthRow"),u=a.equals,h=a.spanRows,p=typeof h=="function";let f=null,C=null,v;const w=(S,y)=>{f=S,C=null,v=y},b=S=>{const y=!S.isExpandable()&&!S.group&&!S.detail&&(d?!d({rowNode:S}):!0);if(S.rowIndex==null||!y){w(null,null);return}if(f==null||S.level!==f.level||S.footer||C&&S.rowIndex-1!==C?.getLastNode().rowIndex){w(S,n.getValue(t,S));return}const x=n.getValue(t,S);if(p){const R=de(s,{valueA:v,nodeA:f,valueB:x,nodeB:S,column:t,colDef:a});if(!h(R)){w(S,x);return}}else if(u?!u(v,x):v!==x){w(S,x);return}if(!C){const R=l?.get(f);R?.firstNode===f?(R.reset(),C=R):C=new F6(t,f),c.set(f,C)}C.addSpannedNode(S),c.set(S,C)};switch(e){case"center":i.forEachDisplayedNode?.(S=>{(!r||r.isRowInPage(S.rowIndex))&&b(S)}),this.centerValueNodeMap=c;break;case"top":o?.forEachPinnedRow("top",b),this.topValueNodeMap=c;break;case"bottom":o?.forEachPinnedRow("bottom",b),this.bottomValueNodeMap=c;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},D6=class extends A{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=st(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=st(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 E6(e));this.spanningColumns.set(e,s),s.buildCache("top"),s.buildCache("bottom"),s.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const s=this.spanningColumns.get(e);return s?s.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:s}=this.beans,o=e.column,i=e.rowIndex,n=this.spanningColumns.get(o);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(i);break;case"bottom":r=t?.getPinnedBottomRow(i);break;default:r=s.getRow(i)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const s=this.spanningColumns.get(e);if(s)return s.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[s,o]of this.spanningColumns)if(o.isCellSpanning(e)){const i=o.getCellSpan(e);t(s,i)}}destroy(){super.destroy(),this.spanningColumns.clear()}},P6=class extends Jo{constructor(e,t,s){super(e.col,e.firstNode,s,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,s,o,i,n,r){this.eWrapper=s,super.setComp(e,t,s,o,i,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||Wg(e,t.rowIndex)}setAriaRowSpan(){bb(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(ma(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}},M6=class extends jr{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new P6(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(){}},T6=class extends A{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,s=this.getCtrlsMap(e),o=s.size,i=this.getAllRelevantRowControls(e),n=new Map;let r=!1;for(const l of i)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(c,d)=>{if(n.has(d.firstNode))return;const u=s.get(d.firstNode);if(u){n.set(d.firstNode,u),s.delete(d.firstNode);return}r=!0;const h=new M6(d.firstNode,this.beans,!1,!1,!1);n.set(d.firstNode,h)});this.setCtrlsMap(e,n);const a=n.size===o;if(!(!r&&a)){for(const l of s.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,s=t?.getCellSpanByPosition(e);if(!s)return;const o=this.getCtrlsMap(e.rowPinned).get(s.firstNode);if(o)return o.getAllCellCtrls().find(i=>i.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},I6={moduleName:"CellSpan",version:K,beans:[D6,T6]},k6=class extends A{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,s=e.colDef,o=s.cellClassRules,i=this.getCellClassParams(e,s);Td(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,i,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=o}applyUserStyles(){const e=this.column,t=e.colDef,s=t.cellStyle;if(!s)return;let o;if(typeof s=="function"){const i=this.getCellClassParams(e,t);o=s(i)}else o=s;o&&this.cellComp.setUserStyles(o)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,s=e.colDef,o=this.getCellClassParams(e,s);for(const n of this.staticClasses)t.toggleCss(n,!1);const i=this.beans.cellStyles.getStaticCellClasses(s,o);this.staticClasses=i;for(const n of i)t.toggleCss(n,!0)}getCellClassParams(e,t){const{value:s,rowNode:o}=this.cellCtrl;return de(this.beans.gos,{value:s,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},A6=class extends A{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,s,o){Td(this.beans.expressionSvc,void 0,e.cellClassRules,t,s,o),this.processStaticCellClasses(e,t,s)}getStaticCellClasses(e,t){const{cellClass:s}=e;if(!s)return[];let o;return typeof s=="function"?o=s(t):o=s,typeof o=="string"&&(o=[o]),o||[]}createCellCustomStyleFeature(e,t){return new k6(e,t)}processStaticCellClasses(e,t,s){this.getStaticCellClasses(e,t).forEach(i=>{s(i)})}},L6={moduleName:"CellStyle",version:K,beans:[A6]},O6={moduleName:"RowStyle",version:K,beans:[b3]};function N6(e,t){return!!e.colHover?.isHovered(t)}var H6=class extends A{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=s=>{const{beans:o,gos:i,element:n,columns:r}=this,a=o.colHover;if(s??!!i.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:a.setMouseOver.bind(a,r),mouseout:a.clearMouseOver.bind(a)});else{for(const c of this.destroyManagedListeners)c();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},G6="ag-column-hover",B6=class extends A{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,s){const o=()=>{const i=this.isHovered(s);t.toggleCss("ag-column-hover",i)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const s=this.isHovered(e);t.toggleCss(G6,s)}addHeaderFilterColumnHoverListener(e,t,s,o){this.createHoverFeature(e,[s],o);const i=()=>{const n=this.isHovered(s);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:i}),i()}createHoverFeature(e,t,s){e.createManagedBean(new H6(t,s))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},V6={moduleName:"ColumnHover",version:K,beans:[B6],apiFunctions:{isColumnHovered:N6}},z6=class extends A{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const s=this.wrapSvc?.wrap(e,t)??t,o=!vr.has(e),i=o?this.asyncListeners:this.syncListeners;i.has(e)||i.set(e,new Set),i.get(e).add(s),this.eventSvc.addListener(e,s,o)}removeListener(e,t){const s=this.wrapSvc?.unwrap(e,t)??t,i=!!this.asyncListeners.get(e)?.delete(s);i||this.syncListeners.get(e)?.delete(s),this.eventSvc.removeListener(e,s,i)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,s=(n,r)=>{vr.has(n)&&t(n,r)},o=(n,r)=>{vr.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:s,asyncListener:o});const i=this.eventSvc;i.addGlobalListener(s,!1),i.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:s,globalListenerPairs:o}=this,i=s?.unwrapGlobal(e)??e;if(o.has(i)){const{syncListener:r,asyncListener:a}=o.get(i);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),o.delete(e)}else this.syncGlobalListeners.delete(i),t.removeGlobalListener(i,!1)}destroyEventListeners(e,t){e.forEach((s,o)=>{s.forEach(i=>this.eventSvc.removeListener(o,i,t)),s.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const s of e)this.eventSvc.removeGlobalListener(s,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:s,asyncListener:o})=>{t.removeGlobalListener(s,!1),t.removeGlobalListener(o,!0)}),e.clear()}};function W6(e,t,s){e.apiEventSvc?.addListener(t,s)}function _6(e,t,s){e.apiEventSvc?.removeListener(t,s)}function j6(e,t){e.apiEventSvc?.addGlobalListener(t)}function U6(e,t){e.apiEventSvc?.removeGlobalListener(t)}var $6={moduleName:"EventApi",version:K,apiFunctions:{addEventListener:W6,addGlobalListener:j6,removeEventListener:_6,removeGlobalListener:U6},beans:[z6]},K6={moduleName:"Locale",version:K,beans:[bP]},q6=class extends A{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=st(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:s,pinnedRowModel:o}=this.beans,i=e.autoHeightCols;let n=!1;const r=a=>{const l=a.__autoHeights;let c=ks(this.beans,a).height;for(const d of i){let u=l?.[d.getColId()];const h=s?.getCellSpan(d,a);if(h){if(h.getLastNode()!==a)continue;if(u=s?.getCellSpan(d,a)?.getLastNodeAutoHeight(),!u)return}if(u==null){if(this.colSpanSkipCell(d,a))continue;return}c=Math.max(u,c)}c!==a.rowHeight&&(a.setRowHeight(c),n=!0)};o?.forEachPinnedRow?.("top",r),o?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),n&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,s){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[s.getId()];return}const o=e.__autoHeights[s.getId()];e.__autoHeights[s.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:s,colViewport:o,visibleCols:i}=this.beans;if(!s.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=i.getLeftColsForRow(t);break;case"right":n=i.getRightColsForRow(t);break;case null:n=o.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,s){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:i,column:n}=e,r=this.beans,a=d=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!s.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:p,borderTopWidth:f}=So(o),C=u+h+p+f,w=t.offsetHeight+C;if(d<5){const S=!Qe(r)?.contains(t),y=w==0;if(S||y){window.setTimeout(()=>a(d+1),0);return}}this.setRowAutoHeight(i,w,n)},l=()=>a(0);l();const c=vs(r,t,l);return s.addDestroyFunc(()=>{c(),this.setRowAutoHeight(i,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:s}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(s).filter(i=>i.isAutoHeight())),t.length!==0){if(!s.__autoHeights)return!1;for(const o of t){const i=s.__autoHeights[o.getColId()];if(!i||s.rowHeight<i)return!1}}return!0}},Y6={moduleName:"RowAutoHeight",version:K,beans:[q6]},Z6={moduleName:"AllCommunity",version:K,dependsOn:[qM,sT,hT,BP,Y4,Z4,X4,Q4,J4,eM,tM,q4,z5,W5,_5,V5,U5,$5,PT,EM,KT,Hf,o6,i6,h6,C6,D2,R6,mM,sP,L6,V6,O6,$6,nP,yT,Em,K6,Y6,E2,YM,I6]},at=g.createContext({}),_m=g.createContext("default"),Rn=(e,t,s,o)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const n=e.newAgStackInstance();let r,a,l=!1;return n.then(c=>{if(l){t.destroyBean(c);return}r=c,a=r.getGui(),s.appendChild(a),Gh(o,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),o&&Gh(o,void 0))}},Gh=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const s=e;s.current=t}},It=(...e)=>e.filter(s=>s!=null&&s!=="").join(" "),Nt=class jm{constructor(...t){this.classesMap={};for(const s of t)this.classesMap[s]=!0}setClass(t,s){if(!!this.classesMap[t]==s)return this;const i=new jm;return i.classesMap={...this.classesMap},i.classesMap[t]=s,i}toString(){return Object.keys(this.classesMap).filter(s=>this.classesMap[s]).join(" ")}},pi=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()},Nc=g.version?.split(".")[0],Um=Nc==="16"||Nc==="17";function X6(){return Nc==="19"}var br=!1;function Q6(e){return br||setTimeout(()=>br=!1,0),br=!0,e()}var hn=(e,t)=>{!Um&&e&&!br?pn.flushSync(t):t()},J6=e=>{Um?e():g.startTransition(e)};function eI(e,t,s){return g.useSyncExternalStore?g.useSyncExternalStore(e,t):s}function Kr(e,t,s){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(s||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const o=[],i=[],n=new Map,r=new Map;for(let a=0;a<t.length;a++){const l=t[a];r.set(l.instanceId,l)}for(let a=0;a<e.length;a++){const l=e[a];n.set(l.instanceId,l),r.has(l.instanceId)&&o.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;n.has(c)||i.push(l)}return o.length===e.length&&i.length===0?e:o.length===0&&i.length===t.length?t:o.length===0?i:i.length===0?o:[...o,...i]}var $m=g.forwardRef((e,t)=>{const{registry:s,context:o}=g.useContext(at),i=g.useRef(null),n=g.useRef(null),r=g.useRef(null),a=g.useRef(null),l=g.useRef(null),c=g.useRef(),[d,u]=g.useState(),[h,p]=g.useState(),[f,C]=g.useState(),[v,w]=g.useState(()=>new Nt),[b,S]=g.useState(()=>new Nt("ag-hidden")),[y,x]=g.useState(()=>new Nt("ag-hidden")),[R,E]=g.useState(()=>new Nt("ag-invisible"));g.useImperativeHandle(t,()=>({refresh(){return!1}})),g.useLayoutEffect(()=>Rn(d,o,n.current),[d]);const D=g.useCallback(ee=>{if(i.current=ee,!ee||o.isDestroyed()){c.current=o.destroyBean(c.current);return}const O={setInnerRenderer:(z,X)=>{u(z),C(X)},setChildCount:z=>p(z),toggleCss:(z,X)=>w(Y=>Y.setClass(z,X)),setContractedDisplayed:z=>x(X=>X.setClass("ag-hidden",!z)),setExpandedDisplayed:z=>S(X=>X.setClass("ag-hidden",!z)),setCheckboxVisible:z=>E(X=>X.setClass("ag-invisible",!z)),setCheckboxSpacing:z=>E(X=>X.setClass("ag-group-checkbox-spacing",z))},le=s.createDynamicBean("groupCellRendererCtrl",!0);le&&(c.current=o.createBean(le),c.current.init(O,ee,r.current,a.current,l.current,$m,e))},[]),T=g.useMemo(()=>`ag-cell-wrapper ${v.toString()}`,[v]),k=g.useMemo(()=>`ag-group-expanded ${b.toString()}`,[b]),F=g.useMemo(()=>`ag-group-contracted ${y.toString()}`,[y]),M=g.useMemo(()=>`ag-group-checkbox ${R.toString()}`,[R]),L=d?.componentFromFramework,B=L?d.componentClass:void 0,H=d==null&&f!=null,Q=ui(f);return g.createElement("span",{className:T,ref:D,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},g.createElement("span",{className:k,ref:a}),g.createElement("span",{className:F,ref:l}),g.createElement("span",{className:M,ref:r}),g.createElement("span",{className:"ag-group-value",ref:n},H?Q:L?g.createElement(B,{...d.params}):null),g.createElement("span",{className:"ag-group-child-count"},h))}),Bh=$m,Gd=g.createContext({setMethods:()=>{}}),tI=e=>{const{initialProps:t,addUpdateCallback:s,CustomComponentClass:o,setMethods:i}=e,[{key:n,...r},a]=g.useState(t);return g.useEffect(()=>{s(l=>a(l))},[]),g.createElement(Gd.Provider,{value:{setMethods:i}},g.createElement(o,{key:n,...r}))},sI=g.memo(tI),oI=0;function Vh(){return`agPortalKey_${++oI}`}var Km=class{constructor(e,t,s,o){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=s,this.suppressFallbackMethods=!!o,this.statelessComponent=this.isStateless(this.reactComponent),this.key=Vh(),this.portalKey=Vh(),this.instanceCreated=this.isStatelessComponent()?Re.resolve(!1):new Re(i=>{this.resolveInstanceCreated=i})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy();const e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),s=document.createElement(t||"div");return s.classList.add("ag-react-container"),e.reactContainer=s,s}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return typeof Symbol=="function"&&Symbol.for}isStateless(e){return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&t[e]!=null||this.fallbackMethodAvailable(e)}callMethod(e,t){const s=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!s){setTimeout(()=>this.callMethod(e,t));return}const o=s[e];if(o)return o.apply(s,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new Re(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=pn.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return g.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 ya(e,t,s){for(const o of e){const i=t[o];i&&(s[o]=i)}}var Dt=class extends Km{constructor(){super(...arguments),this.awaitUpdateCallback=new Re(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=sI}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 Re(o=>{setTimeout(()=>{o()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,ya(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new Re(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},iI=class extends Dt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},nI=class extends Dt{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}},rI=class extends Dt{constructor(){super(...arguments),this.label="",this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){const e=super.getProps(),{label:t,icon:s,shake:o}=this;return e.label=t,e.icon=s,e.shake=o,e}},aI=class extends Dt{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 Re(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 Re(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}},lI=class extends Dt{constructor(){super(...arguments),this.awaitSetMethodsCallback=new Re(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 qm(e,t){e.parentFilterInstance(s=>{(s.setModel(t)||Re.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var cI=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){ya(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),qm(this.floatingFilterParams,e)}},dI=class extends Dt{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(),qm(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},uI=class extends Dt{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},hI=class extends Dt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},gI=class extends Dt{refresh(e){this.sourceParams=e,this.refreshProps()}},pI=class extends Dt{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}},fI=class extends Dt{refresh(e){this.sourceParams=e,this.refreshProps()}},mI=class extends Dt{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},CI=class extends Dt{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 Bd(){G(231)}var vI=1e3,wI=class{constructor(e,t,s){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=s||vI}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){hn(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,s)})}}},bI=({ctrl:e})=>{const t=e.isAlive(),{context:s}=g.useContext(at),[o,i]=g.useState(),[n,r]=g.useState(),a=g.useRef(),l=g.useRef(null),c=g.useRef(null),d=g.useRef(null),u=g.useRef(),h=g.useRef();t&&!h.current&&(h.current=new wn(()=>l.current));const p=g.useCallback(w=>{if(l.current=w,!w||!e.isAlive()||s.isDestroyed()){a.current=s.destroyBean(a.current);return}a.current=s.createBean(new hi);const b=()=>{const y=e.getSelectAllGui();y&&(c.current?.insertAdjacentElement("afterend",y),a.current.addDestroyFunc(()=>y.remove()))},S={setWidth:y=>{l.current&&(l.current.style.width=y)},toggleCss:(y,x)=>h.current.toggleCss(y,x),setUserStyles:y=>r(y),setAriaSort:y=>{l.current&&(y?xb(l.current,y):Rb(l.current))},setUserCompDetails:y=>i(y),getUserCompInstance:()=>u.current||void 0,refreshSelectAllGui:b,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(S,w,c.current,d.current,a.current),b()},[]);g.useLayoutEffect(()=>Rn(o,s,d.current,u),[o]),g.useEffect(()=>{e.setDragSource(l.current)},[o]);const f=g.useMemo(()=>!!(o?.componentFromFramework&&pi(o.componentClass)),[o]),C=o?.componentFromFramework,v=o?.componentClass;return g.createElement("div",{ref:p,style:n,className:"ag-header-cell",role:"columnheader"},g.createElement("div",{ref:c,className:"ag-header-cell-resize",role:"presentation"}),g.createElement("div",{ref:d,className:"ag-header-cell-comp-wrapper",role:"presentation"},C?f?g.createElement(v,{...o.params}):g.createElement(v,{...o.params,ref:u}):null))},SI=g.memo(bI),yI=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){ya(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}},xI=({ctrl:e})=>{const{context:t,gos:s}=g.useContext(at),[o,i]=g.useState(),[n,r]=g.useState(()=>new Nt("ag-header-cell","ag-floating-filter")),[a,l]=g.useState(()=>new Nt),[c,d]=g.useState(()=>new Nt("ag-floating-filter-button","ag-hidden")),[u,h]=g.useState("false"),[p,f]=g.useState(),[,C]=g.useState(1),v=g.useRef(),w=g.useRef(null),b=g.useRef(null),S=g.useRef(null),y=g.useRef(null),x=g.useRef(),R=g.useRef(),E=z=>{z!=null&&x.current&&x.current(z)},D=g.useCallback(z=>{if(w.current=z,!z||!e.isAlive()||t.isDestroyed()){v.current=t.destroyBean(v.current);return}v.current=t.createBean(new hi),R.current=new Re(Y=>{x.current=Y});const X={toggleCss:(Y,_)=>r(U=>U.setClass(Y,_)),setUserStyles:Y=>i(Y),addOrRemoveBodyCssClass:(Y,_)=>l(U=>U.setClass(Y,_)),setButtonWrapperDisplayed:Y=>{d(_=>_.setClass("ag-hidden",!Y)),h(Y?"false":"true")},setWidth:Y=>{w.current&&(w.current.style.width=Y)},setCompDetails:Y=>f(Y),getFloatingFilterComp:()=>R.current?R.current:null,setMenuIcon:Y=>y.current?.appendChild(Y)};e.setComp(X,z,y.current,b.current,v.current)},[]);g.useLayoutEffect(()=>Rn(p,t,b.current,E),[p]);const T=g.useMemo(()=>n.toString(),[n]),k=g.useMemo(()=>a.toString(),[a]),F=g.useMemo(()=>c.toString(),[c]),M=g.useMemo(()=>!!(p&&p.componentFromFramework&&pi(p.componentClass)),[p]),L=g.useMemo(()=>s.get("reactiveCustomComponents"),[]),B=g.useMemo(()=>s.get("enableFilterHandlers"),[]),[H,Q]=g.useState();g.useEffect(()=>{if(p?.componentFromFramework)if(L){const z=B?yI:cI,X=new z(p.params,()=>C(Y=>Y+1));E(X),Q(X)}else Bd()},[p]);const ee=H?.getProps(),O=p?.componentFromFramework,le=p?.componentClass;return g.createElement("div",{ref:D,style:o,className:T,role:"gridcell"},g.createElement("div",{ref:b,className:k,role:"presentation"},O?L?ee&&g.createElement(Gd.Provider,{value:{setMethods:z=>H.setMethods(z)}},g.createElement(le,{...ee})):g.createElement(le,{...p.params,ref:M?()=>{}:E}):null),g.createElement("div",{ref:S,"aria-hidden":u,className:F,role:"presentation"},g.createElement("button",{ref:y,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},RI=g.memo(xI),FI=({ctrl:e})=>{const{context:t}=g.useContext(at),[s,o]=g.useState(),[i,n]=g.useState(()=>new Nt),[r,a]=g.useState(()=>new Nt),[l,c]=g.useState("false"),[d,u]=g.useState(),[h,p]=g.useState(),f=g.useRef(),C=g.useRef(null),v=g.useRef(null),w=g.useRef(null),b=g.useRef(),S=g.useCallback(T=>{if(C.current=T,!T||!e.isAlive()||t.isDestroyed()){f.current=t.destroyBean(f.current);return}f.current=t.createBean(new hi);const k={setWidth:F=>{C.current&&(C.current.style.width=F)},toggleCss:(F,M)=>n(L=>L.setClass(F,M)),setUserStyles:F=>o(F),setHeaderWrapperHidden:F=>{const M=w.current;M&&(F?M.style.setProperty("display","none"):M.style.removeProperty("display"))},setHeaderWrapperMaxHeight:F=>{const M=w.current;M&&(F!=null?M.style.setProperty("max-height",`${F}px`):M.style.removeProperty("max-height"),M.classList.toggle("ag-header-cell-comp-wrapper-limited-height",F!=null))},setUserCompDetails:F=>p(F),setResizableDisplayed:F=>{a(M=>M.setClass("ag-hidden",!F)),c(F?"false":"true")},setAriaExpanded:F=>u(F),getUserCompInstance:()=>b.current||void 0};e.setComp(k,T,v.current,w.current,f.current)},[]);g.useLayoutEffect(()=>Rn(h,t,w.current),[h]),g.useEffect(()=>{C.current&&e.setDragSource(C.current)},[h]);const y=g.useMemo(()=>!!(h?.componentFromFramework&&pi(h.componentClass)),[h]),x=g.useMemo(()=>"ag-header-group-cell "+i.toString(),[i]),R=g.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),E=h?.componentFromFramework,D=h?.componentClass;return g.createElement("div",{ref:S,style:s,className:x,role:"columnheader","aria-expanded":d},g.createElement("div",{ref:w,className:"ag-header-cell-comp-wrapper",role:"presentation"},E?y?g.createElement(D,{...h.params}):g.createElement(D,{...h.params,ref:b}):null),g.createElement("div",{ref:v,"aria-hidden":l,className:R}))},EI=g.memo(FI),DI=({ctrl:e})=>{const{gos:t,context:s}=g.useContext(at),{topOffset:o,rowHeight:i}=g.useMemo(()=>e.getTopAndHeight(),[]),n=g.useMemo(()=>t.get("tabIndex"),[]),[r,a]=g.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=g.useState(()=>i+"px"),[u,h]=g.useState(()=>o+"px"),p=g.useRef(null),[f,C]=g.useState(()=>e.getUpdatedHeaderCtrls()),v=g.useRef(),w=g.useRef(null),b=g.useCallback(x=>{if(w.current=x,!x||!e.isAlive()||s.isDestroyed()){v.current=s.destroyBean(v.current);return}v.current=s.createBean(new hi);const R={setHeight:E=>d(E),setTop:E=>h(E),setHeaderCtrls:(E,D,T)=>{const k=p.current,F=Kr(k,E,D);F!==k&&(p.current=F,hn(T,()=>C(F)))},setWidth:E=>{w.current&&(w.current.style.width=E)},setRowIndex:E=>{a(E)}};e.setComp(R,v.current,!1)},[]),S=g.useMemo(()=>({height:c,top:u}),[c,u]),y=g.useCallback(x=>{switch(e.type){case"group":return g.createElement(EI,{ctrl:x,key:x.instanceId});case"filter":return g.createElement(RI,{ctrl:x,key:x.instanceId});default:return g.createElement(SI,{ctrl:x,key:x.instanceId})}},[]);return g.createElement("div",{ref:b,className:l,role:"row",style:S,tabIndex:n,"aria-rowindex":r},f.map(y))},PI=g.memo(DI),MI=({pinned:e})=>{const[t,s]=g.useState(!0),[o,i]=g.useState([]),{context:n}=g.useContext(at),r=g.useRef(null),a=g.useRef(null),l=g.useRef(),c=e==="left",d=e==="right",u=!c&&!d,h=g.useCallback(C=>{if(r.current=C,!C||n.isDestroyed()){l.current=n.destroyBean(l.current);return}l.current=n.createBean(new cR(e));const v={setDisplayed:s,setCtrls:w=>i(w),setCenterWidth:w=>{a.current&&(a.current.style.width=w)},setViewportScrollLeft:w=>{r.current&&(r.current.scrollLeft=w)},setPinnedContainerWidth:w=>{r.current&&(r.current.style.width=w,r.current.style.minWidth=w,r.current.style.maxWidth=w)}};l.current.setComp(v,r.current)},[]),p=t?"":"ag-hidden",f=()=>o.map(C=>g.createElement(PI,{ctrl:C,key:C.instanceId}));return c?g.createElement("div",{ref:h,className:"ag-pinned-left-header "+p,"aria-hidden":!t,role:"rowgroup"},f()):d?g.createElement("div",{ref:h,className:"ag-pinned-right-header "+p,"aria-hidden":!t,role:"rowgroup"},f()):u?g.createElement("div",{ref:h,className:"ag-header-viewport "+p,role:"rowgroup",tabIndex:-1},g.createElement("div",{ref:a,className:"ag-header-container",role:"presentation"},f())):null},Vl=g.memo(MI),TI=()=>{const[e,t]=g.useState(()=>new Nt),[s,o]=g.useState(),{context:i}=g.useContext(at),n=g.useRef(null),r=g.useRef(),a=g.useCallback(d=>{if(n.current=d,!d||i.isDestroyed()){r.current=i.destroyBean(r.current);return}r.current=i.createBean(new nR);const u={toggleCss:(h,p)=>t(f=>f.setClass(h,p)),setHeightAndMinHeight:h=>o(h)};r.current.setComp(u,d,d)},[]),l=g.useMemo(()=>"ag-header "+e.toString(),[e]),c=g.useMemo(()=>({height:s,minHeight:s}),[s]);return g.createElement("div",{ref:a,className:l,style:c,role:"presentation"},g.createElement(Vl,{pinned:"left"}),g.createElement(Vl,{pinned:null}),g.createElement(Vl,{pinned:"right"}))},II=g.memo(TI),kI=(e,t)=>{g.useEffect(()=>{const s=t.current;if(s){const o=s.parentElement;if(o){const i=document.createComment(e);return o.insertBefore(i,s),()=>{i.remove()}}}},[e])},Ys=kI,AI=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new Re(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){ya(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()}},LI=e=>{const t=g.useRef(e),s=g.useRef(),o=g.useRef(!1),i=g.useRef(!1),[,n]=g.useState(0);o.current&&(i.current=!0),g.useEffect(()=>(o.current||(s.current=t.current(),o.current=!0),n(r=>r+1),()=>{i.current&&s.current?.()}),[])},OI=e=>{const[t,s]=g.useState(),o=g.useContext(at),{context:i,popupSvc:n,gos:r,editSvc:a}=o,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return LI(()=>{const{compDetails:u}=l,h=r.get("stopEditingWhenCellsLoseFocus");let p,f;if(!i.isDestroyed()){f=i.createBean(a.createPopupEditorWrapper(u.params));const C=f.getGui();if(e.jsChildComp){const x=e.jsChildComp.getGui();x&&C.appendChild(x)}const{column:v,rowNode:w}=c,b={column:v,rowNode:w,type:"popupCellEditor",eventSource:d,ePopup:C,position:l.popupPosition,keepWithinBounds:!0},S=n?.positionPopupByComponent.bind(n,b),y=n?.addPopup({modal:h,eChild:C,closeOnEsc:!0,closedCallback:()=>{c.onPopupEditorClosed()},anchorToElement:d,positionCallback:S,ariaOwns:d});p=y?y.hideFunc:void 0,s(f),e.jsChildComp?.afterGuiAttached?.()}return()=>{p?.(),i.destroyBean(f)}}),g.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(Ve(o))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?pn.createPortal(e.wrappedContent,t.getGui()):null},zh=g.memo(OI),NI=(e,t,s)=>{const{compProxy:o}=e;s(o);const i=o.getProps(),n=pi(t);return g.createElement(Gd.Provider,{value:{setMethods:r=>o.setMethods(r)}},n?g.createElement(t,{...i}):g.createElement(t,{...i,ref:r=>o.setRef(r)}))},Wh=(e,t,s)=>e.compProxy?NI(e,t,s):g.createElement(t,{...e.compDetails.params,ref:s}),HI=(e,t,s,o,i)=>{const n=e.compDetails,r=n.componentClass,a=n.componentFromFramework&&!e.popup,l=n.componentFromFramework&&e.popup,c=!n.componentFromFramework&&e.popup;return a?Wh(e,r,t):l?g.createElement(zh,{editDetails:e,cellCtrl:o,eParentCell:s,wrappedContent:Wh(e,r,t)}):c&&i?g.createElement(zh,{editDetails:e,cellCtrl:o,eParentCell:s,jsChildComp:i}):null},GI=(e,t,s,o,i,n)=>{const{context:r}=g.useContext(at),a=g.useCallback(()=>{const l=i.current;if(!l)return;const c=l.getGui();c&&c.parentElement&&c.remove(),r.destroyBean(l),i.current=void 0},[]);g.useEffect(()=>{const l=e!=null,c=e?.compDetails&&!e.compDetails.componentFromFramework,d=t&&s==null;if(!(l&&c&&!d)){a();return}const h=e.compDetails;if(i.current){const f=i.current,v=f.refresh!=null&&e.force==!1?f.refresh(h.params):!1;if(v===!0||v===void 0)return;a()}h.newAgStackInstance().then(f=>{if(!f)return;const C=f.getGui();if(!C)return;(t?s:n.current).appendChild(C),i.current=f})},[e,t,o]),g.useEffect(()=>a,[])},Ym=GI,BI=({cellCtrl:e,parent:t})=>{const s=g.useRef(),o=g.useMemo(()=>{const{loadingComp:i}=e.getDeferLoadingCellRenderer();return i?{value:void 0,compDetails:i,force:!1}:void 0},[e]);if(Ym(o,!1,void 0,1,s,t),o?.compDetails?.componentFromFramework){const i=o.compDetails.componentClass;return g.createElement(i,{...o.compDetails.params})}return g.createElement(g.Fragment,null)},VI=({cellCtrl:e,printLayout:t,editingCell:s})=>{const o=g.useContext(at),{context:i}=o,{column:{colIdSanitised:n},instanceId:r}=e,a=g.useRef(),[l,c]=g.useState(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[d,u]=g.useState(),[h,p]=g.useState(1),[f,C]=g.useState(),[v,w]=g.useState(!1),[b,S]=g.useState(!1),[y,x]=g.useState(!1),[R,E]=g.useState(),D=g.useMemo(()=>e.isForceWrapper(),[e]),T=g.useMemo(()=>e.getCellAriaRole(),[e]),k=g.useRef(null),F=g.useRef(null),M=g.useRef(null),L=g.useRef(),B=g.useRef(),H=g.useRef(),Q=g.useRef([]),ee=g.useRef(),O=g.useRef(),[le,z]=g.useState(0),X=g.useCallback(fe=>{O.current=fe,z(ye=>ye+1)},[]),Y=l!=null&&(v||y||b)&&(d==null||!!d.popup),_=D||Y,U=g.useMemo(()=>e.getCellValueClass(),[e]),te=g.useCallback(fe=>{if(B.current=fe,fe){const ye=fe.isCancelBeforeStart&&fe.isCancelBeforeStart();setTimeout(()=>{ye?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(fe))})}},[e]),N=g.useRef();N.current||(N.current=new wn(()=>k.current)),Ym(l,_,O.current,le,L,k);const P=g.useRef();g.useLayoutEffect(()=>{const fe=P.current,ye=l;if(P.current=l,fe==null||fe.compDetails==null||ye==null||ye.compDetails==null)return;ee.current?.refreshVisibility();const W=fe.compDetails,me=ye.compDetails;if(W.componentClass!=me.componentClass||M.current?.refresh==null)return;M.current.refresh(me.params)!=!0&&p(xe=>xe+1)},[l]),g.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||i.isDestroyed())return;const ye=d.compDetails,W=d.popup===!0,me=ye.newAgStackInstance();return me.then(ue=>{if(!ue)return;const xe=ue.getGui();te(ue),W||((D?H:k).current?.appendChild(xe),ue.afterGuiAttached?.()),E(ue)}),()=>{me.then(ue=>{const xe=ue.getGui();e.disableEditorTooltipFeature(),i.destroyBean(ue),te(void 0),E(void 0),xe?.remove()})}},[d]);const j=g.useCallback(fe=>{if(H.current=fe,!fe||i.isDestroyed()||!e.isAlive()){const me=Q.current;Q.current=[];for(const ue of me)ue();return}let ye;const W=me=>{me&&(fe.insertAdjacentElement("afterbegin",me.getGui()),Q.current.push(()=>{Is(me.getGui()),i.destroyBean(me),ee.current===ye&&(ee.current=void 0)}))};v&&W(e.createSelectionCheckbox()),y&&W(e.createDndSource()),b&&(ye=e.createRowDragComp(),ee.current=ye,ye&&(W(ye),ye.refreshVisibility()))},[e,i,y,b,v]),ie=g.useCallback(()=>{const fe=!e.isCellSpanning()||F.current,ye=k.current;if(!ye||!fe||!e||!e.isAlive()||i.isDestroyed()){a.current=i.destroyBean(a.current);return}a.current=i.createBean(new hi);const W={toggleCss:(ue,xe)=>N.current.toggleCss(ue,xe),setUserStyles:ue=>C(ue),getFocusableElement:()=>k.current,setIncludeSelection:ue=>w(ue),setIncludeRowDrag:ue=>S(ue),setIncludeDndSource:ue=>x(ue),getCellEditor:()=>B.current??null,getCellRenderer:()=>M.current??L.current,getParentOfValue:()=>O.current??H.current??k.current,setRenderDetails:(ue,xe,Ke)=>{const wt=()=>{c(Oe=>Oe?.compDetails!==ue||Oe?.value!==xe||Oe?.force!==Ke?{value:xe,compDetails:ue,force:Ke}:Oe)};if(ue?.params?.deferRender&&!e.rowNode.group){const{loadingComp:Oe,onReady:bt}=e.getDeferLoadingCellRenderer();if(Oe){c({value:void 0,compDetails:Oe,force:!1}),bt.then(()=>J6(wt));return}}wt()},setEditDetails:(ue,xe,Ke,wt)=>{if(ue){let Oe;ue.componentFromFramework&&(wt?Oe=new AI(ue.params,()=>p(bt=>bt+1)):Bd()),u({compDetails:ue,popup:xe,popupPosition:Ke,compProxy:Oe}),xe||c(void 0)}else e.hasBrowserFocus()&&W.getFocusableElement().focus({preventScroll:!0}),B.current=void 0,u(void 0)},refreshEditStyles:(ue,xe)=>{if(!k.current)return;const{current:Ke}=N;Ke.toggleCss("ag-cell-value",!_),Ke.toggleCss("ag-cell-inline-editing",!!ue&&!xe),Ke.toggleCss("ag-cell-popup-editing",!!ue&&!!xe),Ke.toggleCss("ag-cell-not-inline-editing",!ue||!!xe)}},me=H.current||void 0;e.setComp(W,ye,F.current??void 0,me,t,s,a.current)},[]),J=g.useCallback(fe=>{k.current=fe,ie()},[]),pe=g.useCallback(fe=>{F.current=fe,ie()},[]),Se=g.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&pi(l.compDetails.componentClass)),[l]);g.useLayoutEffect(()=>{if(!k.current)return;const{current:fe}=N;fe.toggleCss("ag-cell-value",!_),fe.toggleCss("ag-cell-inline-editing",!!d&&!d.popup),fe.toggleCss("ag-cell-popup-editing",!!d&&!!d.popup),fe.toggleCss("ag-cell-not-inline-editing",!d||!!d.popup)});const we=()=>{const{compDetails:fe,value:ye}=l;if(!fe)return ye?.toString?.()??ye;if(fe.componentFromFramework){const W=fe.componentClass;return g.createElement(g.Suspense,{fallback:g.createElement(BI,{cellCtrl:e,parent:k})},Se?g.createElement(W,{...fe.params,key:h}):g.createElement(W,{...fe.params,key:h,ref:M}))}},Ie=()=>{const fe=()=>l==null?null:_?g.createElement("span",{role:"presentation",id:`cell-${r}`,className:U,ref:X},we()):we(),ye=W=>HI(W,te,k.current,e,R);return d!=null?d.popup?g.createElement(g.Fragment,null,fe(),ye(d)):ye(d):fe()},Je=()=>g.createElement("div",{ref:J,style:f,role:T,"col-id":n},_?g.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:j},Ie()):Ie());return e.isCellSpanning()?g.createElement("div",{ref:pe,className:"ag-spanned-cell-wrapper",role:"presentation"},Je()):Je()},zI=g.memo(VI),WI=({rowCtrl:e,containerType:t})=>{const{context:s,gos:o,editSvc:i}=g.useContext(at),n=g.useContext(_m)==="default",r=g.useRef(),a=g.useRef(e.getDomOrder()),l=e.isFullWidth(),c=e.rowNode.displayed,[d,u]=g.useState(()=>c?e.rowNode.getRowIndexString():null),[h,p]=g.useState(()=>e.rowId),[f,C]=g.useState(()=>e.businessKey),[v,w]=g.useState(()=>e.rowStyles),b=g.useRef(null),[S,y]=g.useState(()=>null),[x,R]=g.useState(),[E,D]=g.useState(()=>c?e.getInitialRowTop(t):void 0),[T,k]=g.useState(()=>c?e.getInitialTransform(t):void 0),F=g.useRef(null),M=g.useRef(),L=g.useRef(),B=g.useRef(!1),[H,Q]=g.useState(0);g.useEffect(()=>{if(B.current||!x||H>10)return;const J=F.current?.firstChild;J?(e.setupDetailRowAutoHeight(J),B.current=!0):Q(pe=>pe+1)},[x,H]);const ee=g.useRef();ee.current||(ee.current=new wn(()=>F.current));const O=g.useRef(()=>{}),le=g.useCallback(J=>(O.current=J,()=>{O.current=()=>{}}),[]),z=eI(le,()=>b.current,[]),X=n?z:S,Y=g.useCallback(J=>{if(F.current=J,r.current=J?s.createBean(new hi):s.destroyBean(r.current),!J){e.unsetComp(t);return}if(!e.isAlive()||s.isDestroyed())return;const pe={setTop:D,setTransform:k,toggleCss:(Se,we)=>ee.current.toggleCss(Se,we),setDomOrder:Se=>a.current=Se,setRowIndex:u,setRowId:p,setRowBusinessKey:C,setUserStyles:w,setCellCtrls:(Se,we)=>{const Ie=b.current,Je=Kr(Ie,Se,a.current);Je!==Ie&&(b.current=Je,n?O.current():hn(we,()=>y(Je)))},showFullWidth:Se=>{L.current=Se.params,R(Se)},getFullWidthCellRenderer:()=>M.current,getFullWidthCellRendererParams:()=>L.current,refreshFullWidth:Se=>{const we=Se();return L.current=we,P.current?(R(Ie=>({...Ie,params:we})),!0):!M.current||!M.current.refresh?!1:M.current.refresh(we)}};e.setComp(pe,J,t,r.current)},[]);g.useLayoutEffect(()=>Rn(x,s,F.current,M),[x]);const _=g.useMemo(()=>{const J={top:E,transform:T};return Object.assign(J,v),J},[E,T,v]),U=l&&x?.componentFromFramework,te=!l&&X!=null,N=g.useMemo(()=>!!(x?.componentFromFramework&&pi(x.componentClass)),[x]),P=g.useRef(!1);g.useEffect(()=>{P.current=N&&!!x&&!!o.get("reactiveCustomComponents")},[N,x]);const j=()=>X?.map(J=>g.createElement(zI,{cellCtrl:J,editingCell:i?.isEditing(J,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:J.instanceId})),ie=()=>{const J=x.componentClass;return N?g.createElement(J,{...x.params}):g.createElement(J,{...x.params,ref:M})};return g.createElement("div",{ref:Y,role:"row",style:_,"row-index":d,"row-id":h,"row-business-key":f},te?j():U?ie():null)},_h=g.memo(WI),_I=({name:e})=>{const{context:t,gos:s}=g.useContext(at),o=g.useMemo(()=>Sn(e),[e]),i=g.useRef(null),n=g.useRef(null),r=g.useRef(null),a=g.useRef([]),l=g.useRef([]),[c,d]=g.useState(()=>[]),u=!!s.get("enableCellSpan")&&!!o.getSpannedRowCtrls,h=g.useRef([]),p=g.useRef([]),[f,C]=g.useState(()=>[]),v=g.useRef(!1),w=g.useRef(),b=g.useMemo(()=>It("ag-viewport",pf(e)),[e]),S=g.useMemo(()=>It(fr(e)),[e]),y=g.useMemo(()=>It("ag-spanning-container",Mx(e)),[e]),x=o.type==="center"||u,R=x?i:n;Ys(" AG Row Container "+e+" ",R);const E=g.useCallback(()=>{const H=!x||i.current!=null,Q=n.current!=null,ee=!u||r.current!=null;return H&&Q&&ee},[]),D=g.useCallback(()=>i.current==null&&n.current==null&&r.current==null,[]),T=g.useCallback(()=>{if(D()&&(w.current=t.destroyBean(w.current)),!t.isDestroyed()&&E()){const H=O=>{const le=Kr(l.current,a.current,v.current);le!==l.current&&(l.current=le,hn(O,()=>d(le)))},Q=O=>{const le=Kr(p.current,h.current,v.current);le!==p.current&&(p.current=le,hn(O,()=>C(le)))},ee={setHorizontalScroll:O=>{i.current&&(i.current.scrollLeft=O)},setViewportHeight:O=>{i.current&&(i.current.style.height=O)},setRowCtrls:({rowCtrls:O,useFlushSync:le})=>{const z=!!le&&a.current.length>0&&O.length>0;a.current=O,H(z)},setSpannedRowCtrls:(O,le)=>{const z=!!le&&h.current.length>0&&O.length>0;h.current=O,Q(z)},setDomOrder:O=>{v.current!=O&&(v.current=O,H(!1))},setContainerWidth:O=>{n.current&&(n.current.style.width=O)},setOffsetTop:O=>{n.current&&(n.current.style.transform=`translateY(${O})`)}};w.current=t.createBean(new Bx(e)),w.current.setComp(ee,n.current,r.current??void 0,i.current)}},[E,D]),k=g.useCallback(H=>{n.current=H,T()},[T]),F=g.useCallback(H=>{r.current=H,T()},[T]),M=g.useCallback(H=>{i.current=H,T()},[T]),L=()=>g.createElement("div",{className:S,ref:k,role:x?"presentation":"rowgroup"},c.map(H=>g.createElement(_h,{rowCtrl:H,containerType:o.type,key:H.instanceId})));if(!x)return L();const B=()=>g.createElement("div",{className:y,ref:F,role:"presentation"},f.map(H=>g.createElement(_h,{rowCtrl:H,containerType:o.type,key:H.instanceId})));return g.createElement("div",{className:b,ref:M,role:"rowgroup"},L(),u?B():null)},jI=g.memo(_I),UI=()=>{const e=g.useContext(at),{context:t,overlays:s}=e,[o,i]=g.useState(""),[n,r]=g.useState(0),[a,l]=g.useState(0),[c,d]=g.useState("0px"),[u,h]=g.useState("0px"),[p,f]=g.useState("100%"),[C,v]=g.useState("0px"),[w,b]=g.useState("0px"),[S,y]=g.useState("100%"),[x,R]=g.useState(!0),[E,D]=g.useState(!0),[T,k]=g.useState(null),[F,M]=g.useState(""),[L,B]=g.useState(null),[H,Q]=g.useState("ag-layout-normal"),ee=g.useRef();ee.current||(ee.current=new wn(()=>O.current));const O=g.useRef(null),le=g.useRef(null),z=g.useRef(null),X=g.useRef(null),Y=g.useRef(null),_=g.useRef(null),U=g.useRef(null),te=g.useRef([]),N=g.useRef([]);Ys(" AG Grid Body ",O),Ys(" AG Pinned Top ",le),Ys(" AG Sticky Top ",z),Ys(" AG Middle ",_),Ys(" AG Pinned Bottom ",U);const P=g.useCallback(xe=>{if(O.current=xe,!xe||t.isDestroyed()){te.current=t.destroyBeans(te.current);for(const ke of N.current)ke();N.current=[];return}const Ke=(ke,et)=>{ke.appendChild(et),N.current.push(()=>et.remove())},wt=ke=>{const et=t.createBean(new ke);return te.current.push(et),et},Oe=(ke,et,Po)=>{Ke(ke,document.createComment(Po)),Ke(ke,wt(et).getGui())};Oe(xe,$x," AG Fake Horizontal Scroll ");const bt=s?.getOverlayWrapperCompClass();bt&&Oe(xe,bt," AG Overlay Wrapper "),Y.current&&Oe(Y.current,qx," AG Fake Vertical Scroll ");const lt={setRowAnimationCssOnBodyViewport:i,setColumnCount:ke=>{O.current&&Sb(O.current,ke)},setRowCount:ke=>{O.current&&wb(O.current,ke)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:h,setStickyTopWidth:f,setTopInvisible:R,setBottomInvisible:D,setColumnMovingCss:(ke,et)=>ee.current.toggleCss(ke,et),updateLayoutClasses:Q,setAlwaysVerticalScrollClass:k,setPinnedTopBottomOverflowY:M,setCellSelectableCss:(ke,et)=>B(et?ke:null),setBodyViewportWidth:ke=>{_.current&&(_.current.style.width=ke)},registerBodyViewportResizeListener:ke=>{if(_.current){const et=vs(e,_.current,ke);N.current.push(()=>et())}},setStickyBottomHeight:v,setStickyBottomBottom:b,setStickyBottomWidth:y,setGridRootRole:ke=>xe.setAttribute("role",ke)},Do=t.createBean(new _x);te.current.push(Do),Do.setComp(lt,xe,_.current,le.current,U.current,z.current,X.current)},[]),j=g.useMemo(()=>It("ag-root","ag-unselectable",H),[H]),ie=g.useMemo(()=>It("ag-body-viewport",o,H,T,L),[o,H,T,L]),J=g.useMemo(()=>It("ag-body",H),[H]),pe=g.useMemo(()=>It("ag-floating-top",x?"ag-invisible":null,L),[L,x]),Se=g.useMemo(()=>It("ag-sticky-top",L),[L]),we=g.useMemo(()=>It("ag-sticky-bottom",C==="0px"?"ag-invisible":null,L),[L,C]),Ie=g.useMemo(()=>It("ag-floating-bottom",E?"ag-invisible":null,L),[L,E]),Je=g.useMemo(()=>({height:n,minHeight:n,overflowY:F}),[n,F]),fe=g.useMemo(()=>({height:c,top:u,width:p}),[c,u,p]),ye=g.useMemo(()=>({height:C,bottom:w,width:S}),[C,w,S]),W=g.useMemo(()=>({height:a,minHeight:a,overflowY:F}),[a,F]),me=xe=>g.createElement(jI,{name:xe,key:`${xe}-container`}),ue=({section:xe,children:Ke,className:wt,style:Oe})=>g.createElement("div",{ref:xe,className:wt,role:"presentation",style:Oe},Ke.map(me));return g.createElement("div",{ref:P,className:j},g.createElement(II,null),ue({section:le,className:pe,style:Je,children:["topLeft","topCenter","topRight","topFullWidth"]}),g.createElement("div",{className:J,ref:Y,role:"presentation"},ue({section:_,className:ie,children:["left","center","right","fullWidth"]})),ue({section:z,className:Se,style:fe,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),ue({section:X,className:we,style:ye,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),ue({section:U,className:Ie,style:W,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},$I=g.memo(UI),KI=(e,t)=>{const{children:s,eFocusableElement:o,onTabKeyDown:i,gridCtrl:n,forceFocusOutWhenTabGuardsAreEmpty:r,isEmpty:a}=e,{context:l}=g.useContext(at),c=g.useRef(null),d=g.useRef(null),u=g.useRef(),h=w=>{const b=w==null?void 0:parseInt(w,10).toString();for(const S of[c,d])b===void 0?S.current?.removeAttribute("tabindex"):S.current?.setAttribute("tabindex",b)};g.useImperativeHandle(t,()=>({forceFocusOutOfContainer(w){u.current?.forceFocusOutOfContainer(w)}}));const p=g.useCallback(()=>{const w=c.current,b=d.current;if(!w&&!b||l.isDestroyed()){u.current=l.destroyBean(u.current);return}if(w&&b){const S={setTabIndex:h};u.current=l.createBean(new Ef({comp:S,eTopGuard:w,eBottomGuard:b,eFocusableElement:o,onTabKeyDown:i,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:y=>n.focusInnerElement(y),isEmpty:a}))}},[]),f=g.useCallback(w=>{c.current=w,p()},[p]),C=g.useCallback(w=>{d.current=w,p()},[p]),v=w=>{const b=w==="top"?Zo.TAB_GUARD_TOP:Zo.TAB_GUARD_BOTTOM;return g.createElement("div",{className:`${Zo.TAB_GUARD} ${b}`,role:"presentation",ref:w==="top"?f:C})};return g.createElement(g.Fragment,null,v("top"),s,v("bottom"))},qI=g.forwardRef(KI),YI=g.memo(qI),ZI=({context:e})=>{const[t,s]=g.useState(""),[o,i]=g.useState(""),[n,r]=g.useState(null),[a,l]=g.useState(null),[c,d]=g.useState(!1),[u,h]=g.useState(),p=g.useRef(),f=g.useRef(null),C=g.useRef(),[v,w]=g.useState(null),b=g.useRef(()=>{}),S=g.useRef(),y=g.useRef([]),x=g.useCallback(()=>{},[]);Ys(" AG Grid ",f);const R=g.useCallback(M=>{if(f.current=M,p.current=M?e.createBean(new UR):e.destroyBean(p.current),!M||e.isDestroyed())return;const L=p.current;b.current=L.focusInnerElement.bind(L);const B={destroyGridUi:()=>{},setRtlClass:s,forceFocusOutOfContainer:H=>{if(!H&&S.current?.isDisplayed()){S.current.forceFocusOutOfContainer(H);return}C.current?.forceFocusOutOfContainer(H)},updateLayoutClasses:i,getFocusableContainers:()=>{const H=[],Q=f.current?.querySelector(".ag-root");Q&&H.push({getGui:()=>Q});for(const ee of y.current)ee.isDisplayed()&&H.push(ee);return H},setCursor:r,setUserSelect:l};L.setComp(B,M,M),d(!0)},[]);g.useEffect(()=>{const M=p.current,L=f.current;if(!u||!M||!v||!L||e.isDestroyed())return;const B=[],{watermarkSelector:H,paginationSelector:Q,sideBarSelector:ee,statusBarSelector:O,gridHeaderDropZonesSelector:le}=M.getOptionalSelectors(),z=[];if(le){const Y=e.createBean(new le.component),_=Y.getGui();L.insertAdjacentElement("afterbegin",_),z.push(_),B.push(Y)}if(ee){const Y=e.createBean(new ee.component),_=Y.getGui(),U=v.querySelector(".ag-tab-guard-bottom");U&&(U.insertAdjacentElement("beforebegin",_),z.push(_)),B.push(Y),y.current.push(Y)}const X=Y=>{const _=e.createBean(new Y),U=_.getGui();return L.insertAdjacentElement("beforeend",U),z.push(U),B.push(_),_};if(O&&X(O.component),Q){const Y=X(Q.component);S.current=Y,y.current.push(Y)}return H&&X(H.component),()=>{e.destroyBeans(B);for(const Y of z)Y.remove()}},[u,v,e]);const E=g.useMemo(()=>It("ag-root-wrapper",t,o),[t,o]),D=g.useMemo(()=>It("ag-root-wrapper-body","ag-focus-managed",o),[o]),T=g.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:n??""}),[a,n]),k=g.useCallback(M=>{C.current=M,h(M!==null)},[]),F=g.useCallback(()=>!p.current?.isFocusable(),[]);return g.createElement("div",{ref:R,className:E,style:T,role:"presentation"},g.createElement("div",{className:D,ref:w,role:"presentation"},c&&v&&!e.isDestroyed()&&g.createElement(at.Provider,{value:e.getBeans()},g.createElement(YI,{ref:k,eFocusableElement:v,onTabKeyDown:x,gridCtrl:p.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:F},g.createElement($I,null)))))},XI=g.memo(ZI),QI=class extends A{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))}},Zm={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},JI={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...Zm},Xm=new Set(Object.keys(JI)),ek=new Set(Object.keys(Zm)),Qm=e=>{const t=g.useRef(),s=g.useRef(null),o=g.useRef(null),i=g.useRef([]),n=g.useRef([]),r=g.useRef(e),a=g.useRef(),l=g.useRef(),c=g.useRef(!1),[d,u]=g.useState(void 0),[,h]=g.useState(0),p=g.useCallback(w=>{if(s.current=w,!w){for(const F of i.current)F();i.current.length=0;return}const b=e.modules||[];o.current||(o.current=new wI(()=>h(F=>F+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),i.current.push(()=>{o.current?.destroy(),o.current=null}));const S=y0(e.gridOptions,e,Object.keys(e).filter(F=>!Xm.has(F))),y=()=>{if(c.current){const F=()=>a.current?.shouldQueueUpdates()?void 0:n.current.shift();let M=F();for(;M;)M(),M=F()}},x=new ik(y);a.current=x;const R=new QI,E={providedBeanInstances:{frameworkCompWrapper:new sk(o.current,S),renderStatus:R},modules:b,frameworkOverrides:x,setThemeOnGridDiv:!0},D=F=>{u(F),F.createBean(R),i.current.push(()=>{F.destroy()}),F.getBean("ctrlsSvc").whenReady({addDestroyFunc:M=>{i.current.push(M)}},()=>{if(F.isDestroyed())return;const M=t.current;M&&e.passGridApi?.(M)})},T=F=>{F.getBean("ctrlsSvc").whenReady({addDestroyFunc:M=>{i.current.push(M)}},()=>{for(const M of n.current)M();n.current.length=0,c.current=!0})},k=new vP;S.gridId??(S.gridId=l.current),t.current=k.create(w,S,D,T,E),i.current.push(()=>{t.current=void 0}),t.current&&(l.current=t.current.getGridId())},[]),f=g.useMemo(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),C=g.useCallback(w=>{c.current&&!a.current?.shouldQueueUpdates()?w():n.current.push(w)},[]);g.useEffect(()=>{const w=tk(r.current,e);r.current=e,C(()=>{t.current&&x0(w,t.current)})},[e]);const v=!g.useSyncExternalStore||dr(e,"renderingMode")==="legacy"?"legacy":"default";return g.createElement("div",{style:f,className:e.className,ref:p},g.createElement(_m.Provider,{value:v},d&&!d.isDestroyed()?g.createElement(XI,{key:d.instanceId,context:d}):null,o.current?.getPortals()??null))};function tk(e,t){const s={};for(const o of Object.keys(t)){if(Xm.has(o)){ek.has(o)&&G(274,{prop:o});continue}const i=t[o];e[o]!==i&&(s[o]=i)}return s}var sk=class extends xP{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const s=this.gridOptions;if(dr(s,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return dr(s,"enableFilterHandlers")?lI:aI;case"floatingFilterComponent":return dr(s,"enableFilterHandlers")?uI:dI;case"dateComponent":return nI;case"dragAndDropImageComponent":return rI;case"loadingOverlayComponent":return gI;case"noRowsOverlayComponent":return fI;case"statusPanel":return mI;case"toolPanel":return CI;case"menuItem":return pI;case"cellRenderer":return iI;case"innerHeaderComponent":return hI}})(t.name);if(r)return new r(e,this.parent,t)}else switch(t.name){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":Bd();break}const i=!t.cellRenderer&&t.name!=="toolPanel";return new Km(e,this.parent,t,i)}},ok=g.forwardRef((e,t)=>{const s=g.useContext(at),{registry:o,context:i,gos:n,rowModel:r}=s,[a,l]=g.useState(()=>new Nt),[c,d]=g.useState(()=>new Nt),[u,h]=g.useState(),[p,f]=g.useState(),C=g.useRef(),v=g.useRef(null),w=g.useRef(),b=g.useMemo(()=>Jb(e.api.getGridId(),u?.rowModelType??"clientSide"),[e]),S=g.useMemo(()=>a.toString()+" ag-details-row",[a]),y=g.useMemo(()=>c.toString()+" ag-details-grid",[c]);t&&g.useImperativeHandle(t,()=>({refresh(){return C.current?.refresh()??!1}})),e.template&&G(230);const x=g.useCallback(E=>{if(v.current=E,!E||i.isDestroyed()){C.current=i.destroyBean(C.current),w.current?.();return}const D={toggleCss:(k,F)=>l(M=>M.setClass(k,F)),toggleDetailGridCss:(k,F)=>d(M=>M.setClass(k,F)),setDetailGrid:k=>h(k),setRowData:k=>f(k),getGui:()=>v.current},T=o.createDynamicBean("detailCellRendererCtrl",!0);if(T&&(i.createBean(T),T.init(D,e),C.current=T,n.get("detailRowAutoHeight"))){const k=()=>{if(v.current==null)return;const F=v.current.clientHeight;F!=null&&F>0&&setTimeout(()=>{e.node.setRowHeight(F),(We(n)||yo(n))&&r.onRowHeightChanged()},0)};w.current=vs(s,E,k),k()}},[]),R=g.useCallback(E=>{C.current?.registerDetailWithMaster(E)},[]);return g.createElement("div",{className:S,ref:x},u&&g.createElement(Qm,{className:y,...u,modules:b,rowData:p,passGridApi:R}))}),ik=class extends Df{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:Bh,agGroupRowRenderer:Bh,agDetailCellRenderer:ok},this.wrapIncoming=(t,s)=>s==="ensureVisible"?Q6(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 X6()}},nk=class extends g.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 g.createElement(Qm,{...this.props,passGridApi:this.setGridApi})}},Jm=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(Jm||{}),yt=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(yt||{}),qr=(e=>(e.Item="item",e.Divider="divider",e.PlainText="plainText",e))(qr||{});const rk=Z("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),ak=Z("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none","w-max"),lk=Z("flex w-full cursor-pointer items-center gap-3","focus-visible:border-none focus-visible:outline-none","hover:bg-accent-primary-alpha px-3","dial-small h-[34px] rounded text-primary"),ck="opacity-75 !cursor-not-allowed",dk="text-error",uk="my-1 border-t border-hover border-secondary",Ii=4,Vd=({ariaLabel:e,className:t,size:s=24,onClose:o,...i})=>m.jsx(De,{"aria-label":e,className:ce("text-secondary hover:enabled:text-accent-primary",t),onClick:o,iconBefore:m.jsx(V.IconX,{size:s}),...i}),vt=({children:e,menu:t,renderOverlay:s,trigger:o=[yt.Click],placement:i,disabled:n=!1,open:r,defaultOpen:a=!1,onOpenChange:l,closable:c=!1,onClose:d,className:u,listClassName:h,outsidePressIgnoreRef:p,outsideClosable:f=!0,allowedPlacements:C,anchorToMouse:v=!1,matchReferenceWidth:w=!0,maxDropdownHeight:b})=>{const[S,y]=g.useState(a),x=r!==void 0,R=x?!!r:S,E=g.useRef(null),D=g.useCallback(P=>{x||y(P),l?.(P)},[x,l]),T=g.useId(),k=i===void 0,F=P=>"clientWidth"in P?P.clientWidth:P.getBoundingClientRect?.()?.width??0,{refs:M,floatingStyles:L,context:B}=be.useFloating({placement:i,open:R,onOpenChange:D,whileElementsMounted:be.autoUpdate,middleware:[be.offset({mainAxis:Ii,crossAxis:0}),k?be.autoPlacement({alignment:"start",crossAxis:!0,padding:Ii,allowedPlacements:C}):be.flip({padding:Ii}),be.shift({padding:Ii}),be.size({padding:Ii,apply({availableWidth:P,availableHeight:j,elements:ie}){const J=ie.floating,pe=F(ie.reference);J.style.setProperty("--fui-available-height",`${Math.floor(j)}px`),J.style.setProperty("--reference-width",w?`${Math.round(pe)}px`:"0px"),w?J.style.minWidth=`${Math.round(pe)}px`:J.style.removeProperty("min-width"),J.style.maxWidth=`${Math.floor(P)}px`;const Se=Math.floor(j);J.style.maxHeight=`${b?Math.min(Se,b):Se}px`}})]}),H=be.useClick(B,{enabled:o.includes(yt.Click)&&!n}),Q=be.useHover(B,{enabled:o.includes(yt.Hover)&&!n,move:!1,restMs:40,delay:{open:80,close:80}}),ee=be.useDismiss(B,{bubbles:!0,referencePress:!1,outsidePress:P=>{if(!f)return!1;const j=P.target;return!(p?.current&&j instanceof Node&&p.current.contains(j))}}),O=be.useRole(B,{role:"menu"}),{getReferenceProps:le,getFloatingProps:z}=be.useInteractions([H,Q,ee,O]),X=g.useCallback((P,j)=>{M.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:P,y:j,top:j,left:P,right:P,bottom:j})})},[M]),Y=g.useCallback(P=>{!o.includes(yt.ContextMenu)||n||(P.preventDefault(),v&&(X(P.clientX,P.clientY),E.current=document.elementFromPoint(P.clientX,P.clientY)),D(!0))},[v,n,D,X,o]),_=g.useCallback(P=>{!v||n||(o.includes(yt.ContextMenu)&&R&&D(!1),X(P.clientX,P.clientY),E.current=document.elementFromPoint(P.clientX,P.clientY))},[v,n,X,R,o,D]);g.useEffect(()=>{n&&R&&D(!1)},[n,R,D]);const U=g.useCallback(P=>j=>{P.disabled||(P.onClick?.({key:P.key,domEvent:j}),t?.onClick?.({key:P.key,domEvent:j}),D(!1))},[t,D]),te=g.useMemo(()=>s?s():t?m.jsxs(m.Fragment,{children:[t.header&&m.jsx(m.Fragment,{children:typeof t.header=="function"?t.header():t.header}),m.jsx("div",{role:"none",className:"py-1","aria-label":"dropdown",children:t.items.map(P=>P.type===qr.Divider?m.jsx("div",{role:"separator",className:uk},P.key):P.type===qr.PlainText?m.jsx("div",{className:ce("px-3 py-2 text-secondary dial-caption",P.className),children:P.label},P.key):m.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!P.disabled,className:Z(lk,P.disabled&&ck,P.danger&&dk,P.className),disabled:P.disabled,onClick:U(P),children:[P.icon&&m.jsx("span",{className:Z(P.danger&&"text-error",P.disabled&&"text-secondary"),children:m.jsx(Le,{icon:P.icon})}),m.jsx("span",{className:Z("flex-1 truncate text-left",P.danger&&"text-error",P.disabled&&"text-secondary"),"aria-labelledby":"item-text",children:P.label})]},P.key))}),t.footer&&m.jsx(m.Fragment,{children:typeof t.footer=="function"?t.footer():t.footer})]}):null,[U,t,s]),N=le({onContextMenu:Y,onMouseDown:_});return g.useEffect(()=>{if(!R)return;const P=M.reference.current;let j=null;if(P instanceof Element?j=P:E.current instanceof Element&&(j=E.current),!j)return;const ie=new IntersectionObserver(([J])=>{J.isIntersecting||D(!1)},{root:null,threshold:0});return ie.observe(j),()=>ie.disconnect()},[R,M.reference,D]),m.jsxs(m.Fragment,{children:[m.jsx("span",{ref:M.setReference,className:Z(rk,n&&"!cursor-not-allowed opacity-75",u),"aria-haspopup":"menu","aria-expanded":R,"aria-controls":T,...N,children:e}),R&&m.jsx(be.FloatingPortal,{children:m.jsx(be.FloatingFocusManager,{context:B,modal:!1,initialFocus:-1,returnFocus:!0,children:m.jsxs("div",{id:T,ref:M.setFloating,style:L,className:Z(ak,!w&&"w-max",h),...z(),children:[c&&m.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:m.jsx(Vd,{ariaLabel:"Close dropdown",onClose:P=>{d?.(P),D(!1)}})}),te]})})})]})},hk="h-full",zl={accentColor:"var(--controls-bg-accent, #5C8DEA)",backgroundColor:"var(--bg-layer-2, #141A23)",oddRowBackgroundColor:"var(--bg-layer-3, #222932)",borderColor:"var(--bg-layer-4, #333942)",rowBorder:"1px solid var(--stroke-tertiary, #090D13)",borderRadius:3,browserColorScheme:"dark",chromeBackgroundColor:"var(--bg-layer-1, #090D13)",foregroundColor:"var(--text-primary, #F3F4F6)",headerFontSize:14,headerFontWeight:600,headerTextColor:"var(--text-secondary, #7F8792)",spacing:4,wrapperBorderRadius:3,fontSize:14,fontFamily:{googleFont:"var(--theme-font, var(--font-inter))"},cellStyle:{textAlign:"center"}},Wl=40,gk=(e,t,s,o,i)=>{const n=typeof e=="string"?e.toLowerCase():e,r=typeof t=="string"?t.toLowerCase():t;return n===r?0:n?r?n>r?1:-1:i?1:-1:i?-1:1},pk=({selectedRowIds:e,selectedRows:t,onSelectionChange:s,onSelectionChangeWithMap:o,rowData:i=[],getRowId:n})=>{const[r,a]=g.useState(new Map),l=t??r,c=g.useMemo(()=>new Set(l.keys()),[l]),d=e!==void 0||t!==void 0;g.useEffect(()=>{if(e!==void 0&&!t){const f=new Map;i.forEach(v=>{const w=n(v);e.has(w)&&f.set(w,v)}),(f.size!==r.size||Array.from(f.keys()).some(v=>!r.has(v)))&&a(f)}},[e,t,i,n,r]);const u=g.useCallback((f,C)=>{const v=n(f),w=new Map(l);if(C?w.set(v,f):w.delete(v),d||a(w),o&&o(w),s){const b=new Set(w.keys()),S=Array.from(w.values());s(b,S)}},[l,n,d,s,o]),h=g.useMemo(()=>{if(!i.length)return"unchecked";const f=i.every(v=>c.has(n(v))),C=i.some(v=>c.has(n(v)));return f?"checked":C?"indeterminate":"unchecked"},[i,c,n]),p=g.useCallback(f=>{const C=new Map;if(f&&i.forEach(v=>{const w=n(v);C.set(w,v)}),d||a(C),o&&o(C),s){const v=new Set(C.keys()),w=Array.from(C.values());s(v,w)}},[i,n,d,s,o]);return{currentSelectedIds:c,currentSelectedRows:l,handleSelectionToggle:u,headerCheckboxState:h,handleHeaderCheckboxChange:p}};s0.registerModules([Z6]);const zd=({columnDefs:e,rowData:t,additionalGridOptions:s,getContextMenuItems:o,className:i,ariaLabel:n="Data grid",withSelectionColumn:r=!0,wrapCustomCellRenderers:a=!0,selectedRowIds:l,selectedRows:c,selectionOnHover:d=!0,onSelectionChange:u,onSelectionChangeWithMap:h,getRowId:p=R=>String(R.id||JSON.stringify(R)),alternateOddRowColors:f=!1,filterPlaceholder:C="Enter value",emptyStateIcon:v,emptyStateTitle:w="No results found",emptyStateDescription:b="Sorry, we couldn't find any results for your search.",loading:S=!1,wrapperBorder:y=!0,withoutHeaderBorders:x=!1})=>{const[R,E]=g.useState(Wl),[D,T]=g.useState(),k=g.useId(),{currentSelectedIds:F,handleSelectionToggle:M,headerCheckboxState:L,handleHeaderCheckboxChange:B}=pk({selectedRowIds:l,selectedRows:c,onSelectionChange:u,onSelectionChangeWithMap:h,rowData:t,getRowId:p}),H=g.useMemo(()=>({...zl,oddRowBackgroundColor:f?zl.oddRowBackgroundColor:zl.backgroundColor,wrapperBorder:y}),[f,y]),Q=g.useCallback(P=>{P.api.sizeColumnsToFit(),E(Wl)},[]),ee=g.useCallback(P=>{if(P.data){const j=p(P.data);return F.has(j)?"ag-row-selected":""}},[F,p]),O=g.useCallback(()=>{const P=L==="checked",j=L==="indeterminate";return m.jsx("div",{className:"flex items-center justify-center h-full header-checkbox-container",children:m.jsx(Yi,{id:"header-select-all",ariaLabel:"Select all rows",checked:P,indeterminate:j,className:Z(`dial-header-select ${L}`,!d&&"dial-header-select-visible"),onChange:B})})},[L,B,d]),le=g.useCallback(P=>{if(P.data){const j=o?.(P.data)??[],ie=P.value==null?"":String(P.value);return m.jsx(vt,{trigger:[yt.ContextMenu],menu:{items:j},anchorToMouse:!0,matchReferenceWidth:!0,className:"w-full",children:m.jsx("span",{className:"block min-w-0 h-full max-w-full",children:m.jsx(ut,{text:ie,className:"max-w-full h-full"})})})}},[o]),z=g.useCallback(P=>{if(!P.data)return null;const j=p(P.data),ie=F.has(j),J=`row-select-${j}`;return m.jsx("div",{className:"flex items-center justify-center size-full",children:m.jsx(Yi,{id:J,ariaLabel:"Select row",checked:ie,className:Z(["dial-row-select",!d&&"dial-row-select-visible"]),onChange:pe=>{P.data&&M(P.data,!!pe)}},`${j}-${ie}`)})},[F,p,M,d]),X=g.useCallback(P=>{const j=typeof a=="function"?a(P):!!a;if(!P.cellRenderer)return{...P,cellRenderer:le};if(!j)return P;const ie=P.cellRenderer;return{...P,cellRenderer:pe=>{const Se=pe.data?o?.(pe.data)??[]:[];let we=null;if(typeof ie=="function"){const Ie=ie;we=m.jsx(Ie,{...pe})}else we=le(pe);return m.jsx(vt,{trigger:[yt.ContextMenu],menu:{items:Se},anchorToMouse:!0,matchReferenceWidth:!0,className:"w-full h-full",children:m.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:we})})}}},[o,le,a]),Y=g.useMemo(()=>({colId:"__select",headerName:"",width:44,minWidth:44,suppressSizeToFit:!0,lockPosition:!0,sortable:!1,resizable:!1,filter:!1,floatingFilter:!1,suppressMenu:!0,borderless:!0,cellRenderer:z,headerComponent:O}),[z,O]),_=g.useMemo(()=>{const P=(e??[]).map(X);return r?[Y,...P]:P},[e,Y,r,X]),U=g.useMemo(()=>({minWidth:150,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:C,buttons:["reset"]},comparator:gk.bind(void 0)}),[C]),te=P=>{const j=_.map(ie=>({...ie,sort:void 0}));P.api.updateGridOptions({columnDefs:j,rowData:t}),P.api.sizeColumnsToFit(),T(P.api),s?.onGridReady?.(P)};g.useEffect(()=>{D&&D.redrawRows()},[D,F]);const N=g.useCallback(()=>m.jsx(sa,{title:w,description:b,containerClassName:"gap-3",titleClassName:"mt-2 !text-lg",icon:v||m.jsx(V.IconZoomCancel,{size:100,stroke:.5,className:"text-secondary"})}),[w,b,v]);return m.jsx("div",{className:Z(hk,i,r&&"with-selection-column",x&&"dial-without-header-borders"),"aria-label":n,role:"region","aria-busy":S,children:m.jsx("div",{className:"ag-theme-balham-dark h-full overflow-x-auto",role:"table","aria-describedby":k,children:m.jsx(nk,{rowModelType:"clientSide",headerHeight:Wl,rowHeight:R,cellSelection:!1,getRowClass:ee,theme:YE.withPart(PE).withParams({...H}),autoSizeStrategy:{type:"fitGridWidth"},columnDefs:_,defaultColDef:U,onGridSizeChanged:Q,onGridReady:te,loading:S,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:N,rowData:t,...s})})})};var Yr=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(Yr||{}),Zr=(e=>(e.Mobile="mobile",e.Tablet="tablet",e))(Zr||{});const sr=({tab:e,active:t,invalid:s,className:o,horizontal:i,onClick:n})=>{const r=ce("rounded h-[38px] items-center flex flex-row border-transparent cursor-pointer dial-small leading-4 hover:text-accent-primary",{"border-b-2 px-4":i,"border-l-2 px-3":!i}),a=ce(r,{"bg-layer-4":i,"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&&i&&!e.disabled,"border-l-accent-primary":t&&!i&&!e.disabled},o);return m.jsxs("button",{role:"tab",className:a,onClick:()=>n(e.id),disabled:e.disabled,children:[m.jsx(ut,{text:e.label,contentClassName:"max-w-[200px]",className:"max-w-[200px]"}),(s||e.invalid)&&m.jsx("div",{className:"text-error pl-1",children:m.jsx(V.IconExclamationCircle,{...ae})})]})},jh=12;var Js=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(Js||{});const Uh=()=>typeof window<"u"&&window.innerWidth<640,$h=()=>{if(typeof window>"u")return Js.Undefined;const e=window.innerWidth;return e>=1024?Js.Desktop:e<640?Js.Mobile:Js.Tablet},fk=()=>{const[e,t]=g.useState($h());return g.useEffect(()=>{const s=()=>t($h());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},eC=({tabs:e,activeTab:t,onClick:s,orientation:o=Yr.Horizontal,screenThreshold:i=Zr.Tablet,smallScreenContainerClassName:n,smallScreenDropdownItemClassName:r})=>{const[a,l]=g.useState(!1),[c,d]=g.useState(!1),[u,h]=g.useState(!1),p=fk(),f=p===Js.Mobile||i===Zr.Tablet&&p===Js.Tablet,C=o===Yr.Horizontal,v=g.useRef(null),w=g.useRef(null),b=g.useRef(null),S=e.find(R=>R.id===t),y=g.useMemo(()=>Z("flex gap-2",C?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[C]),x=g.useCallback(()=>{const R=w.current;R&&h(R.scrollWidth>R.clientWidth)},[]);return g.useEffect(()=>{x();const R=new ResizeObserver(()=>x()),E=w.current;return E&&R.observe(E),()=>R.disconnect()},[e,x]),g.useEffect(()=>{const R=b.current,E=w.current;if(!R||!E)return;const D=R.offsetLeft,T=D+R.offsetWidth,k=E.scrollLeft,F=k+E.clientWidth;D<k?E.scrollTo({left:D-jh,behavior:"smooth"}):T>F&&E.scrollTo({left:T-E.clientWidth+jh,behavior:"smooth"})},[t]),f?m.jsx("div",{role:"tablist",className:ce("h-11 flex items-center bg-layer-3 px-4",n),children:m.jsx(vt,{trigger:[yt.Click],open:a,onOpenChange:l,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(R=>m.jsx(sr,{tab:R,active:R.id===t,onClick:E=>{s(E),l(!1)},className:ce("w-full rounded-none h-11 items-center px-6",r)},R.id)),children:m.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[m.jsx(sr,{tab:S,active:!0,onClick:s,className:"rounded-none bg-transparent border-l-0 border-b-0 h-full items-center px-0"},t),m.jsx(Le,{icon:m.jsx(V.IconChevronDown,{size:16}),className:Z("text-primary transition-transform",a&&"rotate-180")})]})})}):m.jsxs("div",{ref:v,className:"flex w-full items-start",children:[m.jsx("div",{ref:w,role:"tablist",className:y,children:e.map(R=>m.jsx("div",{ref:t===R.id?b:void 0,className:"w-full",children:m.jsx(sr,{tab:R,active:t===R.id,onClick:s,horizontal:C,className:"w-full"})},R.id))}),u&&m.jsx("div",{className:"flex items-center ml-2",children:m.jsx(vt,{trigger:[yt.Click],open:c,onOpenChange:d,placement:"bottom-end",renderOverlay:()=>e.map(R=>m.jsx(sr,{tab:R,active:R.id===t,onClick:E=>{s(E),d(!1)},className:"w-full rounded-none h-[32px] items-center px-3 py-2"},R.id)),children:m.jsx(De,{iconBefore:m.jsx(V.IconDotsVertical,{size:18}),className:Z("w-8 h-8 flex items-center justify-center rounded border",c?"bg-layer-4 border-transparent":"border-primary")})})})]})},mk="w-full overflow-hidden",Ck="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",tC="flex items-center gap-2 min-w-0 shrink-0 dial-small",vk="max-w-[20%] basis-[20%] flex-none",wk="flex-1 min-w-0",Kh="inline-flex items-center gap-1 min-w-0 transition-colors",bk="text-secondary hover:text-accent-primary",Sk="text-primary cursor-default",sC="flex-none inline-flex items-center leading-none text-secondary",yk="items-center gap-1 min-w-0 transition-colors text-secondary hover:text-accent-primary",oC=m.jsx(V.IconChevronRight,{size:16,"aria-hidden":"true"}),Ni=({title:e,href:t,onClick:s,disabled:o,isLast:i,separator:n=oC,className:r,iconBefore:a,titleClassName:l})=>{const c=ce(tC,i?wk:vk,r),d=(!!t||!!s)&&!i&&!o,u=d?ce(Kh,bk):ce(Kh,Sk,o?"pointer-events-none opacity-75":""),h=typeof e=="string"?m.jsx(ut,{className:l,text:e,id:"breadcrumb-item-content"}):m.jsx("span",{className:ce("flex-1 min-w-0 max-w-full truncate",l),"aria-label":"breadcrumb-item-content",children:e});return m.jsxs("li",{className:c,"aria-label":"breadcrumb-item",children:[d?m.jsxs("a",{href:t,onClick:s,className:u,children:[a,h]}):m.jsxs("span",{className:u,"aria-current":i?"page":void 0,"aria-disabled":o?"true":void 0,children:[a,h]}),!i&&m.jsx("span",{className:sC,"aria-label":"separator",children:n})]})},iC=({pathItems:e,separator:t=oC,ariaLabel:s="Breadcrumb",className:o,children:i,titleClassName:n})=>{const r=g.useMemo(()=>e?.length?e:g.Children.toArray(i).filter(g.isValidElement).map(c=>{const d=c.props,{titleClassName:u,isLast:h,separator:p,...f}=d;return f}),[e,i]),a=g.useCallback(c=>{const d=parseInt(c.key,10),u=r[d];u.onClick?u.onClick(c.domEvent):u.href&&(window.location.href=u.href)},[r]),l=g.useMemo(()=>{if(r.length===0)return null;if(r.length<=3)return r.map((f,C)=>g.createElement(Ni,{...f,key:`item-${C}`,isLast:C===r.length-1,separator:t,titleClassName:n}));const c=r.at(0),d=r.slice(1,-2),u=r.at(-2),h=r.at(-1);if(!c||!u||!h)return null;const p=d.map((f,C)=>({key:String(C+1),label:typeof f.title=="string"?f.title:`Item ${C+1}`,disabled:f.disabled}));return m.jsxs(m.Fragment,{children:[g.createElement(Ni,{...c,key:"item-0",separator:t,titleClassName:n}),m.jsxs("li",{className:ce(tC),children:[m.jsx(vt,{menu:{items:p,onClick:a},placement:"bottom-start",matchReferenceWidth:!1,children:m.jsx("button",{type:"button","aria-label":"More breadcrumbs",className:yk,children:m.jsx(V.IconDots,{size:16})})}),m.jsx("span",{className:sC,children:t})]}),g.createElement(Ni,{...u,key:`item-${r.length-2}`,separator:t,titleClassName:n}),g.createElement(Ni,{...h,key:`item-${r.length-1}`,isLast:!0,separator:t,titleClassName:n})]})},[r,t,n,a]);return m.jsx("nav",{"aria-label":s,className:ce(mk,o),children:m.jsx("ol",{className:Ck,children:l})})},nC=({iconClassName:e,...t})=>m.jsx(De,{...t,iconBefore:m.jsx(V.IconTrashX,{...ae,className:e||""})}),rC=({value:e,textareaId:t,placeholder:s,className:o="",containerClassName:i="",disabled:n,invalid:r,readonly:a,disableTooltip:l,onChange:c})=>m.jsx(ms,{tooltip:l?null:e,triggerClassName:ce("flex",i),children:m.jsx("textarea",{id:t,placeholder:s,value:e||"",disabled:n,className:Z("dial-textarea dial-input px-3 py-2",r?"dial-input-error":"",n&&"dial-input-disable",a&&"dial-input-readonly",o),onChange:d=>!a&&c?.(d.currentTarget.value)})}),xk=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],Rk=(e,t,s,o)=>{if((t==="number"||s!==void 0||o!==void 0)&&!xk.includes(e.key)&&!(e.ctrlKey||e.metaKey)&&!(e.key==="-"&&(e.currentTarget.selectionStart??0)===0&&!e.currentTarget.value.includes("-"))&&!(e.key==="."&&t==="number"&&!e.currentTarget.value.includes("."))){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if(s!==void 0||o!==void 0){const n=e.currentTarget.value,r=e.currentTarget.selectionStart||0,a=n.slice(0,r)+e.key+n.slice(r),l=parseFloat(a);if(!isNaN(l)){if(s!==void 0&&l<s){e.preventDefault();return}if(o!==void 0&&l>o){e.preventDefault();return}}}}},vo=({iconBefore:e,iconAfter:t,hideBorder:s,value:o,elementId:i,placeholder:n="",className:r="",containerClassName:a,tooltipTriggerClassName:l,type:c="text",disabled:d,readonly:u,invalid:h,onChange:p,min:f,max:C,prefix:v,suffix:w,textBeforeInput:b,textAfterInput:S,onBlur:y,defaultValue:x,tooltipText:R,hideTooltip:E=!1,inputRef:D})=>{const T=g.useRef(null),k=be.useMergeRefs([D,T]);g.useEffect(()=>{const B=T.current;if(!B)return;const H=Q=>{Q.preventDefault()};return B.addEventListener("wheel",H,{passive:!1}),()=>{B.removeEventListener("wheel",H)}},[]);const F=c==="number"||f!==void 0||C!==void 0,M=B=>{Rk(B,c,f,C)},L=B=>{const H=B.currentTarget.value;if(F&&H!==""){const Q=parseFloat(H);if(isNaN(Q)&&H!=="-"&&H!=="."||!isNaN(Q)&&(f!==void 0&&Q<f||C!==void 0&&Q>C))return}p?.(H||void 0)};return m.jsxs("div",{className:Z("dial-input-field flex flex-row items-center justify-between py-2",s?"dial-input-no-border":"dial-input",h&&"dial-input-error",d&&"dial-input-disable",u&&"dial-input-readonly",!b&&"pl-3",!S&&"pr-3",a),"aria-label":"input-container",children:[b&&m.jsx("div",{className:"mr-2",children:m.jsx(vo,{hideBorder:!0,containerClassName:"rounded-r-none border-r-0",className:"overflow-hidden overflow-ellipsis dial-small",value:b,disabled:!0,elementId:b+"textBefore"})}),v&&m.jsxs("p",{className:"text-secondary dial-small mr-2",children:[" ",v]}),m.jsx(Le,{icon:e,className:Z(!!e&&"mr-2")}),m.jsx(ms,{tooltip:E?void 0:R||o,triggerClassName:Z(l,"flex-1"),children:m.jsx("input",{ref:k,type:c,autoComplete:"off",id:i,placeholder:n,value:x?void 0:o??"",disabled:d,className:Z("border-0 bg-transparent w-full truncate",r),onChange:B=>!u&&L?.(B),onKeyDown:M,onBlur:y,min:f,max:C,defaultValue:x})}),m.jsx(Le,{icon:t,className:Z(!!t&&"ml-2")}),w&&m.jsxs("p",{className:"text-secondary dial-small ml-2",children:[" ",w]}),S&&m.jsx("div",{className:"ml-2",children:m.jsx(vo,{hideBorder:!0,containerClassName:"rounded-l-none border-l-0",value:S,disabled:!0,elementId:S+"textAfter"})})]})},Fk=/^0+\.(\d+)?$/,Ek=/^0+/,aC=({label:e,optional:t,optionalText:s,description:o,error:i,captionDescription:n,readonly:r,orientation:a,elementId:l,fieldTitle:c,errorText:d,elementClassName:u,elementContainerClassName:h,containerClassName:p,defaultEmptyText:f,...C})=>m.jsx(ta,{label:e??c,error:i??d,optionalText:s,optional:t,description:o,captionDescription:n,readonly:r,orientation:a,elementId:l,className:p,defaultEmptyText:f,value:C.value,children:m.jsx(vo,{elementId:l,className:u,containerClassName:h,invalid:d!=null,...C})}),Dk=({onChange:e,...t})=>{const s=o=>!o||o==="-"?o:String(o)?.match(Fk)?String(o)?.replace(Ek,"0"):Number(o);return m.jsx(aC,{type:"number",onChange:o=>e?.(s(o)),...t})},Pk=({onChange:e,...t})=>m.jsx(aC,{type:"text",onChange:s=>e?.(s),...t}),Mk=({fieldTitle:e,optional:t,elementId:s,elementClassName:o,containerClassName:i,elementContainerClassName:n,errorText:r,...a})=>m.jsxs("div",{className:ce("flex flex-col",i),children:[m.jsx(bo,{fieldTitle:e,optional:t,htmlFor:s}),m.jsx(rC,{textareaId:s,className:o,containerClassName:n,...a}),m.jsx(Ts,{errorText:r})]}),Wd=({title:e,switchId:t,isOn:s=!1,disabled:o,onChange:i})=>{const n=Z("flex w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",s?"flex-row-reverse":"flex-row",o?"pointer-events-none":"",o?s?"bg-controls-disable":"bg-layer-4":s?"bg-accent-primary":"bg-layer-4"),r=g.useCallback(a=>{a.stopPropagation(),i?.(!s)},[i,s]);return m.jsxs("div",{className:"flex flex-row items-center",role:"switch",children:[m.jsx("input",{type:"checkbox",onChange:r,id:t,disabled:o,className:"invisible w-0 h-0",checked:s}),m.jsx("label",{htmlFor:t,className:n,children:m.jsx("span",{className:Z("size-3 rounded-full",o?s?"bg-layer-4":"bg-controls-disable":"bg-controls-enable-primary")})}),e&&m.jsx("span",{className:"pl-2 dial-small text-primary","aria-label":"switch-title",children:e})]})};var Ht=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(Ht||{});const Tk="z-[52] flex items-center justify-center bg-blackout md:p-4",Ik="divide-tertiary divide-y",kk="flex flex-row justify-between py-4 px-6 items-center",Ak={[Ht.Sm]:"dial-sm-popup",[Ht.Md]:"dial-md-popup",[Ht.Lg]:"dial-lg-popup"},Eo=({open:e=!1,title:t,portalId:s,className:o,overlayClassName:i,headingClassName:n,dividers:r=!0,children:a,footer:l,onClose:c,size:d=Ht.Md})=>{const{refs:u,context:h}=be.useFloating({open:e,onOpenChange:b=>{b||c?.(null)}}),p=be.useRole(h,{role:"dialog"}),f=be.useDismiss(h,{outsidePress:!0}),{getFloatingProps:C}=be.useInteractions([p,f]);if(!e)return null;const v=typeof t=="string"?"dial-popup-heading":void 0,w=b=>b?typeof b=="string"?m.jsx("h3",{id:v,className:Z("flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",n),children:m.jsx(ms,{tooltip:b,children:b})}):b:m.jsx("span",{});return m.jsx(be.FloatingPortal,{id:s,children:m.jsx(be.FloatingOverlay,{className:Z(Tk,i),children:m.jsx(be.FloatingFocusManager,{context:h,children:m.jsxs("div",{ref:u.setFloating,...C(),role:"dialog","aria-modal":"true","aria-labelledby":v,className:Z("dial-popup",Ak[d],r&&Ik,o),children:[m.jsxs("div",{className:kk,children:[w(t),m.jsx(Vd,{ariaLabel:"Close dialog",onClose:b=>c?.(b)})]}),m.jsx("div",{className:"flex-grow overflow-auto","aria-label":"popup-description",children:a}),l]})})})})};var ai=(e=>(e.Info="info",e.Danger="danger",e))(ai||{});const Lk="flex justify-end gap-2 px-6 py-4",Ok="text-secondary dial-small-150 px-6 py-4",Nk="Cancel",Hk="Ok",qh={[ai.Info]:{confirmVariant:Te.Primary,cancelVariant:Te.Secondary},[ai.Danger]:{container:"dial-danger-popup",confirmVariant:Te.Danger,cancelVariant:Te.Secondary}},lC=({title:e,description:t,descriptionClassName:s,open:o=!1,confirmLabel:i=Hk,cancelLabel:n=Nk,isLoading:r=!1,disableConfirmButton:a=!1,className:l,confirmClassName:c,onClose:d,onConfirm:u,onCancel:h,children:p,dividers:f=!1,variant:C=ai.Info,size:v=Ht.Sm,footer:w})=>{const b=r?null:m.jsxs("div",{className:Lk,children:[m.jsx(De,{variant:Te.Secondary,label:n,onClick:()=>h?h():d?.()}),m.jsx(De,{variant:qh[C].confirmVariant,className:c,label:i,disabled:a,onClick:()=>u()})]}),S=g.useCallback(()=>r?m.jsx("div",{className:"px-6 py-4 h-[120px]",children:m.jsx(fn,{size:50})}):p??(t?m.jsx("div",{className:Z(Ok,s),children:t}):null),[p,t,r,s]);return m.jsx(Eo,{open:o,title:e,className:Z(qh[C].container,l),dividers:f,onClose:()=>d?.(),footer:w??b,size:v,children:S()})},_d=({selectedItems:e,listClassName:t,listElementClassName:s,placeholder:o})=>e?.length?m.jsx("ul",{className:Z("flex-row items-center truncate flex-wrap","flex gap-x-2 gap-y-1",t),children:e?.map(i=>m.jsx("li",{children:m.jsx(ms,{tooltip:i,children:m.jsx(ia,{tag:i,className:Z([s])})})},i))}):o?m.jsx("span",{className:"text-secondary",children:o}):null,Yh=e=>ge.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ge.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"})),cC=({children:e,open:t,disabled:s=!1,selectedValue:o,valueClassName:i,inputClassName:n,onOpen:r,elementId:a,errorText:l,invalid:c,emptyValueText:d,placeholder:u})=>{const h=Array.isArray(o)&&o.length>0,p=typeof o=="string"&&!!o.trim(),f=h||p?o:u?void 0:d,C=s?void 0:r,v=()=>m.jsxs(m.Fragment,{children:[m.jsx("button",{type:"button",className:"w-full",onClick:C,"aria-label":"open-popup",id:a,children:m.jsxs("div",{className:Z("dial-input px-3 py-2 dial-input-field flex flex-row items-center w-full justify-between",n,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[m.jsx(ms,{tooltip:f==null?void 0:String(f),children:f||!u?m.jsx("span",{className:i,children:f}):m.jsx("span",{className:"text-secondary",children:u})}),!s&&m.jsx("div",{className:"flex-shrink-0",children:m.jsx(Le,{icon:m.jsx(Yh,{role:"img",width:ls,height:ls})})})]})}),l&&m.jsx(Ts,{errorText:l})]}),w=()=>m.jsx("div",{className:"w-full",onClick:C,children:m.jsxs("div",{className:Z("dial-input px-3 py-2 flex flex-row items-center w-full justify-between",s&&"dial-input-disable"),children:[m.jsx(_d,{placeholder:u,selectedItems:f}),!s&&m.jsx("div",{className:"ml-1",children:m.jsx(Le,{icon:m.jsx(Yh,{role:"img",width:ls,height:ls})})})]})});return m.jsxs(m.Fragment,{children:[h?w():v(),t&&pn.createPortal(e,document.body)]})},Gk=({fieldTitle:e,htmlFor:t,disabled:s,selectedValue:o,radioButtons:i,customInputValue:n,valueClassName:r,inputClassName:a,emptyValueText:l,onClose:c,title:d,portalId:u,onApply:h,cancelButtonTitle:p="Cancel",applyButtonTitle:f="Apply",isValid:C,selectedRadioValue:v,onChangeRadioField:w,id:b,size:S=Ht.Md})=>{const[y,x]=g.useState(!1),R=g.useCallback(()=>{s||x(!0)},[s]),E=g.useCallback(()=>{x(!1),c?.()},[c]),D=g.useCallback(()=>{h(),E()},[h,E]);return m.jsxs("div",{className:"flex flex-col",children:[m.jsx(bo,{fieldTitle:e,htmlFor:t}),m.jsx(cC,{disabled:s,open:y,selectedValue:n??i.find(T=>T.id===o)?.name,valueClassName:r,inputClassName:Z(a,"py-2","px-3"),emptyValueText:l,onOpen:R,children:m.jsx(Eo,{open:y,onClose:E,title:d,portalId:u,size:S,footer:m.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[m.jsx(De,{variant:Te.Secondary,label:p,onClick:E}),m.jsx(De,{variant:Te.Primary,label:f,onClick:D,disabled:!C})]}),children:m.jsx("div",{className:"px-6 py-4",children:m.jsx(yr,{radioButtons:i,labelClassName:"dial-small",activeRadioButton:v,onChange:w,elementId:b,orientation:lo.Column})})})})]})},Bk="Create",Vk="Cancel",zk="flex items-center justify-end gap-2 px-6 py-3",Wk=({title:e,open:t=!1,submitLabel:s=Bk,cancelLabel:o=Vk,isLoading:i=!1,disableSubmitButton:n=!1,className:r,submitClassName:a,onClose:l,onSubmit:c,onCancel:d,children:u,dividers:h=!0,size:p=Ht.Md,footer:f})=>{const C=i?null:m.jsxs("div",{className:zk,children:[m.jsx(De,{variant:Te.Secondary,label:o,onClick:()=>d?d():l?.()}),m.jsx(De,{variant:Te.Primary,className:a,label:s,disabled:n,onClick:()=>c()})]}),v=g.useCallback(()=>i?m.jsx("div",{className:"px-6 py-4 h-[120px]",children:m.jsx(fn,{size:50})}):u??null,[u,i]);return m.jsx(Eo,{open:t,title:e,className:r,dividers:h,onClose:()=>l?.(),footer:f??C,size:p,children:v()})},_k=({onClick:e})=>m.jsx(V.IconEyeOff,{...ae,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),jk=({onClick:e})=>m.jsx(V.IconEye,{...ae,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),dC=({...e})=>{const[t,s]=g.useState(!1),o=g.useCallback(i=>{s(i)},[]);return m.jsx(vo,{type:t?"text":"password",...e,hideTooltip:!t,iconAfter:t?m.jsx(_k,{onClick:()=>o(!1)}):m.jsx(jk,{onClick:()=>o(!0)})})},Uk=({fieldTitle:e,optional:t,elementClassName:s,elementId:o,errorText:i,...n})=>m.jsxs("div",{className:"flex flex-col",children:[m.jsx(bo,{fieldTitle:e,optional:t,htmlFor:o}),m.jsx(dC,{className:s,elementId:o,invalid:!!i,...n}),m.jsx(Ts,{errorText:i})]});var gn=(e=>(e.Small="small",e.Base="base",e))(gn||{});const $k={[gn.Small]:{textClassName:"text-xs px-1",containerClassName:"px-[6px] py-1 h-[22px]",iconSize:10,iconStroke:1},[gn.Base]:{textClassName:"text-sm px-2",containerClassName:"px-3 py-2 h-[38px]",iconSize:18,iconStroke:1.5}},jd=({elementId:e,value:t,placeholder:s="Search...",disabled:o,readonly:i,invalid:n,className:r,containerClassName:a,onChange:l,onBlur:c,size:d=gn.Base,allowClear:u=!0})=>{const[h,p]=g.useState(t||"");g.useEffect(()=>{p(t||"")},[t]);const f=g.useCallback(w=>{p(w),l?.(w)},[l]),C=$k[d],v=g.useCallback(()=>{f("")},[f]);return m.jsxs("div",{className:ce("dial-input flex flex-row items-center justify-between",n&&"dial-input-error",o&&"dial-input-disable",i&&"dial-input-readonly",C.containerClassName,a),children:[m.jsx(Le,{className:Z(o?"text-secondary":"text-primary"),icon:m.jsx(V.IconSearch,{size:C.iconSize,stroke:C.iconStroke})}),m.jsx("input",{id:e,type:"text",autoComplete:"off",placeholder:s,value:h??"",disabled:o,readOnly:i,className:Z("border-0 bg-transparent w-full",r,C.textClassName),onChange:w=>!i&&f(w.currentTarget.value),onBlur:c}),h&&!i&&!o&&u&&m.jsx(Le,{className:"text-primary cursor-pointer",icon:m.jsx(V.IconX,{size:C.iconSize,stroke:C.iconStroke,onClick:v,"aria-label":"Clear search",role:"button"})})]})},Kk=({placeholder:e="",selectedItems:t=[],updateSelected:s,listClassName:o,listElementClassName:i,containerClassName:n,inputClassName:r})=>{const[a,l]=g.useState(""),c=g.useCallback(u=>{u.key==="Enter"&&(s([...t,u.currentTarget.value]),l("")),(u.key==="Backspace"||u.key==="Delete")&&t.length&&!a&&s(t.slice(0,-1))},[t,s,a]),d=g.useCallback(u=>{l(u.target.value)},[l]);return m.jsxs("div",{className:Z(["dial-input px-3 py-2 flex flex-row items-center flex-wrap w-fit gap-2",n]),children:[m.jsx(_d,{selectedItems:t,listClassName:o,listElementClassName:i}),m.jsx("input",{type:"text",value:a,className:Z(["border-0 bg-transparent p-0",r]),placeholder:t?.length?"":e,onKeyDown:c,onChange:d})]})},qk=({initialTags:e=[],fieldTitle:t,optional:s,elementId:o,placeholder:i,errorText:n,invalid:r,disabled:a,onChange:l})=>{const c=g.useRef(null),[d,u]=g.useState(e),[h,p]=g.useState(""),[f,C]=g.useState(!1),v=S=>{const y=S.trim().replace(/,$/,"");if(y&&!d.includes(y)){const x=[y,...d];u(x),l?.(x)}},w=S=>{(S.key===","||S.key==="Enter")&&(S.preventDefault(),v(h),p(""))},b=S=>{const y=d.filter((x,R)=>R!==S);u(y),l?.(y)};return g.useEffect(()=>{const S=new ResizeObserver(()=>{if(c.current){const y=c.current.scrollHeight>c.current.clientHeight+10;C(y)}});return c.current&&S.observe(c.current),()=>S.disconnect()},[d]),m.jsxs("div",{className:Z("flex flex-col w-full"),children:[m.jsx(bo,{fieldTitle:t,optional:s,htmlFor:o}),m.jsx("div",{className:Z("dial-input min-h-[38px] p-[6px]",r&&"dial-input-error",a&&"dial-input-disable"),children:m.jsxs("div",{ref:c,className:Z("flex flex-wrap gap-2 items-center",f?"flex-col-reverse":"flex-row"),children:[d.map((S,y)=>m.jsx(ia,{tag:S,remove:a?void 0:()=>b(y)},S+y)),m.jsx("input",{type:"text",value:h,onChange:S=>p(S.target.value),onKeyDown:w,className:Z("dial-input-no-border outline-none border-none w-full min-w-[100px] flex-1 p-1"),placeholder:i,disabled:a})]})}),m.jsx(Ts,{errorText:n})]})},Yk="dial-input flex w-full items-center justify-between gap-2 dial-small",Zk="w-full rounded flex flex-col",_l="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none",Xk="bg-accent-primary-alpha",Qk="bg-accent-primary-alpha border-l border-accent-primary border-1",Zh="opacity-75",Jk=352,eA=m.jsx(V.IconChevronDown,{size:16}),uC=({options:e,selectedValues:t,handleRemoveTag:s})=>m.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(o=>{const i=e.find(r=>r.value===o)?.label??o,n=e.find(r=>r.value===o)?.icon;return m.jsx(ia,{tag:i,remove:r=>s?.(r,o),iconBefore:n?m.jsx(Le,{icon:n}):null,className:"max-w-full"},o)})});var Xr=(e=>(e.Sm="sm",e.Md="md",e))(Xr||{}),Qr=(e=>(e.Primary="Primary",e.Secondary="Secondary",e))(Qr||{});const hC=({options:e,multiple:t=!1,elementId:s,value:o,defaultValue:i,variant:n=Qr.Primary,size:r=Xr.Md,prefix:a,customSelectedValue:l,placeholder:c="Select...",searchable:d=!1,searchPlaceholder:u,selectAll:h=!1,selectAllLabel:p="Select all",emptyStateTitle:f="No options available",emptyStateDescription:C,emptyStateIcon:v,disabled:w=!1,className:b,closable:S=!1,header:y,footer:x,onClose:R,onChange:E,inlineSearch:D=!1,dismissRef:T,onFooterClick:k})=>{const F=g.useId(),[M,L]=g.useState(!1),[B,H]=g.useState(D&&l||""),Q=g.useRef(null),ee=o!==void 0,[O,le]=g.useState(i),z=ee?o:O,X=g.useMemo(()=>t?Array.isArray(z)?z:[]:typeof z=="string"?[z]:[],[z,t]),Y=g.useMemo(()=>{const W=B.trim().toLowerCase();return W?e.filter(me=>me.label.toLowerCase().includes(W)):e},[e,B]);g.useEffect(()=>{!M&&!D&&H("")},[D,M]),g.useEffect(()=>{D&&H(l||"")},[l,D]);const _=g.useCallback(W=>{ee||le(W),E?.(W)},[ee,E]),U=W=>{if(t){const me=new Set(X);me.has(W)?me.delete(W):me.add(W),_(Array.from(me))}else _(W),L(!1)},te=g.useCallback((W,me)=>{if(W.stopPropagation(),!t){_("");return}const ue=X.filter(xe=>xe!==me);_(ue)},[t,X,_]),N=g.useMemo(()=>Y.filter(W=>!W.disabled),[Y]),P=g.useMemo(()=>N.filter(W=>X.includes(W.value)).length,[N,X]),j=W=>{D&&!t&&!W&&U(B),L(W)},ie=N.length>0&&P===N.length,J=P>0&&!ie,pe=()=>{if(!(!t||N.length===0))if(ie){const W=new Set(N.map(ue=>ue.value)),me=X.filter(ue=>!W.has(ue));_(me)}else{const W=new Set(X);N.forEach(me=>W.add(me.value)),_(Array.from(W))}},Se=X.length>0;g.useEffect(()=>{M&&D&&!t&&!w&&requestAnimationFrame(()=>{const W=Q.current;if(!W)return;W.focus();const me=W.value?.length??0;W.setSelectionRange?.(me,me)})},[M,D,t,w]);const we=!t&&Se?X[0]:void 0,Ie=g.useMemo(()=>we?e.find(W=>W.value===we):void 0,[e,we]),Je=g.useCallback(()=>!t||X.length===0?null:m.jsx(uC,{options:e,selectedValues:X,handleRemoveTag:te}),[t,e,X,te]),fe=g.useCallback(()=>t?Se?Je():m.jsx("span",{className:"text-secondary truncate",children:c}):Ie?m.jsxs(m.Fragment,{children:[Ie.icon&&m.jsx(Le,{icon:Ie.icon}),m.jsx(ut,{text:a?`${a} ${Ie.label}`:Ie.label}),Ie?.description&&m.jsx("div",{className:"text-secondary dial-small",children:Ie.description})]}):l&&o?l:m.jsx("span",{className:"text-secondary truncate",children:c}),[Se,t,l,a,o,c,Je,Ie]);g.useImperativeHandle(T,()=>({dismiss:()=>{L(!1)}}));const ye=()=>{H(X.length===1?Ie?.label??B:"")};return m.jsx(vt,{open:M,onOpenChange:j,disabled:w,closable:S,onClose:R,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],maxDropdownHeight:d?null:Jk,renderOverlay:()=>m.jsxs("div",{id:`list-${s||F}`,role:"listbox","aria-multiselectable":t||void 0,className:Zk,children:[y&&m.jsx(m.Fragment,{children:typeof y=="function"?y():y}),(d||S)&&e.length>8&&m.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[d&&m.jsx(jd,{placeholder:u,onChange:H,value:B,elementId:`search-${s||F}`}),S&&m.jsx(De,{"aria-label":"Close select",className:"shrink-0",iconBefore:m.jsx(V.IconX,{size:16}),onClick:W=>{R?.(W),L(!1)}})]}),t&&h&&N.length>0&&m.jsx("div",{className:Z(_l,"mt-2"),children:m.jsx(Yi,{id:`${s||F}-selectAll`,label:p,checked:ie,indeterminate:J,onChange:pe,ariaLabel:p})}),m.jsx("div",{className:Z("overflow-y-auto max-h-[352px]",D&&Y.length===0?"":"py-1"),children:Y.length===0?!D&&m.jsx("div",{className:"px-2 py-3",children:m.jsx(sa,{icon:v??m.jsx(V.IconClipboardX,{size:24}),title:f,description:C})}):Y.map(W=>{const me=X.includes(W.value);return t?m.jsxs("div",{role:"option","aria-selected":me,"aria-disabled":!!W.disabled,className:Z(_l,me&&Xk,W.disabled&&Zh,"w-full"),children:[m.jsx(Yi,{id:`${s||F}-${W.value}`,label:m.jsxs("span",{className:"flex w-full flex-1 min-w-0 items-center gap-2 text-primary",children:[W.icon&&m.jsx(Le,{icon:W.icon}),m.jsx("span",{className:"truncate",children:W.label})]}),checked:me,disabled:W.disabled,onChange:()=>!W.disabled&&U(W.value),ariaLabel:W.label}),W.description&&m.jsx("div",{className:"text-secondary dial-small",children:W.description})]},W.value):m.jsx("button",{role:"option",type:"button","aria-selected":me,"aria-disabled":!!W.disabled,disabled:W.disabled,className:Z(_l,me&&Qk,W.disabled&&Zh),onClick:()=>!W.disabled&&U(W.value),children:m.jsxs("div",{className:"flex items-center gap-2 w-full",children:[W.icon&&m.jsx(Le,{icon:W.icon}),m.jsx(ut,{text:W.label}),W.description&&m.jsx("div",{className:"text-secondary dial-small",children:W.description})]})},W.value)})}),x&&m.jsx("div",{onClick:W=>{k?.(W),k&&L(!1)},children:typeof x=="function"?x():x})]}),children:m.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-expanded":M,"aria-controls":`list-${s||F}`,className:ce(Yk,w&&"opacity-75 !cursor-not-allowed",r===Xr.Sm?"min-h-[25px] px-1.5 py-1":"min-h-[38px] px-3 py-2",n===Qr.Secondary?"!bg-layer-4":"",b),onMouseDown:W=>{w||D&&!t&&(ye(),W.preventDefault())},onClick:()=>{w||(L(W=>!W),D&&!t&&(ye(),Q.current?.focus()))},children:[D&&!t?m.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary flex-1",children:m.jsx("input",{id:`inline-${s||F}`,type:"text",placeholder:u??c,value:B||"",onChange:W=>H(W.currentTarget.value),onFocus:()=>!w&&L(!0),onMouseDown:W=>{ye(),W.stopPropagation()},onClick:W=>{W.stopPropagation()},className:"bg-transparent outline-none w-full dial-small",ref:Q,disabled:w,"aria-disabled":w})}):m.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary",children:fe()}),!D&&m.jsx(Le,{icon:eA,className:Z("text-primary",M&&"rotate-180")})]})})},tA=({fieldTitle:e,optional:t,captionDescription:s,containerClassName:o,selectClassName:i,error:n,elementId:r,description:a,readonly:l,value:c,defaultEmptyText:d,...u})=>{const h=g.useCallback(()=>{if(!c||Array.isArray(c)&&c.length===0)return d??"None";if(Array.isArray(c))return m.jsx(uC,{options:u.options,selectedValues:c});{const p=u.options?.find(f=>f.value===c);return m.jsx("span",{"aria-readonly":!0,className:"text-primary",children:p?.label||c})}},[c,u.options,d]);return m.jsx(ta,{elementId:r,label:e,optional:t,description:a,error:n,captionDescription:s,className:o,readonly:l,value:h(),defaultEmptyText:d,children:m.jsx(hC,{className:i,value:c,elementId:r,...u})})};function gC(e){let t=null;return()=>(t==null&&(t=e()),t)}function sA(e,t){return e.filter(s=>s!==t)}function oA(e,t){const s=new Set,o=n=>s.add(n);e.forEach(o),t.forEach(o);const i=[];return s.forEach(n=>i.push(n)),i}class iA{enter(t){const s=this.entered.length,o=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t));return this.entered=oA(this.entered.filter(o),[t]),s===0&&this.entered.length>0}leave(t){const s=this.entered.length;return this.entered=sA(this.entered.filter(this.isNodeInDocument),t),s>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class nA{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const s={};Object.keys(this.config.exposeProperties).forEach(o=>{const i=this.config.exposeProperties[o];i!=null&&(s[o]={value:i(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,s)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,s){return s===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Ud="__NATIVE_FILE__",pC="__NATIVE_URL__",fC="__NATIVE_TEXT__",mC="__NATIVE_HTML__",Xh=Object.freeze(Object.defineProperty({__proto__:null,FILE:Ud,HTML:mC,TEXT:fC,URL:pC},Symbol.toStringTag,{value:"Module"}));function jl(e,t,s){const o=t.reduce((i,n)=>i||e.getData(n),"");return o??s}const Hc={[Ud]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[mC]:{exposeProperties:{html:(e,t)=>jl(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[pC]:{exposeProperties:{urls:(e,t)=>jl(e,t,"").split(`
62
+ `),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[fC]:{exposeProperties:{text:(e,t)=>jl(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function rA(e,t){const s=Hc[e];if(!s)throw new Error(`native type ${e} has no configuration`);const o=new nA(s);return o.loadDataTransfer(t),o}function Ul(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(Hc).filter(s=>{const o=Hc[s];return o?.matchesTypes?o.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const aA=gC(()=>/firefox/i.test(navigator.userAgent)),CC=gC(()=>!!window.safari);class Qh{interpolate(t){const{xs:s,ys:o,c1s:i,c2s:n,c3s:r}=this;let a=s.length-1;if(t===s[a])return o[a];let l=0,c=r.length-1,d;for(;l<=c;){d=Math.floor(.5*(l+c));const p=s[d];if(p<t)l=d+1;else if(p>t)c=d-1;else return o[d]}a=Math.max(0,c);const u=t-s[a],h=u*u;return o[a]+i[a]*u+n[a]*h+r[a]*u*h}constructor(t,s){const{length:o}=t,i=[];for(let p=0;p<o;p++)i.push(p);i.sort((p,f)=>t[p]<t[f]?-1:1);const n=[],r=[];let a,l;for(let p=0;p<o-1;p++)a=t[p+1]-t[p],l=s[p+1]-s[p],n.push(a),r.push(l/a);const c=[r[0]];for(let p=0;p<n.length-1;p++){const f=r[p],C=r[p+1];if(f*C<=0)c.push(0);else{a=n[p];const v=n[p+1],w=a+v;c.push(3*w/((w+v)/f+(w+a)/C))}}c.push(r[r.length-1]);const d=[],u=[];let h;for(let p=0;p<c.length-1;p++){h=r[p];const f=c[p],C=1/n[p],v=f+c[p+1]-h-h;d.push((h-f-v)*C),u.push(v*C*C)}this.xs=t,this.ys=s,this.c1s=c,this.c2s=d,this.c3s=u}}const lA=1;function vC(e){const t=e.nodeType===lA?e:e.parentElement;if(!t)return null;const{top:s,left:o}=t.getBoundingClientRect();return{x:o,y:s}}function or(e){return{x:e.clientX,y:e.clientY}}function cA(e){var t;return e.nodeName==="IMG"&&(aA()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function dA(e,t,s,o){let i=e?t.width:s,n=e?t.height:o;return CC()&&e&&(n/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:n}}function uA(e,t,s,o,i){const n=cA(t),a=vC(n?e:t),l={x:s.x-a.x,y:s.y-a.y},{offsetWidth:c,offsetHeight:d}=e,{anchorX:u,anchorY:h}=o,{dragPreviewWidth:p,dragPreviewHeight:f}=dA(n,t,c,d),C=()=>{let R=new Qh([0,.5,1],[l.y,l.y/d*f,l.y+f-d]).interpolate(h);return CC()&&n&&(R+=(window.devicePixelRatio-1)*f),R},v=()=>new Qh([0,.5,1],[l.x,l.x/c*p,l.x+p-c]).interpolate(u),{offsetX:w,offsetY:b}=i,S=w===0||w,y=b===0||b;return{x:S?w:v(),y:y?b:C()}}class hA{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 gA(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Jh(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},o=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),o.forEach(function(i){gA(e,i,s[i])})}return e}class pA{profile(){var t,s;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((s=this.dragOverTargetIds)===null||s===void 0?void 0:s.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var s;(s=this.window)===null||s===void 0||s.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,s,o){return this.sourcePreviewNodeOptions.set(t,o),this.sourcePreviewNodes.set(t,s),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,s,o){this.sourceNodes.set(t,s),this.sourceNodeOptions.set(t,o);const i=r=>this.handleDragStart(r,t),n=r=>this.handleSelectStart(r);return s.setAttribute("draggable","true"),s.addEventListener("dragstart",i),s.addEventListener("selectstart",n),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),s.removeEventListener("dragstart",i),s.removeEventListener("selectstart",n),s.setAttribute("draggable","false")}}connectDropTarget(t,s){const o=r=>this.handleDragEnter(r,t),i=r=>this.handleDragOver(r,t),n=r=>this.handleDrop(r,t);return s.addEventListener("dragenter",o),s.addEventListener("dragover",i),s.addEventListener("drop",n),()=>{s.removeEventListener("dragenter",o),s.removeEventListener("dragover",i),s.removeEventListener("drop",n)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),s=this.sourceNodeOptions.get(t);return Jh({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 Jh({anchorX:.5,anchorY:.5,captureDraggingState:!1},s||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(Xh).some(s=>Xh[s]===t)}beginDragNativeItem(t,s){this.clearCurrentDragSourceNode(),this.currentNativeSource=rA(t,s),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const s=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var o;return(o=this.rootElement)===null||o===void 0?void 0:o.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},s)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,s){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(s))}handleDragEnter(t,s){this.dragEnterTargetIds.unshift(s)}handleDragOver(t,s){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(s)}handleDrop(t,s){this.dropTargetIds.unshift(s)}constructor(t,s,o){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const n=this.sourceNodes.get(i);return n&&vC(n)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:n}=this;this.dragStartSourceIds=null;const r=or(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(n||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:a}=i,l=Ul(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:p,anchorY:f,offsetX:C,offsetY:v}=this.getCurrentSourcePreviewNodeOptions(),S=uA(u,h,r,{anchorX:p,anchorY:f},{offsetX:C,offsetY:v});a.setDragImage(h,S.x,S.y)}}try{a?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:c}=this.getCurrentSourcePreviewNodeOptions();c?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(l)this.beginDragNativeItem(l);else{if(a&&!a.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var n;(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:a}=i,l=Ul(a);l&&this.beginDragNativeItem(l,a)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:n}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,n.length>0&&this.actions.hover(n,{clientOffset:or(i)}),n.some(a=>this.monitor.canDropOnTarget(a))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var n;(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:n}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=or(i),this.scheduleHover(n),(n||[]).some(a=>this.monitor.canDropOnTarget(a))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var n;i.preventDefault(),(n=this.currentNativeSource)===null||n===void 0||n.loadDataTransfer(i.dataTransfer)}else Ul(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:n}=this;this.dropTargetIds=[],this.actions.hover(n,{clientOffset:or(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const n=i.target;typeof n.dragDrop=="function"&&(n.tagName==="INPUT"||n.tagName==="SELECT"||n.tagName==="TEXTAREA"||n.isContentEditable||(i.preventDefault(),n.dragDrop()))},this.options=new hA(s,o),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new iA(this.isNodeInDocument)}}const fA=function(t,s,o){return new pA(t,s,o)},mA=({onChange:e,emptyTextFirstLine:t,emptyTextSecondLine:s,emptyButtonLabel:o,acceptTypes:i,maxFilesCount:n,multiple:r,fileFormatError:a,fileCountError:l,getIsFileFormatError:c})=>{const d=g.useRef(null),u=g.useRef(null),[h,p]=g.useState([]),[f,C]=g.useState(!1),v=g.useCallback(F=>{const M=F.target.files;if(M&&M.length>0){const L=Array.from(M);c?.(L)?C(!0):e(L)}},[c,e]),w=g.useCallback(F=>n&&F?.length>n,[n]),b=g.useMemo(()=>f||w(h),[f,h,w]),S=()=>{p([]),C(!1)};g.useEffect(()=>{S()},[i]);const[{isOver:y,canDrop:x},R]=Ag(()=>({accept:[Ud],drop(F){const M=F.files;!c?.(M)&&!w(M)&&e(M),S()},collect:F=>({isOver:F.isOver(),canDrop:F.canDrop()})}),[v]),E=F=>{(F.key==="Enter"||F.key==="Space")&&(F.preventDefault(),u.current?.click())},D=F=>{F?.preventDefault();const M=Array.from(F.dataTransfer?.items??[]);C(!!c?.(M)),p(M)},T=F=>{F.target===F.currentTarget&&S()},k=Z("border border-dashed rounded w-full cursor-pointer relative h-full hover:border-hover",!x&&!b&&"border-primary",x&&(y?"border-accent-primary":"border-hover"),b&&"border-error");return R(d),m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:k,ref:d,onDragOver:D,onDragLeave:T,children:[m.jsxs("label",{htmlFor:"file",tabIndex:0,onKeyDown:E,className:"flex flex-col items-center cursor-pointer h-full w-full text-secondary dial-tiny justify-center",children:[t&&m.jsx("p",{className:"mb-1",children:t}),s&&m.jsx("p",{className:"mb-0.5",children:s}),o&&m.jsx(De,{variant:Te.Tertiary,label:o,onClick:()=>u.current?.click()})]}),m.jsx("input",{multiple:r,id:"file",type:"file",ref:u,hidden:!0,accept:i,onChange:v})]}),m.jsx(m.Fragment,{children:f?m.jsx(Ts,{errorText:a}):w(h)&&m.jsx(Ts,{errorText:l})})]})},CA=({iconBefore:e,className:t,errorText:s,...o})=>{const i=o.invalid,n=()=>m.jsx("div",{className:"mr-2",children:i?m.jsx(V.IconExclamationCircle,{...ae,className:"text-error"}):e});return m.jsx(vo,{...o,iconBefore:n(),tooltipTriggerClassName:"flex-1 min-w-0",className:Z(i?"text-error":"",t),tooltipText:i&&s?s:void 0,hideBorder:!0})},vA=e=>{const{files:t,iconBeforeInput:s,dynamicIcon:o,onChange:i,isInvalid:n,errorText:r,removeButtonAriaLabel:a}=e,l=(u,h)=>{u.stopPropagation(),i(t?.filter(p=>p.name!==h)||[])},c=u=>m.jsx(nC,{"aria-label":a,onClick:h=>l(h,u)}),d=u=>{i(u)};return!t||t.length===0?m.jsx(i1,{backend:fA,children:m.jsx(mA,{...e,onChange:d})}):m.jsx("div",{className:"flex-1 min-h-0 border border-solid border-primary rounded",children:t&&t.length>0&&m.jsx("div",{className:"max-h-full overflow-y-auto",children:t.map((u,h)=>m.jsx(CA,{elementId:u.name,value:u.name,iconAfter:c(u.name),iconBefore:s||o?.(u.name),invalid:n?.(u),errorText:r},u.name+h))})})},wA=({onChange:e,fieldTitle:t,elementId:s,files:o,maxFilesCount:i,fileFormatError:n,fileCountError:r,multiple:a=!0,acceptTypes:l,deleteAllButtonLabel:c,addButtonLabel:d,...u})=>{const h=g.useRef(null),p=()=>h.current?.click(),f=()=>{e([])},C=g.useCallback(w=>w?.some(b=>b.type===""||!(l==="/"||l?.toLowerCase()?.includes(b?.type?.toLowerCase()))),[l]),v=g.useCallback(w=>{const b=w.target.files;if(b&&b.length>0){const S=Array.from(b);C(S)||e([...o||[],...S])}},[e,o,C]);return m.jsxs("div",{className:"h-full flex flex-col",children:[m.jsxs("div",{className:"flex justify-between items-center pb-1 min-h-[42px]",children:[m.jsx(bo,{fieldTitle:`${t}: ${a?o?.length||0:""}`,htmlFor:s}),a&&!!o?.length&&m.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[m.jsx(De,{variant:Te.Tertiary,className:"!text-error",iconBefore:m.jsx(V.IconTrashX,{...ae}),label:c,onClick:f}),(i?i>o?.length:!0)&&m.jsx(De,{variant:Te.Tertiary,iconBefore:m.jsx(V.IconPlus,{...ae}),label:d,onClick:p})]})]}),o&&o.length>0&&m.jsx("input",{id:"file",type:"file",multiple:a,ref:h,hidden:!0,accept:l,onChange:v}),m.jsx(vA,{files:o,onChange:e,acceptTypes:l,maxFilesCount:i,multiple:a,fileFormatError:n,fileCountError:r,getIsFileFormatError:C,...u})]})},bA=m.jsx(V.IconChevronDown,{size:16}),SA=m.jsx(V.IconChevronUp,{size:16}),Gc=e=>{const[t,s]=g.useState(!1),o=g.useMemo(()=>t?SA:bA,[t]);return m.jsx("div",{children:m.jsx(vt,{menu:{items:e.items},onOpenChange:i=>s(i),children:m.jsx(De,{...e,iconAfter:o})})})},yA="w-full h-full grid grid-rows-[auto_1fr] gap-5 p-6 overflow-hidden min-w-0 bg-layer-2",eg="w-full text-secondary flex items-center gap-2",xA="flex min-h-0 min-w-0 h-full gap-4 overflow-hidden",RA="flex flex-col flex-1 min-h-0 min-w-0 h-full gap-4",FA="w-full h-full rounded bg-layer-3 text-secondary overflow-auto min-w-0",EA="flex-1 w-full rounded text-secondary overflow-auto min-h-0 min-w-0",DA=280,PA="Files",Ms=20,MA="Files",$l=".dial_folder",TA=280,IA=460,Kl=44,kA=56,AA=800;var Ae=(e=>(e.ITEM="item",e.FOLDER="folder",e))(Ae||{}),wC=(e=>(e.FILE="FILE",e.PROMPT="PROMPT",e.CONVERSATION="CONVERSATION",e.APPLICATION="APPLICATION",e.TOOLSET="TOOL_SET",e))(wC||{}),bC=(e=>(e.READ="READ",e.WRITE="WRITE",e.SHARE="SHARE",e))(bC||{});const wo=(e,t)=>{if(!(!e||!e.length||!t))for(const s of e){if(s.path===t)return s;const o=wo(s.items,t);if(o)return o}},tg=(e,t)=>{if(!e?.length)return;if(!t)return e[0];const s=wo(e,t);if(s&&s.nodeType===Ae.FOLDER)return s;const o=t.split("/").filter(Boolean);if(o.length<=1)return e[0];const i="/"+o.slice(0,o.length-1).join("/");return wo(e,i)??e[0]},Sr=e=>(e??"").toLowerCase(),LA=e=>Sr(e).replace(/^\./,""),OA=e=>{if(!e)return[];const t=[],s=o=>{const i=o.items??[];for(const n of i)t.push(n),n.nodeType===Ae.FOLDER&&s(n)};return s(e),t},SC=e=>(e.name??e.path.split("/").pop()??"").startsWith("."),yC=e=>{if(!e||e<=0)return"";const t=1024,s=t*1024;return e>=s?`${(e/s).toFixed(1)} MB`:e>=t?`${(e/t).toFixed(0)} KB`:`${e} bytes`},NA=(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}},HA={size:10,stroke:2},GA=26;var Gt=(e=>(e.File="file",e.Folder="folder",e))(Gt||{});const BA=({name:e,type:t,shared:s=!1,loading:o=!1,...i})=>{const n=r=>m.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[r,s&&m.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:m.jsx(Xi,{})})]});if(o)return n(m.jsx(fn,{}));if(t===Gt.File){const r=e.includes(".")?e.split(".").pop():null;return m.jsx($c,{...i,extension:r??"",className:"text-secondary",indicator:s?m.jsx(Xi,{}):null,label:"File type icon"})}return t===Gt.Folder?n(m.jsx(Le,{icon:m.jsx(V.IconFolder,{className:i.className,size:i.size??ae.size,stroke:i.stroke??ae.stroke}),className:"inline-block align-middle"})):null},VA=({name:e,type:t,elementId:s,loading:o=!1,shared:i=!1,iconClassName:n,iconIndicator:r,iconLabel:a,iconSize:l,iconStroke:c,inputInvalid:d,inputInvalidMessage:u,inputContainerClassName:h,inputIconAfter:p,inputRef:f,onChange:C})=>{const v=()=>d?m.jsx(ms,{tooltip:u,children:p||m.jsx(V.IconAlertCircleFilled,{...ae,className:"text-error","aria-label":"alert"})}):null;return m.jsxs("div",{className:"flex gap-2 items-center",children:[m.jsx(BA,{name:e,type:t,label:a,className:n,indicator:r,size:l,stroke:c,loading:o,shared:i}),m.jsx(vo,{containerClassName:ce("!h-6 py-[1px] pl-[7px] pr-[7px]",h),elementId:s,value:e,onChange:C,invalid:d,iconAfter:v(),inputRef:f})]})};function xC({value:e,isEditing:t,restoreOnCancel:s=!0,onValidate:o,onSave:i,onCancel:n}){const[r,a]=g.useState(e),[l,c]=g.useState(!1),[d,u]=g.useState(""),h=g.useRef(null),p=g.useCallback((b=!1,S="")=>{c(b),u(S)},[]),f=g.useCallback(b=>{if(!o)return p(),!0;const S=o(b);return S?(p(!0,S),!1):(p(),!0)},[o,p]),C=g.useCallback(b=>{const S=b??"";a(S),f(S)},[f]),v=g.useCallback(()=>{f(r)?i?.(r):h.current?.focus()},[f,i,r]),w=g.useCallback(()=>{s&&a(e),p(),n?.()},[e,n,s,p]);return g.useEffect(()=>{t&&(a(e),p(),requestAnimationFrame(()=>{h.current?.focus(),h.current?.select()}))},[t,e,p]),g.useEffect(()=>{const b=h.current;if(!t||!b)return;const S=y=>{y.key==="Enter"?(y.preventDefault(),h.current?.blur()):y.key==="Escape"&&(y.preventDefault(),w())};return b.addEventListener("keydown",S),()=>b.removeEventListener("keydown",S)},[t,v,w]),g.useEffect(()=>{if(!t)return;const b=h.current;if(!b)return;const S=y=>{const x=y.relatedTarget;x&&b.contains(x)||(f(r)?v():b.focus())};return b.addEventListener("blur",S),()=>{b.removeEventListener("blur",S)}},[t,r,f,v]),{inputRef:h,value:r,onChange:C,invalid:l,invalidMessage:d}}const Jr=({name:e,type:t,elementId:s,editing:o=!1,loading:i=!1,shared:n=!1,iconSize:r=ls,validate:a,onSave:l,onCancel:c,inputContainerClassName:d,...u})=>{const{value:h,invalid:p,invalidMessage:f,onChange:C,inputRef:v}=xC({value:e,isEditing:o,onValidate:a,onCancel:c,onSave:l});return o?m.jsx(VA,{type:t,name:h,elementId:s,inputInvalid:p,inputInvalidMessage:f,inputRef:v,onChange:C,iconSize:r,inputContainerClassName:d}):t===Gt.Folder?m.jsx(da,{name:e,loading:i,shared:n,iconSize:r,className:"max-w-[428px] truncate"}):m.jsx(mn,{className:"max-w-[428px]",...u,name:e,shared:n,iconSize:r})},RC=e=>{const[t,s]=g.useState(e?.expandedPaths??new Set),o=g.useMemo(()=>!!e?.onExpandedPathsChange,[e?.onExpandedPathsChange]),i=g.useMemo(()=>o?e?.expandedPaths??new Set:t,[o,e?.expandedPaths,t]),n=g.useCallback(d=>{o?e?.onExpandedPathsChange?.(d):s(d)},[o,e]),r=g.useCallback(d=>{const u=new Set(i);u.has(d)?u.delete(d):u.add(d),n(u)},[i,n]),a=g.useCallback(()=>{n(new Set)},[n]),l=g.useCallback(d=>{const u=new Set(i);u.add(d),n(u)},[i,n]),c=g.useCallback(d=>{const u=new Set(i);u.delete(d),n(u)},[i,n]);return{expandedPaths:i,setExpandedPaths:n,togglePath:r,collapseAll:a,expandPath:l,collapsePath:c,isControlled:o}},zA=({items:e,showFiles:t=!1,expandedPaths:s,loadingPaths:o=new Set,loadedPaths:i=new Set,sharedByMePaths:n=new Set,selectedPath:r,emptyStateTitle:a="No Folders",emptyStateDescription:l,emptyStateIcon:c,areHiddenFilesVisible:d=!1,renamedPath:u,rootItemLabel:h,rootItemPath:p,onItemClick:f,getContextMenuItems:C,onRenameSave:v,onRenameCancel:w,onRenameValidate:b,onExpandedPathsChange:S})=>{const{expandedPaths:y,togglePath:x}=RC({expandedPaths:s??new Set,onExpandedPathsChange:S}),R=D=>{f?.(D),x(D.path)},E=(D,T)=>D.map(k=>{const{path:F,nodeType:M,name:L,items:B}=k,H=M===Ae.FOLDER;if(!d&&SC(k))return null;if(!H&&!t)return;const Q=Array.isArray(B)&&B.length>0&&B.some(P=>P.nodeType===Ae.FOLDER||t),ee=y.has(F),O=r===F,le=o.has(F),z=u===F,X=i.has(F),Y=n.has(F),_=p&&h&&F===p&&H,U=b&&(P=>b(P,k)),te=O?"bg-accent-primary-alpha border-l-2 border-l-accent-primary rounded":"border-l-2 border-l-transparent",N=_?[]:C?.(k)??[];return m.jsx("div",{className:"cursor-pointer text-secondary",children:m.jsxs("div",{className:"flex flex-col w-full","aria-label":"folder",children:[m.jsx(vt,{trigger:[yt.ContextMenu],className:"w-full",anchorToMouse:!0,menu:{items:N},children:m.jsxs("div",{style:{paddingLeft:`${T*GA}px`},className:ce("py-1 gap-[2px] dial-small flex justify-between hover:bg-accent-primary-alpha rounded group/item w-full mb-[2px] relative",te),"aria-selected":O,children:[!z&&m.jsx("div",{className:"absolute size-full left-0 top-0 z-0",onClick:()=>R(k)}),m.jsx("div",{className:"relative flex flex-row truncate items-center w-fit h-6",onClick:()=>!z&&R(k),children:m.jsxs(m.Fragment,{children:[H&&m.jsx(V.IconCaretRightFilled,{...HA,className:Z("flex-shrink-0",ee&&"rotate-90 transition-all",X&&!Q&&"text-transparent")}),m.jsx(Jr,{elementId:`${F}-tree-item`,name:_?h:L,type:H?Gt.Folder:Gt.File,loading:le,shared:Y,iconSize:Ms,...!_&&{editing:z,onSave:v,onCancel:w,validate:U}})]})}),N.length>0&&!z&&!_&&m.jsx("div",{className:"flex-1 flex justify-end",children:m.jsx(vt,{placement:"bottom-start",allowedPlacements:["top-start","top-end"],menu:{items:N},className:"sticky right-0",children:m.jsx(Le,{className:"invisible group-hover/item:visible text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary",icon:m.jsx(V.IconDotsVertical,{...ae})})})})]})}),ee&&B&&E(B,T+1)]})},`${F}-children`)});return m.jsx("div",{className:"flex-1 w-full h-full overflow-y-auto","aria-label":"folders-tree",children:e.length>0?E(e,0):m.jsx(sa,{title:a,description:l,icon:c})})},WA="w-full flex items-center justify-between gap-4",_A="min-w-0 h-[38px] flex-1 overflow-hidden bg-layer-3 px-3 flex items-center rounded",jA="w-[260px]",UA=({ariaLabel:e="Breadcrumb",titleClassName:t,onItemClick:s,path:o,makeHref:i,rootItemPath:n,rootItemLabel:r,className:a,breadcrumbClassName:l,searchable:c=!0,value:d,elementId:u="fm-search",disabled:h,readonly:p,invalid:f,onSearchChange:C,searchClassName:v,searchContainerClassName:w,isCompactView:b=!1})=>{const S=g.useMemo(()=>{if(!o)return;const D=o.split("/").map(k=>k.trim()).filter(Boolean);if(!D.length)return[{title:"/"}];const T=D.map((k,F)=>{const M=D.slice(0,F+1),L=typeof i=="function"?i(M,F):void 0;return{title:k,href:L,onClick:s?B=>{B.preventDefault(),s(L)}:void 0}});if(n&&r){const k=n.split("/").filter(Boolean),F=o.split("/").filter(Boolean);if(k.every((L,B)=>F[B]===L)&&T.length>0){const L=T.slice(k.length);return[{title:r,href:n,onClick:s?B=>{B.preventDefault(),s(n)}:void 0},...L]}}return T},[o,i,s,n,r]),[y,x]=g.useState(!1),R=g.useCallback(()=>{if(!y){x(!0);const D=document.getElementById(u);D&&D.focus()}},[u,y]),E=g.useCallback(()=>b&&y?m.jsx(De,{className:"!p-[9px]",variant:Te.Secondary,iconBefore:m.jsx(V.IconArrowLeft,{...ae}),onClick:()=>{x(!1),C?.("")}}):m.jsx("div",{className:_A,children:m.jsx(iC,{pathItems:S,ariaLabel:e,titleClassName:t,className:l})}),[e,l,S,y,b,t,C]);return m.jsxs("div",{className:ce(WA,{"gap-3":b},a),"aria-label":"navigation-panel",children:[E(),c&&m.jsx("div",{className:ce(jA,{"w-[38px]":b&&!y,"w-full":b&&y}),role:"search","aria-label":"Search",onClick:R,children:m.jsx(jd,{elementId:u,value:d??"",onChange:C,disabled:h,readonly:p,invalid:f,className:v,containerClassName:ce(w,{"p-[10px]":b})})})]})};var ea=(e=>(e.MyFiles="my_files",e.Shared="shared",e.Organization="organization",e))(ea||{}),re=(e=>(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))(re||{}),nt=(e=>(e.Replace="replace",e.Duplicate="duplicate",e.Cancel="cancel",e))(nt||{}),Mt=(e=>(e.ReplaceAll="replaceAll",e.DuplicateAll="duplicateAll",e.DecideForEach="decideForEach",e))(Mt||{}),Ze=(e=>(e.Copy="copy",e.Move="move",e))(Ze||{}),ei=(e=>(e.Tree="tree",e.Grid="grid",e))(ei||{}),St=(e=>(e.Name="name",e.UpdatedAt="updatedAt",e.Size="size",e.Author="author",e.Owner="owner",e.Actions="__actions",e))(St||{});const FC=()=>{const[e,t]=g.useState(Uh());return g.useEffect(()=>{const s=()=>t(Uh());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},$A=({tabs:e,activeTab:t,onTabChange:s,areHiddenFilesVisible:o,onToggleHiddenFiles:i,isNewButtonVisible:n,newButtonVariant:r=Te.Secondary,newButtonDropdownItems:a=[],newButtonLabel:l="New",hiddenFilesSwitcherLabel:c="Hidden files",showHiddenFilesLabel:d="Show hidden files",hideHiddenFilesLabel:u="Hide hidden files"})=>{const h=FC(),p=g.useMemo(()=>[{key:"hidden-files-switch",label:o?u:d,icon:o?m.jsx(V.IconEyeOff,{...ae,className:"text-secondary"}):m.jsx(V.IconEye,{...ae,className:"text-secondary"}),onClick:()=>i?.(!o)}],[o,u,d,i]),f=()=>e&&t&&s?m.jsx(eC,{tabs:e,activeTab:t,onClick:w=>s(w),screenThreshold:Zr.Tablet,smallScreenContainerClassName:"w-fit bg-transparent h-[38px] overflow-hidden",smallScreenDropdownItemClassName:"px-3 h-[38px]"}):null,C=()=>m.jsxs(m.Fragment,{children:[m.jsx(Wd,{switchId:"hidden-files-switch",title:c,isOn:o,onChange:i}),n&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"h-6 border-l border-primary"}),m.jsx(Gc,{label:l,variant:r,items:a})]})]}),v=()=>m.jsxs(m.Fragment,{children:[m.jsx(vt,{menu:{items:p},allowedPlacements:["bottom","bottom-start"],children:m.jsx(De,{className:"h-[38px]",iconBefore:m.jsx(V.IconDotsVertical,{...ae,className:"text-secondary hover:text-accent-primary"})})}),n?m.jsx(Gc,{label:l,variant:r,items:a}):null]});return m.jsxs("div",{className:"flex w-full justify-between gap-4 items-center overflow-x-auto",children:[m.jsx("div",{className:"flex-1 min-w-0",children:f()}),m.jsx("div",{className:"flex gap-4 flex-shrink-0 items-center",children:h?v():C()})]})},KA=12,qA=8;var eo=(e=>(e.Normal="normal",e.Reverse="reverse",e))(eo||{});function YA({actions:e,direction:t=eo.Normal,moreButtonWidth:s=ls,actionsGap:o=8,containerPadding:i=8,dependencies:n=[]}){const r=g.useRef(null),a=g.useRef(null),l=g.useRef(null),c=g.useRef(null),d=g.useRef([]),[u,h]=g.useState(e.length);g.useLayoutEffect(()=>{if(!a.current)return;const C=Array.from(a.current.children);d.current=C.map(v=>Math.ceil(v.getBoundingClientRect().width))},[e,...n]),g.useEffect(()=>{if(!r.current)return;let C=null;const v=()=>{C&&cancelAnimationFrame(C),C=requestAnimationFrame(()=>{const b=r.current,S=l.current?.offsetWidth??0,y=c.current?.offsetWidth??0,x=S+y,E=b.getBoundingClientRect().width-x-s-o*2-i*2,D=d.current;let T=0,k=0;if(t===eo.Reverse)for(let F=D.length-1;F>=0&&(T+=D[F]+o,!(T>E));F--)k++;else for(const F of D){if(T+=F+o,T>E)break;k++}h(k)})},w=new ResizeObserver(v);return w.observe(r.current),v(),()=>{C&&cancelAnimationFrame(C),w.disconnect()}},[e.length,t,...n]);const p=t===eo.Reverse?e.slice(0,e.length-u):e.slice(u);return{visibleActions:t===eo.Reverse?e.slice(e.length-u):e.slice(0,u),hiddenActions:p,refs:{containerRef:r,measureRef:a,leftSectionRef:l,rightSectionRef:c}}}const ZA=({getSelectionLabel:e,onClearSelection:t,actions:s,selectedCount:o})=>{const i=FC(),{refs:{containerRef:n,leftSectionRef:r,measureRef:a},visibleActions:l,hiddenActions:c}=YA({actions:s,direction:eo.Reverse,dependencies:[i],actionsGap:KA,containerPadding:qA}),d=e(o);return m.jsxs(m.Fragment,{children:[m.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:p})=>m.jsx(De,{iconBefore:h,label:p,variant:Te.Secondary,hideTitleOnMobile:!0},u))}),m.jsxs("div",{ref:n,className:"rounded bg-layer-0 p-2 flex justify-between items-center w-full",role:"toolbar","aria-label":"File bulk actions",children:[m.jsx("div",{ref:r,children:m.jsx(De,{label:d,onClick:t,textClassName:"text-accent-primary whitespace-nowrap",variant:Te.Tertiary,iconBefore:m.jsx(V.IconX,{...ae,className:"text-accent-primary"})})}),m.jsxs("div",{className:"flex flex-1 w-full gap-3 items-center justify-end",children:[c.length>0&&m.jsx(vt,{menu:{items:c},allowedPlacements:["bottom","bottom-start"],children:m.jsx(De,{className:"h-[38px]",iconBefore:m.jsx(V.IconDotsVertical,{...ae,className:"text-secondary hover:text-accent-primary"})})}),l.map(({key:u,icon:h,title:p,onClick:f,disabled:C})=>m.jsx(De,{className:"!p-[9px]",iconBefore:h,label:p,variant:Te.Secondary,hideTitleOnMobile:!0,disabled:C,onClick:v=>f?.({key:u,domEvent:v})},u))]})]})]})},$d=e=>ge.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ge.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"})),Kd=e=>ge.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ge.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"})),XA=e=>{const[t,s]=g.useState(e?.showHiddenFiles??!1),o=!!e?.onShowHiddenFilesChange,i=o?e.showHiddenFiles??!1:t,n=g.useCallback(a=>{o?e?.onShowHiddenFilesChange?.(a):s(a)},[o,e]),r=g.useCallback(()=>{const a=!i;o?e?.onShowHiddenFilesChange?.(a):s(a)},[i,o,e]);return{areHiddenFilesVisible:i,toggleHiddenFilesVisibility:r,setAreHiddenFilesVisible:n}},QA=e=>{const[t,s]=g.useState(e?.collapsed??!1),o=!!e?.onCollapseChange,i=o?e.collapsed??!1:t,n=g.useCallback(a=>{o?e?.onCollapseChange?.(a):s(a)},[o,e]),r=g.useCallback(()=>{const a=!i;o?e?.onCollapseChange?.(a):s(a)},[i,o,e]);return{isTreeCollapsed:i,toggleTreeCollapse:r,setIsTreeCollapsed:n}},sg=(e,t)=>{if(!t.has(e))return e;const s=e.lastIndexOf("."),o=s>0,i=o?e.substring(0,s):e,n=o?e.substring(s):"";let r=1,a;do a=`${i} (${r})${n}`,r++;while(t.has(a));return a},ql=e=>e.name,EC=({getDestinationFiles:e,onResolve:t})=>{const[s,o]=g.useState([]),[i,n]=g.useState(!1),[r,a]=g.useState(null),l=g.useRef(!1),c=g.useCallback(b=>{l.current=!0,o(b),n(!0)},[]),d=g.useCallback(()=>{l.current=!1,n(!1),o([]),a(null)},[]),u=g.useCallback((b,S)=>{const y=e(b),x=new Set(y.map(ql)),R=S.filter(E=>x.has(E.name));return{hasConflicts:R.length>0,conflicts:R}},[e]),h=g.useCallback((b,S,y,x)=>{const R=e(b),E=new Set(R.map(ql));return S.map(D=>{const T=D.name,k=E.has(T),F=y&&k?T:sg(T,E);return(!y||!k)&&E.add(F),{sourceUrl:D.path,destinationUrl:`${b}/${F}`,overwrite:y&&k,nodeType:D.nodeType??Ae.ITEM,...x??{}}})},[e]),p=g.useCallback((b,S,y,x)=>{const R=e(b),E=new Set(R.map(ql));return S.filter(T=>y.get(T.path)!==nt.Cancel).map(T=>{const k=y.get(T.path),F=E.has(T.name),M=k===nt.Replace&&F,L=M?T.name:sg(T.name,E);return M||E.add(L),{sourceUrl:T.path,destinationUrl:`${b}/${L}`,overwrite:M,nodeType:T.nodeType??Ae.ITEM,...x??{}}})},[e]),f=g.useCallback((b,S,y)=>{const x=u(b,S);return x.hasConflicts&&(a({files:S,destinationFolder:b,metadata:y}),c(x.conflicts)),x},[u,c]),C=g.useCallback(()=>{if(!r)return;const{files:b,destinationFolder:S,metadata:y}=r,x=h(S,b,!0,y);t?.(x,S),d()},[r,h,t,d]),v=g.useCallback(()=>{if(!r)return;const{files:b,destinationFolder:S,metadata:y}=r,x=h(S,b,!1,y);t?.(x,S),d()},[r,h,t,d]),w=g.useCallback(b=>{if(!r)return;const{files:S,destinationFolder:y,metadata:x}=r,R=new Map(b.map(D=>[D.file.path,D.action])),E=p(y,S,R,x);t?.(E,y),d()},[r,p,t,d]);return{conflictingFiles:s,conflictResolutionOpen:i,hasActiveConflictRef:l,checkForConflicts:u,startConflictResolution:f,resolveConflictsWithStrategy:h,resolveConflictsWithDecisions:p,openConflictResolution:c,closeConflictResolution:d,handleReplaceAll:C,handleDuplicateAll:v,handleDecideForEach:w}},JA=({getDestinationFiles:e,onCopyFiles:t,onMoveToFiles:s,onCopySuccess:o,onMoveSuccess:i,onDuplicateSuccess:n,getCopyHeader:r,getMoveHeader:a})=>{const[l,c]=g.useState(!1),[d,u]=g.useState([]),[h,p]=g.useState([]),[f,C]=g.useState(Ze.Copy),[v,w]=g.useState(null),{conflictingFiles:b,conflictResolutionOpen:S,hasActiveConflictRef:y,startConflictResolution:x,resolveConflictsWithStrategy:R,closeConflictResolution:E,openConflictResolution:D,handleReplaceAll:T,handleDuplicateAll:k,handleDecideForEach:F}=EC({getDestinationFiles:e,onResolve:(te,N)=>{v?.type===Ze.Copy?(t?.(te,N),o?.()):v?.type===Ze.Move&&v.sourceFolder&&(s?.(te,v.sourceFolder,N),i?.())}}),M=g.useCallback(()=>{u([]),p([]),w(null)},[]),L=g.useCallback(te=>{const N=x(te,d,{type:Ze.Copy});if(w({type:Ze.Copy}),!N.hasConflicts){const P=R(te,d,!1);t?.(P,te),o?.(),M()}},[d,x,R,t,o,M]),B=g.useCallback((te,N)=>{const P=N||(v?.sourceFolder??"/");if(!x(te,h,{type:Ze.Move,sourceFolderPath:P}).hasConflicts){const ie=R(te,h,!0);s?.(ie,P,te),i?.(),M()}},[h,x,R,s,i,M,v]),H=g.useCallback(()=>{T(),M()},[T,M]),Q=g.useCallback(()=>{k(),M()},[k,M]),ee=g.useCallback(te=>{F(te),M()},[F,M]),O=g.useCallback(te=>{const N=te.at(0)?.parentPath??"/",P=R(N,te,!1);t?.(P,N),n?.()},[t,n,R]),le=g.useCallback(te=>{C(te),c(!0)},[]),z=g.useCallback(()=>{c(!1),y.current||M()},[M,y]),[X,Y]=g.useState(),_=g.useCallback(te=>{u(te),r&&te.length>0?Y(r(te.length,te[0]?.name)):Y(void 0)},[r]),U=g.useCallback(te=>{p(te),w({type:Ze.Move,sourceFolder:te[0]?.folderId}),a&&te.length>0?Y(a(te.length,te[0]?.name)):Y(void 0)},[a,w]);return{handleDuplicate:O,handleCloseDestinationFolderPopup:z,handleOpenDestinationFolderPopup:le,handleCopyTo:L,handleMoveTo:B,openDestinationFolderPopup:l,destinationFolderMode:f,destinationFolderTitle:X,handleSetCopiedFiles:_,handleSetMovedFiles:U,clearState:M,conflictingFiles:b,conflictResolutionOpen:S,openConflictResolution:D,closeConflictResolution:E,handleConflictReplace:H,handleConflictDuplicate:Q,handleConflictDecideForEach:ee}},e8=({path:e,onPathChange:t,onSelectionClear:s})=>{const[o,i]=g.useState(e);g.useEffect(()=>{i(e),s?.()},[e,s]);const n=g.useCallback(r=>{i(r),t?.(r),s?.()},[t,s]);return{currentPath:o,setCurrentPath:i,handlePathChange:n}},t8=({onDeleteFiles:e,onDeleteSuccess:t})=>{const[s,o]=g.useState(!1),[i,n]=g.useState([]),[r,a]=g.useState(""),l=g.useCallback((u,h)=>{n(u),a(h),o(!0)},[]),c=g.useCallback(()=>{o(!1),n([])},[]),d=g.useCallback(()=>{if(e&&i.length>0){const u=i.map(h=>({sourceUrl:h.path,nodeType:h.nodeType}));e(u,r),t?.()}c()},[i,e,t,c,r]);return{deleteConfirmationOpen:s,itemsToDelete:i,openDeleteConfirmation:l,closeDeleteConfirmation:c,confirmDelete:d}},s8=({onDownloadFiles:e,onDownloadSuccess:t})=>({handleDownloadFiles:g.useCallback(o=>{e&&o.length>0&&(e(o),t?.())},[e,t])}),o8=e=>"dataTransfer"in e&&e.dataTransfer!==null,i8=({onUploadFiles:e,onValidateUpload:t,maxFileSize:s,validationMessages:o={},onUploadArchive:i}={})=>{const[n,r]=g.useState(!1),[a,l]=g.useState(!1),[c,d]=g.useState(),u=g.useRef(null),h=g.useRef(""),p=g.useRef([]),[f,C]=g.useState(new Map),[v,w]=g.useState(null),{conflictingFiles:b,conflictResolutionOpen:S,hasActiveConflictRef:y,startConflictResolution:x,closeConflictResolution:R,openConflictResolution:E,handleReplaceAll:D,handleDuplicateAll:T,handleDecideForEach:k}=EC({getDestinationFiles:()=>p.current,onResolve:(N,P)=>{if(!v)return;const j=N.map(ie=>{const J=f.get(ie.sourceUrl);if(!J)return;const pe=ie.destinationUrl.split("/").pop();return{fileContent:J.fileContent,name:pe}}).filter(Boolean);j.length>0&&e?.(j,P),F()}}),F=g.useCallback(()=>{C(new Map),w(null)},[]);g.useEffect(()=>{let N=0;const P=pe=>{o8(pe)&&pe.dataTransfer.types.includes(MA)&&(N++,l(!0))},j=()=>{N--,N===0&&l(!1)},ie=()=>{N=0,l(!1)},J=pe=>{pe.preventDefault()};return window.addEventListener("dragenter",P),window.addEventListener("dragleave",j),window.addEventListener("drop",ie),window.addEventListener("dragover",J),()=>{window.removeEventListener("dragenter",P),window.removeEventListener("dragleave",j),window.removeEventListener("drop",ie),window.removeEventListener("dragover",J)}},[]);const M=g.useCallback(N=>s?N.filter(P=>P.fileContent.size>s).map(P=>P.name):[],[s]),L=g.useCallback((N,P)=>N.map(j=>({id:j.name,name:j.name,folderId:P,path:j.name,nodeType:Ae.ITEM,parentPath:P,contentLength:j.fileContent.size})),[]),B=g.useCallback(async(N,P,j)=>{d(void 0),p.current=j;const ie=M(N);if(ie.length>0){const we=s?(s/1048576).toFixed(2):0,Ie=o.oversizedFiles||`Files exceed maximum size (${we}MB): ${ie.join(", ")}`;return d(Ie),!1}if(t)try{const we=await t(N,j,P);if(!we.valid)return d(we.message||o.validationFailed||"Validation failed"),!1}catch{return d(o.validationError||"Validation error occurred"),!1}const J=new Map(N.map(we=>[we.name,we]));C(J);const pe=L(N,P);return w({destinationFolder:P}),x(P,pe,{destinationFolder:P}).hasConflicts?!1:(e?.(N,P),F(),!0)},[e,t,M,s,o,L,x,F]),H=g.useCallback(()=>{D(),F()},[D,F]),Q=g.useCallback(()=>{T(),F()},[T,F]),ee=g.useCallback(N=>{k(N),F()},[k,F]),O=g.useCallback(()=>{R(),y.current||F()},[R,y,F]),le=g.useCallback(N=>{N.preventDefault(),N.stopPropagation(),N.dataTransfer.types.includes("Files")&&r(!0)},[]),z=g.useCallback(N=>{N.preventDefault(),N.stopPropagation();const P=N.currentTarget.getBoundingClientRect(),j=N.clientX,ie=N.clientY;(j<=P.left||j>=P.right||ie<=P.top||ie>=P.bottom)&&r(!1)},[]),X=g.useCallback(N=>{N.preventDefault(),N.stopPropagation(),N.dataTransfer.types.includes("Files")&&(N.dataTransfer.dropEffect="copy")},[]),Y=g.useCallback(async(N,P,j)=>{if(N.preventDefault(),N.stopPropagation(),r(!1),!N.dataTransfer.types.includes("Files"))return;const ie=Array.from(N.dataTransfer.files);if(ie.length>0){const J=ie.map(pe=>({fileContent:pe,name:pe.name}));await B(J,P,j)}},[B]);g.useEffect(()=>{let N=u.current;N||(N=document.createElement("input"),N.type="file",N.multiple=!0,N.style.display="none",document.body.appendChild(N),u.current=N);const P=async()=>{if(!N?.files?.length)return;const ie=Array.from(N.files).map(J=>({fileContent:J,name:J.name}));await B(ie,h.current,p.current),N.value=""};return N.addEventListener("change",P),()=>{N&&(N.removeEventListener("change",P),u.current===N&&(document.body.removeChild(N),u.current=null))}},[B]);const _=g.useCallback((N,P)=>{h.current=N,p.current=P,u.current&&u.current.click()},[]),U=g.useCallback((N,P)=>{if(!i)return;const j=document.createElement("input");j.type="file",j.accept=".zip,application/zip",j.multiple=!1,j.style.display="none";const ie=()=>{const J=j.files?.[0];if(!J){document.body.removeChild(j);return}const pe=J.name.replace(/\.zip$/i,"");if(P.some(we=>we.nodeType===Ae.FOLDER&&we.name.toLowerCase()===pe.toLowerCase())){d(o.validationFailed||`Folder with name "${pe}" already exists`),document.body.removeChild(j);return}try{i(J,pe,N)}finally{document.body.removeChild(j)}};j.addEventListener("change",ie),document.body.appendChild(j),j.click()},[i,o]),te=g.useCallback(()=>{d(void 0)},[]);return{isDragging:n,isDraggingOverWindow:a,uploadError:c,handleDragEnter:le,handleDragLeave:z,handleDragOver:X,handleDrop:Y,clearError:te,handleUpload:B,openFileDialog:_,openArchiveDialog:U,fileInputRef:u,uploadConflictingFiles:b,uploadConflictResolutionOpen:S,hasActiveUploadConflictRef:y,openUploadConflictResolution:E,closeUploadConflictResolution:O,handleUploadConflictReplace:H,handleUploadConflictDuplicate:Q,handleUploadConflictDecideForEach:ee}},DC=g.createContext(void 0),n8={emptyName:"Name cannot be empty",duplicateName:"An item with this name already exists"};function r8(e){let t=e.length;for(;t>0&&e[t-1]==="/";)t--;return e.slice(0,t)}function a8(e,t){const s=r8(e),o=s.lastIndexOf("/");return o===-1?t:s.slice(0,o+1)+t}function l8(e){const t=e.lastIndexOf(".");return t===-1||t===0?e:e.substring(0,t)}function og(e){const t=e.lastIndexOf(".");return t===-1||t===0?"":e.substring(t)}const c8=({items:e,onRenameValidate:t,validationMessages:s,onMoveToFiles:o})=>{const[i,n]=g.useState(),r=g.useMemo(()=>({...n8,...s}),[s]),a=g.useMemo(()=>i?.path,[i]),l=g.useCallback(p=>{const f=wo(e,p);f&&n(f)},[e]),c=g.useCallback(()=>{n(void 0)},[]),d=g.useCallback(p=>{if(!i||!o){n(void 0);return}const f=i.nodeType===Ae.ITEM;let C=p.trim();if(f){const S=og(i.name);S&&!C.endsWith(S)&&(C=C+S)}if(C===i.name){n(void 0);return}const v=a8(i.path,C),w=i.parentPath;if(!w){n(void 0);return}const b={sourceUrl:i.path,destinationUrl:v,nodeType:i.nodeType};o([b],w,w),n(void 0)},[i,o]),u=g.useCallback((p,f)=>{const C=p.trim();if(!C)return r.emptyName;const v=f.nodeType===Ae.ITEM;let w=C;if(v){const S=og(f.name);S&&!w.endsWith(S)&&(w=w+S)}const b=f.parentPath;if(b){const S=wo(e,b);if(S&&new Set((S.items??[]).filter(x=>x.path!==f.path).map(x=>x.name.toLowerCase())).has(w.toLowerCase()))return r.duplicateName}if(t){const S=t(w,f);if(S)return S}return null},[t,r,e]),h=g.useCallback(p=>p.nodeType===Ae.ITEM?l8(p.name):p.name,[]);return{renamedPath:a,renamedItem:i,renameHandler:l,renameSaveHandler:d,renameCancelHandler:c,renameValidateHandler:u,getDisplayName:h}},d8=({newActionLabels:e,onUploadFiles:t,onCreateFolder:s,onUploadArchive:o})=>{const i=g.useMemo(()=>{const r=[];return e&&(e.newFolder&&r.push({key:"new-folder",label:e.newFolder,icon:m.jsx(V.IconFolder,{...ae,className:"text-secondary"}),onClick:()=>{s&&s()}}),e.uploadFiles&&r.push({key:"upload-file",label:e.uploadFiles,icon:m.jsx(V.IconFile,{...ae,className:"text-secondary"}),onClick:()=>{t&&t()}}),e.uploadArchive&&r.push({key:"upload-archive",label:e.uploadArchive,icon:m.jsx(V.IconFileZip,{...ae,className:"text-secondary"}),onClick:()=>{o&&o()}})),r},[e,t,s,o]),n=g.useMemo(()=>i.length>0,[i]);return{newActions:i,isNewButtonVisible:n}},u8={emptyName:"Folder name cannot be empty",duplicateName:"A folder with this name already exists"},h8=({currentFolder:e,onCreateFolder:t,onValidateFolderName:s,validationMessages:o})=>{const[i,n]=g.useState(!1),[r,a]=g.useState(null),l=g.useRef(e?.path),c=g.useMemo(()=>({...u8,...o}),[o]);g.useEffect(()=>{const f=e?.path;l.current!==f&&i&&(n(!1),a(null)),l.current=f},[e?.path,i]);const d=g.useCallback(()=>{const f=`__new_folder_${Date.now()}`;a(f),n(!0)},[]),u=g.useCallback(()=>{n(!1),a(null)},[]),h=g.useCallback(f=>{const C=f.trim();if(!C)return c.emptyName;if(e&&new Set((e.items??[]).filter(w=>w.nodeType===Ae.FOLDER).map(w=>w.name.toLowerCase())).has(C.toLowerCase()))return c.duplicateName;if(s&&e){const v=s(C,e);if(v)return v}return null},[e,s,c]),p=g.useCallback(async f=>{const C=f.trim();if(!C)return;const w=`${e?.path??"/"}/${C}`,b=`${w}/${$l}`,y={fileContent:new File([],$l,{type:"text/plain"}),name:$l};t&&await t(y,w,b),u()},[e,t,u]);return{isCreatingFolder:i,newFolderTempId:r,startFolderCreation:d,cancelFolderCreation:u,saveFolderCreation:p,validateFolderName:h}},g8=({additionalButtons:e,expandedPathsLength:t,collapseAll:s})=>{const o=t===0;return{additionalButtons:g.useMemo(()=>{const n=ce(["hover:text-accent-primary p-1",o&&"text-controls-disable hover:text-controls-disable disabled:hover:cursor-default"]);return m.jsxs(m.Fragment,{children:[e,m.jsx(De,{disabled:o,className:n,onClick:s,iconBefore:m.jsx(V.IconCopyMinus,{size:24,stroke:1.5}),"aria-label":"collapse-all"})]})},[e,o,s])}},p8=({onGetInfo:e})=>{const[t,s]=g.useState(!1),[o,i]=g.useState(void 0),n=g.useCallback(async a=>{i(a),s(!0),e&&await e(a)},[e]),r=g.useCallback(()=>{s(!1),i(void 0)},[]);return{isMetadataPopupOpen:t,selectedFileForMetadata:o,openMetadataPopup:n,closeMetadataPopup:r}},PC=({children:e,className:t,items:s=[],rootItem:o,path:i,filesLoading:n,showHiddenFiles:r,onShowHiddenFilesChange:a,treeOptions:l,navigationPanelOptions:c,deleteConfirmationOptions:d,gridOptions:u,toolbarOptions:h,bulkActionsToolbarOptions:p,destinationFolderPopupOptions:f,conflictResolutionPopupOptions:C,onPathChange:v,onTableFileClick:w,onCopyFiles:b,onMoveToFiles:S,onDeleteFiles:y,onDownloadFiles:x,onRenameValidate:R,renameValidationMessages:E,onUploadFiles:D,onValidateUpload:T,maxFileSize:k,onUploadArchive:F,onCreateFolder:M,onCreateFolderValidate:L,folderCreationValidationMessages:B,fileMetadataPopupOptions:H,onGetInfo:Q,onUnshareFile:ee,actionsRef:O,sharedByMePaths:le})=>{const[z,X]=g.useState(new Map),Y=g.useMemo(()=>new Set(z.keys()),[z]),_=g.useCallback(()=>X(new Map),[]),{currentPath:U,setCurrentPath:te,handlePathChange:N}=e8({path:i,onPathChange:v,onSelectionClear:_}),[P,j]=g.useState(),ie=f?.destinationFolderPath??P,J=g.useCallback(Ee=>{f?.setDestinationFolderPath?f.setDestinationFolderPath(Ee):j(Ee)},[f]),{areHiddenFilesVisible:pe,toggleHiddenFilesVisibility:Se}=XA({showHiddenFiles:r,onShowHiddenFilesChange:a}),{isTreeCollapsed:we,toggleTreeCollapse:Ie,setIsTreeCollapsed:Je}=QA({collapsed:l?.collapsed,onCollapseChange:l?.onCollapseChange}),{renamedPath:fe,renamedItem:ye,renameHandler:W,renameSaveHandler:me,renameCancelHandler:ue,renameValidateHandler:xe,getDisplayName:Ke}=c8({items:s,onRenameValidate:R,validationMessages:E,onMoveToFiles:S}),[wt,Oe]=g.useState("");g.useEffect(()=>{const Ee=c?.value;Ee!=null&&Oe(String(Ee))},[c?.value]);const bt=String(c?.value??wt??"").trim(),lt=g.useMemo(()=>tg(s,U)??s[0],[s,U]),{handleCopyTo:Do,handleMoveTo:ke,handleDuplicate:et,handleOpenDestinationFolderPopup:Po,handleCloseDestinationFolderPopup:xa,openDestinationFolderPopup:Vs,handleSetCopiedFiles:Ra,handleSetMovedFiles:Fa,destinationFolderMode:Ea,destinationFolderTitle:Da,conflictingFiles:Pa,conflictResolutionOpen:Ma,closeConflictResolution:Ta,handleConflictReplace:Ia,handleConflictDuplicate:ka,handleConflictDecideForEach:Aa}=JA({getDestinationFiles:Ee=>tg(s,Ee)?.items??[],onCopyFiles:b,onMoveToFiles:S,onCopySuccess:_,onMoveSuccess:_,onDuplicateSuccess:_,getCopyHeader:f?.getCopyHeader,getMoveHeader:f?.getMoveHeader});g.useEffect(()=>{Vs&&!ie&&J(U??o?.path??"/")},[Vs,ie,U,o?.path,J]),g.useEffect(()=>{Vs||J(void 0)},[Vs,J]);const{deleteConfirmationOpen:La,itemsToDelete:jt,openDeleteConfirmation:Oa,closeDeleteConfirmation:Na,confirmDelete:Ha}=t8({onDeleteFiles:y,onDeleteSuccess:_}),{handleDownloadFiles:fi}=s8({onDownloadFiles:x,onDownloadSuccess:_}),{isDragging:Ga,isDraggingOverWindow:Ba,uploadError:Fn,handleDragEnter:En,handleDragLeave:Dn,handleDragOver:Pn,handleDrop:zs,clearError:Mn,openFileDialog:Mo,fileInputRef:Va,openArchiveDialog:mi,uploadConflictingFiles:Ci,uploadConflictResolutionOpen:za,closeUploadConflictResolution:vi,handleUploadConflictReplace:Tn,handleUploadConflictDuplicate:wi,handleUploadConflictDecideForEach:bi}=i8({onUploadFiles:D,onValidateUpload:T,maxFileSize:k,onUploadArchive:F}),In=g.useCallback(Ee=>{const ct=U??"",Us=lt?.items??[];zs(Ee,ct,Us)},[U,lt,zs]),Si=g.useCallback(()=>{const Ee=U??"",ct=lt?.items??[];Mo(Ee,ct)},[U,lt,Mo]),Wa=g.useCallback(()=>{const Ee=U??"",ct=lt?.items??[];mi(Ee,ct)},[U,lt,mi]),{isCreatingFolder:qe,newFolderTempId:Ws,startFolderCreation:yi,cancelFolderCreation:_a,saveFolderCreation:ja,validateFolderName:kn}=h8({currentFolder:lt,onCreateFolder:M,onValidateFolderName:L,validationMessages:B}),{newActions:Ua,isNewButtonVisible:$a}=d8({newActionLabels:h?.newActionLabels,onUploadFiles:Si,onUploadArchive:Wa,onCreateFolder:yi}),An=g.useMemo(()=>{const Ee=Sr(bt).trim(),ct=lt?.items??[];let Us=Ee?OA(lt):ct;pe||(Us=Us.filter(_e=>!SC(_e)));const Ri=Us.map(_e=>({id:_e.id??_e.path,name:_e.name??_e.path.split("/").pop()??"",updatedAt:_e.updatedAt,size:_e.nodeType===Ae.ITEM?yC(_e.contentLength):"",author:_e.author,path:_e.path,nodeType:_e.nodeType,extension:_e.extension,isTemporary:!1,owner:_e.owner}));if(qe&&Ws&&!Ee&&Ri.unshift({id:Ws,name:"",updatedAt:void 0,size:"",author:void 0,path:Ws,nodeType:Ae.FOLDER,extension:void 0,isTemporary:!0,owner:void 0}),!Ee)return Ri;const Ya=Ee.split(/\s+/).filter(Boolean);return Ri.filter(_e=>{if(_e.isTemporary)return!0;const qd=Sr(_e.name),Za=Sr(_e.author),Xa=LA(_e.extension);return Ya.every(Qa=>qd.includes(Qa)||Za.includes(Qa)||Xa.includes(Qa))})},[lt,bt,pe,qe,Ws]),Ln=g.useCallback(Ee=>{N(Ee.path)},[N]),xi=g.useCallback(Ee=>{N(Ee)},[N]),On=g.useCallback(Ee=>{const ct=String(Ee??"");Oe(ct),c?.onSearchChange?.(ct)},[c]),Nn=g.useCallback(Ee=>{Ee.nodeType===Ae.FOLDER?N(Ee.path):w?.(Ee)},[N,w]),{expandedPaths:Hn,setExpandedPaths:$,collapseAll:Fe}=RC({expandedPaths:l?.expandedPaths,onExpandedPathsChange:l?.onExpandedPathsChange}),{additionalButtons:_s}=g8({collapseAll:Fe,expandedPathsLength:Hn.size,additionalButtons:l?.additionalButtons}),{isMetadataPopupOpen:os,selectedFileForMetadata:Ss,openMetadataPopup:Ka,closeMetadataPopup:Gn}=p8({onGetInfo:Q}),js=g.useCallback(()=>{Gn(),H?.clearMetadata?.()},[Gn,H]),qa={className:t,items:s,rootItem:o,filesLoading:n,treeOptions:{...l,expandedPaths:Hn,onExpandedPathsChange:$,additionalButtons:_s},navigationPanelOptions:c,gridOptions:u,toolbarOptions:h,bulkActionsToolbarOptions:p,deleteConfirmationOptions:d,destinationFolderPopupOptions:{...f,destinationFolderPath:ie,setDestinationFolderPath:J,title:Da,onCreateFolder:M,onCreateFolderValidate:L,folderCreationValidationMessages:B},currentPath:U,setCurrentPath:te,searchValue:wt,effectiveSearchValue:bt,setSearchValue:Oe,areHiddenFilesVisible:pe,toggleHiddenFilesVisibility:Se,isTreeCollapsed:we,toggleTreeCollapse:Ie,setIsTreeCollapsed:Je,selectedIds:Y,selectedFiles:z,setSelectedFiles:X,clearSelection:_,currentFolder:lt,gridRows:An,handleCopyTo:Do,handleMoveTo:ke,handleDuplicate:et,handleSetCopiedFiles:Ra,handleSetMovedFiles:Fa,openDestinationFolderPopup:Vs,handleCloseDestinationFolderPopup:xa,handleOpenDestinationFolderPopup:Po,destinationFolderMode:Ea,handleDownloadFiles:fi,renamedPath:fe,renamedItem:ye,onRename:W,onRenameSave:me,onRenameCancel:ue,onRenameValidate:xe,getDisplayName:Ke,openDeleteConfirmation:Oa,closeDeleteConfirmation:Na,confirmDelete:Ha,deleteConfirmationOpen:La,itemsToDelete:jt,handlePathChange:N,handleTreeItemClick:Ln,handleBreadcrumbItemClick:xi,handleSearchChange:On,handleTableRowClick:Nn,onTableFileClick:w,isDragging:Ga,uploadError:Fn,handleDragEnter:En,handleDragLeave:Dn,handleDragOver:Pn,handleDrop:In,clearUploadError:Mn,onUploadFiles:D,onValidateUpload:T,maxFileSize:k,isDraggingOverWindow:Ba,openFileDialog:Si,fileInputRef:Va,newActions:Ua,isNewButtonVisible:$a,isCreatingFolder:qe,newFolderTempId:Ws,startFolderCreation:yi,cancelFolderCreation:_a,saveFolderCreation:ja,validateFolderName:kn,conflictResolutionPopupOptions:C,conflictingFiles:Pa,conflictResolutionOpen:Ma,closeConflictResolution:Ta,handleConflictReplace:Ia,handleConflictDuplicate:ka,handleConflictDecideForEach:Aa,uploadConflictingFiles:Ci,uploadConflictResolutionOpen:za,closeUploadConflictResolution:vi,handleUploadConflictReplace:Tn,handleUploadConflictDuplicate:wi,handleUploadConflictDecideForEach:bi,fileMetadataPopupOptions:H,isMetadataPopupOpen:os,selectedFileForMetadata:Ss,openMetadataPopup:Ka,closeMetadataPopup:js,onGetInfo:Q,onUnshareFile:ee,actionsRef:O,sharedByMePaths:le};return m.jsx(DC.Provider,{value:qa,children:e})},MC=()=>{const e=g.useContext(DC);if(!e)throw new Error("useFileManagerContext must be used within <FileManagerProvider>");return e},f8="en-US",m8={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},C8="text-primary";function TC(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 o=Number(t);return TC(o)}const s=new Date(t);return isFinite(s.getTime())?s:null}return null}const IC=({value:e,locale:t=f8,options:s=m8,emptyPlaceholder:o,className:i})=>{const n=TC(e),r=g.useMemo(()=>n?new Intl.DateTimeFormat(t,s).format(n):o,[n,o,t,s]),a=n?n.toISOString():void 0;return m.jsx(ut,{text:a?m.jsx("time",{dateTime:a,children:r}):m.jsx("span",{children:r}),className:Z(C8,i),hideTooltip:!1})},v8=({open:e,itemsToDelete:t,onClose:s,onConfirm:o,cancelLabel:i="Cancel",confirmLabel:n="Delete",titleRenderer:r,contentRenderer:a})=>{const l=t.map(p=>p.name),d=r?.(l)||"Confirm Deleting Items",u=m.jsxs("div",{className:"px-6 py-3 dial-small",children:[m.jsx("p",{className:"text-secondary mb-3",children:t.length===1?m.jsxs(m.Fragment,{children:["Do you want to delete file or folder"," ",m.jsxs("span",{className:"text-primary break-all",children:['"',t[0].name,'"']}),"?"]}):m.jsxs(m.Fragment,{children:["Do you want to delete the following"," ",m.jsx("span",{className:"text-primary",children:t.length})," items?"]})}),t.length>1&&m.jsx(m.Fragment,{children:t.length<=10?m.jsx("ul",{className:"space-y-1 text-primary list-none",children:t.map(p=>m.jsx("li",{className:"truncate",children:p.name},p.path))}):m.jsxs(m.Fragment,{children:[m.jsx("ul",{className:"space-y-1 text-primary list-none mb-2",children:t.slice(0,10).map(p=>m.jsx("li",{className:"truncate",children:p.name},p.path))}),m.jsxs("p",{className:"text-secondary italic",children:["... and ",t.length-10," more"]})]})})]}),h=a?.(l)||u;return m.jsx(lC,{open:e,title:d,confirmLabel:n,cancelLabel:i,variant:ai.Danger,onClose:s,onConfirm:o,children:h})},w8=({onClose:e,onConfirm:t,open:s,copyLabel:o="Copy",moveLabel:i="Move",addFolderLabel:n="Add folder",mode:r=Ze.Copy,hiddenFilesSwitcherLabel:a="Show hidden files",onUploadFiles:l,onValidateUpload:c,maxFileSize:d,title:u,...h})=>{const[p,f]=g.useState(!1),C=g.useRef(null),v=g.useCallback(b=>{f(b)},[]),w=r===Ze.Copy?"Copy to":"Move to";return m.jsx(Eo,{open:s,onClose:()=>{e()},size:Ht.Lg,className:"md:!h-[800px]",footer:m.jsxs("div",{className:"flex justify-between space-x-2 py-4 px-6",children:[m.jsxs("div",{className:"flex space-x-4",children:[m.jsx(De,{label:n,variant:Te.Tertiary,iconBefore:m.jsx(V.IconFolderPlus,{...ae}),onClick:()=>{C.current?.createFolder()}}),m.jsx("div",{className:"border border-l border-primary my-2"}),m.jsx("div",{className:"inline-flex items-center cursor-pointer",onClick:b=>{b.stopPropagation(),v(!p)},children:m.jsx(Wd,{title:a,isOn:p,onChange:v,switchId:"hidden-files-switch"})})]}),m.jsxs("div",{className:"flex space-x-4",children:[m.jsx(De,{onClick:e,label:"Cancel",variant:Te.Secondary}),m.jsx(De,{onClick:t,label:r==="copy"?o:i,variant:Te.Primary})]})]}),title:u??w,children:m.jsx(AC,{...h,actionsRef:C,showHiddenFiles:p,onShowHiddenFilesChange:v,treeOptions:{...h.treeOptions,collapsed:!0,expandedPaths:new Set([h.rootItem?.path||"/"])},gridOptions:{withSelectionColumn:!1,...h.gridOptions},onUploadFiles:l,onValidateUpload:c,maxFileSize:d})})},b8=({selectedFiles:e,actionLabels:t,onDuplicate:s,onCopy:o,onMove:i,onDownload:n,onDelete:r,getCurrentFolderPath:a})=>g.useMemo(()=>{const l=[],c=Array.from(e.values());return!c.length||!t||(t[re.Move]&&l.push({key:re.Move,label:t[re.Move],title:t[re.Move],icon:m.jsx(Kd,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>i(c)}),t[re.Copy]&&l.push({key:re.Copy,label:t[re.Copy],title:t[re.Copy],icon:m.jsx($d,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>o(c)}),t[re.Duplicate]&&l.push({key:re.Duplicate,label:t[re.Duplicate],title:t[re.Duplicate],icon:m.jsx(V.IconCopy,{...ae,className:"text-secondary"}),onClick:()=>s(c)}),t[re.Delete]&&l.push({key:re.Delete,label:t[re.Delete],title:t[re.Delete],icon:m.jsx(V.IconTrashX,{...ae,className:"text-secondary"}),onClick:()=>{const d=a();r(c,d)}}),t[re.Download]&&l.push({key:re.Download,label:t[re.Download],title:t[re.Download],icon:m.jsx(V.IconDownload,{...ae,className:"text-secondary"}),onClick:()=>n(c)})),l},[e,t,s,o,i,n,r,a]),kC=e=>ge.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},ge.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"})),S8=({actionLabels:e,onDuplicate:t,onCopy:s,onMove:o,onDownload:i,onRename:n,onDelete:r,onInfo:a,onUnshare:l})=>g.useMemo(()=>c=>{const d=[];return e&&(e[re.Duplicate]&&d.push({key:re.Duplicate,label:e[re.Duplicate],icon:m.jsx(V.IconCopy,{...ae,className:"text-secondary"}),onClick:()=>t(c)}),e[re.Copy]&&d.push({key:re.Copy,label:e[re.Copy],icon:m.jsx($d,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>s(c)}),e[re.Move]&&d.push({key:re.Move,label:e[re.Move],icon:m.jsx(Kd,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>o(c)}),e[re.Download]&&d.push({key:re.Download,label:e[re.Download],icon:m.jsx(V.IconDownload,{...ae,className:"text-secondary"}),onClick:()=>i(c)}),e[re.Delete]&&d.push({key:re.Delete,label:e[re.Delete],icon:m.jsx(V.IconTrashX,{...ae,className:"text-secondary"}),onClick:()=>r(c,c.parentPath??"")}),e[re.Rename]&&d.push({key:re.Rename,label:e[re.Rename],icon:m.jsx(V.IconPencilMinus,{...ae,className:"text-secondary"}),onClick:()=>n(c.path)}),e[re.Info]&&c.nodeType===Ae.ITEM&&d.push({key:re.Info,label:e[re.Info],icon:m.jsx(V.IconInfoCircle,{...ae,className:"text-secondary"}),onClick:()=>a(c)}),e[re.Unshare]&&d.push({key:re.Unshare,label:e[re.Unshare],icon:m.jsx(kC,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>l(c)})),d},[e,t,s,o,i,n,r,a,l]),ig=({open:e,onClose:t,onReplace:s,onDuplicate:o,onDecideForEach:i,conflictingFiles:n,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:p="Name",actionColumnLabel:f="Action"})=>{const C=n.length===1,v=C?n[0]?.name:"",w=c?.[nt.Replace]??"Replace",b=c?.[nt.Duplicate]??"Duplicate",S=c?.[nt.Cancel]??"Cancel",y=d?.[Mt.ReplaceAll]??"Replace all",x=d?.[Mt.DuplicateAll]??"Duplicate all",R=d?.[Mt.DecideForEach]??"Decide for each",[E,D]=g.useState(nt.Replace),[T,k]=g.useState(Mt.ReplaceAll),[F,M]=g.useState(new Map(n.map(U=>[U.path,nt.Replace]))),[L,B]=g.useState(void 0),H=C?r:a,Q=m.jsxs(m.Fragment,{children:["Item with the name ",m.jsxs("span",{className:"text-primary",children:['"',v,'"']})," ","already exists in this destination."]}),ee=`${n.length} items with the same names already exist in this destination.`,O=l??(C?Q:ee),le=g.useMemo(()=>[{id:nt.Replace,name:w},{id:nt.Duplicate,name:b}],[w,b]),z=g.useMemo(()=>n.map(U=>({id:U.path,name:U.name,path:U.path,nodeType:U.nodeType??Ae.ITEM,action:F.get(U.path)||nt.Replace})),[n,F]),X=g.useMemo(()=>[{field:"name",headerName:p,flex:1,minWidth:200,floatingFilter:!1,filter:!1,resizable:!1,cellRenderer:U=>U.data?.nodeType===Ae.FOLDER?m.jsx(da,{name:U.data.name,iconSize:Ms}):m.jsx(mn,{name:U.data.name,iconSize:Ms})},{field:"action",headerName:f,width:140,suppressSizeToFit:!0,sortable:!1,filter:!1,floatingFilter:!1,resizable:!1,cellRenderer:U=>{if(!U.data)return null;const te=[{key:nt.Replace,label:w,icon:m.jsx(V.IconCircleFilled,{size:10,className:"text-accent-tertiary"})},{key:nt.Duplicate,label:b,icon:m.jsx(V.IconCircleFilled,{size:10,className:"text-accent-secondary"})},{key:nt.Cancel,label:S,icon:m.jsx(V.IconCircleFilled,{size:10,className:"text-error"})}],N=te.find(j=>j.key===U.data.action),P=L===U.data.path;return m.jsx("div",{className:"flex items-center h-full",children:m.jsx(vt,{trigger:[yt.Click],open:P,menu:{items:te,onClick:({key:j})=>{M(ie=>{const J=new Map(ie);return J.set(U.data.path,j),J}),B(void 0)}},placement:"bottom-start",matchReferenceWidth:!1,allowedPlacements:["bottom-start","top-start"],onOpenChange:j=>{B(j?U.data.path:void 0)},children:m.jsxs("button",{type:"button",className:"flex items-center gap-2",children:[m.jsxs("span",{className:"flex items-center gap-2",children:[N?.icon,N?.label??w]}),m.jsx(V.IconChevronDown,{size:16,className:Z("text-secondary transition-transform",P&&"rotate-180")})]})})})}}],[p,f,w,b,S,L]),Y=g.useMemo(()=>[{id:Mt.ReplaceAll,name:y},{id:Mt.DuplicateAll,name:x},{id:Mt.DecideForEach,name:R,content:T===Mt.DecideForEach?m.jsx("div",{className:"mt-4",children:m.jsx(zd,{columnDefs:X,rowData:z,getRowId:U=>U.id,withSelectionColumn:!1,wrapCustomCellRenderers:!1,alternateOddRowColors:!1,additionalGridOptions:{domLayout:"autoHeight"}})}):void 0}],[y,x,R,T,X,z]),_=g.useCallback(()=>{if(C)E===nt.Replace?s():o();else if(T===Mt.ReplaceAll)s();else if(T===Mt.DuplicateAll)o();else if(T===Mt.DecideForEach&&i){const U=n.map(te=>({file:te,action:F.get(te.path)||nt.Replace}));i(U)}},[C,E,T,F,n,s,o,i]);return m.jsx(Eo,{open:e,onClose:t,size:Ht.Md,title:H,dividers:!1,footer:m.jsxs("div",{className:"flex justify-end gap-3 py-4 px-6",children:[m.jsx(De,{onClick:t,label:h,variant:Te.Secondary}),m.jsx(De,{onClick:_,label:u,variant:Te.Primary})]}),children:m.jsxs("div",{className:"px-6 py-4",children:[m.jsx("p",{className:"text-secondary mb-4",children:O}),C?m.jsx(yr,{elementId:"single-file-conflict",radioButtons:le,activeRadioButton:E,orientation:lo.Column,onChange:U=>D(U)}):m.jsx(yr,{elementId:"multiple-files-conflict",radioButtons:Y,activeRadioButton:T,orientation:lo.Column,onChange:U=>k(U),formItemChildrenClassName:"gap-3"})]})})},y8=({id:e,name:t,nodeType:s,size:o,updatedAt:i,dateLocale:n,dateOptions:r,shared:a})=>m.jsx("div",{className:"flex",children:m.jsx("div",{className:"flex flex-1 min-w-0",children:m.jsx(Jr,{type:s===Ae.FOLDER?Gt.Folder:Gt.File,name:t,elementId:e,shared:a,iconSize:Ms,details:m.jsxs("div",{className:"flex items-center gap-1 dial-tiny text-secondary",children:[m.jsx("span",{children:o}),i&&o&&m.jsx(V.IconCircleFilled,{size:2,className:"text-secondary"}),i?m.jsx("span",{children:m.jsx(IC,{value:i,locale:n?.toString(),options:r,className:"dial-tiny text-secondary"})}):null]})})})});function x8(e){const t=g.useRef(null),[s,o]=g.useState(!1);return g.useEffect(()=>{if(!t.current)return;const i=new ResizeObserver(([n])=>{const r=n.contentRect.width;o(r<e)});return i.observe(t.current),()=>i.disconnect()},[e]),{containerRef:t,isBelowBreakpoint:s}}const R8=({getContextMenuItems:e})=>{const t=g.useCallback(o=>{if(!o.data)return null;const i=o.data?e?.(o.data)??[]:[];return i.length?m.jsx(vt,{placement:"bottom-start",allowedPlacements:["top-start","top-end","bottom-start"],menu:{items:i},className:"sticky right-0",children:m.jsx(Le,{className:"text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary",icon:m.jsx(V.IconDotsVertical,{...ae})})}):null},[e]);return{actionsColumnDef:g.useMemo(()=>({colId:"__actions",headerName:"",width:44,minWidth:44,suppressSizeToFit:!0,sortable:!1,resizable:!1,filter:!1,floatingFilter:!1,suppressMenu:!0,borderless:!0,cellRenderer:t}),[t])}},F8=({onRename:e})=>{const[t,s]=g.useState(ei.Grid),o=g.useCallback(n=>{e(n),s(ei.Grid)},[e]),i=g.useCallback(n=>{e(n),s(ei.Tree)},[e]);return{renameTriggerView:t,onGridRename:o,onTreeRename:i}},E8=100,ki=16,$t="text-secondary",ir="text-primary min-w-0",D8="text-primary break-words min-w-0",Ai="bg-layer-2",P8=({open:e,onClose:t,fileMetadata:s,loading:o=!1,title:i="Information",nameLabel:n="Name:",pathLabel:r="Path:",modifiedDateLabel:a="Modified Date:",sizeLabel:l="Size:",authorLabel:c="Author:",dateLocale:d="en-US",dateOptions:u})=>m.jsx(Eo,{open:e,onClose:t,size:Ht.Sm,title:i,dividers:!1,children:m.jsx("div",{className:"px-6 py-4",children:m.jsx("div",{className:"grid gap-x-4 gap-y-4 items-center dial-small",style:{gridTemplateColumns:`${E8}px 1fr`},children:o?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:$t,children:n}),m.jsx(Go,{variant:At.Text,width:"100%",height:ki,className:Ai}),m.jsx("div",{className:$t,children:a}),m.jsx(Go,{variant:At.Text,width:"90%",height:ki,className:Ai}),m.jsx("div",{className:$t,children:l}),m.jsx(Go,{variant:At.Text,width:"60%",height:ki,className:Ai}),m.jsx("div",{className:$t,children:c}),m.jsx(Go,{variant:At.Text,width:"80%",height:ki,className:Ai}),m.jsx("div",{className:$t,children:r}),m.jsx(Go,{variant:At.Text,width:"70%",height:ki,className:Ai})]}):s?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:$t,children:n}),m.jsx("div",{className:ir,children:m.jsx(ut,{text:m.jsx(mn,{name:s.name,iconSize:16})})}),m.jsx("div",{className:$t,children:a}),m.jsx("div",{className:ir,children:m.jsx(ut,{text:NA(s.updatedAt,d,u)})}),m.jsx("div",{className:$t,children:l}),m.jsx("div",{className:ir,children:m.jsx(ut,{text:yC(s.contentLength)})}),m.jsx("div",{className:$t,children:c}),m.jsx("div",{className:ir,children:m.jsx(ut,{text:s.author||"—"})}),m.jsx("div",{className:$t,children:r}),m.jsx("div",{className:D8,children:s.path})]}):null})})}),AC=e=>m.jsx(PC,{...e,children:m.jsx(M8,{})}),M8=()=>{const{className:e,items:t,rootItem:s,filesLoading:o,treeOptions:i,navigationPanelOptions:n,gridOptions:r,toolbarOptions:a,bulkActionsToolbarOptions:l,deleteConfirmationOptions:c,destinationFolderPopupOptions:d,conflictResolutionPopupOptions:u,compactViewWidthBreakpoint:h=AA,sharedByMePaths:p,areHiddenFilesVisible:f,toggleHiddenFilesVisibility:C,isTreeCollapsed:v,toggleTreeCollapse:w,currentPath:b,gridRows:S,selectedIds:y,selectedFiles:x,setSelectedFiles:R,clearSelection:E,effectiveSearchValue:D,handleBreadcrumbItemClick:T,handleSearchChange:k,handleTreeItemClick:F,handleTableRowClick:M,handleOpenDestinationFolderPopup:L,handleCloseDestinationFolderPopup:B,openDestinationFolderPopup:H,destinationFolderMode:Q,handleSetCopiedFiles:ee,handleSetMovedFiles:O,handleDuplicate:le,handleCopyTo:z,handleMoveTo:X,handleDownloadFiles:Y,openDeleteConfirmation:_,closeDeleteConfirmation:U,confirmDelete:te,deleteConfirmationOpen:N,itemsToDelete:P,renamedPath:j,renamedItem:ie,onRename:J,onRenameSave:pe,onRenameCancel:Se,onRenameValidate:we,getDisplayName:Ie,isDragging:Je,isDraggingOverWindow:fe,handleDragEnter:ye,handleDragLeave:W,handleDragOver:me,handleDrop:ue,onUploadFiles:xe,onValidateUpload:Ke,maxFileSize:wt,newActions:Oe,isNewButtonVisible:bt,newFolderTempId:lt,cancelFolderCreation:Do,saveFolderCreation:ke,validateFolderName:et,startFolderCreation:Po,conflictingFiles:xa,conflictResolutionOpen:Vs,closeConflictResolution:Ra,handleConflictReplace:Fa,handleConflictDuplicate:Ea,handleConflictDecideForEach:Da,uploadConflictingFiles:Pa,uploadConflictResolutionOpen:Ma,closeUploadConflictResolution:Ta,handleUploadConflictReplace:Ia,handleUploadConflictDuplicate:ka,handleUploadConflictDecideForEach:Aa,openMetadataPopup:La,fileMetadataPopupOptions:jt,isMetadataPopupOpen:Oa,selectedFileForMetadata:Na,closeMetadataPopup:Ha,onUnshareFile:fi,actionsRef:Ga}=MC(),{width:Ba=DA,title:Fn=PA,containerClassName:En=FA,additionalButtons:Dn,...Pn}=i??{},[zs,Mn]=g.useState(Ba),{renameTriggerView:Mo,onGridRename:Va,onTreeRename:mi}=F8({onRename:J}),Ci=g.useRef(null),za=$=>{Ci.current===null&&(Ci.current=requestAnimationFrame(()=>{Mn($),Ci.current=null}))},{columnDefs:vi,filterable:Tn=!0,dateLocale:wi,dateOptions:bi,visibleColumns:In=[St.Name,St.UpdatedAt,St.Size,St.Author,St.Actions],...Si}=r??{},{containerRef:Wa,isBelowBreakpoint:qe}=x8(h),Ws=g.useMemo(()=>[{colId:St.Name,field:"name",headerName:"Name",flex:1,minWidth:200,cellRenderer:$=>{const Fe=$.data.nodeType,{saveFolderCreation:_s,validateFolderName:os,cancelFolderCreation:Ss,newFolderTempId:Ka,sharedByMePaths:Gn}=$.context,js=Gn?.has($.data.path);if($.data?.isTemporary&&$.data.id===Ka)return m.jsx(Jr,{name:"",type:Gt.Folder,elementId:`new-folder-${$.data.id}`,editing:!0,shared:js,iconSize:Ms,validate:os,onSave:_s,onCancel:Ss,inputContainerClassName:ce(["!h-9",qe&&Fe===Ae.ITEM&&"!h-10"])});const{renameTriggerView:qa,renamedPath:Ee,renamedItem:ct,getDisplayName:Us,onRenameValidate:Ri,onRenameSave:Ya,onRenameCancel:_e}=$.context;if(qa===ei.Grid&&Ee===$.data?.path&&ct&&$.data){const Za=Us(ct);return m.jsx(Jr,{name:Za,type:Fe===Ae.FOLDER?Gt.Folder:Gt.File,elementId:`rename-${$.data.id}`,editing:!0,shared:js,iconSize:Ms,validate:Xa=>Ri(Xa,ct),onSave:Ya,onCancel:_e,inputContainerClassName:ce(["!h-9",qe&&Fe===Ae.ITEM&&"!h-10"])})}return qe?m.jsx(y8,{id:$.data.id,name:$.data.name,nodeType:Fe,size:$.data.size,shared:js,updatedAt:$.data.updatedAt,dateLocale:wi,dateOptions:bi}):Fe===Ae.FOLDER?m.jsx(da,{name:$.data.name,shared:js,iconSize:Ms}):m.jsx(mn,{name:$.data.name,shared:js,iconSize:Ms})}},{colId:St.UpdatedAt,field:"updatedAt",headerName:"Modified Date",width:168,suppressSizeToFit:!0,cellRenderer:IC,cellRendererParams:{locale:wi,options:bi}},{colId:St.Size,field:"size",headerName:"Size",width:120,suppressSizeToFit:!0},{colId:St.Author,field:"author",headerName:"Author",width:200,suppressSizeToFit:!0,cellRenderer:$=>$.data.author},{colId:St.Owner,field:"owner",headerName:"Owner",width:200,suppressSizeToFit:!0,cellRenderer:$=>$.data.owner}],[wi,bi,qe]),yi=g.useCallback($=>{const Fe=[];return i?.actionLabels&&(i.actionLabels[re.Duplicate]&&Fe.push({key:"duplicate",label:i.actionLabels[re.Duplicate],icon:m.jsx(V.IconCopy,{...ae,className:"text-secondary"}),onClick:()=>le([$])}),i.actionLabels[re.Copy]&&Fe.push({key:Ze.Copy,label:i.actionLabels[re.Copy],icon:m.jsx($d,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>{ee([$]),L(Ze.Copy)}}),i.actionLabels[re.Move]&&Fe.push({key:Ze.Move,label:i.actionLabels[re.Move],icon:m.jsx(Kd,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>{O([$]),L(Ze.Move)}}),i.actionLabels[re.Download]&&Fe.push({key:"download",label:i.actionLabels[re.Download],icon:m.jsx(V.IconDownload,{...ae,className:"text-secondary"}),onClick:()=>Y([$])}),i.actionLabels[re.Rename]&&Fe.push({key:"rename",label:i.actionLabels[re.Rename],icon:m.jsx(V.IconPencilMinus,{...ae,className:"text-secondary"}),onClick:()=>mi($.path)}),i.actionLabels[re.Unshare]&&Fe.push({key:"unshare",label:i.actionLabels[re.Unshare],icon:m.jsx(kC,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>fi?.($)}),i.actionLabels[re.Delete]&&Fe.push({key:"delete",label:i.actionLabels[re.Delete],icon:m.jsx(V.IconTrashX,{...ae,className:"text-secondary"}),onClick:()=>_([$],$.parentPath??"")})),Fe},[Y,le,L,ee,O,mi,_,i,fi]),_a=g.useMemo(()=>{const $=new Map;return x.forEach((Fe,_s)=>{const os=S.find(Ss=>Ss.path===_s);os&&$.set(_s,os)}),$},[x,S]),ja=g.useCallback($=>{const Fe=new Map;$.forEach((_s,os)=>{const Ss=wo(t,os);Ss&&Fe.set(os,Ss)}),R(Fe)},[t,R]),kn=b8({selectedFiles:x,actionLabels:l?.actionLabels,onDuplicate:le,onCopy:$=>{ee($),L(Ze.Copy)},onMove:$=>{O($),L(Ze.Move)},onDownload:Y,onDelete:_,getCurrentFolderPath:()=>b??"/"}),Ua=g.useCallback(()=>a&&y.size===0?m.jsx("div",{className:eg,role:"toolbar","aria-label":"File Manager Toolbar",children:m.jsx($A,{...a,areHiddenFilesVisible:f,onToggleHiddenFiles:C,isNewButtonVisible:bt,newButtonDropdownItems:Oe})}):y.size>0&&l?m.jsx("div",{className:eg,role:"toolbar","aria-label":"File Manager Toolbar",children:m.jsx(ZA,{...l,selectedCount:y.size,onClearSelection:E,actions:kn})}):m.jsx("div",{}),[l,y,E,kn,f,C,a,bt,Oe]);g.useImperativeHandle(Ga,()=>({createFolder:Po}),[Po]);const $a=g.useCallback(()=>qe?null:m.jsx("aside",{role:"region","aria-label":"File Manager Tree Navigation",className:"min-h-0 min-w-0 h-full flex-none",children:m.jsx(Og,{defaultWidth:zs,width:zs,onResizeStop:Mn,onResize:za,minWidth:TA,maxWidth:IA,enabled:v,children:m.jsx(Sg,{width:zs,title:Fn,containerClassName:En,additionalButtons:Dn,isOpened:v,onToggle:w,children:m.jsx(zA,{...Pn,items:t,rootItemPath:s?.path,rootItemLabel:s?.label,selectedPath:b,sharedByMePaths:p,onItemClick:F,areHiddenFilesVisible:f,getContextMenuItems:yi,renamedPath:Mo===ei.Tree?j:void 0,onRenameSave:pe,onRenameCancel:Se,onRenameValidate:we})})})}),[Dn,f,En,b,Pn,yi,F,qe,v,t,s,Se,pe,we,Mo,j,zs,Fn,p,w]),An=S8({actionLabels:r?.actionLabels,onDuplicate:$=>le([$]),onCopy:$=>{ee([$]),L(Ze.Copy)},onMove:$=>{O([$]),L(Ze.Move)},onDownload:$=>Y([$]),onRename:Va,onDelete:($,Fe)=>_([$],Fe),onInfo:$=>La($),onUnshare:$=>fi?.($)}),Ln=g.useCallback($=>{const Fe=wo(t,$.path);return Fe?An(Fe):[]},[t,An]),{actionsColumnDef:xi}=R8({getContextMenuItems:Ln}),On=vi??Ws,Nn=g.useMemo(()=>{let $=On;return vi||($=$.filter(Fe=>Fe.colId&&In.includes(Fe.colId))),qe&&($=$.slice(0,1)),$.push(xi),Tn?$:$.map(Fe=>({...Fe,filter:!1,floatingFilter:!1}))},[On,Tn,qe,xi,vi,In]),Hn=g.useCallback($=>{$.colDef.colId==="__select"||$.colDef.colId===St.Actions||j&&$.data?.path===j||$.data?.isTemporary||$.data&&M($.data)},[j,M]);return m.jsxs("section",{ref:Wa,className:ce(yA,{"gap-3 pt-4":l&&y.size>0,"gap-4 p-3 pt-4":qe,"gap-2 pt-2":qe&&l&&y.size>0},e),children:[Ua(),m.jsxs("div",{className:xA,children:[$a(),m.jsxs("div",{className:ce(RA,{"gap-3":qe}),children:[m.jsx(UA,{...n??{},makeHref:$=>$.join("/"),path:b,onItemClick:T,rootItemPath:s?.path,rootItemLabel:s?.label,value:D,onSearchChange:k,isCompactView:qe}),m.jsx("section",{role:"region","aria-label":"File Manager Grid View",className:ce(EA),onDragEnter:ye,onDragLeave:W,onDragOver:me,onDrop:ue,children:m.jsx(zd,{columnDefs:Nn,rowData:S,getRowId:$=>$.path,loading:o,getContextMenuItems:Ln,withoutHeaderBorders:qe,selectionOnHover:!qe,className:Z(Je?"border border-dashed border-accent-primary":"",fe&&!Je?"border border-dashed border-primary":""),...Si,additionalGridOptions:{...Si.additionalGridOptions,onCellClicked:Hn,headerHeight:Kl,rowHeight:Kl,...qe?{getRowHeight:$=>$.data?.nodeType===Ae.FOLDER?Kl:kA}:{},context:{cancelFolderCreation:Do,saveFolderCreation:ke,getDisplayName:Ie,onRenameCancel:Se,onRenameSave:pe,onRenameValidate:we,renameTriggerView:Mo,validateFolderName:et,renamedItem:ie,renamedPath:j,newFolderTempId:lt,sharedByMePaths:p}},selectedRows:_a,onSelectionChangeWithMap:ja,wrapperBorder:!Je&&!fe})})]})]}),m.jsx(v8,{...c,open:N,itemsToDelete:P,onClose:U,onConfirm:te}),m.jsx(w8,{...d,open:H,onClose:B,onConfirm:()=>{const $=d?.destinationFolderPath??"/";Q===Ze.Copy?z($):X($),B()},mode:Q,items:t,rootItem:s,gridOptions:{columnDefs:Nn,loading:o},onUploadFiles:xe,onValidateUpload:Ke,maxFileSize:wt,path:d?.destinationFolderPath||b,onPathChange:$=>{d?.setDestinationFolderPath?.($)}}),m.jsx(ig,{...u,open:Vs,onClose:Ra,onReplace:Fa,onDuplicate:Ea,onDecideForEach:Da,conflictingFiles:xa}),m.jsx(ig,{...u,open:Ma,onClose:Ta,onReplace:Ia,onDuplicate:ka,onDecideForEach:Aa,conflictingFiles:Pa}),m.jsx(P8,{open:Oa,onClose:Ha,fileMetadata:jt?.fileMetadata??Na,loading:jt?.loading,title:jt?.title,nameLabel:jt?.nameLabel,pathLabel:jt?.pathLabel,modifiedDateLabel:jt?.modifiedDateLabel,sizeLabel:jt?.sizeLabel,authorLabel:jt?.authorLabel,dateLocale:r?.dateLocale,dateOptions:r?.dateOptions})]})},T8=e=>{const[t,s]=g.useState(ea.MyFiles),o=n=>{s(n)},i=g.useMemo(()=>{if(e)return Object.values(ea).map(n=>({id:n,label:e?.[n]||n.replace("_"," ")}))},[e]);return{activeTab:t,handleTabChange:o,tabs:i}};exports.AlertVariant=Zs;exports.ButtonVariant=Te;exports.ConfirmationPopupVariant=ai;exports.DialAlert=yv;exports.DialAutocompleteInput=Kk;exports.DialAutocompleteInputValue=_d;exports.DialBreadcrumb=iC;exports.DialBreadcrumbItem=Ni;exports.DialButton=De;exports.DialButtonDropdown=Gc;exports.DialCheckbox=Yi;exports.DialCloseButton=Vd;exports.DialCollapsibleSidebar=Sg;exports.DialConditionalResizableContainer=Og;exports.DialConfirmationPopup=lC;exports.DialDraggableItem=V1;exports.DialDropdown=vt;exports.DialEllipsisTooltip=ut;exports.DialErrorText=Ts;exports.DialFieldLabel=bo;exports.DialFileIcon=$c;exports.DialFileManager=AC;exports.DialFileManagerActions=re;exports.DialFileManagerTabs=ea;exports.DialFileName=mn;exports.DialFileNodeType=Ae;exports.DialFilePermission=bC;exports.DialFileResourceType=wC;exports.DialFolderName=da;exports.DialFormItem=ta;exports.DialFormPopup=Wk;exports.DialGrid=zd;exports.DialIcon=Le;exports.DialInput=vo;exports.DialInputPopup=cC;exports.DialItemType=Gt;exports.DialLabelledText=Nv;exports.DialLoadFileAreaField=wA;exports.DialLoader=fn;exports.DialNoDataContent=sa;exports.DialNumberInputField=Dk;exports.DialPasswordInput=dC;exports.DialPasswordInputField=Uk;exports.DialPopup=Eo;exports.DialRadioButton=bg;exports.DialRadioGroup=yr;exports.DialRadioGroupPopupField=Gk;exports.DialRemoveButton=nC;exports.DialResizableContainer=Lg;exports.DialSearch=jd;exports.DialSelect=hC;exports.DialSelectField=tA;exports.DialSharedEntityIndicator=Xi;exports.DialSkeleton=Go;exports.DialSkeletonAvatarShape=xr;exports.DialSkeletonAvatarSize=Gi;exports.DialSkeletonVariant=At;exports.DialSteps=Tv;exports.DialSwitch=Wd;exports.DialTabs=eC;exports.DialTag=ia;exports.DialTagInput=qk;exports.DialTextAreaField=Mk;exports.DialTextInputField=Pk;exports.DialTextarea=rC;exports.DialTooltip=ms;exports.DropdownItemType=qr;exports.DropdownTrigger=yt;exports.DropdownType=Jm;exports.FileManagerColumnKey=St;exports.FileManagerProvider=PC;exports.FlexibleActionsDirection=eo;exports.FormItemOrientation=Zi;exports.PopupSize=Ht;exports.RadioGroupOrientation=lo;exports.ResizableContainerSide=Qi;exports.SearchSize=gn;exports.SelectSize=Xr;exports.SelectVariant=Qr;exports.StepStatus=xt;exports.TabOrientation=Yr;exports.TagVariant=oa;exports.mergeClasses=ce;exports.useDialFileManagerTabs=T8;exports.useEditableItem=xC;exports.useFileManagerContext=MC;