Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ag-grid-react

Package Overview
Dependencies
Maintainers
4
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ag-grid-react - npm Package Compare versions

Comparing version 32.2.2 to 32.3.0

2

dist/package/index.cjs.min.js

@@ -1,1 +0,1 @@

"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of __getOwnPropNames(t))!__hasOwnProp.call(e,s)&&s!==r&&__defProp(e,s,{get:()=>t[s],enumerable:!(n=__getOwnPropDesc(t,s))||n.enumerable});return e},__toESM=(e,t,r)=>(r=e!=null?__create(__getProtoOf(e)):{},__copyProps(t||!e||!e.__esModule?__defProp(r,"default",{value:e,enumerable:!0}):r,e)),__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),src_exports={};__export(src_exports,{AgGridReact:()=>AgGridReact,CustomComponentContext:()=>CustomContext,getInstance:()=>getInstance,useGridCellEditor:()=>useGridCellEditor,useGridDate:()=>useGridDate,useGridFilter:()=>useGridFilter,useGridFloatingFilter:()=>useGridFloatingFilter,useGridMenuItem:()=>useGridMenuItem,warnReactiveCustomComponents:()=>warnReactiveCustomComponents}),module.exports=__toCommonJS(src_exports);var import_react24=__toESM(require("react")),import_ag_grid_community20=require("ag-grid-community"),import_react23=__toESM(require("react")),import_ag_grid_community=require("ag-grid-community"),import_react3=__toESM(require("react")),import_react=__toESM(require("react")),BeansContext=import_react.default.createContext({}),showJsComp=(e,t,r,n)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const d=e.newAgStackInstance();if(d==null)return;let c,o,l=!1;return d.then(a=>{if(l){t.destroyBean(a);return}c=a,o=c.getGui(),r.appendChild(o),setRef(n,c)}),()=>{l=!0,c&&(o?.parentElement?.removeChild(o),t.destroyBean(c),n&&setRef(n,void 0))}},setRef=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const r=e;r.current=t}},import_react2=__toESM(require("react")),import_react_dom=__toESM(require("react-dom")),classesList=(...e)=>e.filter(r=>r!=null&&r!=="").join(" "),CssClasses=class ie{constructor(...t){this.classesMap={},t.forEach(r=>{this.classesMap[r]=!0})}setClass(t,r){if(!!this.classesMap[t]==r)return this;const s=new ie;return s.classesMap={...this.classesMap},s.classesMap[t]=r,s}toString(){return Object.keys(this.classesMap).filter(r=>this.classesMap[r]).join(" ")}},isComponentStateless=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,r=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===r()},reactVersion=import_react2.default.version?.split(".")[0],isReactVersion17Minus=reactVersion==="16"||reactVersion==="17";function isReact19(){return reactVersion==="19"}var disableFlushSync=!1;function runWithoutFlushSync(e){return disableFlushSync||setTimeout(()=>disableFlushSync=!1,0),disableFlushSync=!0,e()}var agFlushSync=(e,t)=>{!isReactVersion17Minus&&e&&!disableFlushSync?import_react_dom.default.flushSync(t):t()};function getNextValueIfDifferent(e,t,r){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(r||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const n=[],s=[],d=new Map,c=new Map;for(let o=0;o<t.length;o++){const l=t[o];c.set(l.instanceId,l)}for(let o=0;o<e.length;o++){const l=e[o];d.set(l.instanceId,l),c.has(l.instanceId)&&n.push(l)}for(let o=0;o<t.length;o++){const l=t[o],a=l.instanceId;d.has(a)||s.push(l)}return n.length===e.length&&s.length===0?e:n.length===0&&s.length===t.length?t:n.length===0?s:s.length===0?n:[...n,...s]}var GroupCellRenderer=(0,import_react3.forwardRef)((e,t)=>{const{ctrlsFactory:r,context:n}=(0,import_react3.useContext)(BeansContext),s=(0,import_react3.useRef)(null),d=(0,import_react3.useRef)(null),c=(0,import_react3.useRef)(null),o=(0,import_react3.useRef)(null),l=(0,import_react3.useRef)(null),a=(0,import_react3.useRef)(),[i,C]=(0,import_react3.useState)(),[v,g]=(0,import_react3.useState)(),[p,f]=(0,import_react3.useState)(),[u,h]=(0,import_react3.useState)(()=>new CssClasses),[R,y]=(0,import_react3.useState)(()=>new CssClasses("ag-hidden")),[w,b]=(0,import_react3.useState)(()=>new CssClasses("ag-hidden")),[I,E]=(0,import_react3.useState)(()=>new CssClasses("ag-invisible"));(0,import_react3.useImperativeHandle)(t,()=>({refresh(){return!1}})),(0,import_react3.useLayoutEffect)(()=>showJsComp(i,n,d.current),[i]);const M=(0,import_react3.useCallback)(G=>{if(s.current=G,!G){a.current=n.destroyBean(a.current);return}const B={setInnerRenderer:(A,W)=>{C(A),f(W)},setChildCount:A=>g(A),addOrRemoveCssClass:(A,W)=>h(D=>D.setClass(A,W)),setContractedDisplayed:A=>b(W=>W.setClass("ag-hidden",!A)),setExpandedDisplayed:A=>y(W=>W.setClass("ag-hidden",!A)),setCheckboxVisible:A=>E(W=>W.setClass("ag-invisible",!A))},H=r.getInstance("groupCellRendererCtrl");H&&(a.current=n.createBean(H),a.current.init(B,G,c.current,o.current,l.current,GroupCellRenderer,e))},[]),F=(0,import_react3.useMemo)(()=>`ag-cell-wrapper ${u.toString()}`,[u]),m=(0,import_react3.useMemo)(()=>`ag-group-expanded ${R.toString()}`,[R]),S=(0,import_react3.useMemo)(()=>`ag-group-contracted ${w.toString()}`,[w]),k=(0,import_react3.useMemo)(()=>`ag-group-checkbox ${I.toString()}`,[I]),z=i&&i.componentFromFramework,O=z?i.componentClass:void 0,N=i==null&&p!=null,_=(0,import_ag_grid_community._escapeString)(p,!0);return import_react3.default.createElement("span",{className:F,ref:M,...e.colDef?{}:{role:a.current?.getCellAriaRole()}},import_react3.default.createElement("span",{className:m,ref:o}),import_react3.default.createElement("span",{className:S,ref:l}),import_react3.default.createElement("span",{className:k,ref:c}),import_react3.default.createElement("span",{className:"ag-group-value",ref:d},N&&import_react3.default.createElement(import_react3.default.Fragment,null,_),z&&import_react3.default.createElement(O,{...i.params})),import_react3.default.createElement("span",{className:"ag-group-child-count"},v))}),groupCellRenderer_default=GroupCellRenderer,import_ag_grid_community3=require("ag-grid-community"),import_react5=__toESM(require("react")),import_react4=require("react"),CustomContext=(0,import_react4.createContext)({setMethods:()=>{}}),CustomWrapperComp=e=>{const{initialProps:t,addUpdateCallback:r,CustomComponentClass:n,setMethods:s}=e,[{key:d,...c},o]=(0,import_react5.useState)(t);return(0,import_react5.useEffect)(()=>{r(l=>o(l))},[]),import_react5.default.createElement(CustomContext.Provider,{value:{setMethods:s}},import_react5.default.createElement(n,{key:d,...c}))},customWrapperComp_default=(0,import_react5.memo)(CustomWrapperComp),import_ag_grid_community2=require("ag-grid-community"),import_react6=require("react"),import_react_dom2=require("react-dom"),counter=0;function generateNewKey(){return`agPortalKey_${++counter}`}var ReactComponent=class{constructor(e,t,r,n){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=r,this.suppressFallbackMethods=!!n,this.statelessComponent=this.isStateless(this.reactComponent),this.key=generateNewKey(),this.portalKey=generateNewKey(),this.instanceCreated=this.isStatelessComponent()?import_ag_grid_community2.AgPromise.resolve(!1):new import_ag_grid_community2.AgPromise(s=>{this.resolveInstanceCreated=s})}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(),r=document.createElement(t||"div");return r.classList.add("ag-react-container"),e.reactContainer=r,r}addParentContainerStyleAndClasses(){this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&((0,import_ag_grid_community2._warnOnce)('Since v31.1 "getReactContainerStyle" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),Object.assign(this.eParentElement.style,this.componentInstance.getReactContainerStyle())),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses()&&((0,import_ag_grid_community2._warnOnce)('Since v31.1 "getReactContainerClasses" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),this.componentInstance.getReactContainerClasses().forEach(t=>this.eParentElement.classList.add(t))))}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 r=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!r){setTimeout(()=>this.callMethod(e,t));return}const n=r[e];if(n)return n.apply(r,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 import_ag_grid_community2.AgPromise(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{this.componentInstance=t,this.addParentContainerStyleAndClasses(),this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=(0,import_react_dom2.createPortal)(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return(0,import_react6.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 r=this[`${e}Component`];if(!this.suppressFallbackMethods&&r)return r.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function addOptionalMethods(e,t,r){e.forEach(n=>{const s=t[n];s&&(r[n]=s)})}var CustomComponentWrapper=class extends ReactComponent{constructor(){super(...arguments),this.awaitUpdateCallback=new import_ag_grid_community3.AgPromise(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=customWrapperComp_default}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:r=>this.setMethods(r),addUpdateCallback:r=>{this.updateCallback=()=>(r(this.getProps()),new import_ag_grid_community3.AgPromise(n=>{setTimeout(()=>{n()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,addOptionalMethods(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new import_ag_grid_community3.AgPromise(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},CellRendererComponentWrapper=class extends CustomComponentWrapper{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},DateComponentWrapper=class extends CustomComponentWrapper{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}},DragAndDropImageComponentWrapper=class extends CustomComponentWrapper{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:r,shake:n}=this;return e.label=t,e.icon=r,e.shake=n,e}},FilterComponentWrapper=class extends CustomComponentWrapper{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterChangedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1}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}getOptionalMethods(){return["afterGuiAttached","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)}updateModel(e){this.setModel(e).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,delete e.filterModifiedCallback,delete e.valueGetter,e}},import_ag_grid_community4=require("ag-grid-community");function updateFloatingFilterParent(e,t){e.parentFilterInstance(r=>{(r.setModel(t)||import_ag_grid_community4.AgPromise.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var FloatingFilterComponentProxy=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=r=>this.updateModel(r)}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){addOptionalMethods(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),updateFloatingFilterParent(this.floatingFilterParams,e)}},FloatingFilterComponentWrapper=class extends CustomComponentWrapper{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(),updateFloatingFilterParent(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},LoadingOverlayComponentWrapper=class extends CustomComponentWrapper{refresh(e){this.sourceParams=e,this.refreshProps()}},MenuItemComponentWrapper=class extends CustomComponentWrapper{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}},NoRowsOverlayComponentWrapper=class extends CustomComponentWrapper{refresh(e){this.sourceParams=e,this.refreshProps()}},StatusPanelComponentWrapper=class extends CustomComponentWrapper{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},ToolPanelComponentWrapper=class extends CustomComponentWrapper{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}},import_ag_grid_community5=require("ag-grid-community");function getInstance(e,t){(e?.getInstance?.()??import_ag_grid_community5.AgPromise.resolve(void 0)).then(n=>t(n))}function warnReactiveCustomComponents(){(0,import_ag_grid_community5._warnOnce)("As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.")}var MAX_COMPONENT_CREATION_TIME_IN_MS=1e3,PortalManager=class{constructor(e,t,r){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=r||MAX_COMPONENT_CREATION_TIME_IN_MS}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,r){this.portals=[...this.portals,e],this.waitForInstance(t,r),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,r=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-r>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return;window.setTimeout(()=>{this.waitForInstance(e,t,r)})}}},import_ag_grid_community18=require("ag-grid-community"),import_react22=__toESM(require("react")),import_ag_grid_community16=require("ag-grid-community"),import_react20=__toESM(require("react")),import_ag_grid_community11=require("ag-grid-community"),import_react12=__toESM(require("react")),import_ag_grid_community10=require("ag-grid-community"),import_react11=__toESM(require("react")),import_ag_grid_community9=require("ag-grid-community"),import_react10=__toESM(require("react")),import_ag_grid_community6=require("ag-grid-community"),import_react7=__toESM(require("react")),HeaderCellComp=({ctrl:e})=>{const t=e.isAlive(),{context:r}=(0,import_react7.useContext)(BeansContext),n=t?e.getColId():void 0,[s,d]=(0,import_react7.useState)(),c=(0,import_react7.useRef)(),o=(0,import_react7.useRef)(null),l=(0,import_react7.useRef)(null),a=(0,import_react7.useRef)(null),i=(0,import_react7.useRef)(),C=(0,import_react7.useRef)();t&&!C.current&&(C.current=new import_ag_grid_community6.CssClassManager(()=>o.current));const v=(0,import_react7.useCallback)(u=>{if(o.current=u,c.current=u?r.createBean(new import_ag_grid_community6._EmptyBean):r.destroyBean(c.current),!u||!t)return;const h={setWidth:y=>{o.current&&(o.current.style.width=y)},addOrRemoveCssClass:(y,w)=>C.current.addOrRemoveCssClass(y,w),setAriaSort:y=>{o.current&&(y?(0,import_ag_grid_community6._setAriaSort)(o.current,y):(0,import_ag_grid_community6._removeAriaSort)(o.current))},setUserCompDetails:y=>d(y),getUserCompInstance:()=>i.current||void 0};e.setComp(h,u,l.current,a.current,c.current);const R=e.getSelectAllGui();l.current?.insertAdjacentElement("afterend",R),c.current.addDestroyFunc(()=>R.remove())},[]);(0,import_react7.useLayoutEffect)(()=>showJsComp(s,r,a.current,i),[s]),(0,import_react7.useEffect)(()=>{e.setDragSource(o.current)},[s]);const g=(0,import_react7.useMemo)(()=>!!(s?.componentFromFramework&&isComponentStateless(s.componentClass)),[s]),p=s&&s.componentFromFramework,f=s&&s.componentClass;return import_react7.default.createElement("div",{ref:v,className:"ag-header-cell","col-id":n,role:"columnheader"},import_react7.default.createElement("div",{ref:l,className:"ag-header-cell-resize",role:"presentation"}),import_react7.default.createElement("div",{ref:a,className:"ag-header-cell-comp-wrapper",role:"presentation"},p&&g&&import_react7.default.createElement(f,{...s.params}),p&&!g&&import_react7.default.createElement(f,{...s.params,ref:i})))},headerCellComp_default=(0,import_react7.memo)(HeaderCellComp),import_ag_grid_community7=require("ag-grid-community"),import_react8=__toESM(require("react")),HeaderFilterCellComp=({ctrl:e})=>{const{context:t,gos:r}=(0,import_react8.useContext)(BeansContext),[n,s]=(0,import_react8.useState)(()=>new CssClasses("ag-header-cell","ag-floating-filter")),[d,c]=(0,import_react8.useState)(()=>new CssClasses),[o,l]=(0,import_react8.useState)(()=>new CssClasses("ag-floating-filter-button","ag-hidden")),[a,i]=(0,import_react8.useState)("false"),[C,v]=(0,import_react8.useState)(),[,g]=(0,import_react8.useState)(1),p=(0,import_react8.useRef)(),f=(0,import_react8.useRef)(null),u=(0,import_react8.useRef)(null),h=(0,import_react8.useRef)(null),R=(0,import_react8.useRef)(null),y=(0,import_react8.useRef)(),w=(0,import_react8.useRef)(),b=_=>{_!=null&&y.current&&y.current(_)},I=(0,import_react8.useCallback)(_=>{if(f.current=_,p.current=_?t.createBean(new import_ag_grid_community7._EmptyBean):t.destroyBean(p.current),!_)return;w.current=new import_ag_grid_community7.AgPromise(B=>{y.current=B});const G={addOrRemoveCssClass:(B,H)=>s(A=>A.setClass(B,H)),addOrRemoveBodyCssClass:(B,H)=>c(A=>A.setClass(B,H)),setButtonWrapperDisplayed:B=>{l(H=>H.setClass("ag-hidden",!B)),i(B?"false":"true")},setWidth:B=>{f.current&&(f.current.style.width=B)},setCompDetails:B=>v(B),getFloatingFilterComp:()=>w.current?w.current:null,setMenuIcon:B=>R.current?.appendChild(B)};e.setComp(G,_,R.current,u.current,p.current)},[]);(0,import_react8.useLayoutEffect)(()=>showJsComp(C,t,u.current,b),[C]);const E=(0,import_react8.useMemo)(()=>n.toString(),[n]),M=(0,import_react8.useMemo)(()=>d.toString(),[d]),F=(0,import_react8.useMemo)(()=>o.toString(),[o]),m=(0,import_react8.useMemo)(()=>!!(C&&C.componentFromFramework&&isComponentStateless(C.componentClass)),[C]),S=(0,import_react8.useMemo)(()=>r.get("reactiveCustomComponents"),[]),k=(0,import_react8.useMemo)(()=>{if(C)if(S){const _=new FloatingFilterComponentProxy(C.params,()=>g(G=>G+1));return b(_),_}else C.componentFromFramework&&warnReactiveCustomComponents()},[C]),z=k?.getProps(),O=C&&C.componentFromFramework,N=C&&C.componentClass;return import_react8.default.createElement("div",{ref:I,className:E,role:"gridcell"},import_react8.default.createElement("div",{ref:u,className:M,role:"presentation"},O&&!S&&import_react8.default.createElement(N,{...C.params,ref:m?()=>{}:b}),O&&S&&import_react8.default.createElement(CustomContext.Provider,{value:{setMethods:_=>k.setMethods(_)}},import_react8.default.createElement(N,{...z}))),import_react8.default.createElement("div",{ref:h,"aria-hidden":a,className:F,role:"presentation"},import_react8.default.createElement("button",{ref:R,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},headerFilterCellComp_default=(0,import_react8.memo)(HeaderFilterCellComp),import_ag_grid_community8=require("ag-grid-community"),import_react9=__toESM(require("react")),HeaderGroupCellComp=({ctrl:e})=>{const{context:t}=(0,import_react9.useContext)(BeansContext),[r,n]=(0,import_react9.useState)(()=>new CssClasses),[s,d]=(0,import_react9.useState)(()=>new CssClasses),[c,o]=(0,import_react9.useState)("false"),[l,a]=(0,import_react9.useState)(),[i,C]=(0,import_react9.useState)(),v=(0,import_react9.useMemo)(()=>e.getColId(),[]),g=(0,import_react9.useRef)(),p=(0,import_react9.useRef)(null),f=(0,import_react9.useRef)(null),u=(0,import_react9.useRef)(null),h=(0,import_react9.useRef)(),R=(0,import_react9.useCallback)(M=>{if(p.current=M,g.current=M?t.createBean(new import_ag_grid_community8._EmptyBean):t.destroyBean(g.current),!M)return;const F={setWidth:m=>{p.current&&(p.current.style.width=m)},addOrRemoveCssClass:(m,S)=>n(k=>k.setClass(m,S)),setUserCompDetails:m=>C(m),setResizableDisplayed:m=>{d(S=>S.setClass("ag-hidden",!m)),o(m?"false":"true")},setAriaExpanded:m=>a(m),getUserCompInstance:()=>h.current||void 0};e.setComp(F,M,f.current,u.current,g.current)},[]);(0,import_react9.useLayoutEffect)(()=>showJsComp(i,t,u.current),[i]),(0,import_react9.useEffect)(()=>{p.current&&e.setDragSource(p.current)},[i]);const y=(0,import_react9.useMemo)(()=>!!(i?.componentFromFramework&&isComponentStateless(i.componentClass)),[i]),w=(0,import_react9.useMemo)(()=>"ag-header-group-cell "+r.toString(),[r]),b=(0,import_react9.useMemo)(()=>"ag-header-cell-resize "+s.toString(),[s]),I=i&&i.componentFromFramework,E=i&&i.componentClass;return import_react9.default.createElement("div",{ref:R,className:w,"col-id":v,role:"columnheader","aria-expanded":l},import_react9.default.createElement("div",{ref:u,className:"ag-header-cell-comp-wrapper",role:"presentation"},I&&y&&import_react9.default.createElement(E,{...i.params}),I&&!y&&import_react9.default.createElement(E,{...i.params,ref:h})),import_react9.default.createElement("div",{ref:f,"aria-hidden":c,className:b}))},headerGroupCellComp_default=(0,import_react9.memo)(HeaderGroupCellComp),HeaderRowComp=({ctrl:e})=>{const{context:t}=(0,import_react10.useContext)(BeansContext),{topOffset:r,rowHeight:n}=(0,import_react10.useMemo)(()=>e.getTopAndHeight(),[]),s=e.getAriaRowIndex(),d=e.getHeaderRowClass(),[c,o]=(0,import_react10.useState)(()=>n+"px"),[l,a]=(0,import_react10.useState)(()=>r+"px"),i=(0,import_react10.useRef)(null),C=(0,import_react10.useRef)(null),[v,g]=(0,import_react10.useState)(()=>e.getHeaderCtrls()),p=(0,import_react10.useRef)(),f=(0,import_react10.useRef)(null),u=(0,import_react10.useCallback)(y=>{if(f.current=y,p.current=y?t.createBean(new import_ag_grid_community9._EmptyBean):t.destroyBean(p.current),!y)return;const w={setHeight:b=>o(b),setTop:b=>a(b),setHeaderCtrls:(b,I,E)=>{C.current=i.current,i.current=b;const M=getNextValueIfDifferent(C.current,b,I);M!==C.current&&agFlushSync(E,()=>g(M))},setWidth:b=>{f.current&&(f.current.style.width=b)}};e.setComp(w,p.current,!1)},[]),h=(0,import_react10.useMemo)(()=>({height:c,top:l}),[c,l]),R=(0,import_react10.useCallback)(y=>{switch(e.getType()){case import_ag_grid_community9.HeaderRowType.COLUMN_GROUP:return import_react10.default.createElement(headerGroupCellComp_default,{ctrl:y,key:y.instanceId});case import_ag_grid_community9.HeaderRowType.FLOATING_FILTER:return import_react10.default.createElement(headerFilterCellComp_default,{ctrl:y,key:y.instanceId});default:return import_react10.default.createElement(headerCellComp_default,{ctrl:y,key:y.instanceId})}},[]);return import_react10.default.createElement("div",{ref:u,className:d,role:"row",style:h,"aria-rowindex":s},v.map(R))},headerRowComp_default=(0,import_react10.memo)(HeaderRowComp),HeaderRowContainerComp=({pinned:e})=>{const[t,r]=(0,import_react11.useState)(!0),[n,s]=(0,import_react11.useState)([]),{context:d}=(0,import_react11.useContext)(BeansContext),c=(0,import_react11.useRef)(null),o=(0,import_react11.useRef)(null),l=(0,import_react11.useRef)(),a=e==="left",i=e==="right",C=!a&&!i,v=(0,import_react11.useCallback)(f=>{if(c.current=f,l.current=f?d.createBean(new import_ag_grid_community10.HeaderRowContainerCtrl(e)):d.destroyBean(l.current),!f)return;const u={setDisplayed:r,setCtrls:h=>s(h),setCenterWidth:h=>{o.current&&(o.current.style.width=h)},setViewportScrollLeft:h=>{c.current&&(c.current.scrollLeft=h)},setPinnedContainerWidth:h=>{c.current&&(c.current.style.width=h,c.current.style.minWidth=h,c.current.style.maxWidth=h)}};l.current.setComp(u,c.current)},[]),g=t?"":"ag-hidden",p=()=>n.map(f=>import_react11.default.createElement(headerRowComp_default,{ctrl:f,key:f.instanceId}));return import_react11.default.createElement(import_react11.default.Fragment,null,a&&import_react11.default.createElement("div",{ref:v,className:"ag-pinned-left-header "+g,"aria-hidden":!t,role:"rowgroup"},p()),i&&import_react11.default.createElement("div",{ref:v,className:"ag-pinned-right-header "+g,"aria-hidden":!t,role:"rowgroup"},p()),C&&import_react11.default.createElement("div",{ref:v,className:"ag-header-viewport "+g,role:"presentation"},import_react11.default.createElement("div",{ref:o,className:"ag-header-container",role:"rowgroup"},p())))},headerRowContainerComp_default=(0,import_react11.memo)(HeaderRowContainerComp),GridHeaderComp=()=>{const[e,t]=(0,import_react12.useState)(()=>new CssClasses),[r,n]=(0,import_react12.useState)(),{context:s}=(0,import_react12.useContext)(BeansContext),d=(0,import_react12.useRef)(null),c=(0,import_react12.useRef)(),o=(0,import_react12.useCallback)(i=>{if(d.current=i,c.current=i?s.createBean(new import_ag_grid_community11.GridHeaderCtrl):s.destroyBean(c.current),!i)return;const C={addOrRemoveCssClass:(v,g)=>t(p=>p.setClass(v,g)),setHeightAndMinHeight:v=>n(v)};c.current.setComp(C,i,i)},[]),l=(0,import_react12.useMemo)(()=>"ag-header "+e.toString(),[e]),a=(0,import_react12.useMemo)(()=>({height:r,minHeight:r}),[r]);return import_react12.default.createElement("div",{ref:o,className:l,style:a,role:"presentation"},import_react12.default.createElement(headerRowContainerComp_default,{pinned:"left"}),import_react12.default.createElement(headerRowContainerComp_default,{pinned:null}),import_react12.default.createElement(headerRowContainerComp_default,{pinned:"right"}))},gridHeaderComp_default=(0,import_react12.memo)(GridHeaderComp),import_react13=require("react"),useReactCommentEffect=(e,t)=>{(0,import_react13.useEffect)(()=>{const r=t.current;if(r){const n=r.parentElement;if(n){const s=document.createComment(e);return n.insertBefore(s,r),()=>{n.removeChild(s)}}}},[e])},reactComment_default=useReactCommentEffect,import_ag_grid_community15=require("ag-grid-community"),import_react19=__toESM(require("react")),import_ag_grid_community14=require("ag-grid-community"),import_react18=__toESM(require("react")),import_ag_grid_community13=require("ag-grid-community"),import_react17=__toESM(require("react")),import_ag_grid_community12=require("ag-grid-community"),CellEditorComponentProxy=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new import_ag_grid_community12.AgPromise(r=>{this.resolveInstanceCreated=r}),this.onValueChange=r=>this.updateValue(r),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){addOptionalMethods(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"]}updateValue(e){this.value=e,this.refreshProps()}},import_react15=__toESM(require("react")),import_react_dom3=require("react-dom"),import_react14=require("react"),useEffectOnce=e=>{const t=(0,import_react14.useRef)(e),r=(0,import_react14.useRef)(),n=(0,import_react14.useRef)(!1),s=(0,import_react14.useRef)(!1),[,d]=(0,import_react14.useState)(0);n.current&&(s.current=!0),(0,import_react14.useEffect)(()=>(n.current||(r.current=t.current(),n.current=!0),d(c=>c+1),()=>{s.current&&r.current?.()}),[])},PopupEditorComp=e=>{const[t,r]=(0,import_react15.useState)(),{context:n,popupService:s,localeService:d,gos:c,editService:o}=(0,import_react15.useContext)(BeansContext);return useEffectOnce(()=>{const{editDetails:l,cellCtrl:a,eParentCell:i}=e,{compDetails:C}=l,v=c.get("stopEditingWhenCellsLoseFocus"),g=n.createBean(o.createPopupEditorWrapper(C.params)),p=g.getGui();if(e.jsChildComp){const w=e.jsChildComp.getGui();w&&p.appendChild(w)}const f={column:a.getColumn(),rowNode:a.getRowNode(),type:"popupCellEditor",eventSource:i,ePopup:p,position:l.popupPosition,keepWithinBounds:!0},u=s.positionPopupByComponent.bind(s,f),h=d.getLocaleTextFunc(),R=s.addPopup({modal:v,eChild:p,closeOnEsc:!0,closedCallback:()=>{a.onPopupEditorClosed()},anchorToElement:i,positionCallback:u,ariaLabel:h("ariaLabelCellEditor","Cell Editor")}),y=R?R.hideFunc:void 0;return r(g),e.jsChildComp?.afterGuiAttached?.(),()=>{y?.(),n.destroyBean(g)}}),import_react15.default.createElement(import_react15.default.Fragment,null,t&&e.wrappedContent&&(0,import_react_dom3.createPortal)(e.wrappedContent,t.getGui()))},popupEditorComp_default=(0,import_react15.memo)(PopupEditorComp),import_react16=require("react"),useJsCellRenderer=(e,t,r,n,s,d)=>{const{context:c}=(0,import_react16.useContext)(BeansContext),o=(0,import_react16.useCallback)(()=>{const l=s.current;if(!l)return;const a=l.getGui();a&&a.parentElement&&a.parentElement.removeChild(a),c.destroyBean(l),s.current=void 0},[]);(0,import_react16.useEffect)(()=>{const l=e!=null,a=e?.compDetails&&!e.compDetails.componentFromFramework,i=t&&r==null;if(!(l&&a&&!i)){o();return}const v=e.compDetails;if(s.current){const p=s.current,u=p.refresh!=null&&e.force==!1?p.refresh(v.params):!1;if(u===!0||u===void 0)return;o()}const g=v.newAgStackInstance();g?.then(p=>{if(!p)return;const f=p.getGui();if(!f)return;(t?r:d.current).appendChild(f),s.current=p})},[e,t,n]),(0,import_react16.useEffect)(()=>o,[])},showJsRenderer_default=useJsCellRenderer,jsxEditorProxy=(e,t,r)=>{const{compProxy:n}=e;r(n);const s=n.getProps(),d=isComponentStateless(t);return import_react17.default.createElement(CustomContext.Provider,{value:{setMethods:c=>n.setMethods(c)}},d?import_react17.default.createElement(t,{...s}):import_react17.default.createElement(t,{...s,ref:c=>n.setRef(c)}))},jsxEditor=(e,t,r)=>{const n=e.compProxy;return import_react17.default.createElement(import_react17.default.Fragment,null,n?jsxEditorProxy(e,t,r):import_react17.default.createElement(t,{...e.compDetails.params,ref:r}))},jsxEditValue=(e,t,r,n,s)=>{const d=e.compDetails,c=d.componentClass,o=d.componentFromFramework&&!e.popup,l=d.componentFromFramework&&e.popup,a=!d.componentFromFramework&&e.popup;return import_react17.default.createElement(import_react17.default.Fragment,null,o&&jsxEditor(e,c,t),l&&import_react17.default.createElement(popupEditorComp_default,{editDetails:e,cellCtrl:n,eParentCell:r,wrappedContent:jsxEditor(e,c,t)}),a&&s&&import_react17.default.createElement(popupEditorComp_default,{editDetails:e,cellCtrl:n,eParentCell:r,jsChildComp:s}))},jsxShowValue=(e,t,r,n,s,d,c)=>{const{compDetails:o,value:l}=e,a=!o,i=o&&o.componentFromFramework,C=o&&o.componentClass,v=l?.toString?l.toString():l,g=()=>import_react17.default.createElement(import_react17.default.Fragment,null,a&&import_react17.default.createElement(import_react17.default.Fragment,null,v),i&&!d&&import_react17.default.createElement(C,{...o.params,key:t,ref:n}),i&&d&&import_react17.default.createElement(C,{...o.params,key:t}));return import_react17.default.createElement(import_react17.default.Fragment,null,s?import_react17.default.createElement("span",{role:"presentation",id:`cell-${r}`,className:"ag-cell-value",ref:c},g()):g())},CellComp=({cellCtrl:e,printLayout:t,editingRow:r})=>{const{context:n}=(0,import_react17.useContext)(BeansContext),{colIdSanitised:s,instanceId:d}=e,c=(0,import_react17.useRef)(),[o,l]=(0,import_react17.useState)(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[a,i]=(0,import_react17.useState)(),[C,v]=(0,import_react17.useState)(1),[g,p]=(0,import_react17.useState)(),[f,u]=(0,import_react17.useState)(!1),[h,R]=(0,import_react17.useState)(!1),[y,w]=(0,import_react17.useState)(!1),[b,I]=(0,import_react17.useState)(),E=(0,import_react17.useMemo)(()=>e.isForceWrapper(),[e]),M=(0,import_react17.useMemo)(()=>e.getCellAriaRole(),[e]),F=(0,import_react17.useRef)(null),m=(0,import_react17.useRef)(null),S=(0,import_react17.useRef)(),k=(0,import_react17.useRef)(),z=(0,import_react17.useRef)(),O=(0,import_react17.useRef)([]),N=(0,import_react17.useRef)(),[_,G]=(0,import_react17.useState)(0),B=(0,import_react17.useCallback)(T=>{N.current=T,G(j=>j+1)},[]),H=o!=null&&(f||y||h),A=E||H,W=(0,import_react17.useCallback)(T=>{if(k.current=T,T){const j=T.isCancelBeforeStart&&T.isCancelBeforeStart();setTimeout(()=>{j?(e.stopEditing(!0),e.focusCell(!0)):e.cellEditorAttached()})}},[e]),D=(0,import_react17.useRef)();D.current||(D.current=new import_ag_grid_community13.CssClassManager(()=>F.current)),showJsRenderer_default(o,A,N.current,_,S,F);const Q=(0,import_react17.useRef)();(0,import_react17.useLayoutEffect)(()=>{const T=Q.current,j=o;if(Q.current=o,T==null||T.compDetails==null||j==null||j.compDetails==null)return;const $=T.compDetails,x=j.compDetails;if($.componentClass!=x.componentClass||m.current?.refresh==null)return;m.current.refresh(x.params)!=!0&&v(J=>J+1)},[o]),(0,import_react17.useLayoutEffect)(()=>{if(!(a&&!a.compDetails.componentFromFramework))return;const j=a.compDetails,$=a.popup===!0,x=j.newAgStackInstance();return x.then(L=>{if(!L)return;const J=L.getGui();W(L),$||((E?z:F).current?.appendChild(J),L.afterGuiAttached&&L.afterGuiAttached()),I(L)}),()=>{x.then(L=>{const J=L.getGui();n.destroyBean(L),W(void 0),I(void 0),J?.parentElement?.removeChild(J)})}},[a]);const P=(0,import_react17.useCallback)(T=>{if(z.current=T,!T){O.current.forEach($=>$()),O.current=[];return}const j=$=>{if($){const x=$.getGui();T.insertAdjacentElement("afterbegin",x),O.current.push(()=>{n.destroyBean($),(0,import_ag_grid_community13._removeFromParent)(x)})}return $};if(f){const $=e.createSelectionCheckbox();j($)}y&&j(e.createDndSource()),h&&j(e.createRowDragComp())},[e,n,y,h,f]),V=(0,import_react17.useCallback)(T=>{if(F.current=T,c.current=T?n.createBean(new import_ag_grid_community13._EmptyBean):n.destroyBean(c.current),!T||!e)return;const j={addOrRemoveCssClass:(x,L)=>D.current.addOrRemoveCssClass(x,L),setUserStyles:x=>p(x),getFocusableElement:()=>F.current,setIncludeSelection:x=>u(x),setIncludeRowDrag:x=>R(x),setIncludeDndSource:x=>w(x),getCellEditor:()=>k.current||null,getCellRenderer:()=>m.current??S.current,getParentOfValue:()=>N.current??z.current??F.current,setRenderDetails:(x,L,J)=>{l(X=>X?.compDetails!==x||X?.value!==L||X?.force!==J?{value:L,compDetails:x,force:J}:X)},setEditDetails:(x,L,J,X)=>{if(x){let te;X?te=new CellEditorComponentProxy(x.params,()=>v(oe=>oe+1)):x.componentFromFramework&&warnReactiveCustomComponents(),i({compDetails:x,popup:L,popupPosition:J,compProxy:te}),L||l(void 0)}else i(te=>{te?.compProxy&&(k.current=void 0)})}},$=z.current||void 0;e.setComp(j,T,$,t,r,c.current)},[]),U=(0,import_react17.useMemo)(()=>!!(o?.compDetails?.componentFromFramework&&isComponentStateless(o.compDetails.componentClass)),[o]);(0,import_react17.useLayoutEffect)(()=>{F.current&&(D.current.addOrRemoveCssClass("ag-cell-value",!A),D.current.addOrRemoveCssClass("ag-cell-inline-editing",!!a&&!a.popup),D.current.addOrRemoveCssClass("ag-cell-popup-editing",!!a&&!!a.popup),D.current.addOrRemoveCssClass("ag-cell-not-inline-editing",!a||!!a.popup),e.getRowCtrl()?.setInlineEditingCss(),e.shouldRestoreFocus()&&!e.isEditing()&&F.current.focus({preventScroll:!0}))});const Y=()=>import_react17.default.createElement(import_react17.default.Fragment,null,o!=null&&jsxShowValue(o,C,d,m,A,U,B),a!=null&&jsxEditValue(a,W,F.current,e,b)),ee=(0,import_react17.useCallback)(()=>e.onFocusOut(),[]);return import_react17.default.createElement("div",{ref:V,style:g,role:M,"col-id":s,onBlur:ee},A?import_react17.default.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:P},Y()):Y())},cellComp_default=(0,import_react17.memo)(CellComp),RowComp=({rowCtrl:e,containerType:t})=>{const{context:r,gos:n}=(0,import_react18.useContext)(BeansContext),s=(0,import_react18.useRef)(),d=(0,import_react18.useRef)(e.getDomOrder()),c=e.isFullWidth(),o=e.getRowNode().displayed,[l,a]=(0,import_react18.useState)(()=>o?e.getRowIndex():null),[i,C]=(0,import_react18.useState)(()=>e.getRowId()),[v,g]=(0,import_react18.useState)(()=>e.getBusinessKey()),[p,f]=(0,import_react18.useState)(()=>e.getRowStyles()),u=(0,import_react18.useRef)(null),h=(0,import_react18.useRef)(null),[R,y]=(0,import_react18.useState)(()=>null),[w,b]=(0,import_react18.useState)(),[I,E]=(0,import_react18.useState)(()=>o?e.getInitialRowTop(t):void 0),[M,F]=(0,import_react18.useState)(()=>o?e.getInitialTransform(t):void 0),m=(0,import_react18.useRef)(null),S=(0,import_react18.useRef)(),k=(0,import_react18.useRef)(!1),[z,O]=(0,import_react18.useState)(0);(0,import_react18.useEffect)(()=>{if(k.current||!w||z>10)return;const P=m.current?.firstChild;P?(e.setupDetailRowAutoHeight(P),k.current=!0):O(V=>V+1)},[w,z]);const N=(0,import_react18.useRef)();N.current||(N.current=new import_ag_grid_community14.CssClassManager(()=>m.current));const _=(0,import_react18.useCallback)(P=>{if(m.current=P,s.current=P?r.createBean(new import_ag_grid_community14._EmptyBean):r.destroyBean(s.current),!P){e.unsetComp(t);return}if(!e.isAlive())return;const V={setTop:E,setTransform:F,addOrRemoveCssClass:(U,Y)=>N.current.addOrRemoveCssClass(U,Y),setDomOrder:U=>d.current=U,setRowIndex:a,setRowId:C,setRowBusinessKey:g,setUserStyles:f,setCellCtrls:(U,Y)=>{h.current=u.current,u.current=U;const ee=getNextValueIfDifferent(h.current,U,d.current);ee!==h.current&&agFlushSync(Y,()=>y(ee))},showFullWidth:U=>b(U),getFullWidthCellRenderer:()=>S.current,refreshFullWidth:U=>W.current?(b(Y=>({...Y,params:U()})),!0):!S.current||!S.current.refresh?!1:S.current.refresh(U())};e.setComp(V,P,t,s.current)},[]);(0,import_react18.useLayoutEffect)(()=>showJsComp(w,r,m.current,S),[w]);const G=(0,import_react18.useMemo)(()=>{const P={top:I,transform:M};return Object.assign(P,p),P},[I,M,p]),B=c&&w?.componentFromFramework,H=!c&&R!=null,A=(0,import_react18.useMemo)(()=>!!(w?.componentFromFramework&&isComponentStateless(w.componentClass)),[w]),W=(0,import_react18.useRef)(!1);(0,import_react18.useEffect)(()=>{W.current=A&&!!w&&!!n.get("reactiveCustomComponents")},[A,w]);const D=()=>R?.map(P=>import_react18.default.createElement(cellComp_default,{cellCtrl:P,editingRow:e.isEditing(),printLayout:e.isPrintLayout(),key:P.instanceId})),Q=()=>{const P=w.componentClass;return import_react18.default.createElement(import_react18.default.Fragment,null,A?import_react18.default.createElement(P,{...w.params}):import_react18.default.createElement(P,{...w.params,ref:S}))};return import_react18.default.createElement("div",{ref:_,role:"row",style:G,"row-index":l,"row-id":i,"row-business-key":v},H&&D(),B&&Q())},rowComp_default=(0,import_react18.memo)(RowComp),RowContainerComp=({name:e})=>{const{context:t}=(0,import_react19.useContext)(BeansContext),r=(0,import_react19.useMemo)(()=>(0,import_ag_grid_community15._getRowContainerOptions)(e),[e]),n=(0,import_react19.useRef)(null),s=(0,import_react19.useRef)(null),d=(0,import_react19.useRef)([]),c=(0,import_react19.useRef)([]),[o,l]=(0,import_react19.useState)(()=>[]),a=(0,import_react19.useRef)(!1),i=(0,import_react19.useRef)(),C=(0,import_react19.useMemo)(()=>classesList(r.viewport),[r]),v=(0,import_react19.useMemo)(()=>classesList(r.container),[r]),g=r.type==="center",p=g?n:s;reactComment_default(" AG Row Container "+e+" ",p);const f=(0,import_react19.useCallback)(()=>g?n.current!=null&&s.current!=null:s.current!=null,[]),u=(0,import_react19.useCallback)(()=>g?n.current==null&&s.current==null:s.current==null,[]),h=(0,import_react19.useCallback)(()=>{if(u()&&(i.current=t.destroyBean(i.current)),f()){const b=E=>{const M=getNextValueIfDifferent(c.current,d.current,a.current);M!==c.current&&(c.current=M,agFlushSync(E,()=>l(M)))},I={setHorizontalScroll:E=>{n.current&&(n.current.scrollLeft=E)},setViewportHeight:E=>{n.current&&(n.current.style.height=E)},setRowCtrls:({rowCtrls:E,useFlushSync:M})=>{const F=!!M&&d.current.length>0&&E.length>0;d.current=E,b(F)},setDomOrder:E=>{a.current!=E&&(a.current=E,b(!1))},setContainerWidth:E=>{s.current&&(s.current.style.width=E)},setOffsetTop:E=>{s.current&&(s.current.style.transform=`translateY(${E})`)}};i.current=t.createBean(new import_ag_grid_community15.RowContainerCtrl(e)),i.current.setComp(I,s.current,n.current)}},[f,u]),R=(0,import_react19.useCallback)(b=>{s.current=b,h()},[h]),y=(0,import_react19.useCallback)(b=>{n.current=b,h()},[h]),w=()=>import_react19.default.createElement("div",{className:v,ref:R,role:"rowgroup"},o.map(b=>import_react19.default.createElement(rowComp_default,{rowCtrl:b,containerType:r.type,key:b.instanceId})));return import_react19.default.createElement(import_react19.default.Fragment,null,g?import_react19.default.createElement("div",{className:C,ref:y,role:"presentation"},w()):w())},rowContainerComp_default=(0,import_react19.memo)(RowContainerComp),GridBodyComp=()=>{const{context:e,resizeObserverService:t}=(0,import_react20.useContext)(BeansContext),[r,n]=(0,import_react20.useState)(""),[s,d]=(0,import_react20.useState)(0),[c,o]=(0,import_react20.useState)(0),[l,a]=(0,import_react20.useState)("0px"),[i,C]=(0,import_react20.useState)("0px"),[v,g]=(0,import_react20.useState)("100%"),[p,f]=(0,import_react20.useState)("0px"),[u,h]=(0,import_react20.useState)("0px"),[R,y]=(0,import_react20.useState)("100%"),[w,b]=(0,import_react20.useState)(""),[I,E]=(0,import_react20.useState)(""),[M,F]=(0,import_react20.useState)(null),[m,S]=(0,import_react20.useState)(""),[k,z]=(0,import_react20.useState)(null),[O,N]=(0,import_react20.useState)("ag-layout-normal"),_=(0,import_react20.useRef)();_.current||(_.current=new import_ag_grid_community16.CssClassManager(()=>G.current));const G=(0,import_react20.useRef)(null),B=(0,import_react20.useRef)(null),H=(0,import_react20.useRef)(null),A=(0,import_react20.useRef)(null),W=(0,import_react20.useRef)(null),D=(0,import_react20.useRef)(null),Q=(0,import_react20.useRef)(null),P=(0,import_react20.useRef)([]),V=(0,import_react20.useRef)([]);reactComment_default(" AG Grid Body ",G),reactComment_default(" AG Pinned Top ",B),reactComment_default(" AG Sticky Top ",H),reactComment_default(" AG Middle ",D),reactComment_default(" AG Pinned Bottom ",Q);const U=(0,import_react20.useCallback)(Z=>{if(G.current=Z,!Z){P.current=e.destroyBeans(P.current),V.current.forEach(q=>q()),V.current=[];return}if(!e)return;const ne=(q,K)=>{q.appendChild(K),V.current.push(()=>q.removeChild(K))},ae=q=>{const K=e.createBean(new q);return P.current.push(K),K},se=(q,K,de)=>{ne(q,document.createComment(de)),ne(q,ae(K).getGui())};se(Z,import_ag_grid_community16.FakeHScrollComp," AG Fake Horizontal Scroll "),se(Z,import_ag_grid_community16.OverlayWrapperComponent," AG Overlay Wrapper "),W.current&&se(W.current,import_ag_grid_community16.FakeVScrollComp," AG Fake Vertical Scroll ");const le={setRowAnimationCssOnBodyViewport:n,setColumnCount:q=>{G.current&&(0,import_ag_grid_community16._setAriaColCount)(G.current,q)},setRowCount:q=>{G.current&&(0,import_ag_grid_community16._setAriaRowCount)(G.current,q)},setTopHeight:d,setBottomHeight:o,setStickyTopHeight:a,setStickyTopTop:C,setStickyTopWidth:g,setTopDisplay:b,setBottomDisplay:E,setColumnMovingCss:(q,K)=>_.current.addOrRemoveCssClass(q,K),updateLayoutClasses:N,setAlwaysVerticalScrollClass:F,setPinnedTopBottomOverflowY:S,setCellSelectableCss:(q,K)=>z(K?q:null),setBodyViewportWidth:q=>{D.current&&(D.current.style.width=q)},registerBodyViewportResizeListener:q=>{if(D.current){const K=t.observeResize(D.current,q);V.current.push(()=>K())}},setStickyBottomHeight:f,setStickyBottomBottom:h,setStickyBottomWidth:y},ce=e.createBean(new import_ag_grid_community16.GridBodyCtrl);P.current.push(ce),ce.setComp(le,Z,D.current,B.current,Q.current,H.current,A.current)},[]),Y=(0,import_react20.useMemo)(()=>classesList("ag-root","ag-unselectable",O),[O]),ee=(0,import_react20.useMemo)(()=>classesList("ag-body-viewport",r,O,M,k),[r,O,M,k]),T=(0,import_react20.useMemo)(()=>classesList("ag-body",O),[O]),j=(0,import_react20.useMemo)(()=>classesList("ag-floating-top",k),[k]),$=(0,import_react20.useMemo)(()=>classesList("ag-sticky-top",k),[k]),x=(0,import_react20.useMemo)(()=>classesList("ag-sticky-bottom",p==="0px"?"ag-hidden":null,k),[k,p]),L=(0,import_react20.useMemo)(()=>classesList("ag-floating-bottom",k),[k]),J=(0,import_react20.useMemo)(()=>({height:s,minHeight:s,display:w,overflowY:m}),[s,w,m]),X=(0,import_react20.useMemo)(()=>({height:l,top:i,width:v}),[l,i,v]),te=(0,import_react20.useMemo)(()=>({height:p,bottom:u,width:R}),[p,u,R]),oe=(0,import_react20.useMemo)(()=>({height:c,minHeight:c,display:I,overflowY:m}),[c,I,m]),ue=Z=>import_react20.default.createElement(rowContainerComp_default,{name:Z,key:`${Z}-container`}),re=({section:Z,children:ne,className:ae,style:se})=>import_react20.default.createElement("div",{ref:Z,className:ae,role:"presentation",style:se},ne.map(ue));return import_react20.default.createElement("div",{ref:U,className:Y,role:"treegrid"},import_react20.default.createElement(gridHeaderComp_default,null),re({section:B,className:j,style:J,children:["topLeft","topCenter","topRight","topFullWidth"]}),import_react20.default.createElement("div",{className:T,ref:W,role:"presentation"},re({section:D,className:ee,children:["left","center","right","fullWidth"]})),re({section:H,className:$,style:X,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),re({section:A,className:x,style:te,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),re({section:Q,className:L,style:oe,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},gridBodyComp_default=(0,import_react20.memo)(GridBodyComp),import_ag_grid_community17=require("ag-grid-community"),import_react21=__toESM(require("react")),TabGuardCompRef=(e,t)=>{const{children:r,eFocusableElement:n,onTabKeyDown:s,gridCtrl:d,forceFocusOutWhenTabGuardsAreEmpty:c}=e,{context:o}=(0,import_react21.useContext)(BeansContext),l=(0,import_react21.useRef)(null),a=(0,import_react21.useRef)(null),i=(0,import_react21.useRef)(),C=u=>{const h=u==null?void 0:parseInt(u,10).toString();[l,a].forEach(R=>{h===void 0?R.current?.removeAttribute("tabindex"):R.current?.setAttribute("tabindex",h)})};(0,import_react21.useImperativeHandle)(t,()=>({forceFocusOutOfContainer(u){i.current?.forceFocusOutOfContainer(u)}}));const v=(0,import_react21.useCallback)(()=>{const u=l.current,h=a.current;if(!u&&!h){i.current=o.destroyBean(i.current);return}if(u&&h){const R={setTabIndex:C};i.current=o.createBean(new import_ag_grid_community17.TabGuardCtrl({comp:R,eTopGuard:u,eBottomGuard:h,eFocusableElement:n,onTabKeyDown:s,forceFocusOutWhenTabGuardsAreEmpty:c,focusInnerElement:y=>d.focusInnerElement(y)}))}},[]),g=(0,import_react21.useCallback)(u=>{l.current=u,v()},[v]),p=(0,import_react21.useCallback)(u=>{a.current=u,v()},[v]),f=u=>{const h=u==="top"?import_ag_grid_community17.TabGuardClassNames.TAB_GUARD_TOP:import_ag_grid_community17.TabGuardClassNames.TAB_GUARD_BOTTOM;return import_react21.default.createElement("div",{className:`${import_ag_grid_community17.TabGuardClassNames.TAB_GUARD} ${h}`,role:"presentation",ref:u==="top"?g:p})};return import_react21.default.createElement(import_react21.default.Fragment,null,f("top"),r,f("bottom"))},TabGuardComp=(0,import_react21.forwardRef)(TabGuardCompRef),tabGuardComp_default=(0,import_react21.memo)(TabGuardComp),GridComp=({context:e})=>{const[t,r]=(0,import_react22.useState)(""),[n,s]=(0,import_react22.useState)(""),[d,c]=(0,import_react22.useState)(""),[o,l]=(0,import_react22.useState)(null),[a,i]=(0,import_react22.useState)(null),[C,v]=(0,import_react22.useState)(!1),[g,p]=(0,import_react22.useState)(),f=(0,import_react22.useRef)(),u=(0,import_react22.useRef)(null),h=(0,import_react22.useRef)(),[R,y]=(0,import_react22.useState)(null),w=(0,import_react22.useRef)(()=>{}),b=(0,import_react22.useRef)(),I=(0,import_react22.useRef)([]),E=(0,import_react22.useCallback)(()=>{},[]),M=(0,import_react22.useMemo)(()=>e.isDestroyed()?null:e.getBeans(),[e]);reactComment_default(" AG Grid ",u);const F=(0,import_react22.useCallback)(O=>{if(u.current=O,f.current=O?e.createBean(new import_ag_grid_community18.GridCtrl):e.destroyBean(f.current),!O||e.isDestroyed())return;const N=f.current;w.current=N.focusInnerElement.bind(N);const _={destroyGridUi:()=>{},setRtlClass:r,setGridThemeClass:s,forceFocusOutOfContainer:G=>{if(!G&&b.current?.isDisplayed()){b.current.forceFocusOutOfContainer(G);return}h.current?.forceFocusOutOfContainer(G)},updateLayoutClasses:c,getFocusableContainers:()=>{const G=[],B=u.current?.querySelector(".ag-root");return B&&G.push({getGui:()=>B}),I.current.forEach(H=>{H.isDisplayed()&&G.push(H)}),G},setCursor:l,setUserSelect:i};N.setComp(_,O,O),v(!0)},[]);(0,import_react22.useEffect)(()=>{const O=f.current,N=u.current;if(!g||!M||!O||!R||!N)return;const _=[],{watermarkSelector:G,paginationSelector:B,sideBarSelector:H,statusBarSelector:A,gridHeaderDropZonesSelector:W}=O.getOptionalSelectors(),D=[];if(W){const P=e.createBean(new W.component),V=P.getGui();N.insertAdjacentElement("afterbegin",V),D.push(V),_.push(P)}if(H){const P=e.createBean(new H.component),V=P.getGui(),U=R.querySelector(".ag-tab-guard-bottom");U&&(U.insertAdjacentElement("beforebegin",V),D.push(V)),_.push(P),I.current.push(P)}const Q=P=>{const V=e.createBean(new P),U=V.getGui();return N.insertAdjacentElement("beforeend",U),D.push(U),_.push(V),V};if(A&&Q(A.component),B){const P=Q(B.component);b.current=P,I.current.push(P)}return G&&Q(G.component),()=>{e.destroyBeans(_),D.forEach(P=>{P.parentElement?.removeChild(P)})}},[g,R,M]);const m=(0,import_react22.useMemo)(()=>classesList("ag-root-wrapper",t,n,d),[t,n,d]),S=(0,import_react22.useMemo)(()=>classesList("ag-root-wrapper-body","ag-focus-managed",d),[d]),k=(0,import_react22.useMemo)(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:o??""}),[a,o]),z=(0,import_react22.useCallback)(O=>{h.current=O,p(O!==null)},[]);return import_react22.default.createElement("div",{ref:F,className:m,style:k,role:"presentation"},import_react22.default.createElement("div",{className:S,ref:y,role:"presentation"},C&&R&&M&&import_react22.default.createElement(BeansContext.Provider,{value:M},import_react22.default.createElement(tabGuardComp_default,{ref:z,eFocusableElement:R,onTabKeyDown:E,gridCtrl:f.current,forceFocusOutWhenTabGuardsAreEmpty:!0},import_react22.default.createElement(gridBodyComp_default,null)))))},gridComp_default=(0,import_react22.memo)(GridComp),import_ag_grid_community19=require("ag-grid-community"),RenderStatusService=class extends import_ag_grid_community19.BeanStub{wireBeans(e){this.ctrlsService=e.ctrlsService}areHeaderCellsRendered(){return this.ctrlsService.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(t=>t.areCellsRendered()))}},AgGridReactUi=e=>{const t=(0,import_react23.useRef)(),r=(0,import_react23.useRef)(null),n=(0,import_react23.useRef)(null),s=(0,import_react23.useRef)([]),d=(0,import_react23.useRef)([]),c=(0,import_react23.useRef)(e),o=(0,import_react23.useRef)(),l=(0,import_react23.useRef)(),a=(0,import_react23.useRef)(!1),[i,C]=(0,import_react23.useState)(void 0),[,v]=(0,import_react23.useState)(0),g=(0,import_react23.useCallback)(u=>{if(r.current=u,!u){s.current.forEach(m=>m()),s.current.length=0;return}const h=e.modules||[];n.current||(n.current=new PortalManager(()=>v(m=>m+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),s.current.push(()=>{n.current?.destroy(),n.current=null}));const R=(0,import_ag_grid_community20._combineAttributesAndGridOptions)(e.gridOptions,e),y=()=>{if(a.current){const m=()=>o.current?.shouldQueueUpdates()?void 0:d.current.shift();let S=m();for(;S;)S(),S=m()}},w=new ReactFrameworkOverrides(y);o.current=w;const b=new RenderStatusService,I={providedBeanInstances:{frameworkComponentWrapper:new ReactFrameworkComponentWrapper(n.current,R.reactiveCustomComponents??(0,import_ag_grid_community20._getGlobalGridOption)("reactiveCustomComponents")??!0),renderStatusService:b},modules:h,frameworkOverrides:w},E=m=>{C(m),m.createBean(b),s.current.push(()=>{m.destroy()}),m.getBean("ctrlsService").whenReady({addDestroyFunc:S=>{s.current.push(S)}},()=>{if(m.isDestroyed())return;const S=t.current;S&&e.setGridApi?.(S)})},M=m=>{m.getBean("ctrlsService").whenReady({addDestroyFunc:S=>{s.current.push(S)}},()=>{d.current.forEach(S=>S()),d.current.length=0,a.current=!0})},F=new import_ag_grid_community20.GridCoreCreator;R.gridId??(R.gridId=l.current),t.current=F.create(u,R,E,M,I),s.current.push(()=>{t.current=void 0}),l.current=t.current.getGridId()},[]),p=(0,import_react23.useMemo)(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),f=(0,import_react23.useCallback)(u=>{a.current&&!o.current?.shouldQueueUpdates()?u():d.current.push(u)},[]);return(0,import_react23.useEffect)(()=>{const u=extractGridPropertyChanges(c.current,e);c.current=e,f(()=>{t.current&&(0,import_ag_grid_community20._processOnChange)(u,t.current)})},[e]),import_react23.default.createElement("div",{style:p,className:e.className,ref:g},i&&!i.isDestroyed()?import_react23.default.createElement(gridComp_default,{context:i}):null,n.current?.getPortals()??null)};function extractGridPropertyChanges(e,t){const r={};return Object.keys(t).forEach(n=>{const s=t[n];e[n]!==s&&(r[n]=s)}),r}var ReactFrameworkComponentWrapper=class extends import_ag_grid_community20.BaseComponentWrapper{constructor(e,t){super(),this.parent=e,this.reactiveCustomComponents=t}createWrapper(e,t){if(this.reactiveCustomComponents){const s=(d=>{switch(d){case"filter":return FilterComponentWrapper;case"floatingFilterComponent":return FloatingFilterComponentWrapper;case"dateComponent":return DateComponentWrapper;case"dragAndDropImageComponent":return DragAndDropImageComponentWrapper;case"loadingOverlayComponent":return LoadingOverlayComponentWrapper;case"noRowsOverlayComponent":return NoRowsOverlayComponentWrapper;case"statusPanel":return StatusPanelComponentWrapper;case"toolPanel":return ToolPanelComponentWrapper;case"menuItem":return MenuItemComponentWrapper;case"cellRenderer":return CellRendererComponentWrapper}})(t.propertyName);if(s)return new s(e,this.parent,t)}else switch(t.propertyName){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":warnReactiveCustomComponents();break}const r=!t.cellRenderer&&t.propertyName!=="toolPanel";return new ReactComponent(e,this.parent,t,r)}},DetailCellRenderer=(0,import_react23.forwardRef)((e,t)=>{const{ctrlsFactory:r,context:n,gos:s,resizeObserverService:d,rowModel:c}=(0,import_react23.useContext)(BeansContext),[o,l]=(0,import_react23.useState)(()=>new CssClasses),[a,i]=(0,import_react23.useState)(()=>new CssClasses),[C,v]=(0,import_react23.useState)(),[g,p]=(0,import_react23.useState)(),f=(0,import_react23.useRef)(),u=(0,import_react23.useRef)(null),h=(0,import_react23.useRef)(),R=(0,import_react23.useMemo)(()=>import_ag_grid_community20.ModuleRegistry.__getGridRegisteredModules(e.api.getGridId()),[e]),y=(0,import_react23.useMemo)(()=>o.toString()+" ag-details-row",[o]),w=(0,import_react23.useMemo)(()=>a.toString()+" ag-details-grid",[a]);t&&(0,import_react23.useImperativeHandle)(t,()=>({refresh(){return f.current?.refresh()??!1}})),e.template&&(0,import_ag_grid_community20._warnOnce)("detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://ag-grid.com/react-data-grid/master-detail-custom-detail/");const b=(0,import_react23.useCallback)(E=>{if(u.current=E,!E){f.current=n.destroyBean(f.current),h.current?.();return}const M={addOrRemoveCssClass:(m,S)=>l(k=>k.setClass(m,S)),addOrRemoveDetailGridCssClass:(m,S)=>i(k=>k.setClass(m,S)),setDetailGrid:m=>v(m),setRowData:m=>p(m),getGui:()=>u.current},F=r.getInstance("detailCellRenderer");if(F&&(n.createBean(F),F.init(M,e),f.current=F,s.get("detailRowAutoHeight"))){const m=()=>{if(u.current==null)return;const S=u.current.clientHeight;S!=null&&S>0&&setTimeout(()=>{e.node.setRowHeight(S),((0,import_ag_grid_community20._isClientSideRowModel)(s)||(0,import_ag_grid_community20._isServerSideRowModel)(s))&&c.onRowHeightChanged()},0)};h.current=d.observeResize(E,m),m()}},[]),I=(0,import_react23.useCallback)(E=>{f.current?.registerDetailWithMaster(E)},[]);return import_react23.default.createElement("div",{className:y,ref:b},C&&import_react23.default.createElement(AgGridReactUi,{className:w,...C,modules:R,rowData:g,setGridApi:I}))}),ReactFrameworkOverrides=class extends import_ag_grid_community20.VanillaFrameworkOverrides{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.frameworkComponents={agGroupCellRenderer:groupCellRenderer_default,agGroupRowRenderer:groupCellRenderer_default,agDetailCellRenderer:DetailCellRenderer},this.wrapIncoming=(t,r)=>r==="ensureVisible"?runWithoutFlushSync(t):t(),this.renderingEngine="react"}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 isReact19()}},AgGridReact=class extends import_react24.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e,this.apiListeners.forEach(t=>t(e))}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return import_react24.default.createElement(AgGridReactUi,{...this.props,setGridApi:this.setGridApi})}},import_react25=require("react");function useGridCustomComponent(e){const{setMethods:t}=(0,import_react25.useContext)(CustomContext);t(e)}function useGridCellEditor(e){useGridCustomComponent(e)}function useGridDate(e){return useGridCustomComponent(e)}function useGridFilter(e){return useGridCustomComponent(e)}function useGridFloatingFilter(e){useGridCustomComponent(e)}function useGridMenuItem(e){useGridCustomComponent(e)}
"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of __getOwnPropNames(t))!__hasOwnProp.call(e,s)&&s!==r&&__defProp(e,s,{get:()=>t[s],enumerable:!(n=__getOwnPropDesc(t,s))||n.enumerable});return e},__toESM=(e,t,r)=>(r=e!=null?__create(__getProtoOf(e)):{},__copyProps(t||!e||!e.__esModule?__defProp(r,"default",{value:e,enumerable:!0}):r,e)),__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),src_exports={};__export(src_exports,{AgGridReact:()=>AgGridReact,CustomComponentContext:()=>CustomContext,getInstance:()=>getInstance,useGridCellEditor:()=>useGridCellEditor,useGridDate:()=>useGridDate,useGridFilter:()=>useGridFilter,useGridFloatingFilter:()=>useGridFloatingFilter,useGridMenuItem:()=>useGridMenuItem,warnReactiveCustomComponents:()=>warnReactiveCustomComponents}),module.exports=__toCommonJS(src_exports);var import_react24=__toESM(require("react")),import_ag_grid_community20=require("ag-grid-community"),import_react23=__toESM(require("react")),import_ag_grid_community=require("ag-grid-community"),import_react3=__toESM(require("react")),import_react=__toESM(require("react")),BeansContext=import_react.default.createContext({}),showJsComp=(e,t,r,n)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const d=e.newAgStackInstance();if(d==null)return;let c,o,l=!1;return d.then(a=>{if(l){t.destroyBean(a);return}c=a,o=c.getGui(),r.appendChild(o),setRef(n,c)}),()=>{l=!0,c&&(o?.parentElement?.removeChild(o),t.destroyBean(c),n&&setRef(n,void 0))}},setRef=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const r=e;r.current=t}},import_react2=__toESM(require("react")),import_react_dom=__toESM(require("react-dom")),classesList=(...e)=>e.filter(r=>r!=null&&r!=="").join(" "),CssClasses=class ie{constructor(...t){this.classesMap={},t.forEach(r=>{this.classesMap[r]=!0})}setClass(t,r){if(!!this.classesMap[t]==r)return this;const s=new ie;return s.classesMap={...this.classesMap},s.classesMap[t]=r,s}toString(){return Object.keys(this.classesMap).filter(r=>this.classesMap[r]).join(" ")}},isComponentStateless=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,r=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===r()},reactVersion=import_react2.default.version?.split(".")[0],isReactVersion17Minus=reactVersion==="16"||reactVersion==="17";function isReact19(){return reactVersion==="19"}var disableFlushSync=!1;function runWithoutFlushSync(e){return disableFlushSync||setTimeout(()=>disableFlushSync=!1,0),disableFlushSync=!0,e()}var agFlushSync=(e,t)=>{!isReactVersion17Minus&&e&&!disableFlushSync?import_react_dom.default.flushSync(t):t()};function getNextValueIfDifferent(e,t,r){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(r||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const n=[],s=[],d=new Map,c=new Map;for(let o=0;o<t.length;o++){const l=t[o];c.set(l.instanceId,l)}for(let o=0;o<e.length;o++){const l=e[o];d.set(l.instanceId,l),c.has(l.instanceId)&&n.push(l)}for(let o=0;o<t.length;o++){const l=t[o],a=l.instanceId;d.has(a)||s.push(l)}return n.length===e.length&&s.length===0?e:n.length===0&&s.length===t.length?t:n.length===0?s:s.length===0?n:[...n,...s]}var GroupCellRenderer=(0,import_react3.forwardRef)((e,t)=>{const{ctrlsFactory:r,context:n}=(0,import_react3.useContext)(BeansContext),s=(0,import_react3.useRef)(null),d=(0,import_react3.useRef)(null),c=(0,import_react3.useRef)(null),o=(0,import_react3.useRef)(null),l=(0,import_react3.useRef)(null),a=(0,import_react3.useRef)(),[u,C]=(0,import_react3.useState)(),[R,y]=(0,import_react3.useState)(),[m,h]=(0,import_react3.useState)(),[i,f]=(0,import_react3.useState)(()=>new CssClasses),[w,v]=(0,import_react3.useState)(()=>new CssClasses("ag-hidden")),[S,b]=(0,import_react3.useState)(()=>new CssClasses("ag-hidden")),[x,E]=(0,import_react3.useState)(()=>new CssClasses("ag-invisible"));(0,import_react3.useImperativeHandle)(t,()=>({refresh(){return!1}})),(0,import_react3.useLayoutEffect)(()=>showJsComp(u,n,d.current),[u]);const M=(0,import_react3.useCallback)(G=>{if(s.current=G,!G){a.current=n.destroyBean(a.current);return}const B={setInnerRenderer:(A,W)=>{C(A),h(W)},setChildCount:A=>y(A),addOrRemoveCssClass:(A,W)=>f(D=>D.setClass(A,W)),setContractedDisplayed:A=>b(W=>W.setClass("ag-hidden",!A)),setExpandedDisplayed:A=>v(W=>W.setClass("ag-hidden",!A)),setCheckboxVisible:A=>E(W=>W.setClass("ag-invisible",!A))},H=r.getInstance("groupCellRendererCtrl");H&&(a.current=n.createBean(H),a.current.init(B,G,c.current,o.current,l.current,GroupCellRenderer,e))},[]),F=(0,import_react3.useMemo)(()=>`ag-cell-wrapper ${i.toString()}`,[i]),p=(0,import_react3.useMemo)(()=>`ag-group-expanded ${w.toString()}`,[w]),g=(0,import_react3.useMemo)(()=>`ag-group-contracted ${S.toString()}`,[S]),k=(0,import_react3.useMemo)(()=>`ag-group-checkbox ${x.toString()}`,[x]),z=u&&u.componentFromFramework,O=z?u.componentClass:void 0,N=u==null&&m!=null,_=(0,import_ag_grid_community._escapeString)(m,!0);return import_react3.default.createElement("span",{className:F,ref:M,...e.colDef?{}:{role:a.current?.getCellAriaRole()}},import_react3.default.createElement("span",{className:p,ref:o}),import_react3.default.createElement("span",{className:g,ref:l}),import_react3.default.createElement("span",{className:k,ref:c}),import_react3.default.createElement("span",{className:"ag-group-value",ref:d},N&&import_react3.default.createElement(import_react3.default.Fragment,null,_),z&&import_react3.default.createElement(O,{...u.params})),import_react3.default.createElement("span",{className:"ag-group-child-count"},R))}),groupCellRenderer_default=GroupCellRenderer,import_ag_grid_community3=require("ag-grid-community"),import_react5=__toESM(require("react")),import_react4=require("react"),CustomContext=(0,import_react4.createContext)({setMethods:()=>{}}),CustomWrapperComp=e=>{const{initialProps:t,addUpdateCallback:r,CustomComponentClass:n,setMethods:s}=e,[{key:d,...c},o]=(0,import_react5.useState)(t);return(0,import_react5.useEffect)(()=>{r(l=>o(l))},[]),import_react5.default.createElement(CustomContext.Provider,{value:{setMethods:s}},import_react5.default.createElement(n,{key:d,...c}))},customWrapperComp_default=(0,import_react5.memo)(CustomWrapperComp),import_ag_grid_community2=require("ag-grid-community"),import_react6=require("react"),import_react_dom2=require("react-dom"),counter=0;function generateNewKey(){return`agPortalKey_${++counter}`}var ReactComponent=class{constructor(e,t,r,n){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=r,this.suppressFallbackMethods=!!n,this.statelessComponent=this.isStateless(this.reactComponent),this.key=generateNewKey(),this.portalKey=generateNewKey(),this.instanceCreated=this.isStatelessComponent()?import_ag_grid_community2.AgPromise.resolve(!1):new import_ag_grid_community2.AgPromise(s=>{this.resolveInstanceCreated=s})}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(),r=document.createElement(t||"div");return r.classList.add("ag-react-container"),e.reactContainer=r,r}addParentContainerStyleAndClasses(){this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&((0,import_ag_grid_community2._warnOnce)('Since v31.1 "getReactContainerStyle" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),Object.assign(this.eParentElement.style,this.componentInstance.getReactContainerStyle())),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses()&&((0,import_ag_grid_community2._warnOnce)('Since v31.1 "getReactContainerClasses" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),this.componentInstance.getReactContainerClasses().forEach(t=>this.eParentElement.classList.add(t))))}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 r=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!r){setTimeout(()=>this.callMethod(e,t));return}const n=r[e];if(n)return n.apply(r,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 import_ag_grid_community2.AgPromise(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{this.componentInstance=t,this.addParentContainerStyleAndClasses(),this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=(0,import_react_dom2.createPortal)(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return(0,import_react6.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 r=this[`${e}Component`];if(!this.suppressFallbackMethods&&r)return r.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function addOptionalMethods(e,t,r){e.forEach(n=>{const s=t[n];s&&(r[n]=s)})}var CustomComponentWrapper=class extends ReactComponent{constructor(){super(...arguments),this.awaitUpdateCallback=new import_ag_grid_community3.AgPromise(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=customWrapperComp_default}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:r=>this.setMethods(r),addUpdateCallback:r=>{this.updateCallback=()=>(r(this.getProps()),new import_ag_grid_community3.AgPromise(n=>{setTimeout(()=>{n()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,addOptionalMethods(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new import_ag_grid_community3.AgPromise(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},CellRendererComponentWrapper=class extends CustomComponentWrapper{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},DateComponentWrapper=class extends CustomComponentWrapper{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}},DragAndDropImageComponentWrapper=class extends CustomComponentWrapper{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:r,shake:n}=this;return e.label=t,e.icon=r,e.shake=n,e}},FilterComponentWrapper=class extends CustomComponentWrapper{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterChangedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1}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}getOptionalMethods(){return["afterGuiAttached","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)}updateModel(e){this.setModel(e).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,delete e.filterModifiedCallback,delete e.valueGetter,e}},import_ag_grid_community4=require("ag-grid-community");function updateFloatingFilterParent(e,t){e.parentFilterInstance(r=>{(r.setModel(t)||import_ag_grid_community4.AgPromise.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var FloatingFilterComponentProxy=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=r=>this.updateModel(r)}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){addOptionalMethods(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),updateFloatingFilterParent(this.floatingFilterParams,e)}},FloatingFilterComponentWrapper=class extends CustomComponentWrapper{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(),updateFloatingFilterParent(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},LoadingOverlayComponentWrapper=class extends CustomComponentWrapper{refresh(e){this.sourceParams=e,this.refreshProps()}},MenuItemComponentWrapper=class extends CustomComponentWrapper{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}},NoRowsOverlayComponentWrapper=class extends CustomComponentWrapper{refresh(e){this.sourceParams=e,this.refreshProps()}},StatusPanelComponentWrapper=class extends CustomComponentWrapper{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},ToolPanelComponentWrapper=class extends CustomComponentWrapper{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}},import_ag_grid_community5=require("ag-grid-community");function getInstance(e,t){(e?.getInstance?.()??import_ag_grid_community5.AgPromise.resolve(void 0)).then(n=>t(n))}function warnReactiveCustomComponents(){(0,import_ag_grid_community5._warnOnce)("As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.")}var MAX_COMPONENT_CREATION_TIME_IN_MS=1e3,PortalManager=class{constructor(e,t,r){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=r||MAX_COMPONENT_CREATION_TIME_IN_MS}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,r){this.portals=[...this.portals,e],this.waitForInstance(t,r),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,r=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-r>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return;window.setTimeout(()=>{this.waitForInstance(e,t,r)})}}},import_ag_grid_community18=require("ag-grid-community"),import_react22=__toESM(require("react")),import_ag_grid_community16=require("ag-grid-community"),import_react20=__toESM(require("react")),import_ag_grid_community11=require("ag-grid-community"),import_react12=__toESM(require("react")),import_ag_grid_community10=require("ag-grid-community"),import_react11=__toESM(require("react")),import_ag_grid_community9=require("ag-grid-community"),import_react10=__toESM(require("react")),import_ag_grid_community6=require("ag-grid-community"),import_react7=__toESM(require("react")),HeaderCellComp=({ctrl:e})=>{const t=e.isAlive(),{context:r}=(0,import_react7.useContext)(BeansContext),n=t?e.getColId():void 0,[s,d]=(0,import_react7.useState)(),c=(0,import_react7.useRef)(),o=(0,import_react7.useRef)(null),l=(0,import_react7.useRef)(null),a=(0,import_react7.useRef)(null),u=(0,import_react7.useRef)(),C=(0,import_react7.useRef)();t&&!C.current&&(C.current=new import_ag_grid_community6.CssClassManager(()=>o.current));const R=(0,import_react7.useCallback)(i=>{if(o.current=i,c.current=i?r.createBean(new import_ag_grid_community6._EmptyBean):r.destroyBean(c.current),!i||!t)return;const f={setWidth:v=>{o.current&&(o.current.style.width=v)},addOrRemoveCssClass:(v,S)=>C.current.addOrRemoveCssClass(v,S),setAriaSort:v=>{o.current&&(v?(0,import_ag_grid_community6._setAriaSort)(o.current,v):(0,import_ag_grid_community6._removeAriaSort)(o.current))},setUserCompDetails:v=>d(v),getUserCompInstance:()=>u.current||void 0};e.setComp(f,i,l.current,a.current,c.current);const w=e.getSelectAllGui();l.current?.insertAdjacentElement("afterend",w),c.current.addDestroyFunc(()=>w.remove())},[]);(0,import_react7.useLayoutEffect)(()=>showJsComp(s,r,a.current,u),[s]),(0,import_react7.useEffect)(()=>{e.setDragSource(o.current)},[s]);const y=(0,import_react7.useMemo)(()=>!!(s?.componentFromFramework&&isComponentStateless(s.componentClass)),[s]),m=s&&s.componentFromFramework,h=s&&s.componentClass;return import_react7.default.createElement("div",{ref:R,className:"ag-header-cell","col-id":n,role:"columnheader"},import_react7.default.createElement("div",{ref:l,className:"ag-header-cell-resize",role:"presentation"}),import_react7.default.createElement("div",{ref:a,className:"ag-header-cell-comp-wrapper",role:"presentation"},m&&y&&import_react7.default.createElement(h,{...s.params}),m&&!y&&import_react7.default.createElement(h,{...s.params,ref:u})))},headerCellComp_default=(0,import_react7.memo)(HeaderCellComp),import_ag_grid_community7=require("ag-grid-community"),import_react8=__toESM(require("react")),HeaderFilterCellComp=({ctrl:e})=>{const{context:t,gos:r}=(0,import_react8.useContext)(BeansContext),[n,s]=(0,import_react8.useState)(()=>new CssClasses("ag-header-cell","ag-floating-filter")),[d,c]=(0,import_react8.useState)(()=>new CssClasses),[o,l]=(0,import_react8.useState)(()=>new CssClasses("ag-floating-filter-button","ag-hidden")),[a,u]=(0,import_react8.useState)("false"),[C,R]=(0,import_react8.useState)(),[,y]=(0,import_react8.useState)(1),m=(0,import_react8.useRef)(),h=(0,import_react8.useRef)(null),i=(0,import_react8.useRef)(null),f=(0,import_react8.useRef)(null),w=(0,import_react8.useRef)(null),v=(0,import_react8.useRef)(),S=(0,import_react8.useRef)(),b=_=>{_!=null&&v.current&&v.current(_)},x=(0,import_react8.useCallback)(_=>{if(h.current=_,m.current=_?t.createBean(new import_ag_grid_community7._EmptyBean):t.destroyBean(m.current),!_)return;S.current=new import_ag_grid_community7.AgPromise(B=>{v.current=B});const G={addOrRemoveCssClass:(B,H)=>s(A=>A.setClass(B,H)),addOrRemoveBodyCssClass:(B,H)=>c(A=>A.setClass(B,H)),setButtonWrapperDisplayed:B=>{l(H=>H.setClass("ag-hidden",!B)),u(B?"false":"true")},setWidth:B=>{h.current&&(h.current.style.width=B)},setCompDetails:B=>R(B),getFloatingFilterComp:()=>S.current?S.current:null,setMenuIcon:B=>w.current?.appendChild(B)};e.setComp(G,_,w.current,i.current,m.current)},[]);(0,import_react8.useLayoutEffect)(()=>showJsComp(C,t,i.current,b),[C]);const E=(0,import_react8.useMemo)(()=>n.toString(),[n]),M=(0,import_react8.useMemo)(()=>d.toString(),[d]),F=(0,import_react8.useMemo)(()=>o.toString(),[o]),p=(0,import_react8.useMemo)(()=>!!(C&&C.componentFromFramework&&isComponentStateless(C.componentClass)),[C]),g=(0,import_react8.useMemo)(()=>r.get("reactiveCustomComponents"),[]),k=(0,import_react8.useMemo)(()=>{if(C)if(g){const _=new FloatingFilterComponentProxy(C.params,()=>y(G=>G+1));return b(_),_}else C.componentFromFramework&&warnReactiveCustomComponents()},[C]),z=k?.getProps(),O=C&&C.componentFromFramework,N=C&&C.componentClass;return import_react8.default.createElement("div",{ref:x,className:E,role:"gridcell"},import_react8.default.createElement("div",{ref:i,className:M,role:"presentation"},O&&!g&&import_react8.default.createElement(N,{...C.params,ref:p?()=>{}:b}),O&&g&&import_react8.default.createElement(CustomContext.Provider,{value:{setMethods:_=>k.setMethods(_)}},import_react8.default.createElement(N,{...z}))),import_react8.default.createElement("div",{ref:f,"aria-hidden":a,className:F,role:"presentation"},import_react8.default.createElement("button",{ref:w,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},headerFilterCellComp_default=(0,import_react8.memo)(HeaderFilterCellComp),import_ag_grid_community8=require("ag-grid-community"),import_react9=__toESM(require("react")),HeaderGroupCellComp=({ctrl:e})=>{const{context:t}=(0,import_react9.useContext)(BeansContext),[r,n]=(0,import_react9.useState)(()=>new CssClasses),[s,d]=(0,import_react9.useState)(()=>new CssClasses),[c,o]=(0,import_react9.useState)("false"),[l,a]=(0,import_react9.useState)(),[u,C]=(0,import_react9.useState)(),R=(0,import_react9.useMemo)(()=>e.getColId(),[]),y=(0,import_react9.useRef)(),m=(0,import_react9.useRef)(null),h=(0,import_react9.useRef)(null),i=(0,import_react9.useRef)(null),f=(0,import_react9.useRef)(),w=(0,import_react9.useCallback)(M=>{if(m.current=M,y.current=M?t.createBean(new import_ag_grid_community8._EmptyBean):t.destroyBean(y.current),!M)return;const F={setWidth:p=>{m.current&&(m.current.style.width=p)},addOrRemoveCssClass:(p,g)=>n(k=>k.setClass(p,g)),setHeaderWrapperHidden:p=>{const g=i.current;g&&(p?g.style.setProperty("display","none"):g.style.removeProperty("display"))},setHeaderWrapperMaxHeight:p=>{const g=i.current;g&&(p!=null?g.style.setProperty("max-height",`${p}px`):g.style.removeProperty("max-height"),g.classList.toggle("ag-header-cell-comp-wrapper-limited-height",p!=null))},setUserCompDetails:p=>C(p),setResizableDisplayed:p=>{d(g=>g.setClass("ag-hidden",!p)),o(p?"false":"true")},setAriaExpanded:p=>a(p),getUserCompInstance:()=>f.current||void 0};e.setComp(F,M,h.current,i.current,y.current)},[]);(0,import_react9.useLayoutEffect)(()=>showJsComp(u,t,i.current),[u]),(0,import_react9.useEffect)(()=>{m.current&&e.setDragSource(m.current)},[u]);const v=(0,import_react9.useMemo)(()=>!!(u?.componentFromFramework&&isComponentStateless(u.componentClass)),[u]),S=(0,import_react9.useMemo)(()=>"ag-header-group-cell "+r.toString(),[r]),b=(0,import_react9.useMemo)(()=>"ag-header-cell-resize "+s.toString(),[s]),x=u&&u.componentFromFramework,E=u&&u.componentClass;return import_react9.default.createElement("div",{ref:w,className:S,"col-id":R,role:"columnheader","aria-expanded":l},import_react9.default.createElement("div",{ref:i,className:"ag-header-cell-comp-wrapper",role:"presentation"},x&&v&&import_react9.default.createElement(E,{...u.params}),x&&!v&&import_react9.default.createElement(E,{...u.params,ref:f})),import_react9.default.createElement("div",{ref:h,"aria-hidden":c,className:b}))},headerGroupCellComp_default=(0,import_react9.memo)(HeaderGroupCellComp),HeaderRowComp=({ctrl:e})=>{const{context:t}=(0,import_react10.useContext)(BeansContext),{topOffset:r,rowHeight:n}=(0,import_react10.useMemo)(()=>e.getTopAndHeight(),[]),s=e.getAriaRowIndex(),d=e.getHeaderRowClass(),[c,o]=(0,import_react10.useState)(()=>n+"px"),[l,a]=(0,import_react10.useState)(()=>r+"px"),u=(0,import_react10.useRef)(null),C=(0,import_react10.useRef)(null),[R,y]=(0,import_react10.useState)(()=>e.getHeaderCtrls()),m=(0,import_react10.useRef)(),h=(0,import_react10.useRef)(null),i=(0,import_react10.useCallback)(v=>{if(h.current=v,m.current=v?t.createBean(new import_ag_grid_community9._EmptyBean):t.destroyBean(m.current),!v)return;const S={setHeight:b=>o(b),setTop:b=>a(b),setHeaderCtrls:(b,x,E)=>{C.current=u.current,u.current=b;const M=getNextValueIfDifferent(C.current,b,x);M!==C.current&&agFlushSync(E,()=>y(M))},setWidth:b=>{h.current&&(h.current.style.width=b)}};e.setComp(S,m.current,!1)},[]),f=(0,import_react10.useMemo)(()=>({height:c,top:l}),[c,l]),w=(0,import_react10.useCallback)(v=>{switch(e.getType()){case import_ag_grid_community9.HeaderRowType.COLUMN_GROUP:return import_react10.default.createElement(headerGroupCellComp_default,{ctrl:v,key:v.instanceId});case import_ag_grid_community9.HeaderRowType.FLOATING_FILTER:return import_react10.default.createElement(headerFilterCellComp_default,{ctrl:v,key:v.instanceId});default:return import_react10.default.createElement(headerCellComp_default,{ctrl:v,key:v.instanceId})}},[]);return import_react10.default.createElement("div",{ref:i,className:d,role:"row",style:f,"aria-rowindex":s},R.map(w))},headerRowComp_default=(0,import_react10.memo)(HeaderRowComp),HeaderRowContainerComp=({pinned:e})=>{const[t,r]=(0,import_react11.useState)(!0),[n,s]=(0,import_react11.useState)([]),{context:d}=(0,import_react11.useContext)(BeansContext),c=(0,import_react11.useRef)(null),o=(0,import_react11.useRef)(null),l=(0,import_react11.useRef)(),a=e==="left",u=e==="right",C=!a&&!u,R=(0,import_react11.useCallback)(h=>{if(c.current=h,l.current=h?d.createBean(new import_ag_grid_community10.HeaderRowContainerCtrl(e)):d.destroyBean(l.current),!h)return;const i={setDisplayed:r,setCtrls:f=>s(f),setCenterWidth:f=>{o.current&&(o.current.style.width=f)},setViewportScrollLeft:f=>{c.current&&(c.current.scrollLeft=f)},setPinnedContainerWidth:f=>{c.current&&(c.current.style.width=f,c.current.style.minWidth=f,c.current.style.maxWidth=f)}};l.current.setComp(i,c.current)},[]),y=t?"":"ag-hidden",m=()=>n.map(h=>import_react11.default.createElement(headerRowComp_default,{ctrl:h,key:h.instanceId}));return import_react11.default.createElement(import_react11.default.Fragment,null,a&&import_react11.default.createElement("div",{ref:R,className:"ag-pinned-left-header "+y,"aria-hidden":!t,role:"rowgroup"},m()),u&&import_react11.default.createElement("div",{ref:R,className:"ag-pinned-right-header "+y,"aria-hidden":!t,role:"rowgroup"},m()),C&&import_react11.default.createElement("div",{ref:R,className:"ag-header-viewport "+y,role:"presentation"},import_react11.default.createElement("div",{ref:o,className:"ag-header-container",role:"rowgroup"},m())))},headerRowContainerComp_default=(0,import_react11.memo)(HeaderRowContainerComp),GridHeaderComp=()=>{const[e,t]=(0,import_react12.useState)(()=>new CssClasses),[r,n]=(0,import_react12.useState)(),{context:s}=(0,import_react12.useContext)(BeansContext),d=(0,import_react12.useRef)(null),c=(0,import_react12.useRef)(),o=(0,import_react12.useCallback)(u=>{if(d.current=u,c.current=u?s.createBean(new import_ag_grid_community11.GridHeaderCtrl):s.destroyBean(c.current),!u)return;const C={addOrRemoveCssClass:(R,y)=>t(m=>m.setClass(R,y)),setHeightAndMinHeight:R=>n(R)};c.current.setComp(C,u,u)},[]),l=(0,import_react12.useMemo)(()=>"ag-header "+e.toString(),[e]),a=(0,import_react12.useMemo)(()=>({height:r,minHeight:r}),[r]);return import_react12.default.createElement("div",{ref:o,className:l,style:a,role:"presentation"},import_react12.default.createElement(headerRowContainerComp_default,{pinned:"left"}),import_react12.default.createElement(headerRowContainerComp_default,{pinned:null}),import_react12.default.createElement(headerRowContainerComp_default,{pinned:"right"}))},gridHeaderComp_default=(0,import_react12.memo)(GridHeaderComp),import_react13=require("react"),useReactCommentEffect=(e,t)=>{(0,import_react13.useEffect)(()=>{const r=t.current;if(r){const n=r.parentElement;if(n){const s=document.createComment(e);return n.insertBefore(s,r),()=>{n.removeChild(s)}}}},[e])},reactComment_default=useReactCommentEffect,import_ag_grid_community15=require("ag-grid-community"),import_react19=__toESM(require("react")),import_ag_grid_community14=require("ag-grid-community"),import_react18=__toESM(require("react")),import_ag_grid_community13=require("ag-grid-community"),import_react17=__toESM(require("react")),import_ag_grid_community12=require("ag-grid-community"),CellEditorComponentProxy=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new import_ag_grid_community12.AgPromise(r=>{this.resolveInstanceCreated=r}),this.onValueChange=r=>this.updateValue(r),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){addOptionalMethods(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"]}updateValue(e){this.value=e,this.refreshProps()}},import_react15=__toESM(require("react")),import_react_dom3=require("react-dom"),import_react14=require("react"),useEffectOnce=e=>{const t=(0,import_react14.useRef)(e),r=(0,import_react14.useRef)(),n=(0,import_react14.useRef)(!1),s=(0,import_react14.useRef)(!1),[,d]=(0,import_react14.useState)(0);n.current&&(s.current=!0),(0,import_react14.useEffect)(()=>(n.current||(r.current=t.current(),n.current=!0),d(c=>c+1),()=>{s.current&&r.current?.()}),[])},PopupEditorComp=e=>{const[t,r]=(0,import_react15.useState)(),{context:n,popupService:s,localeService:d,gos:c,editService:o}=(0,import_react15.useContext)(BeansContext);return useEffectOnce(()=>{const{editDetails:l,cellCtrl:a,eParentCell:u}=e,{compDetails:C}=l,R=c.get("stopEditingWhenCellsLoseFocus"),y=n.createBean(o.createPopupEditorWrapper(C.params)),m=y.getGui();if(e.jsChildComp){const S=e.jsChildComp.getGui();S&&m.appendChild(S)}const h={column:a.getColumn(),rowNode:a.getRowNode(),type:"popupCellEditor",eventSource:u,ePopup:m,position:l.popupPosition,keepWithinBounds:!0},i=s.positionPopupByComponent.bind(s,h),f=d.getLocaleTextFunc(),w=s.addPopup({modal:R,eChild:m,closeOnEsc:!0,closedCallback:()=>{a.onPopupEditorClosed()},anchorToElement:u,positionCallback:i,ariaLabel:f("ariaLabelCellEditor","Cell Editor")}),v=w?w.hideFunc:void 0;return r(y),e.jsChildComp?.afterGuiAttached?.(),()=>{v?.(),n.destroyBean(y)}}),import_react15.default.createElement(import_react15.default.Fragment,null,t&&e.wrappedContent&&(0,import_react_dom3.createPortal)(e.wrappedContent,t.getGui()))},popupEditorComp_default=(0,import_react15.memo)(PopupEditorComp),import_react16=require("react"),useJsCellRenderer=(e,t,r,n,s,d)=>{const{context:c}=(0,import_react16.useContext)(BeansContext),o=(0,import_react16.useCallback)(()=>{const l=s.current;if(!l)return;const a=l.getGui();a&&a.parentElement&&a.parentElement.removeChild(a),c.destroyBean(l),s.current=void 0},[]);(0,import_react16.useEffect)(()=>{const l=e!=null,a=e?.compDetails&&!e.compDetails.componentFromFramework,u=t&&r==null;if(!(l&&a&&!u)){o();return}const R=e.compDetails;if(s.current){const m=s.current,i=m.refresh!=null&&e.force==!1?m.refresh(R.params):!1;if(i===!0||i===void 0)return;o()}const y=R.newAgStackInstance();y?.then(m=>{if(!m)return;const h=m.getGui();if(!h)return;(t?r:d.current).appendChild(h),s.current=m})},[e,t,n]),(0,import_react16.useEffect)(()=>o,[])},showJsRenderer_default=useJsCellRenderer,jsxEditorProxy=(e,t,r)=>{const{compProxy:n}=e;r(n);const s=n.getProps(),d=isComponentStateless(t);return import_react17.default.createElement(CustomContext.Provider,{value:{setMethods:c=>n.setMethods(c)}},d?import_react17.default.createElement(t,{...s}):import_react17.default.createElement(t,{...s,ref:c=>n.setRef(c)}))},jsxEditor=(e,t,r)=>{const n=e.compProxy;return import_react17.default.createElement(import_react17.default.Fragment,null,n?jsxEditorProxy(e,t,r):import_react17.default.createElement(t,{...e.compDetails.params,ref:r}))},jsxEditValue=(e,t,r,n,s)=>{const d=e.compDetails,c=d.componentClass,o=d.componentFromFramework&&!e.popup,l=d.componentFromFramework&&e.popup,a=!d.componentFromFramework&&e.popup;return import_react17.default.createElement(import_react17.default.Fragment,null,o&&jsxEditor(e,c,t),l&&import_react17.default.createElement(popupEditorComp_default,{editDetails:e,cellCtrl:n,eParentCell:r,wrappedContent:jsxEditor(e,c,t)}),a&&s&&import_react17.default.createElement(popupEditorComp_default,{editDetails:e,cellCtrl:n,eParentCell:r,jsChildComp:s}))},jsxShowValue=(e,t,r,n,s,d,c)=>{const{compDetails:o,value:l}=e,a=!o,u=o&&o.componentFromFramework,C=o&&o.componentClass,R=l?.toString?l.toString():l,y=()=>import_react17.default.createElement(import_react17.default.Fragment,null,a&&import_react17.default.createElement(import_react17.default.Fragment,null,R),u&&!d&&import_react17.default.createElement(C,{...o.params,key:t,ref:n}),u&&d&&import_react17.default.createElement(C,{...o.params,key:t}));return import_react17.default.createElement(import_react17.default.Fragment,null,s?import_react17.default.createElement("span",{role:"presentation",id:`cell-${r}`,className:"ag-cell-value",ref:c},y()):y())},CellComp=({cellCtrl:e,printLayout:t,editingRow:r})=>{const{context:n}=(0,import_react17.useContext)(BeansContext),{colIdSanitised:s,instanceId:d}=e,c=(0,import_react17.useRef)(),[o,l]=(0,import_react17.useState)(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[a,u]=(0,import_react17.useState)(),[C,R]=(0,import_react17.useState)(1),[y,m]=(0,import_react17.useState)(),[h,i]=(0,import_react17.useState)(!1),[f,w]=(0,import_react17.useState)(!1),[v,S]=(0,import_react17.useState)(!1),[b,x]=(0,import_react17.useState)(),E=(0,import_react17.useMemo)(()=>e.isForceWrapper(),[e]),M=(0,import_react17.useMemo)(()=>e.getCellAriaRole(),[e]),F=(0,import_react17.useRef)(null),p=(0,import_react17.useRef)(null),g=(0,import_react17.useRef)(),k=(0,import_react17.useRef)(),z=(0,import_react17.useRef)(),O=(0,import_react17.useRef)([]),N=(0,import_react17.useRef)(),[_,G]=(0,import_react17.useState)(0),B=(0,import_react17.useCallback)(T=>{N.current=T,G(j=>j+1)},[]),H=o!=null&&(h||v||f),A=E||H,W=(0,import_react17.useCallback)(T=>{if(k.current=T,T){const j=T.isCancelBeforeStart&&T.isCancelBeforeStart();setTimeout(()=>{j?(e.stopEditing(!0),e.focusCell(!0)):e.cellEditorAttached()})}},[e]),D=(0,import_react17.useRef)();D.current||(D.current=new import_ag_grid_community13.CssClassManager(()=>F.current)),showJsRenderer_default(o,A,N.current,_,g,F);const Q=(0,import_react17.useRef)();(0,import_react17.useLayoutEffect)(()=>{const T=Q.current,j=o;if(Q.current=o,T==null||T.compDetails==null||j==null||j.compDetails==null)return;const $=T.compDetails,I=j.compDetails;if($.componentClass!=I.componentClass||p.current?.refresh==null)return;p.current.refresh(I.params)!=!0&&R(J=>J+1)},[o]),(0,import_react17.useLayoutEffect)(()=>{if(!(a&&!a.compDetails.componentFromFramework))return;const j=a.compDetails,$=a.popup===!0,I=j.newAgStackInstance();return I.then(V=>{if(!V)return;const J=V.getGui();W(V),$||((E?z:F).current?.appendChild(J),V.afterGuiAttached&&V.afterGuiAttached()),x(V)}),()=>{I.then(V=>{const J=V.getGui();n.destroyBean(V),W(void 0),x(void 0),J?.parentElement?.removeChild(J)})}},[a]);const P=(0,import_react17.useCallback)(T=>{if(z.current=T,!T){O.current.forEach($=>$()),O.current=[];return}const j=$=>{if($){const I=$.getGui();T.insertAdjacentElement("afterbegin",I),O.current.push(()=>{n.destroyBean($),(0,import_ag_grid_community13._removeFromParent)(I)})}return $};if(h){const $=e.createSelectionCheckbox();j($)}v&&j(e.createDndSource()),f&&j(e.createRowDragComp())},[e,n,v,f,h]),L=(0,import_react17.useCallback)(T=>{if(F.current=T,c.current=T?n.createBean(new import_ag_grid_community13._EmptyBean):n.destroyBean(c.current),!T||!e)return;const j={addOrRemoveCssClass:(I,V)=>D.current.addOrRemoveCssClass(I,V),setUserStyles:I=>m(I),getFocusableElement:()=>F.current,setIncludeSelection:I=>i(I),setIncludeRowDrag:I=>w(I),setIncludeDndSource:I=>S(I),getCellEditor:()=>k.current||null,getCellRenderer:()=>p.current??g.current,getParentOfValue:()=>N.current??z.current??F.current,setRenderDetails:(I,V,J)=>{l(X=>X?.compDetails!==I||X?.value!==V||X?.force!==J?{value:V,compDetails:I,force:J}:X)},setEditDetails:(I,V,J,X)=>{if(I){let te;X?te=new CellEditorComponentProxy(I.params,()=>R(oe=>oe+1)):I.componentFromFramework&&warnReactiveCustomComponents(),u({compDetails:I,popup:V,popupPosition:J,compProxy:te}),V||l(void 0)}else u(te=>{te?.compProxy&&(k.current=void 0)})}},$=z.current||void 0;e.setComp(j,T,$,t,r,c.current)},[]),U=(0,import_react17.useMemo)(()=>!!(o?.compDetails?.componentFromFramework&&isComponentStateless(o.compDetails.componentClass)),[o]);(0,import_react17.useLayoutEffect)(()=>{F.current&&(D.current.addOrRemoveCssClass("ag-cell-value",!A),D.current.addOrRemoveCssClass("ag-cell-inline-editing",!!a&&!a.popup),D.current.addOrRemoveCssClass("ag-cell-popup-editing",!!a&&!!a.popup),D.current.addOrRemoveCssClass("ag-cell-not-inline-editing",!a||!!a.popup),e.getRowCtrl()?.setInlineEditingCss(),e.shouldRestoreFocus()&&!e.isEditing()&&F.current.focus({preventScroll:!0}))});const Y=()=>import_react17.default.createElement(import_react17.default.Fragment,null,o!=null&&jsxShowValue(o,C,d,p,A,U,B),a!=null&&jsxEditValue(a,W,F.current,e,b)),ee=(0,import_react17.useCallback)(()=>e.onFocusOut(),[]);return import_react17.default.createElement("div",{ref:L,style:y,role:M,"col-id":s,onBlur:ee},A?import_react17.default.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:P},Y()):Y())},cellComp_default=(0,import_react17.memo)(CellComp),RowComp=({rowCtrl:e,containerType:t})=>{const{context:r,gos:n}=(0,import_react18.useContext)(BeansContext),s=(0,import_react18.useRef)(),d=(0,import_react18.useRef)(e.getDomOrder()),c=e.isFullWidth(),o=e.getRowNode().displayed,[l,a]=(0,import_react18.useState)(()=>o?e.getRowIndex():null),[u,C]=(0,import_react18.useState)(()=>e.getRowId()),[R,y]=(0,import_react18.useState)(()=>e.getBusinessKey()),[m,h]=(0,import_react18.useState)(()=>e.getRowStyles()),i=(0,import_react18.useRef)(null),f=(0,import_react18.useRef)(null),[w,v]=(0,import_react18.useState)(()=>null),[S,b]=(0,import_react18.useState)(),[x,E]=(0,import_react18.useState)(()=>o?e.getInitialRowTop(t):void 0),[M,F]=(0,import_react18.useState)(()=>o?e.getInitialTransform(t):void 0),p=(0,import_react18.useRef)(null),g=(0,import_react18.useRef)(),k=(0,import_react18.useRef)(!1),[z,O]=(0,import_react18.useState)(0);(0,import_react18.useEffect)(()=>{if(k.current||!S||z>10)return;const P=p.current?.firstChild;P?(e.setupDetailRowAutoHeight(P),k.current=!0):O(L=>L+1)},[S,z]);const N=(0,import_react18.useRef)();N.current||(N.current=new import_ag_grid_community14.CssClassManager(()=>p.current));const _=(0,import_react18.useCallback)(P=>{if(p.current=P,s.current=P?r.createBean(new import_ag_grid_community14._EmptyBean):r.destroyBean(s.current),!P){e.unsetComp(t);return}if(!e.isAlive())return;const L={setTop:E,setTransform:F,addOrRemoveCssClass:(U,Y)=>N.current.addOrRemoveCssClass(U,Y),setDomOrder:U=>d.current=U,setRowIndex:a,setRowId:C,setRowBusinessKey:y,setUserStyles:h,setCellCtrls:(U,Y)=>{f.current=i.current,i.current=U;const ee=getNextValueIfDifferent(f.current,U,d.current);ee!==f.current&&agFlushSync(Y,()=>v(ee))},showFullWidth:U=>b(U),getFullWidthCellRenderer:()=>g.current,refreshFullWidth:U=>W.current?(b(Y=>({...Y,params:U()})),!0):!g.current||!g.current.refresh?!1:g.current.refresh(U())};e.setComp(L,P,t,s.current)},[]);(0,import_react18.useLayoutEffect)(()=>showJsComp(S,r,p.current,g),[S]);const G=(0,import_react18.useMemo)(()=>{const P={top:x,transform:M};return Object.assign(P,m),P},[x,M,m]),B=c&&S?.componentFromFramework,H=!c&&w!=null,A=(0,import_react18.useMemo)(()=>!!(S?.componentFromFramework&&isComponentStateless(S.componentClass)),[S]),W=(0,import_react18.useRef)(!1);(0,import_react18.useEffect)(()=>{W.current=A&&!!S&&!!n.get("reactiveCustomComponents")},[A,S]);const D=()=>w?.map(P=>import_react18.default.createElement(cellComp_default,{cellCtrl:P,editingRow:e.isEditing(),printLayout:e.isPrintLayout(),key:P.instanceId})),Q=()=>{const P=S.componentClass;return import_react18.default.createElement(import_react18.default.Fragment,null,A?import_react18.default.createElement(P,{...S.params}):import_react18.default.createElement(P,{...S.params,ref:g}))};return import_react18.default.createElement("div",{ref:_,role:"row",style:G,"row-index":l,"row-id":u,"row-business-key":R},H&&D(),B&&Q())},rowComp_default=(0,import_react18.memo)(RowComp),RowContainerComp=({name:e})=>{const{context:t}=(0,import_react19.useContext)(BeansContext),r=(0,import_react19.useMemo)(()=>(0,import_ag_grid_community15._getRowContainerOptions)(e),[e]),n=(0,import_react19.useRef)(null),s=(0,import_react19.useRef)(null),d=(0,import_react19.useRef)([]),c=(0,import_react19.useRef)([]),[o,l]=(0,import_react19.useState)(()=>[]),a=(0,import_react19.useRef)(!1),u=(0,import_react19.useRef)(),C=(0,import_react19.useMemo)(()=>classesList(r.viewport),[r]),R=(0,import_react19.useMemo)(()=>classesList(r.container),[r]),y=r.type==="center",m=y?n:s;reactComment_default(" AG Row Container "+e+" ",m);const h=(0,import_react19.useCallback)(()=>y?n.current!=null&&s.current!=null:s.current!=null,[]),i=(0,import_react19.useCallback)(()=>y?n.current==null&&s.current==null:s.current==null,[]),f=(0,import_react19.useCallback)(()=>{if(i()&&(u.current=t.destroyBean(u.current)),h()){const b=E=>{const M=getNextValueIfDifferent(c.current,d.current,a.current);M!==c.current&&(c.current=M,agFlushSync(E,()=>l(M)))},x={setHorizontalScroll:E=>{n.current&&(n.current.scrollLeft=E)},setViewportHeight:E=>{n.current&&(n.current.style.height=E)},setRowCtrls:({rowCtrls:E,useFlushSync:M})=>{const F=!!M&&d.current.length>0&&E.length>0;d.current=E,b(F)},setDomOrder:E=>{a.current!=E&&(a.current=E,b(!1))},setContainerWidth:E=>{s.current&&(s.current.style.width=E)},setOffsetTop:E=>{s.current&&(s.current.style.transform=`translateY(${E})`)}};u.current=t.createBean(new import_ag_grid_community15.RowContainerCtrl(e)),u.current.setComp(x,s.current,n.current)}},[h,i]),w=(0,import_react19.useCallback)(b=>{s.current=b,f()},[f]),v=(0,import_react19.useCallback)(b=>{n.current=b,f()},[f]),S=()=>import_react19.default.createElement("div",{className:R,ref:w,role:"rowgroup"},o.map(b=>import_react19.default.createElement(rowComp_default,{rowCtrl:b,containerType:r.type,key:b.instanceId})));return import_react19.default.createElement(import_react19.default.Fragment,null,y?import_react19.default.createElement("div",{className:C,ref:v,role:"presentation"},S()):S())},rowContainerComp_default=(0,import_react19.memo)(RowContainerComp),GridBodyComp=()=>{const{context:e,resizeObserverService:t}=(0,import_react20.useContext)(BeansContext),[r,n]=(0,import_react20.useState)(""),[s,d]=(0,import_react20.useState)(0),[c,o]=(0,import_react20.useState)(0),[l,a]=(0,import_react20.useState)("0px"),[u,C]=(0,import_react20.useState)("0px"),[R,y]=(0,import_react20.useState)("100%"),[m,h]=(0,import_react20.useState)("0px"),[i,f]=(0,import_react20.useState)("0px"),[w,v]=(0,import_react20.useState)("100%"),[S,b]=(0,import_react20.useState)(""),[x,E]=(0,import_react20.useState)(""),[M,F]=(0,import_react20.useState)(null),[p,g]=(0,import_react20.useState)(""),[k,z]=(0,import_react20.useState)(null),[O,N]=(0,import_react20.useState)("ag-layout-normal"),_=(0,import_react20.useRef)();_.current||(_.current=new import_ag_grid_community16.CssClassManager(()=>G.current));const G=(0,import_react20.useRef)(null),B=(0,import_react20.useRef)(null),H=(0,import_react20.useRef)(null),A=(0,import_react20.useRef)(null),W=(0,import_react20.useRef)(null),D=(0,import_react20.useRef)(null),Q=(0,import_react20.useRef)(null),P=(0,import_react20.useRef)([]),L=(0,import_react20.useRef)([]);reactComment_default(" AG Grid Body ",G),reactComment_default(" AG Pinned Top ",B),reactComment_default(" AG Sticky Top ",H),reactComment_default(" AG Middle ",D),reactComment_default(" AG Pinned Bottom ",Q);const U=(0,import_react20.useCallback)(Z=>{if(G.current=Z,!Z){P.current=e.destroyBeans(P.current),L.current.forEach(q=>q()),L.current=[];return}if(!e)return;const ne=(q,K)=>{q.appendChild(K),L.current.push(()=>q.removeChild(K))},ae=q=>{const K=e.createBean(new q);return P.current.push(K),K},se=(q,K,de)=>{ne(q,document.createComment(de)),ne(q,ae(K).getGui())};se(Z,import_ag_grid_community16.FakeHScrollComp," AG Fake Horizontal Scroll "),se(Z,import_ag_grid_community16.OverlayWrapperComponent," AG Overlay Wrapper "),W.current&&se(W.current,import_ag_grid_community16.FakeVScrollComp," AG Fake Vertical Scroll ");const le={setRowAnimationCssOnBodyViewport:n,setColumnCount:q=>{G.current&&(0,import_ag_grid_community16._setAriaColCount)(G.current,q)},setRowCount:q=>{G.current&&(0,import_ag_grid_community16._setAriaRowCount)(G.current,q)},setTopHeight:d,setBottomHeight:o,setStickyTopHeight:a,setStickyTopTop:C,setStickyTopWidth:y,setTopDisplay:b,setBottomDisplay:E,setColumnMovingCss:(q,K)=>_.current.addOrRemoveCssClass(q,K),updateLayoutClasses:N,setAlwaysVerticalScrollClass:F,setPinnedTopBottomOverflowY:g,setCellSelectableCss:(q,K)=>z(K?q:null),setBodyViewportWidth:q=>{D.current&&(D.current.style.width=q)},registerBodyViewportResizeListener:q=>{if(D.current){const K=t.observeResize(D.current,q);L.current.push(()=>K())}},setStickyBottomHeight:h,setStickyBottomBottom:f,setStickyBottomWidth:v},ce=e.createBean(new import_ag_grid_community16.GridBodyCtrl);P.current.push(ce),ce.setComp(le,Z,D.current,B.current,Q.current,H.current,A.current)},[]),Y=(0,import_react20.useMemo)(()=>classesList("ag-root","ag-unselectable",O),[O]),ee=(0,import_react20.useMemo)(()=>classesList("ag-body-viewport",r,O,M,k),[r,O,M,k]),T=(0,import_react20.useMemo)(()=>classesList("ag-body",O),[O]),j=(0,import_react20.useMemo)(()=>classesList("ag-floating-top",k),[k]),$=(0,import_react20.useMemo)(()=>classesList("ag-sticky-top",k),[k]),I=(0,import_react20.useMemo)(()=>classesList("ag-sticky-bottom",m==="0px"?"ag-hidden":null,k),[k,m]),V=(0,import_react20.useMemo)(()=>classesList("ag-floating-bottom",k),[k]),J=(0,import_react20.useMemo)(()=>({height:s,minHeight:s,display:S,overflowY:p}),[s,S,p]),X=(0,import_react20.useMemo)(()=>({height:l,top:u,width:R}),[l,u,R]),te=(0,import_react20.useMemo)(()=>({height:m,bottom:i,width:w}),[m,i,w]),oe=(0,import_react20.useMemo)(()=>({height:c,minHeight:c,display:x,overflowY:p}),[c,x,p]),ue=Z=>import_react20.default.createElement(rowContainerComp_default,{name:Z,key:`${Z}-container`}),re=({section:Z,children:ne,className:ae,style:se})=>import_react20.default.createElement("div",{ref:Z,className:ae,role:"presentation",style:se},ne.map(ue));return import_react20.default.createElement("div",{ref:U,className:Y,role:"treegrid"},import_react20.default.createElement(gridHeaderComp_default,null),re({section:B,className:j,style:J,children:["topLeft","topCenter","topRight","topFullWidth"]}),import_react20.default.createElement("div",{className:T,ref:W,role:"presentation"},re({section:D,className:ee,children:["left","center","right","fullWidth"]})),re({section:H,className:$,style:X,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),re({section:A,className:I,style:te,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),re({section:Q,className:V,style:oe,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},gridBodyComp_default=(0,import_react20.memo)(GridBodyComp),import_ag_grid_community17=require("ag-grid-community"),import_react21=__toESM(require("react")),TabGuardCompRef=(e,t)=>{const{children:r,eFocusableElement:n,onTabKeyDown:s,gridCtrl:d,forceFocusOutWhenTabGuardsAreEmpty:c}=e,{context:o}=(0,import_react21.useContext)(BeansContext),l=(0,import_react21.useRef)(null),a=(0,import_react21.useRef)(null),u=(0,import_react21.useRef)(),C=i=>{const f=i==null?void 0:parseInt(i,10).toString();[l,a].forEach(w=>{f===void 0?w.current?.removeAttribute("tabindex"):w.current?.setAttribute("tabindex",f)})};(0,import_react21.useImperativeHandle)(t,()=>({forceFocusOutOfContainer(i){u.current?.forceFocusOutOfContainer(i)}}));const R=(0,import_react21.useCallback)(()=>{const i=l.current,f=a.current;if(!i&&!f){u.current=o.destroyBean(u.current);return}if(i&&f){const w={setTabIndex:C};u.current=o.createBean(new import_ag_grid_community17.TabGuardCtrl({comp:w,eTopGuard:i,eBottomGuard:f,eFocusableElement:n,onTabKeyDown:s,forceFocusOutWhenTabGuardsAreEmpty:c,focusInnerElement:v=>d.focusInnerElement(v)}))}},[]),y=(0,import_react21.useCallback)(i=>{l.current=i,R()},[R]),m=(0,import_react21.useCallback)(i=>{a.current=i,R()},[R]),h=i=>{const f=i==="top"?import_ag_grid_community17.TabGuardClassNames.TAB_GUARD_TOP:import_ag_grid_community17.TabGuardClassNames.TAB_GUARD_BOTTOM;return import_react21.default.createElement("div",{className:`${import_ag_grid_community17.TabGuardClassNames.TAB_GUARD} ${f}`,role:"presentation",ref:i==="top"?y:m})};return import_react21.default.createElement(import_react21.default.Fragment,null,h("top"),r,h("bottom"))},TabGuardComp=(0,import_react21.forwardRef)(TabGuardCompRef),tabGuardComp_default=(0,import_react21.memo)(TabGuardComp),GridComp=({context:e})=>{const[t,r]=(0,import_react22.useState)(""),[n,s]=(0,import_react22.useState)(""),[d,c]=(0,import_react22.useState)(""),[o,l]=(0,import_react22.useState)(null),[a,u]=(0,import_react22.useState)(null),[C,R]=(0,import_react22.useState)(!1),[y,m]=(0,import_react22.useState)(),h=(0,import_react22.useRef)(),i=(0,import_react22.useRef)(null),f=(0,import_react22.useRef)(),[w,v]=(0,import_react22.useState)(null),S=(0,import_react22.useRef)(()=>{}),b=(0,import_react22.useRef)(),x=(0,import_react22.useRef)([]),E=(0,import_react22.useCallback)(()=>{},[]),M=(0,import_react22.useMemo)(()=>e.isDestroyed()?null:e.getBeans(),[e]);reactComment_default(" AG Grid ",i);const F=(0,import_react22.useCallback)(O=>{if(i.current=O,h.current=O?e.createBean(new import_ag_grid_community18.GridCtrl):e.destroyBean(h.current),!O||e.isDestroyed())return;const N=h.current;S.current=N.focusInnerElement.bind(N);const _={destroyGridUi:()=>{},setRtlClass:r,setGridThemeClass:s,forceFocusOutOfContainer:G=>{if(!G&&b.current?.isDisplayed()){b.current.forceFocusOutOfContainer(G);return}f.current?.forceFocusOutOfContainer(G)},updateLayoutClasses:c,getFocusableContainers:()=>{const G=[],B=i.current?.querySelector(".ag-root");return B&&G.push({getGui:()=>B}),x.current.forEach(H=>{H.isDisplayed()&&G.push(H)}),G},setCursor:l,setUserSelect:u};N.setComp(_,O,O),R(!0)},[]);(0,import_react22.useEffect)(()=>{const O=h.current,N=i.current;if(!y||!M||!O||!w||!N)return;const _=[],{watermarkSelector:G,paginationSelector:B,sideBarSelector:H,statusBarSelector:A,gridHeaderDropZonesSelector:W}=O.getOptionalSelectors(),D=[];if(W){const P=e.createBean(new W.component),L=P.getGui();N.insertAdjacentElement("afterbegin",L),D.push(L),_.push(P)}if(H){const P=e.createBean(new H.component),L=P.getGui(),U=w.querySelector(".ag-tab-guard-bottom");U&&(U.insertAdjacentElement("beforebegin",L),D.push(L)),_.push(P),x.current.push(P)}const Q=P=>{const L=e.createBean(new P),U=L.getGui();return N.insertAdjacentElement("beforeend",U),D.push(U),_.push(L),L};if(A&&Q(A.component),B){const P=Q(B.component);b.current=P,x.current.push(P)}return G&&Q(G.component),()=>{e.destroyBeans(_),D.forEach(P=>{P.parentElement?.removeChild(P)})}},[y,w,M]);const p=(0,import_react22.useMemo)(()=>classesList("ag-root-wrapper",t,n,d),[t,n,d]),g=(0,import_react22.useMemo)(()=>classesList("ag-root-wrapper-body","ag-focus-managed",d),[d]),k=(0,import_react22.useMemo)(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:o??""}),[a,o]),z=(0,import_react22.useCallback)(O=>{f.current=O,m(O!==null)},[]);return import_react22.default.createElement("div",{ref:F,className:p,style:k,role:"presentation"},import_react22.default.createElement("div",{className:g,ref:v,role:"presentation"},C&&w&&M&&import_react22.default.createElement(BeansContext.Provider,{value:M},import_react22.default.createElement(tabGuardComp_default,{ref:z,eFocusableElement:w,onTabKeyDown:E,gridCtrl:h.current,forceFocusOutWhenTabGuardsAreEmpty:!0},import_react22.default.createElement(gridBodyComp_default,null)))))},gridComp_default=(0,import_react22.memo)(GridComp),import_ag_grid_community19=require("ag-grid-community"),RenderStatusService=class extends import_ag_grid_community19.BeanStub{wireBeans(e){this.ctrlsService=e.ctrlsService}areHeaderCellsRendered(){return this.ctrlsService.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(t=>t.areCellsRendered()))}},AgGridReactUi=e=>{const t=(0,import_react23.useRef)(),r=(0,import_react23.useRef)(null),n=(0,import_react23.useRef)(null),s=(0,import_react23.useRef)([]),d=(0,import_react23.useRef)([]),c=(0,import_react23.useRef)(e),o=(0,import_react23.useRef)(),l=(0,import_react23.useRef)(),a=(0,import_react23.useRef)(!1),[u,C]=(0,import_react23.useState)(void 0),[,R]=(0,import_react23.useState)(0),y=(0,import_react23.useCallback)(i=>{if(r.current=i,!i){s.current.forEach(p=>p()),s.current.length=0;return}const f=e.modules||[];n.current||(n.current=new PortalManager(()=>R(p=>p+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),s.current.push(()=>{n.current?.destroy(),n.current=null}));const w=(0,import_ag_grid_community20._combineAttributesAndGridOptions)(e.gridOptions,e),v=()=>{if(a.current){const p=()=>o.current?.shouldQueueUpdates()?void 0:d.current.shift();let g=p();for(;g;)g(),g=p()}},S=new ReactFrameworkOverrides(v);o.current=S;const b=new RenderStatusService,x={providedBeanInstances:{frameworkComponentWrapper:new ReactFrameworkComponentWrapper(n.current,w.reactiveCustomComponents??(0,import_ag_grid_community20._getGlobalGridOption)("reactiveCustomComponents")??!0),renderStatusService:b},modules:f,frameworkOverrides:S},E=p=>{C(p),p.createBean(b),s.current.push(()=>{p.destroy()}),p.getBean("ctrlsService").whenReady({addDestroyFunc:g=>{s.current.push(g)}},()=>{if(p.isDestroyed())return;const g=t.current;g&&e.setGridApi?.(g)})},M=p=>{p.getBean("ctrlsService").whenReady({addDestroyFunc:g=>{s.current.push(g)}},()=>{d.current.forEach(g=>g()),d.current.length=0,a.current=!0})},F=new import_ag_grid_community20.GridCoreCreator;w.gridId??(w.gridId=l.current),t.current=F.create(i,w,E,M,x),s.current.push(()=>{t.current=void 0}),t.current&&(l.current=t.current.getGridId())},[]),m=(0,import_react23.useMemo)(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),h=(0,import_react23.useCallback)(i=>{a.current&&!o.current?.shouldQueueUpdates()?i():d.current.push(i)},[]);return(0,import_react23.useEffect)(()=>{const i=extractGridPropertyChanges(c.current,e);c.current=e,h(()=>{t.current&&(0,import_ag_grid_community20._processOnChange)(i,t.current)})},[e]),import_react23.default.createElement("div",{style:m,className:e.className,ref:y},u&&!u.isDestroyed()?import_react23.default.createElement(gridComp_default,{context:u}):null,n.current?.getPortals()??null)};function extractGridPropertyChanges(e,t){const r={};return Object.keys(t).forEach(n=>{const s=t[n];e[n]!==s&&(r[n]=s)}),r}var ReactFrameworkComponentWrapper=class extends import_ag_grid_community20.BaseComponentWrapper{constructor(e,t){super(),this.parent=e,this.reactiveCustomComponents=t}createWrapper(e,t){if(this.reactiveCustomComponents){const s=(d=>{switch(d){case"filter":return FilterComponentWrapper;case"floatingFilterComponent":return FloatingFilterComponentWrapper;case"dateComponent":return DateComponentWrapper;case"dragAndDropImageComponent":return DragAndDropImageComponentWrapper;case"loadingOverlayComponent":return LoadingOverlayComponentWrapper;case"noRowsOverlayComponent":return NoRowsOverlayComponentWrapper;case"statusPanel":return StatusPanelComponentWrapper;case"toolPanel":return ToolPanelComponentWrapper;case"menuItem":return MenuItemComponentWrapper;case"cellRenderer":return CellRendererComponentWrapper}})(t.propertyName);if(s)return new s(e,this.parent,t)}else switch(t.propertyName){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":warnReactiveCustomComponents();break}const r=!t.cellRenderer&&t.propertyName!=="toolPanel";return new ReactComponent(e,this.parent,t,r)}},DetailCellRenderer=(0,import_react23.forwardRef)((e,t)=>{const{ctrlsFactory:r,context:n,gos:s,resizeObserverService:d,rowModel:c}=(0,import_react23.useContext)(BeansContext),[o,l]=(0,import_react23.useState)(()=>new CssClasses),[a,u]=(0,import_react23.useState)(()=>new CssClasses),[C,R]=(0,import_react23.useState)(),[y,m]=(0,import_react23.useState)(),h=(0,import_react23.useRef)(),i=(0,import_react23.useRef)(null),f=(0,import_react23.useRef)(),w=(0,import_react23.useMemo)(()=>import_ag_grid_community20.ModuleRegistry.__getGridRegisteredModules(e.api.getGridId()),[e]),v=(0,import_react23.useMemo)(()=>o.toString()+" ag-details-row",[o]),S=(0,import_react23.useMemo)(()=>a.toString()+" ag-details-grid",[a]);t&&(0,import_react23.useImperativeHandle)(t,()=>({refresh(){return h.current?.refresh()??!1}})),e.template&&(0,import_ag_grid_community20._warnOnce)("detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://ag-grid.com/react-data-grid/master-detail-custom-detail/");const b=(0,import_react23.useCallback)(E=>{if(i.current=E,!E){h.current=n.destroyBean(h.current),f.current?.();return}const M={addOrRemoveCssClass:(p,g)=>l(k=>k.setClass(p,g)),addOrRemoveDetailGridCssClass:(p,g)=>u(k=>k.setClass(p,g)),setDetailGrid:p=>R(p),setRowData:p=>m(p),getGui:()=>i.current},F=r.getInstance("detailCellRenderer");if(F&&(n.createBean(F),F.init(M,e),h.current=F,s.get("detailRowAutoHeight"))){const p=()=>{if(i.current==null)return;const g=i.current.clientHeight;g!=null&&g>0&&setTimeout(()=>{e.node.setRowHeight(g),((0,import_ag_grid_community20._isClientSideRowModel)(s)||(0,import_ag_grid_community20._isServerSideRowModel)(s))&&c.onRowHeightChanged()},0)};f.current=d.observeResize(E,p),p()}},[]),x=(0,import_react23.useCallback)(E=>{h.current?.registerDetailWithMaster(E)},[]);return import_react23.default.createElement("div",{className:v,ref:b},C&&import_react23.default.createElement(AgGridReactUi,{className:S,...C,modules:w,rowData:y,setGridApi:x}))}),ReactFrameworkOverrides=class extends import_ag_grid_community20.VanillaFrameworkOverrides{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.frameworkComponents={agGroupCellRenderer:groupCellRenderer_default,agGroupRowRenderer:groupCellRenderer_default,agDetailCellRenderer:DetailCellRenderer},this.wrapIncoming=(t,r)=>r==="ensureVisible"?runWithoutFlushSync(t):t(),this.renderingEngine="react"}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 isReact19()}},AgGridReact=class extends import_react24.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e,this.apiListeners.forEach(t=>t(e))}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return import_react24.default.createElement(AgGridReactUi,{...this.props,setGridApi:this.setGridApi})}},import_react25=require("react");function useGridCustomComponent(e){const{setMethods:t}=(0,import_react25.useContext)(CustomContext);t(e)}function useGridCellEditor(e){useGridCustomComponent(e)}function useGridDate(e){return useGridCustomComponent(e)}function useGridFilter(e){return useGridCustomComponent(e)}function useGridFloatingFilter(e){useGridCustomComponent(e)}function useGridMenuItem(e){useGridCustomComponent(e)}
{
"name": "ag-grid-react",
"version": "32.2.2",
"version": "32.3.0",
"description": "AG Grid React Component",

@@ -35,3 +35,3 @@ "main": "./dist/package/index.cjs.js",

"devDependencies": {
"ag-grid-community": "32.2.2",
"ag-grid-community": "32.3.0",
"gulp": "^4.0.0",

@@ -47,3 +47,3 @@ "gulp-replace": "^1.0.0",

"prop-types": "^15.8.1",
"ag-grid-community": "32.2.2"
"ag-grid-community": "32.3.0"
},

@@ -50,0 +50,0 @@ "peerDependencies": {

{
"name": "ag-grid-react",
"version": "32.2.2",
"version": "32.3.0",
"description": "AG Grid React Component",

@@ -35,3 +35,3 @@ "main": "./src/index.js",

"devDependencies": {
"ag-grid-community": "32.2.2",
"ag-grid-community": "32.3.0",
"gulp": "^4.0.0",

@@ -47,3 +47,3 @@ "gulp-replace": "^1.0.0",

"prop-types": "^15.8.1",
"ag-grid-community": "32.2.2"
"ag-grid-community": "32.3.0"
},

@@ -50,0 +50,0 @@ "peerDependencies": {

@@ -1,1 +0,1 @@

(function(_e,Me){typeof exports=="object"&&typeof module=="object"?module.exports=Me(require("ag-grid-community"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define("AgGridReact",["ag-grid-community","react","react-dom"],Me):typeof exports=="object"?exports.AgGridReact=Me(require("ag-grid-community"),require("react"),require("react-dom")):_e.AgGridReact=Me(_e["ag-grid-community"],_e.react,_e["react-dom"])})(this,(_e,Me,ss)=>{var Le={},ke={exports:Le},vt=Object.create,We=Object.defineProperty,Rt=Object.getOwnPropertyDescriptor,wt=Object.getOwnPropertyNames,St=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty,Et=(e,t)=>{for(var r in t)We(e,r,{get:t[r],enumerable:!0})},tt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of wt(t))!bt.call(e,s)&&s!==r&&We(e,s,{get:()=>t[s],enumerable:!(n=Rt(t,s))||n.enumerable});return e},Z=(e,t,r)=>(r=e!=null?vt(St(e)):{},tt(t||!e||!e.__esModule?We(r,"default",{value:e,enumerable:!0}):r,e)),Pt=e=>tt(We({},"__esModule",{value:!0}),e),rt={};Et(rt,{AgGridReact:()=>$r,CustomComponentContext:()=>Oe,getInstance:()=>ar,useGridCellEditor:()=>Jr,useGridDate:()=>Kr,useGridFilter:()=>Qr,useGridFloatingFilter:()=>Yr,useGridMenuItem:()=>Zr,warnReactiveCustomComponents:()=>Ue}),ke.exports=Pt(rt);var st=Z(require("react"),1),he=require("ag-grid-community"),F=Z(require("react"),1),_t=require("ag-grid-community"),A=Z(require("react"),1),Mt=Z(require("react"),1),kt=Z(require("react"),1),Ft=Z(require("react-dom"),1),je=require("ag-grid-community"),Fe=Z(require("react"),1),Gt=require("react"),Ge=require("ag-grid-community"),At=require("react"),Bt=require("react-dom"),Ot=require("ag-grid-community"),nt=require("ag-grid-community"),xt=require("ag-grid-community"),H=Z(require("react"),1),Re=require("ag-grid-community"),w=Z(require("react"),1),It=require("ag-grid-community"),ie=Z(require("react"),1),Dt=require("ag-grid-community"),ce=Z(require("react"),1),ze=require("ag-grid-community"),re=Z(require("react"),1),Te=require("ag-grid-community"),te=Z(require("react"),1),ot=require("ag-grid-community"),O=Z(require("react"),1),Wt=require("ag-grid-community"),V=Z(require("react"),1),Tt=require("react"),at=require("ag-grid-community"),$=Z(require("react"),1),ct=require("ag-grid-community"),G=Z(require("react"),1),$e=require("ag-grid-community"),h=Z(require("react"),1),Nt=require("ag-grid-community"),Ae=Z(require("react"),1),Ht=require("react-dom"),Se=require("react"),Ne=require("react"),He=require("ag-grid-community"),ue=Z(require("react"),1),qt=require("ag-grid-community"),Ut=require("react"),ne=Mt.default.createContext({}),Be=(e,t,r,n)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const d=e.newAgStackInstance();if(d==null)return;let c,o,l=!1;return d.then(a=>{if(l){t.destroyBean(a);return}c=a,o=c.getGui(),r.appendChild(o),it(n,c)}),()=>{l=!0,c&&(o?.parentElement?.removeChild(o),t.destroyBean(c),n&&it(n,void 0))}},it=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const r=e;r.current=t}},fe=(...e)=>e.filter(r=>r!=null&&r!=="").join(" "),pe=class yt{constructor(...t){this.classesMap={},t.forEach(r=>{this.classesMap[r]=!0})}setClass(t,r){if(!!this.classesMap[t]==r)return this;const s=new yt;return s.classesMap={...this.classesMap},s.classesMap[t]=r,s}toString(){return Object.keys(this.classesMap).filter(r=>this.classesMap[r]).join(" ")}},be=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,r=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===r()},Je=kt.default.version?.split(".")[0],Vt=Je==="16"||Je==="17";function Lt(){return Je==="19"}var qe=!1;function jt(e){return qe||setTimeout(()=>qe=!1,0),qe=!0,e()}var Ke=(e,t)=>{!Vt&&e&&!qe?Ft.default.flushSync(t):t()};function Qe(e,t,r){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(r||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const n=[],s=[],d=new Map,c=new Map;for(let o=0;o<t.length;o++){const l=t[o];c.set(l.instanceId,l)}for(let o=0;o<e.length;o++){const l=e[o];d.set(l.instanceId,l),c.has(l.instanceId)&&n.push(l)}for(let o=0;o<t.length;o++){const l=t[o],a=l.instanceId;d.has(a)||s.push(l)}return n.length===e.length&&s.length===0?e:n.length===0&&s.length===t.length?t:n.length===0?s:s.length===0?n:[...n,...s]}var ut=(0,A.forwardRef)((e,t)=>{const{ctrlsFactory:r,context:n}=(0,A.useContext)(ne),s=(0,A.useRef)(null),d=(0,A.useRef)(null),c=(0,A.useRef)(null),o=(0,A.useRef)(null),l=(0,A.useRef)(null),a=(0,A.useRef)(),[i,g]=(0,A.useState)(),[R,y]=(0,A.useState)(),[m,f]=(0,A.useState)(),[u,C]=(0,A.useState)(()=>new pe),[S,v]=(0,A.useState)(()=>new pe("ag-hidden")),[b,P]=(0,A.useState)(()=>new pe("ag-hidden")),[q,_]=(0,A.useState)(()=>new pe("ag-invisible"));(0,A.useImperativeHandle)(t,()=>({refresh(){return!1}})),(0,A.useLayoutEffect)(()=>Be(i,n,d.current),[i]);const k=(0,A.useCallback)(D=>{if(s.current=D,!D){a.current=n.destroyBean(a.current);return}const W={setInnerRenderer:(T,j)=>{g(T),f(j)},setChildCount:T=>y(T),addOrRemoveCssClass:(T,j)=>C(L=>L.setClass(T,j)),setContractedDisplayed:T=>P(j=>j.setClass("ag-hidden",!T)),setExpandedDisplayed:T=>v(j=>j.setClass("ag-hidden",!T)),setCheckboxVisible:T=>_(j=>j.setClass("ag-invisible",!T))},K=r.getInstance("groupCellRendererCtrl");K&&(a.current=n.createBean(K),a.current.init(W,D,c.current,o.current,l.current,ut,e))},[]),x=(0,A.useMemo)(()=>`ag-cell-wrapper ${u.toString()}`,[u]),p=(0,A.useMemo)(()=>`ag-group-expanded ${S.toString()}`,[S]),E=(0,A.useMemo)(()=>`ag-group-contracted ${b.toString()}`,[b]),B=(0,A.useMemo)(()=>`ag-group-checkbox ${q.toString()}`,[q]),oe=i&&i.componentFromFramework,N=oe?i.componentClass:void 0,J=i==null&&m!=null,I=(0,_t._escapeString)(m,!0);return A.default.createElement("span",{className:x,ref:k,...e.colDef?{}:{role:a.current?.getCellAriaRole()}},A.default.createElement("span",{className:p,ref:o}),A.default.createElement("span",{className:E,ref:l}),A.default.createElement("span",{className:B,ref:c}),A.default.createElement("span",{className:"ag-group-value",ref:d},J&&A.default.createElement(A.default.Fragment,null,I),oe&&A.default.createElement(N,{...i.params})),A.default.createElement("span",{className:"ag-group-child-count"},R))}),lt=ut,Oe=(0,Gt.createContext)({setMethods:()=>{}}),zt=e=>{const{initialProps:t,addUpdateCallback:r,CustomComponentClass:n,setMethods:s}=e,[{key:d,...c},o]=(0,Fe.useState)(t);return(0,Fe.useEffect)(()=>{r(l=>o(l))},[]),Fe.default.createElement(Oe.Provider,{value:{setMethods:s}},Fe.default.createElement(n,{key:d,...c}))},$t=(0,Fe.memo)(zt),Jt=0;function dt(){return`agPortalKey_${++Jt}`}var pt=class{constructor(e,t,r,n){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=r,this.suppressFallbackMethods=!!n,this.statelessComponent=this.isStateless(this.reactComponent),this.key=dt(),this.portalKey=dt(),this.instanceCreated=this.isStatelessComponent()?Ge.AgPromise.resolve(!1):new Ge.AgPromise(s=>{this.resolveInstanceCreated=s})}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(),r=document.createElement(t||"div");return r.classList.add("ag-react-container"),e.reactContainer=r,r}addParentContainerStyleAndClasses(){this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&((0,Ge._warnOnce)('Since v31.1 "getReactContainerStyle" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),Object.assign(this.eParentElement.style,this.componentInstance.getReactContainerStyle())),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses()&&((0,Ge._warnOnce)('Since v31.1 "getReactContainerClasses" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),this.componentInstance.getReactContainerClasses().forEach(t=>this.eParentElement.classList.add(t))))}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 r=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!r){setTimeout(()=>this.callMethod(e,t));return}const n=r[e];if(n)return n.apply(r,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 Ge.AgPromise(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{this.componentInstance=t,this.addParentContainerStyleAndClasses(),this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=(0,Bt.createPortal)(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return(0,At.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 r=this[`${e}Component`];if(!this.suppressFallbackMethods&&r)return r.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function Ye(e,t,r){e.forEach(n=>{const s=t[n];s&&(r[n]=s)})}var Ce=class extends pt{constructor(){super(...arguments),this.awaitUpdateCallback=new je.AgPromise(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=$t}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:r=>this.setMethods(r),addUpdateCallback:r=>{this.updateCallback=()=>(r(this.getProps()),new je.AgPromise(n=>{setTimeout(()=>{n()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,Ye(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new je.AgPromise(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},Kt=class extends Ce{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},Qt=class extends Ce{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}},Yt=class extends Ce{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:r,shake:n}=this;return e.label=t,e.icon=r,e.shake=n,e}},Zt=class extends Ce{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterChangedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1}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}getOptionalMethods(){return["afterGuiAttached","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)}updateModel(e){this.setModel(e).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,delete e.filterModifiedCallback,delete e.valueGetter,e}};function mt(e,t){e.parentFilterInstance(r=>{(r.setModel(t)||Ot.AgPromise.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var Xt=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=r=>this.updateModel(r)}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){Ye(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),mt(this.floatingFilterParams,e)}},er=class extends Ce{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(),mt(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},tr=class extends Ce{refresh(e){this.sourceParams=e,this.refreshProps()}},rr=class extends Ce{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}},sr=class extends Ce{refresh(e){this.sourceParams=e,this.refreshProps()}},nr=class extends Ce{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},or=class extends Ce{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 ar(e,t){(e?.getInstance?.()??nt.AgPromise.resolve(void 0)).then(n=>t(n))}function Ue(){(0,nt._warnOnce)("As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.")}var cr=1e3,ir=class{constructor(e,t,r){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=r||cr}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,r){this.portals=[...this.portals,e],this.waitForInstance(t,r),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,r=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-r>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return;window.setTimeout(()=>{this.waitForInstance(e,t,r)})}}},ur=({ctrl:e})=>{const t=e.isAlive(),{context:r}=(0,te.useContext)(ne),n=t?e.getColId():void 0,[s,d]=(0,te.useState)(),c=(0,te.useRef)(),o=(0,te.useRef)(null),l=(0,te.useRef)(null),a=(0,te.useRef)(null),i=(0,te.useRef)(),g=(0,te.useRef)();t&&!g.current&&(g.current=new Te.CssClassManager(()=>o.current));const R=(0,te.useCallback)(u=>{if(o.current=u,c.current=u?r.createBean(new Te._EmptyBean):r.destroyBean(c.current),!u||!t)return;const C={setWidth:v=>{o.current&&(o.current.style.width=v)},addOrRemoveCssClass:(v,b)=>g.current.addOrRemoveCssClass(v,b),setAriaSort:v=>{o.current&&(v?(0,Te._setAriaSort)(o.current,v):(0,Te._removeAriaSort)(o.current))},setUserCompDetails:v=>d(v),getUserCompInstance:()=>i.current||void 0};e.setComp(C,u,l.current,a.current,c.current);const S=e.getSelectAllGui();l.current?.insertAdjacentElement("afterend",S),c.current.addDestroyFunc(()=>S.remove())},[]);(0,te.useLayoutEffect)(()=>Be(s,r,a.current,i),[s]),(0,te.useEffect)(()=>{e.setDragSource(o.current)},[s]);const y=(0,te.useMemo)(()=>!!(s?.componentFromFramework&&be(s.componentClass)),[s]),m=s&&s.componentFromFramework,f=s&&s.componentClass;return te.default.createElement("div",{ref:R,className:"ag-header-cell","col-id":n,role:"columnheader"},te.default.createElement("div",{ref:l,className:"ag-header-cell-resize",role:"presentation"}),te.default.createElement("div",{ref:a,className:"ag-header-cell-comp-wrapper",role:"presentation"},m&&y&&te.default.createElement(f,{...s.params}),m&&!y&&te.default.createElement(f,{...s.params,ref:i})))},lr=(0,te.memo)(ur),dr=({ctrl:e})=>{const{context:t,gos:r}=(0,O.useContext)(ne),[n,s]=(0,O.useState)(()=>new pe("ag-header-cell","ag-floating-filter")),[d,c]=(0,O.useState)(()=>new pe),[o,l]=(0,O.useState)(()=>new pe("ag-floating-filter-button","ag-hidden")),[a,i]=(0,O.useState)("false"),[g,R]=(0,O.useState)(),[,y]=(0,O.useState)(1),m=(0,O.useRef)(),f=(0,O.useRef)(null),u=(0,O.useRef)(null),C=(0,O.useRef)(null),S=(0,O.useRef)(null),v=(0,O.useRef)(),b=(0,O.useRef)(),P=I=>{I!=null&&v.current&&v.current(I)},q=(0,O.useCallback)(I=>{if(f.current=I,m.current=I?t.createBean(new ot._EmptyBean):t.destroyBean(m.current),!I)return;b.current=new ot.AgPromise(W=>{v.current=W});const D={addOrRemoveCssClass:(W,K)=>s(T=>T.setClass(W,K)),addOrRemoveBodyCssClass:(W,K)=>c(T=>T.setClass(W,K)),setButtonWrapperDisplayed:W=>{l(K=>K.setClass("ag-hidden",!W)),i(W?"false":"true")},setWidth:W=>{f.current&&(f.current.style.width=W)},setCompDetails:W=>R(W),getFloatingFilterComp:()=>b.current?b.current:null,setMenuIcon:W=>S.current?.appendChild(W)};e.setComp(D,I,S.current,u.current,m.current)},[]);(0,O.useLayoutEffect)(()=>Be(g,t,u.current,P),[g]);const _=(0,O.useMemo)(()=>n.toString(),[n]),k=(0,O.useMemo)(()=>d.toString(),[d]),x=(0,O.useMemo)(()=>o.toString(),[o]),p=(0,O.useMemo)(()=>!!(g&&g.componentFromFramework&&be(g.componentClass)),[g]),E=(0,O.useMemo)(()=>r.get("reactiveCustomComponents"),[]),B=(0,O.useMemo)(()=>{if(g)if(E){const I=new Xt(g.params,()=>y(D=>D+1));return P(I),I}else g.componentFromFramework&&Ue()},[g]),oe=B?.getProps(),N=g&&g.componentFromFramework,J=g&&g.componentClass;return O.default.createElement("div",{ref:q,className:_,role:"gridcell"},O.default.createElement("div",{ref:u,className:k,role:"presentation"},N&&!E&&O.default.createElement(J,{...g.params,ref:p?()=>{}:P}),N&&E&&O.default.createElement(Oe.Provider,{value:{setMethods:I=>B.setMethods(I)}},O.default.createElement(J,{...oe}))),O.default.createElement("div",{ref:C,"aria-hidden":a,className:x,role:"presentation"},O.default.createElement("button",{ref:S,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},pr=(0,O.memo)(dr),mr=({ctrl:e})=>{const{context:t}=(0,V.useContext)(ne),[r,n]=(0,V.useState)(()=>new pe),[s,d]=(0,V.useState)(()=>new pe),[c,o]=(0,V.useState)("false"),[l,a]=(0,V.useState)(),[i,g]=(0,V.useState)(),R=(0,V.useMemo)(()=>e.getColId(),[]),y=(0,V.useRef)(),m=(0,V.useRef)(null),f=(0,V.useRef)(null),u=(0,V.useRef)(null),C=(0,V.useRef)(),S=(0,V.useCallback)(k=>{if(m.current=k,y.current=k?t.createBean(new Wt._EmptyBean):t.destroyBean(y.current),!k)return;const x={setWidth:p=>{m.current&&(m.current.style.width=p)},addOrRemoveCssClass:(p,E)=>n(B=>B.setClass(p,E)),setUserCompDetails:p=>g(p),setResizableDisplayed:p=>{d(E=>E.setClass("ag-hidden",!p)),o(p?"false":"true")},setAriaExpanded:p=>a(p),getUserCompInstance:()=>C.current||void 0};e.setComp(x,k,f.current,u.current,y.current)},[]);(0,V.useLayoutEffect)(()=>Be(i,t,u.current),[i]),(0,V.useEffect)(()=>{m.current&&e.setDragSource(m.current)},[i]);const v=(0,V.useMemo)(()=>!!(i?.componentFromFramework&&be(i.componentClass)),[i]),b=(0,V.useMemo)(()=>"ag-header-group-cell "+r.toString(),[r]),P=(0,V.useMemo)(()=>"ag-header-cell-resize "+s.toString(),[s]),q=i&&i.componentFromFramework,_=i&&i.componentClass;return V.default.createElement("div",{ref:S,className:b,"col-id":R,role:"columnheader","aria-expanded":l},V.default.createElement("div",{ref:u,className:"ag-header-cell-comp-wrapper",role:"presentation"},q&&v&&V.default.createElement(_,{...i.params}),q&&!v&&V.default.createElement(_,{...i.params,ref:C})),V.default.createElement("div",{ref:f,"aria-hidden":c,className:P}))},fr=(0,V.memo)(mr),hr=({ctrl:e})=>{const{context:t}=(0,re.useContext)(ne),{topOffset:r,rowHeight:n}=(0,re.useMemo)(()=>e.getTopAndHeight(),[]),s=e.getAriaRowIndex(),d=e.getHeaderRowClass(),[c,o]=(0,re.useState)(()=>n+"px"),[l,a]=(0,re.useState)(()=>r+"px"),i=(0,re.useRef)(null),g=(0,re.useRef)(null),[R,y]=(0,re.useState)(()=>e.getHeaderCtrls()),m=(0,re.useRef)(),f=(0,re.useRef)(null),u=(0,re.useCallback)(v=>{if(f.current=v,m.current=v?t.createBean(new ze._EmptyBean):t.destroyBean(m.current),!v)return;const b={setHeight:P=>o(P),setTop:P=>a(P),setHeaderCtrls:(P,q,_)=>{g.current=i.current,i.current=P;const k=Qe(g.current,P,q);k!==g.current&&Ke(_,()=>y(k))},setWidth:P=>{f.current&&(f.current.style.width=P)}};e.setComp(b,m.current,!1)},[]),C=(0,re.useMemo)(()=>({height:c,top:l}),[c,l]),S=(0,re.useCallback)(v=>{switch(e.getType()){case ze.HeaderRowType.COLUMN_GROUP:return re.default.createElement(fr,{ctrl:v,key:v.instanceId});case ze.HeaderRowType.FLOATING_FILTER:return re.default.createElement(pr,{ctrl:v,key:v.instanceId});default:return re.default.createElement(lr,{ctrl:v,key:v.instanceId})}},[]);return re.default.createElement("div",{ref:u,className:d,role:"row",style:C,"aria-rowindex":s},R.map(S))},Cr=(0,re.memo)(hr),gr=({pinned:e})=>{const[t,r]=(0,ce.useState)(!0),[n,s]=(0,ce.useState)([]),{context:d}=(0,ce.useContext)(ne),c=(0,ce.useRef)(null),o=(0,ce.useRef)(null),l=(0,ce.useRef)(),a=e==="left",i=e==="right",g=!a&&!i,R=(0,ce.useCallback)(f=>{if(c.current=f,l.current=f?d.createBean(new Dt.HeaderRowContainerCtrl(e)):d.destroyBean(l.current),!f)return;const u={setDisplayed:r,setCtrls:C=>s(C),setCenterWidth:C=>{o.current&&(o.current.style.width=C)},setViewportScrollLeft:C=>{c.current&&(c.current.scrollLeft=C)},setPinnedContainerWidth:C=>{c.current&&(c.current.style.width=C,c.current.style.minWidth=C,c.current.style.maxWidth=C)}};l.current.setComp(u,c.current)},[]),y=t?"":"ag-hidden",m=()=>n.map(f=>ce.default.createElement(Cr,{ctrl:f,key:f.instanceId}));return ce.default.createElement(ce.default.Fragment,null,a&&ce.default.createElement("div",{ref:R,className:"ag-pinned-left-header "+y,"aria-hidden":!t,role:"rowgroup"},m()),i&&ce.default.createElement("div",{ref:R,className:"ag-pinned-right-header "+y,"aria-hidden":!t,role:"rowgroup"},m()),g&&ce.default.createElement("div",{ref:R,className:"ag-header-viewport "+y,role:"presentation"},ce.default.createElement("div",{ref:o,className:"ag-header-container",role:"rowgroup"},m())))},Ze=(0,ce.memo)(gr),yr=()=>{const[e,t]=(0,ie.useState)(()=>new pe),[r,n]=(0,ie.useState)(),{context:s}=(0,ie.useContext)(ne),d=(0,ie.useRef)(null),c=(0,ie.useRef)(),o=(0,ie.useCallback)(i=>{if(d.current=i,c.current=i?s.createBean(new It.GridHeaderCtrl):s.destroyBean(c.current),!i)return;const g={addOrRemoveCssClass:(R,y)=>t(m=>m.setClass(R,y)),setHeightAndMinHeight:R=>n(R)};c.current.setComp(g,i,i)},[]),l=(0,ie.useMemo)(()=>"ag-header "+e.toString(),[e]),a=(0,ie.useMemo)(()=>({height:r,minHeight:r}),[r]);return ie.default.createElement("div",{ref:o,className:l,style:a,role:"presentation"},ie.default.createElement(Ze,{pinned:"left"}),ie.default.createElement(Ze,{pinned:null}),ie.default.createElement(Ze,{pinned:"right"}))},vr=(0,ie.memo)(yr),Rr=(e,t)=>{(0,Tt.useEffect)(()=>{const r=t.current;if(r){const n=r.parentElement;if(n){const s=document.createComment(e);return n.insertBefore(s,r),()=>{n.removeChild(s)}}}},[e])},we=Rr,wr=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new Nt.AgPromise(r=>{this.resolveInstanceCreated=r}),this.onValueChange=r=>this.updateValue(r),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){Ye(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"]}updateValue(e){this.value=e,this.refreshProps()}},Sr=e=>{const t=(0,Se.useRef)(e),r=(0,Se.useRef)(),n=(0,Se.useRef)(!1),s=(0,Se.useRef)(!1),[,d]=(0,Se.useState)(0);n.current&&(s.current=!0),(0,Se.useEffect)(()=>(n.current||(r.current=t.current(),n.current=!0),d(c=>c+1),()=>{s.current&&r.current?.()}),[])},br=e=>{const[t,r]=(0,Ae.useState)(),{context:n,popupService:s,localeService:d,gos:c,editService:o}=(0,Ae.useContext)(ne);return Sr(()=>{const{editDetails:l,cellCtrl:a,eParentCell:i}=e,{compDetails:g}=l,R=c.get("stopEditingWhenCellsLoseFocus"),y=n.createBean(o.createPopupEditorWrapper(g.params)),m=y.getGui();if(e.jsChildComp){const b=e.jsChildComp.getGui();b&&m.appendChild(b)}const f={column:a.getColumn(),rowNode:a.getRowNode(),type:"popupCellEditor",eventSource:i,ePopup:m,position:l.popupPosition,keepWithinBounds:!0},u=s.positionPopupByComponent.bind(s,f),C=d.getLocaleTextFunc(),S=s.addPopup({modal:R,eChild:m,closeOnEsc:!0,closedCallback:()=>{a.onPopupEditorClosed()},anchorToElement:i,positionCallback:u,ariaLabel:C("ariaLabelCellEditor","Cell Editor")}),v=S?S.hideFunc:void 0;return r(y),e.jsChildComp?.afterGuiAttached?.(),()=>{v?.(),n.destroyBean(y)}}),Ae.default.createElement(Ae.default.Fragment,null,t&&e.wrappedContent&&(0,Ht.createPortal)(e.wrappedContent,t.getGui()))},ft=(0,Ae.memo)(br),Er=(e,t,r,n,s,d)=>{const{context:c}=(0,Ne.useContext)(ne),o=(0,Ne.useCallback)(()=>{const l=s.current;if(!l)return;const a=l.getGui();a&&a.parentElement&&a.parentElement.removeChild(a),c.destroyBean(l),s.current=void 0},[]);(0,Ne.useEffect)(()=>{const l=e!=null,a=e?.compDetails&&!e.compDetails.componentFromFramework,i=t&&r==null;if(!(l&&a&&!i)){o();return}const R=e.compDetails;if(s.current){const m=s.current,u=m.refresh!=null&&e.force==!1?m.refresh(R.params):!1;if(u===!0||u===void 0)return;o()}const y=R.newAgStackInstance();y?.then(m=>{if(!m)return;const f=m.getGui();if(!f)return;(t?r:d.current).appendChild(f),s.current=m})},[e,t,n]),(0,Ne.useEffect)(()=>o,[])},Pr=Er,_r=(e,t,r)=>{const{compProxy:n}=e;r(n);const s=n.getProps(),d=be(t);return h.default.createElement(Oe.Provider,{value:{setMethods:c=>n.setMethods(c)}},d?h.default.createElement(t,{...s}):h.default.createElement(t,{...s,ref:c=>n.setRef(c)}))},ht=(e,t,r)=>{const n=e.compProxy;return h.default.createElement(h.default.Fragment,null,n?_r(e,t,r):h.default.createElement(t,{...e.compDetails.params,ref:r}))},Mr=(e,t,r,n,s)=>{const d=e.compDetails,c=d.componentClass,o=d.componentFromFramework&&!e.popup,l=d.componentFromFramework&&e.popup,a=!d.componentFromFramework&&e.popup;return h.default.createElement(h.default.Fragment,null,o&&ht(e,c,t),l&&h.default.createElement(ft,{editDetails:e,cellCtrl:n,eParentCell:r,wrappedContent:ht(e,c,t)}),a&&s&&h.default.createElement(ft,{editDetails:e,cellCtrl:n,eParentCell:r,jsChildComp:s}))},kr=(e,t,r,n,s,d,c)=>{const{compDetails:o,value:l}=e,a=!o,i=o&&o.componentFromFramework,g=o&&o.componentClass,R=l?.toString?l.toString():l,y=()=>h.default.createElement(h.default.Fragment,null,a&&h.default.createElement(h.default.Fragment,null,R),i&&!d&&h.default.createElement(g,{...o.params,key:t,ref:n}),i&&d&&h.default.createElement(g,{...o.params,key:t}));return h.default.createElement(h.default.Fragment,null,s?h.default.createElement("span",{role:"presentation",id:`cell-${r}`,className:"ag-cell-value",ref:c},y()):y())},Fr=({cellCtrl:e,printLayout:t,editingRow:r})=>{const{context:n}=(0,h.useContext)(ne),{colIdSanitised:s,instanceId:d}=e,c=(0,h.useRef)(),[o,l]=(0,h.useState)(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[a,i]=(0,h.useState)(),[g,R]=(0,h.useState)(1),[y,m]=(0,h.useState)(),[f,u]=(0,h.useState)(!1),[C,S]=(0,h.useState)(!1),[v,b]=(0,h.useState)(!1),[P,q]=(0,h.useState)(),_=(0,h.useMemo)(()=>e.isForceWrapper(),[e]),k=(0,h.useMemo)(()=>e.getCellAriaRole(),[e]),x=(0,h.useRef)(null),p=(0,h.useRef)(null),E=(0,h.useRef)(),B=(0,h.useRef)(),oe=(0,h.useRef)(),N=(0,h.useRef)([]),J=(0,h.useRef)(),[I,D]=(0,h.useState)(0),W=(0,h.useCallback)(z=>{J.current=z,D(se=>se+1)},[]),K=o!=null&&(f||v||C),T=_||K,j=(0,h.useCallback)(z=>{if(B.current=z,z){const se=z.isCancelBeforeStart&&z.isCancelBeforeStart();setTimeout(()=>{se?(e.stopEditing(!0),e.focusCell(!0)):e.cellEditorAttached()})}},[e]),L=(0,h.useRef)();L.current||(L.current=new $e.CssClassManager(()=>x.current)),Pr(o,T,J.current,I,E,x);const me=(0,h.useRef)();(0,h.useLayoutEffect)(()=>{const z=me.current,se=o;if(me.current=o,z==null||z.compDetails==null||se==null||se.compDetails==null)return;const ae=z.compDetails,U=se.compDetails;if(ae.componentClass!=U.componentClass||p.current?.refresh==null)return;p.current.refresh(U.params)!=!0&&R(le=>le+1)},[o]),(0,h.useLayoutEffect)(()=>{if(!(a&&!a.compDetails.componentFromFramework))return;const se=a.compDetails,ae=a.popup===!0,U=se.newAgStackInstance();return U.then(ee=>{if(!ee)return;const le=ee.getGui();j(ee),ae||((_?oe:x).current?.appendChild(le),ee.afterGuiAttached&&ee.afterGuiAttached()),q(ee)}),()=>{U.then(ee=>{const le=ee.getGui();n.destroyBean(ee),j(void 0),q(void 0),le?.parentElement?.removeChild(le)})}},[a]);const M=(0,h.useCallback)(z=>{if(oe.current=z,!z){N.current.forEach(ae=>ae()),N.current=[];return}const se=ae=>{if(ae){const U=ae.getGui();z.insertAdjacentElement("afterbegin",U),N.current.push(()=>{n.destroyBean(ae),(0,$e._removeFromParent)(U)})}return ae};if(f){const ae=e.createSelectionCheckbox();se(ae)}v&&se(e.createDndSource()),C&&se(e.createRowDragComp())},[e,n,v,C,f]),X=(0,h.useCallback)(z=>{if(x.current=z,c.current=z?n.createBean(new $e._EmptyBean):n.destroyBean(c.current),!z||!e)return;const se={addOrRemoveCssClass:(U,ee)=>L.current.addOrRemoveCssClass(U,ee),setUserStyles:U=>m(U),getFocusableElement:()=>x.current,setIncludeSelection:U=>u(U),setIncludeRowDrag:U=>S(U),setIncludeDndSource:U=>b(U),getCellEditor:()=>B.current||null,getCellRenderer:()=>p.current??E.current,getParentOfValue:()=>J.current??oe.current??x.current,setRenderDetails:(U,ee,le)=>{l(ve=>ve?.compDetails!==U||ve?.value!==ee||ve?.force!==le?{value:ee,compDetails:U,force:le}:ve)},setEditDetails:(U,ee,le,ve)=>{if(U){let Pe;ve?Pe=new wr(U.params,()=>R(Xe=>Xe+1)):U.componentFromFramework&&Ue(),i({compDetails:U,popup:ee,popupPosition:le,compProxy:Pe}),ee||l(void 0)}else i(Pe=>{Pe?.compProxy&&(B.current=void 0)})}},ae=oe.current||void 0;e.setComp(se,z,ae,t,r,c.current)},[]),Q=(0,h.useMemo)(()=>!!(o?.compDetails?.componentFromFramework&&be(o.compDetails.componentClass)),[o]);(0,h.useLayoutEffect)(()=>{x.current&&(L.current.addOrRemoveCssClass("ag-cell-value",!T),L.current.addOrRemoveCssClass("ag-cell-inline-editing",!!a&&!a.popup),L.current.addOrRemoveCssClass("ag-cell-popup-editing",!!a&&!!a.popup),L.current.addOrRemoveCssClass("ag-cell-not-inline-editing",!a||!!a.popup),e.getRowCtrl()?.setInlineEditingCss(),e.shouldRestoreFocus()&&!e.isEditing()&&x.current.focus({preventScroll:!0}))});const ge=()=>h.default.createElement(h.default.Fragment,null,o!=null&&kr(o,g,d,p,T,Q,W),a!=null&&Mr(a,j,x.current,e,P)),Ee=(0,h.useCallback)(()=>e.onFocusOut(),[]);return h.default.createElement("div",{ref:X,style:y,role:k,"col-id":s,onBlur:Ee},T?h.default.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:M},ge()):ge())},Gr=(0,h.memo)(Fr),Ar=({rowCtrl:e,containerType:t})=>{const{context:r,gos:n}=(0,G.useContext)(ne),s=(0,G.useRef)(),d=(0,G.useRef)(e.getDomOrder()),c=e.isFullWidth(),o=e.getRowNode().displayed,[l,a]=(0,G.useState)(()=>o?e.getRowIndex():null),[i,g]=(0,G.useState)(()=>e.getRowId()),[R,y]=(0,G.useState)(()=>e.getBusinessKey()),[m,f]=(0,G.useState)(()=>e.getRowStyles()),u=(0,G.useRef)(null),C=(0,G.useRef)(null),[S,v]=(0,G.useState)(()=>null),[b,P]=(0,G.useState)(),[q,_]=(0,G.useState)(()=>o?e.getInitialRowTop(t):void 0),[k,x]=(0,G.useState)(()=>o?e.getInitialTransform(t):void 0),p=(0,G.useRef)(null),E=(0,G.useRef)(),B=(0,G.useRef)(!1),[oe,N]=(0,G.useState)(0);(0,G.useEffect)(()=>{if(B.current||!b||oe>10)return;const M=p.current?.firstChild;M?(e.setupDetailRowAutoHeight(M),B.current=!0):N(X=>X+1)},[b,oe]);const J=(0,G.useRef)();J.current||(J.current=new ct.CssClassManager(()=>p.current));const I=(0,G.useCallback)(M=>{if(p.current=M,s.current=M?r.createBean(new ct._EmptyBean):r.destroyBean(s.current),!M){e.unsetComp(t);return}if(!e.isAlive())return;const X={setTop:_,setTransform:x,addOrRemoveCssClass:(Q,ge)=>J.current.addOrRemoveCssClass(Q,ge),setDomOrder:Q=>d.current=Q,setRowIndex:a,setRowId:g,setRowBusinessKey:y,setUserStyles:f,setCellCtrls:(Q,ge)=>{C.current=u.current,u.current=Q;const Ee=Qe(C.current,Q,d.current);Ee!==C.current&&Ke(ge,()=>v(Ee))},showFullWidth:Q=>P(Q),getFullWidthCellRenderer:()=>E.current,refreshFullWidth:Q=>j.current?(P(ge=>({...ge,params:Q()})),!0):!E.current||!E.current.refresh?!1:E.current.refresh(Q())};e.setComp(X,M,t,s.current)},[]);(0,G.useLayoutEffect)(()=>Be(b,r,p.current,E),[b]);const D=(0,G.useMemo)(()=>{const M={top:q,transform:k};return Object.assign(M,m),M},[q,k,m]),W=c&&b?.componentFromFramework,K=!c&&S!=null,T=(0,G.useMemo)(()=>!!(b?.componentFromFramework&&be(b.componentClass)),[b]),j=(0,G.useRef)(!1);(0,G.useEffect)(()=>{j.current=T&&!!b&&!!n.get("reactiveCustomComponents")},[T,b]);const L=()=>S?.map(M=>G.default.createElement(Gr,{cellCtrl:M,editingRow:e.isEditing(),printLayout:e.isPrintLayout(),key:M.instanceId})),me=()=>{const M=b.componentClass;return G.default.createElement(G.default.Fragment,null,T?G.default.createElement(M,{...b.params}):G.default.createElement(M,{...b.params,ref:E}))};return G.default.createElement("div",{ref:I,role:"row",style:D,"row-index":l,"row-id":i,"row-business-key":R},K&&L(),W&&me())},Br=(0,G.memo)(Ar),Or=({name:e})=>{const{context:t}=(0,$.useContext)(ne),r=(0,$.useMemo)(()=>(0,at._getRowContainerOptions)(e),[e]),n=(0,$.useRef)(null),s=(0,$.useRef)(null),d=(0,$.useRef)([]),c=(0,$.useRef)([]),[o,l]=(0,$.useState)(()=>[]),a=(0,$.useRef)(!1),i=(0,$.useRef)(),g=(0,$.useMemo)(()=>fe(r.viewport),[r]),R=(0,$.useMemo)(()=>fe(r.container),[r]),y=r.type==="center",m=y?n:s;we(" AG Row Container "+e+" ",m);const f=(0,$.useCallback)(()=>y?n.current!=null&&s.current!=null:s.current!=null,[]),u=(0,$.useCallback)(()=>y?n.current==null&&s.current==null:s.current==null,[]),C=(0,$.useCallback)(()=>{if(u()&&(i.current=t.destroyBean(i.current)),f()){const P=_=>{const k=Qe(c.current,d.current,a.current);k!==c.current&&(c.current=k,Ke(_,()=>l(k)))},q={setHorizontalScroll:_=>{n.current&&(n.current.scrollLeft=_)},setViewportHeight:_=>{n.current&&(n.current.style.height=_)},setRowCtrls:({rowCtrls:_,useFlushSync:k})=>{const x=!!k&&d.current.length>0&&_.length>0;d.current=_,P(x)},setDomOrder:_=>{a.current!=_&&(a.current=_,P(!1))},setContainerWidth:_=>{s.current&&(s.current.style.width=_)},setOffsetTop:_=>{s.current&&(s.current.style.transform=`translateY(${_})`)}};i.current=t.createBean(new at.RowContainerCtrl(e)),i.current.setComp(q,s.current,n.current)}},[f,u]),S=(0,$.useCallback)(P=>{s.current=P,C()},[C]),v=(0,$.useCallback)(P=>{n.current=P,C()},[C]),b=()=>$.default.createElement("div",{className:R,ref:S,role:"rowgroup"},o.map(P=>$.default.createElement(Br,{rowCtrl:P,containerType:r.type,key:P.instanceId})));return $.default.createElement($.default.Fragment,null,y?$.default.createElement("div",{className:g,ref:v,role:"presentation"},b()):b())},xr=(0,$.memo)(Or),Ir=()=>{const{context:e,resizeObserverService:t}=(0,w.useContext)(ne),[r,n]=(0,w.useState)(""),[s,d]=(0,w.useState)(0),[c,o]=(0,w.useState)(0),[l,a]=(0,w.useState)("0px"),[i,g]=(0,w.useState)("0px"),[R,y]=(0,w.useState)("100%"),[m,f]=(0,w.useState)("0px"),[u,C]=(0,w.useState)("0px"),[S,v]=(0,w.useState)("100%"),[b,P]=(0,w.useState)(""),[q,_]=(0,w.useState)(""),[k,x]=(0,w.useState)(null),[p,E]=(0,w.useState)(""),[B,oe]=(0,w.useState)(null),[N,J]=(0,w.useState)("ag-layout-normal"),I=(0,w.useRef)();I.current||(I.current=new Re.CssClassManager(()=>D.current));const D=(0,w.useRef)(null),W=(0,w.useRef)(null),K=(0,w.useRef)(null),T=(0,w.useRef)(null),j=(0,w.useRef)(null),L=(0,w.useRef)(null),me=(0,w.useRef)(null),M=(0,w.useRef)([]),X=(0,w.useRef)([]);we(" AG Grid Body ",D),we(" AG Pinned Top ",W),we(" AG Sticky Top ",K),we(" AG Middle ",L),we(" AG Pinned Bottom ",me);const Q=(0,w.useCallback)(ye=>{if(D.current=ye,!ye){M.current=e.destroyBeans(M.current),X.current.forEach(Y=>Y()),X.current=[];return}if(!e)return;const Ve=(Y,de)=>{Y.appendChild(de),X.current.push(()=>Y.removeChild(de))},et=Y=>{const de=e.createBean(new Y);return M.current.push(de),de},De=(Y,de,rs)=>{Ve(Y,document.createComment(rs)),Ve(Y,et(de).getGui())};De(ye,Re.FakeHScrollComp," AG Fake Horizontal Scroll "),De(ye,Re.OverlayWrapperComponent," AG Overlay Wrapper "),j.current&&De(j.current,Re.FakeVScrollComp," AG Fake Vertical Scroll ");const ts={setRowAnimationCssOnBodyViewport:n,setColumnCount:Y=>{D.current&&(0,Re._setAriaColCount)(D.current,Y)},setRowCount:Y=>{D.current&&(0,Re._setAriaRowCount)(D.current,Y)},setTopHeight:d,setBottomHeight:o,setStickyTopHeight:a,setStickyTopTop:g,setStickyTopWidth:y,setTopDisplay:P,setBottomDisplay:_,setColumnMovingCss:(Y,de)=>I.current.addOrRemoveCssClass(Y,de),updateLayoutClasses:J,setAlwaysVerticalScrollClass:x,setPinnedTopBottomOverflowY:E,setCellSelectableCss:(Y,de)=>oe(de?Y:null),setBodyViewportWidth:Y=>{L.current&&(L.current.style.width=Y)},registerBodyViewportResizeListener:Y=>{if(L.current){const de=t.observeResize(L.current,Y);X.current.push(()=>de())}},setStickyBottomHeight:f,setStickyBottomBottom:C,setStickyBottomWidth:v},gt=e.createBean(new Re.GridBodyCtrl);M.current.push(gt),gt.setComp(ts,ye,L.current,W.current,me.current,K.current,T.current)},[]),ge=(0,w.useMemo)(()=>fe("ag-root","ag-unselectable",N),[N]),Ee=(0,w.useMemo)(()=>fe("ag-body-viewport",r,N,k,B),[r,N,k,B]),z=(0,w.useMemo)(()=>fe("ag-body",N),[N]),se=(0,w.useMemo)(()=>fe("ag-floating-top",B),[B]),ae=(0,w.useMemo)(()=>fe("ag-sticky-top",B),[B]),U=(0,w.useMemo)(()=>fe("ag-sticky-bottom",m==="0px"?"ag-hidden":null,B),[B,m]),ee=(0,w.useMemo)(()=>fe("ag-floating-bottom",B),[B]),le=(0,w.useMemo)(()=>({height:s,minHeight:s,display:b,overflowY:p}),[s,b,p]),ve=(0,w.useMemo)(()=>({height:l,top:i,width:R}),[l,i,R]),Pe=(0,w.useMemo)(()=>({height:m,bottom:u,width:S}),[m,u,S]),Xe=(0,w.useMemo)(()=>({height:c,minHeight:c,display:q,overflowY:p}),[c,q,p]),es=ye=>w.default.createElement(xr,{name:ye,key:`${ye}-container`}),Ie=({section:ye,children:Ve,className:et,style:De})=>w.default.createElement("div",{ref:ye,className:et,role:"presentation",style:De},Ve.map(es));return w.default.createElement("div",{ref:Q,className:ge,role:"treegrid"},w.default.createElement(vr,null),Ie({section:W,className:se,style:le,children:["topLeft","topCenter","topRight","topFullWidth"]}),w.default.createElement("div",{className:z,ref:j,role:"presentation"},Ie({section:L,className:Ee,children:["left","center","right","fullWidth"]})),Ie({section:K,className:ae,style:ve,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),Ie({section:T,className:U,style:Pe,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),Ie({section:me,className:ee,style:Xe,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},Dr=(0,w.memo)(Ir),Wr=(e,t)=>{const{children:r,eFocusableElement:n,onTabKeyDown:s,gridCtrl:d,forceFocusOutWhenTabGuardsAreEmpty:c}=e,{context:o}=(0,ue.useContext)(ne),l=(0,ue.useRef)(null),a=(0,ue.useRef)(null),i=(0,ue.useRef)(),g=u=>{const C=u==null?void 0:parseInt(u,10).toString();[l,a].forEach(S=>{C===void 0?S.current?.removeAttribute("tabindex"):S.current?.setAttribute("tabindex",C)})};(0,ue.useImperativeHandle)(t,()=>({forceFocusOutOfContainer(u){i.current?.forceFocusOutOfContainer(u)}}));const R=(0,ue.useCallback)(()=>{const u=l.current,C=a.current;if(!u&&!C){i.current=o.destroyBean(i.current);return}if(u&&C){const S={setTabIndex:g};i.current=o.createBean(new He.TabGuardCtrl({comp:S,eTopGuard:u,eBottomGuard:C,eFocusableElement:n,onTabKeyDown:s,forceFocusOutWhenTabGuardsAreEmpty:c,focusInnerElement:v=>d.focusInnerElement(v)}))}},[]),y=(0,ue.useCallback)(u=>{l.current=u,R()},[R]),m=(0,ue.useCallback)(u=>{a.current=u,R()},[R]),f=u=>{const C=u==="top"?He.TabGuardClassNames.TAB_GUARD_TOP:He.TabGuardClassNames.TAB_GUARD_BOTTOM;return ue.default.createElement("div",{className:`${He.TabGuardClassNames.TAB_GUARD} ${C}`,role:"presentation",ref:u==="top"?y:m})};return ue.default.createElement(ue.default.Fragment,null,f("top"),r,f("bottom"))},Tr=(0,ue.forwardRef)(Wr),Nr=(0,ue.memo)(Tr),Hr=({context:e})=>{const[t,r]=(0,H.useState)(""),[n,s]=(0,H.useState)(""),[d,c]=(0,H.useState)(""),[o,l]=(0,H.useState)(null),[a,i]=(0,H.useState)(null),[g,R]=(0,H.useState)(!1),[y,m]=(0,H.useState)(),f=(0,H.useRef)(),u=(0,H.useRef)(null),C=(0,H.useRef)(),[S,v]=(0,H.useState)(null),b=(0,H.useRef)(()=>{}),P=(0,H.useRef)(),q=(0,H.useRef)([]),_=(0,H.useCallback)(()=>{},[]),k=(0,H.useMemo)(()=>e.isDestroyed()?null:e.getBeans(),[e]);we(" AG Grid ",u);const x=(0,H.useCallback)(N=>{if(u.current=N,f.current=N?e.createBean(new xt.GridCtrl):e.destroyBean(f.current),!N||e.isDestroyed())return;const J=f.current;b.current=J.focusInnerElement.bind(J);const I={destroyGridUi:()=>{},setRtlClass:r,setGridThemeClass:s,forceFocusOutOfContainer:D=>{if(!D&&P.current?.isDisplayed()){P.current.forceFocusOutOfContainer(D);return}C.current?.forceFocusOutOfContainer(D)},updateLayoutClasses:c,getFocusableContainers:()=>{const D=[],W=u.current?.querySelector(".ag-root");return W&&D.push({getGui:()=>W}),q.current.forEach(K=>{K.isDisplayed()&&D.push(K)}),D},setCursor:l,setUserSelect:i};J.setComp(I,N,N),R(!0)},[]);(0,H.useEffect)(()=>{const N=f.current,J=u.current;if(!y||!k||!N||!S||!J)return;const I=[],{watermarkSelector:D,paginationSelector:W,sideBarSelector:K,statusBarSelector:T,gridHeaderDropZonesSelector:j}=N.getOptionalSelectors(),L=[];if(j){const M=e.createBean(new j.component),X=M.getGui();J.insertAdjacentElement("afterbegin",X),L.push(X),I.push(M)}if(K){const M=e.createBean(new K.component),X=M.getGui(),Q=S.querySelector(".ag-tab-guard-bottom");Q&&(Q.insertAdjacentElement("beforebegin",X),L.push(X)),I.push(M),q.current.push(M)}const me=M=>{const X=e.createBean(new M),Q=X.getGui();return J.insertAdjacentElement("beforeend",Q),L.push(Q),I.push(X),X};if(T&&me(T.component),W){const M=me(W.component);P.current=M,q.current.push(M)}return D&&me(D.component),()=>{e.destroyBeans(I),L.forEach(M=>{M.parentElement?.removeChild(M)})}},[y,S,k]);const p=(0,H.useMemo)(()=>fe("ag-root-wrapper",t,n,d),[t,n,d]),E=(0,H.useMemo)(()=>fe("ag-root-wrapper-body","ag-focus-managed",d),[d]),B=(0,H.useMemo)(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:o??""}),[a,o]),oe=(0,H.useCallback)(N=>{C.current=N,m(N!==null)},[]);return H.default.createElement("div",{ref:x,className:p,style:B,role:"presentation"},H.default.createElement("div",{className:E,ref:v,role:"presentation"},g&&S&&k&&H.default.createElement(ne.Provider,{value:k},H.default.createElement(Nr,{ref:oe,eFocusableElement:S,onTabKeyDown:_,gridCtrl:f.current,forceFocusOutWhenTabGuardsAreEmpty:!0},H.default.createElement(Dr,null)))))},qr=(0,H.memo)(Hr),Ur=class extends qt.BeanStub{wireBeans(e){this.ctrlsService=e.ctrlsService}areHeaderCellsRendered(){return this.ctrlsService.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(t=>t.areCellsRendered()))}},Ct=e=>{const t=(0,F.useRef)(),r=(0,F.useRef)(null),n=(0,F.useRef)(null),s=(0,F.useRef)([]),d=(0,F.useRef)([]),c=(0,F.useRef)(e),o=(0,F.useRef)(),l=(0,F.useRef)(),a=(0,F.useRef)(!1),[i,g]=(0,F.useState)(void 0),[,R]=(0,F.useState)(0),y=(0,F.useCallback)(u=>{if(r.current=u,!u){s.current.forEach(p=>p()),s.current.length=0;return}const C=e.modules||[];n.current||(n.current=new ir(()=>R(p=>p+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),s.current.push(()=>{n.current?.destroy(),n.current=null}));const S=(0,he._combineAttributesAndGridOptions)(e.gridOptions,e),v=()=>{if(a.current){const p=()=>o.current?.shouldQueueUpdates()?void 0:d.current.shift();let E=p();for(;E;)E(),E=p()}},b=new zr(v);o.current=b;const P=new Ur,q={providedBeanInstances:{frameworkComponentWrapper:new Lr(n.current,S.reactiveCustomComponents??(0,he._getGlobalGridOption)("reactiveCustomComponents")??!0),renderStatusService:P},modules:C,frameworkOverrides:b},_=p=>{g(p),p.createBean(P),s.current.push(()=>{p.destroy()}),p.getBean("ctrlsService").whenReady({addDestroyFunc:E=>{s.current.push(E)}},()=>{if(p.isDestroyed())return;const E=t.current;E&&e.setGridApi?.(E)})},k=p=>{p.getBean("ctrlsService").whenReady({addDestroyFunc:E=>{s.current.push(E)}},()=>{d.current.forEach(E=>E()),d.current.length=0,a.current=!0})},x=new he.GridCoreCreator;S.gridId??(S.gridId=l.current),t.current=x.create(u,S,_,k,q),s.current.push(()=>{t.current=void 0}),l.current=t.current.getGridId()},[]),m=(0,F.useMemo)(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),f=(0,F.useCallback)(u=>{a.current&&!o.current?.shouldQueueUpdates()?u():d.current.push(u)},[]);return(0,F.useEffect)(()=>{const u=Vr(c.current,e);c.current=e,f(()=>{t.current&&(0,he._processOnChange)(u,t.current)})},[e]),F.default.createElement("div",{style:m,className:e.className,ref:y},i&&!i.isDestroyed()?F.default.createElement(qr,{context:i}):null,n.current?.getPortals()??null)};function Vr(e,t){const r={};return Object.keys(t).forEach(n=>{const s=t[n];e[n]!==s&&(r[n]=s)}),r}var Lr=class extends he.BaseComponentWrapper{constructor(e,t){super(),this.parent=e,this.reactiveCustomComponents=t}createWrapper(e,t){if(this.reactiveCustomComponents){const s=(d=>{switch(d){case"filter":return Zt;case"floatingFilterComponent":return er;case"dateComponent":return Qt;case"dragAndDropImageComponent":return Yt;case"loadingOverlayComponent":return tr;case"noRowsOverlayComponent":return sr;case"statusPanel":return nr;case"toolPanel":return or;case"menuItem":return rr;case"cellRenderer":return Kt}})(t.propertyName);if(s)return new s(e,this.parent,t)}else switch(t.propertyName){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":Ue();break}const r=!t.cellRenderer&&t.propertyName!=="toolPanel";return new pt(e,this.parent,t,r)}},jr=(0,F.forwardRef)((e,t)=>{const{ctrlsFactory:r,context:n,gos:s,resizeObserverService:d,rowModel:c}=(0,F.useContext)(ne),[o,l]=(0,F.useState)(()=>new pe),[a,i]=(0,F.useState)(()=>new pe),[g,R]=(0,F.useState)(),[y,m]=(0,F.useState)(),f=(0,F.useRef)(),u=(0,F.useRef)(null),C=(0,F.useRef)(),S=(0,F.useMemo)(()=>he.ModuleRegistry.__getGridRegisteredModules(e.api.getGridId()),[e]),v=(0,F.useMemo)(()=>o.toString()+" ag-details-row",[o]),b=(0,F.useMemo)(()=>a.toString()+" ag-details-grid",[a]);t&&(0,F.useImperativeHandle)(t,()=>({refresh(){return f.current?.refresh()??!1}})),e.template&&(0,he._warnOnce)("detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://ag-grid.com/react-data-grid/master-detail-custom-detail/");const P=(0,F.useCallback)(_=>{if(u.current=_,!_){f.current=n.destroyBean(f.current),C.current?.();return}const k={addOrRemoveCssClass:(p,E)=>l(B=>B.setClass(p,E)),addOrRemoveDetailGridCssClass:(p,E)=>i(B=>B.setClass(p,E)),setDetailGrid:p=>R(p),setRowData:p=>m(p),getGui:()=>u.current},x=r.getInstance("detailCellRenderer");if(x&&(n.createBean(x),x.init(k,e),f.current=x,s.get("detailRowAutoHeight"))){const p=()=>{if(u.current==null)return;const E=u.current.clientHeight;E!=null&&E>0&&setTimeout(()=>{e.node.setRowHeight(E),((0,he._isClientSideRowModel)(s)||(0,he._isServerSideRowModel)(s))&&c.onRowHeightChanged()},0)};C.current=d.observeResize(_,p),p()}},[]),q=(0,F.useCallback)(_=>{f.current?.registerDetailWithMaster(_)},[]);return F.default.createElement("div",{className:v,ref:P},g&&F.default.createElement(Ct,{className:b,...g,modules:S,rowData:y,setGridApi:q}))}),zr=class extends he.VanillaFrameworkOverrides{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.frameworkComponents={agGroupCellRenderer:lt,agGroupRowRenderer:lt,agDetailCellRenderer:jr},this.wrapIncoming=(t,r)=>r==="ensureVisible"?jt(t):t(),this.renderingEngine="react"}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 Lt()}},$r=class extends st.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e,this.apiListeners.forEach(t=>t(e))}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return st.default.createElement(Ct,{...this.props,setGridApi:this.setGridApi})}};function xe(e){const{setMethods:t}=(0,Ut.useContext)(Oe);t(e)}function Jr(e){xe(e)}function Kr(e){return xe(e)}function Qr(e){return xe(e)}function Yr(e){xe(e)}function Zr(e){xe(e)}if(typeof ke.exports=="object"&&typeof Le=="object"){var Xr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Object.getOwnPropertyNames(t))!Object.prototype.hasOwnProperty.call(e,s)&&s!==r&&Object.defineProperty(e,s,{get:()=>t[s],enumerable:!(n=Object.getOwnPropertyDescriptor(t,s))||n.enumerable});return e};ke.exports=Xr(ke.exports,Le)}return ke.exports});
(function(Me,_e){typeof exports=="object"&&typeof module=="object"?module.exports=_e(require("ag-grid-community"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define("AgGridReact",["ag-grid-community","react","react-dom"],_e):typeof exports=="object"?exports.AgGridReact=_e(require("ag-grid-community"),require("react"),require("react-dom")):Me.AgGridReact=_e(Me["ag-grid-community"],Me.react,Me["react-dom"])})(this,(Me,_e,ss)=>{var Ve={},ke={exports:Ve},vt=Object.create,We=Object.defineProperty,Rt=Object.getOwnPropertyDescriptor,wt=Object.getOwnPropertyNames,St=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty,Pt=(e,t)=>{for(var r in t)We(e,r,{get:t[r],enumerable:!0})},tt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of wt(t))!bt.call(e,s)&&s!==r&&We(e,s,{get:()=>t[s],enumerable:!(n=Rt(t,s))||n.enumerable});return e},Z=(e,t,r)=>(r=e!=null?vt(St(e)):{},tt(t||!e||!e.__esModule?We(r,"default",{value:e,enumerable:!0}):r,e)),Et=e=>tt(We({},"__esModule",{value:!0}),e),rt={};Pt(rt,{AgGridReact:()=>$r,CustomComponentContext:()=>Be,getInstance:()=>ar,useGridCellEditor:()=>Jr,useGridDate:()=>Kr,useGridFilter:()=>Qr,useGridFloatingFilter:()=>Yr,useGridMenuItem:()=>Zr,warnReactiveCustomComponents:()=>Ue}),ke.exports=Et(rt);var st=Z(require("react"),1),he=require("ag-grid-community"),F=Z(require("react"),1),Mt=require("ag-grid-community"),A=Z(require("react"),1),_t=Z(require("react"),1),kt=Z(require("react"),1),Ft=Z(require("react-dom"),1),je=require("ag-grid-community"),Fe=Z(require("react"),1),Gt=require("react"),Ge=require("ag-grid-community"),At=require("react"),xt=require("react-dom"),Bt=require("ag-grid-community"),nt=require("ag-grid-community"),Ot=require("ag-grid-community"),H=Z(require("react"),1),Re=require("ag-grid-community"),S=Z(require("react"),1),It=require("ag-grid-community"),ie=Z(require("react"),1),Dt=require("ag-grid-community"),ce=Z(require("react"),1),ze=require("ag-grid-community"),re=Z(require("react"),1),Te=require("ag-grid-community"),te=Z(require("react"),1),ot=require("ag-grid-community"),B=Z(require("react"),1),Wt=require("ag-grid-community"),L=Z(require("react"),1),Tt=require("react"),at=require("ag-grid-community"),$=Z(require("react"),1),ct=require("ag-grid-community"),G=Z(require("react"),1),$e=require("ag-grid-community"),h=Z(require("react"),1),Nt=require("ag-grid-community"),Ae=Z(require("react"),1),Ht=require("react-dom"),Se=require("react"),Ne=require("react"),He=require("ag-grid-community"),ue=Z(require("react"),1),qt=require("ag-grid-community"),Ut=require("react"),ne=_t.default.createContext({}),xe=(e,t,r,n)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const d=e.newAgStackInstance();if(d==null)return;let c,o,l=!1;return d.then(a=>{if(l){t.destroyBean(a);return}c=a,o=c.getGui(),r.appendChild(o),it(n,c)}),()=>{l=!0,c&&(o?.parentElement?.removeChild(o),t.destroyBean(c),n&&it(n,void 0))}},it=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const r=e;r.current=t}},fe=(...e)=>e.filter(r=>r!=null&&r!=="").join(" "),pe=class yt{constructor(...t){this.classesMap={},t.forEach(r=>{this.classesMap[r]=!0})}setClass(t,r){if(!!this.classesMap[t]==r)return this;const s=new yt;return s.classesMap={...this.classesMap},s.classesMap[t]=r,s}toString(){return Object.keys(this.classesMap).filter(r=>this.classesMap[r]).join(" ")}},be=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,r=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===r()},Je=kt.default.version?.split(".")[0],Lt=Je==="16"||Je==="17";function Vt(){return Je==="19"}var qe=!1;function jt(e){return qe||setTimeout(()=>qe=!1,0),qe=!0,e()}var Ke=(e,t)=>{!Lt&&e&&!qe?Ft.default.flushSync(t):t()};function Qe(e,t,r){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(r||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const n=[],s=[],d=new Map,c=new Map;for(let o=0;o<t.length;o++){const l=t[o];c.set(l.instanceId,l)}for(let o=0;o<e.length;o++){const l=e[o];d.set(l.instanceId,l),c.has(l.instanceId)&&n.push(l)}for(let o=0;o<t.length;o++){const l=t[o],a=l.instanceId;d.has(a)||s.push(l)}return n.length===e.length&&s.length===0?e:n.length===0&&s.length===t.length?t:n.length===0?s:s.length===0?n:[...n,...s]}var ut=(0,A.forwardRef)((e,t)=>{const{ctrlsFactory:r,context:n}=(0,A.useContext)(ne),s=(0,A.useRef)(null),d=(0,A.useRef)(null),c=(0,A.useRef)(null),o=(0,A.useRef)(null),l=(0,A.useRef)(null),a=(0,A.useRef)(),[u,g]=(0,A.useState)(),[w,v]=(0,A.useState)(),[m,f]=(0,A.useState)(),[i,C]=(0,A.useState)(()=>new pe),[b,R]=(0,A.useState)(()=>new pe("ag-hidden")),[P,E]=(0,A.useState)(()=>new pe("ag-hidden")),[q,M]=(0,A.useState)(()=>new pe("ag-invisible"));(0,A.useImperativeHandle)(t,()=>({refresh(){return!1}})),(0,A.useLayoutEffect)(()=>xe(u,n,d.current),[u]);const k=(0,A.useCallback)(D=>{if(s.current=D,!D){a.current=n.destroyBean(a.current);return}const W={setInnerRenderer:(T,j)=>{g(T),f(j)},setChildCount:T=>v(T),addOrRemoveCssClass:(T,j)=>C(V=>V.setClass(T,j)),setContractedDisplayed:T=>E(j=>j.setClass("ag-hidden",!T)),setExpandedDisplayed:T=>R(j=>j.setClass("ag-hidden",!T)),setCheckboxVisible:T=>M(j=>j.setClass("ag-invisible",!T))},K=r.getInstance("groupCellRendererCtrl");K&&(a.current=n.createBean(K),a.current.init(W,D,c.current,o.current,l.current,ut,e))},[]),O=(0,A.useMemo)(()=>`ag-cell-wrapper ${i.toString()}`,[i]),p=(0,A.useMemo)(()=>`ag-group-expanded ${b.toString()}`,[b]),y=(0,A.useMemo)(()=>`ag-group-contracted ${P.toString()}`,[P]),x=(0,A.useMemo)(()=>`ag-group-checkbox ${q.toString()}`,[q]),oe=u&&u.componentFromFramework,N=oe?u.componentClass:void 0,J=u==null&&m!=null,I=(0,Mt._escapeString)(m,!0);return A.default.createElement("span",{className:O,ref:k,...e.colDef?{}:{role:a.current?.getCellAriaRole()}},A.default.createElement("span",{className:p,ref:o}),A.default.createElement("span",{className:y,ref:l}),A.default.createElement("span",{className:x,ref:c}),A.default.createElement("span",{className:"ag-group-value",ref:d},J&&A.default.createElement(A.default.Fragment,null,I),oe&&A.default.createElement(N,{...u.params})),A.default.createElement("span",{className:"ag-group-child-count"},w))}),lt=ut,Be=(0,Gt.createContext)({setMethods:()=>{}}),zt=e=>{const{initialProps:t,addUpdateCallback:r,CustomComponentClass:n,setMethods:s}=e,[{key:d,...c},o]=(0,Fe.useState)(t);return(0,Fe.useEffect)(()=>{r(l=>o(l))},[]),Fe.default.createElement(Be.Provider,{value:{setMethods:s}},Fe.default.createElement(n,{key:d,...c}))},$t=(0,Fe.memo)(zt),Jt=0;function dt(){return`agPortalKey_${++Jt}`}var pt=class{constructor(e,t,r,n){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=r,this.suppressFallbackMethods=!!n,this.statelessComponent=this.isStateless(this.reactComponent),this.key=dt(),this.portalKey=dt(),this.instanceCreated=this.isStatelessComponent()?Ge.AgPromise.resolve(!1):new Ge.AgPromise(s=>{this.resolveInstanceCreated=s})}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(),r=document.createElement(t||"div");return r.classList.add("ag-react-container"),e.reactContainer=r,r}addParentContainerStyleAndClasses(){this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&((0,Ge._warnOnce)('Since v31.1 "getReactContainerStyle" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),Object.assign(this.eParentElement.style,this.componentInstance.getReactContainerStyle())),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses()&&((0,Ge._warnOnce)('Since v31.1 "getReactContainerClasses" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),this.componentInstance.getReactContainerClasses().forEach(t=>this.eParentElement.classList.add(t))))}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 r=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!r){setTimeout(()=>this.callMethod(e,t));return}const n=r[e];if(n)return n.apply(r,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 Ge.AgPromise(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{this.componentInstance=t,this.addParentContainerStyleAndClasses(),this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=(0,xt.createPortal)(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return(0,At.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 r=this[`${e}Component`];if(!this.suppressFallbackMethods&&r)return r.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function Ye(e,t,r){e.forEach(n=>{const s=t[n];s&&(r[n]=s)})}var Ce=class extends pt{constructor(){super(...arguments),this.awaitUpdateCallback=new je.AgPromise(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=$t}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:r=>this.setMethods(r),addUpdateCallback:r=>{this.updateCallback=()=>(r(this.getProps()),new je.AgPromise(n=>{setTimeout(()=>{n()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,Ye(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new je.AgPromise(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},Kt=class extends Ce{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},Qt=class extends Ce{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}},Yt=class extends Ce{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:r,shake:n}=this;return e.label=t,e.icon=r,e.shake=n,e}},Zt=class extends Ce{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterChangedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1}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}getOptionalMethods(){return["afterGuiAttached","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)}updateModel(e){this.setModel(e).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,delete e.filterModifiedCallback,delete e.valueGetter,e}};function mt(e,t){e.parentFilterInstance(r=>{(r.setModel(t)||Bt.AgPromise.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var Xt=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=r=>this.updateModel(r)}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){Ye(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),mt(this.floatingFilterParams,e)}},er=class extends Ce{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(),mt(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},tr=class extends Ce{refresh(e){this.sourceParams=e,this.refreshProps()}},rr=class extends Ce{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}},sr=class extends Ce{refresh(e){this.sourceParams=e,this.refreshProps()}},nr=class extends Ce{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},or=class extends Ce{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 ar(e,t){(e?.getInstance?.()??nt.AgPromise.resolve(void 0)).then(n=>t(n))}function Ue(){(0,nt._warnOnce)("As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.")}var cr=1e3,ir=class{constructor(e,t,r){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=r||cr}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,r){this.portals=[...this.portals,e],this.waitForInstance(t,r),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,r=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-r>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return;window.setTimeout(()=>{this.waitForInstance(e,t,r)})}}},ur=({ctrl:e})=>{const t=e.isAlive(),{context:r}=(0,te.useContext)(ne),n=t?e.getColId():void 0,[s,d]=(0,te.useState)(),c=(0,te.useRef)(),o=(0,te.useRef)(null),l=(0,te.useRef)(null),a=(0,te.useRef)(null),u=(0,te.useRef)(),g=(0,te.useRef)();t&&!g.current&&(g.current=new Te.CssClassManager(()=>o.current));const w=(0,te.useCallback)(i=>{if(o.current=i,c.current=i?r.createBean(new Te._EmptyBean):r.destroyBean(c.current),!i||!t)return;const C={setWidth:R=>{o.current&&(o.current.style.width=R)},addOrRemoveCssClass:(R,P)=>g.current.addOrRemoveCssClass(R,P),setAriaSort:R=>{o.current&&(R?(0,Te._setAriaSort)(o.current,R):(0,Te._removeAriaSort)(o.current))},setUserCompDetails:R=>d(R),getUserCompInstance:()=>u.current||void 0};e.setComp(C,i,l.current,a.current,c.current);const b=e.getSelectAllGui();l.current?.insertAdjacentElement("afterend",b),c.current.addDestroyFunc(()=>b.remove())},[]);(0,te.useLayoutEffect)(()=>xe(s,r,a.current,u),[s]),(0,te.useEffect)(()=>{e.setDragSource(o.current)},[s]);const v=(0,te.useMemo)(()=>!!(s?.componentFromFramework&&be(s.componentClass)),[s]),m=s&&s.componentFromFramework,f=s&&s.componentClass;return te.default.createElement("div",{ref:w,className:"ag-header-cell","col-id":n,role:"columnheader"},te.default.createElement("div",{ref:l,className:"ag-header-cell-resize",role:"presentation"}),te.default.createElement("div",{ref:a,className:"ag-header-cell-comp-wrapper",role:"presentation"},m&&v&&te.default.createElement(f,{...s.params}),m&&!v&&te.default.createElement(f,{...s.params,ref:u})))},lr=(0,te.memo)(ur),dr=({ctrl:e})=>{const{context:t,gos:r}=(0,B.useContext)(ne),[n,s]=(0,B.useState)(()=>new pe("ag-header-cell","ag-floating-filter")),[d,c]=(0,B.useState)(()=>new pe),[o,l]=(0,B.useState)(()=>new pe("ag-floating-filter-button","ag-hidden")),[a,u]=(0,B.useState)("false"),[g,w]=(0,B.useState)(),[,v]=(0,B.useState)(1),m=(0,B.useRef)(),f=(0,B.useRef)(null),i=(0,B.useRef)(null),C=(0,B.useRef)(null),b=(0,B.useRef)(null),R=(0,B.useRef)(),P=(0,B.useRef)(),E=I=>{I!=null&&R.current&&R.current(I)},q=(0,B.useCallback)(I=>{if(f.current=I,m.current=I?t.createBean(new ot._EmptyBean):t.destroyBean(m.current),!I)return;P.current=new ot.AgPromise(W=>{R.current=W});const D={addOrRemoveCssClass:(W,K)=>s(T=>T.setClass(W,K)),addOrRemoveBodyCssClass:(W,K)=>c(T=>T.setClass(W,K)),setButtonWrapperDisplayed:W=>{l(K=>K.setClass("ag-hidden",!W)),u(W?"false":"true")},setWidth:W=>{f.current&&(f.current.style.width=W)},setCompDetails:W=>w(W),getFloatingFilterComp:()=>P.current?P.current:null,setMenuIcon:W=>b.current?.appendChild(W)};e.setComp(D,I,b.current,i.current,m.current)},[]);(0,B.useLayoutEffect)(()=>xe(g,t,i.current,E),[g]);const M=(0,B.useMemo)(()=>n.toString(),[n]),k=(0,B.useMemo)(()=>d.toString(),[d]),O=(0,B.useMemo)(()=>o.toString(),[o]),p=(0,B.useMemo)(()=>!!(g&&g.componentFromFramework&&be(g.componentClass)),[g]),y=(0,B.useMemo)(()=>r.get("reactiveCustomComponents"),[]),x=(0,B.useMemo)(()=>{if(g)if(y){const I=new Xt(g.params,()=>v(D=>D+1));return E(I),I}else g.componentFromFramework&&Ue()},[g]),oe=x?.getProps(),N=g&&g.componentFromFramework,J=g&&g.componentClass;return B.default.createElement("div",{ref:q,className:M,role:"gridcell"},B.default.createElement("div",{ref:i,className:k,role:"presentation"},N&&!y&&B.default.createElement(J,{...g.params,ref:p?()=>{}:E}),N&&y&&B.default.createElement(Be.Provider,{value:{setMethods:I=>x.setMethods(I)}},B.default.createElement(J,{...oe}))),B.default.createElement("div",{ref:C,"aria-hidden":a,className:O,role:"presentation"},B.default.createElement("button",{ref:b,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},pr=(0,B.memo)(dr),mr=({ctrl:e})=>{const{context:t}=(0,L.useContext)(ne),[r,n]=(0,L.useState)(()=>new pe),[s,d]=(0,L.useState)(()=>new pe),[c,o]=(0,L.useState)("false"),[l,a]=(0,L.useState)(),[u,g]=(0,L.useState)(),w=(0,L.useMemo)(()=>e.getColId(),[]),v=(0,L.useRef)(),m=(0,L.useRef)(null),f=(0,L.useRef)(null),i=(0,L.useRef)(null),C=(0,L.useRef)(),b=(0,L.useCallback)(k=>{if(m.current=k,v.current=k?t.createBean(new Wt._EmptyBean):t.destroyBean(v.current),!k)return;const O={setWidth:p=>{m.current&&(m.current.style.width=p)},addOrRemoveCssClass:(p,y)=>n(x=>x.setClass(p,y)),setHeaderWrapperHidden:p=>{const y=i.current;y&&(p?y.style.setProperty("display","none"):y.style.removeProperty("display"))},setHeaderWrapperMaxHeight:p=>{const y=i.current;y&&(p!=null?y.style.setProperty("max-height",`${p}px`):y.style.removeProperty("max-height"),y.classList.toggle("ag-header-cell-comp-wrapper-limited-height",p!=null))},setUserCompDetails:p=>g(p),setResizableDisplayed:p=>{d(y=>y.setClass("ag-hidden",!p)),o(p?"false":"true")},setAriaExpanded:p=>a(p),getUserCompInstance:()=>C.current||void 0};e.setComp(O,k,f.current,i.current,v.current)},[]);(0,L.useLayoutEffect)(()=>xe(u,t,i.current),[u]),(0,L.useEffect)(()=>{m.current&&e.setDragSource(m.current)},[u]);const R=(0,L.useMemo)(()=>!!(u?.componentFromFramework&&be(u.componentClass)),[u]),P=(0,L.useMemo)(()=>"ag-header-group-cell "+r.toString(),[r]),E=(0,L.useMemo)(()=>"ag-header-cell-resize "+s.toString(),[s]),q=u&&u.componentFromFramework,M=u&&u.componentClass;return L.default.createElement("div",{ref:b,className:P,"col-id":w,role:"columnheader","aria-expanded":l},L.default.createElement("div",{ref:i,className:"ag-header-cell-comp-wrapper",role:"presentation"},q&&R&&L.default.createElement(M,{...u.params}),q&&!R&&L.default.createElement(M,{...u.params,ref:C})),L.default.createElement("div",{ref:f,"aria-hidden":c,className:E}))},fr=(0,L.memo)(mr),hr=({ctrl:e})=>{const{context:t}=(0,re.useContext)(ne),{topOffset:r,rowHeight:n}=(0,re.useMemo)(()=>e.getTopAndHeight(),[]),s=e.getAriaRowIndex(),d=e.getHeaderRowClass(),[c,o]=(0,re.useState)(()=>n+"px"),[l,a]=(0,re.useState)(()=>r+"px"),u=(0,re.useRef)(null),g=(0,re.useRef)(null),[w,v]=(0,re.useState)(()=>e.getHeaderCtrls()),m=(0,re.useRef)(),f=(0,re.useRef)(null),i=(0,re.useCallback)(R=>{if(f.current=R,m.current=R?t.createBean(new ze._EmptyBean):t.destroyBean(m.current),!R)return;const P={setHeight:E=>o(E),setTop:E=>a(E),setHeaderCtrls:(E,q,M)=>{g.current=u.current,u.current=E;const k=Qe(g.current,E,q);k!==g.current&&Ke(M,()=>v(k))},setWidth:E=>{f.current&&(f.current.style.width=E)}};e.setComp(P,m.current,!1)},[]),C=(0,re.useMemo)(()=>({height:c,top:l}),[c,l]),b=(0,re.useCallback)(R=>{switch(e.getType()){case ze.HeaderRowType.COLUMN_GROUP:return re.default.createElement(fr,{ctrl:R,key:R.instanceId});case ze.HeaderRowType.FLOATING_FILTER:return re.default.createElement(pr,{ctrl:R,key:R.instanceId});default:return re.default.createElement(lr,{ctrl:R,key:R.instanceId})}},[]);return re.default.createElement("div",{ref:i,className:d,role:"row",style:C,"aria-rowindex":s},w.map(b))},Cr=(0,re.memo)(hr),gr=({pinned:e})=>{const[t,r]=(0,ce.useState)(!0),[n,s]=(0,ce.useState)([]),{context:d}=(0,ce.useContext)(ne),c=(0,ce.useRef)(null),o=(0,ce.useRef)(null),l=(0,ce.useRef)(),a=e==="left",u=e==="right",g=!a&&!u,w=(0,ce.useCallback)(f=>{if(c.current=f,l.current=f?d.createBean(new Dt.HeaderRowContainerCtrl(e)):d.destroyBean(l.current),!f)return;const i={setDisplayed:r,setCtrls:C=>s(C),setCenterWidth:C=>{o.current&&(o.current.style.width=C)},setViewportScrollLeft:C=>{c.current&&(c.current.scrollLeft=C)},setPinnedContainerWidth:C=>{c.current&&(c.current.style.width=C,c.current.style.minWidth=C,c.current.style.maxWidth=C)}};l.current.setComp(i,c.current)},[]),v=t?"":"ag-hidden",m=()=>n.map(f=>ce.default.createElement(Cr,{ctrl:f,key:f.instanceId}));return ce.default.createElement(ce.default.Fragment,null,a&&ce.default.createElement("div",{ref:w,className:"ag-pinned-left-header "+v,"aria-hidden":!t,role:"rowgroup"},m()),u&&ce.default.createElement("div",{ref:w,className:"ag-pinned-right-header "+v,"aria-hidden":!t,role:"rowgroup"},m()),g&&ce.default.createElement("div",{ref:w,className:"ag-header-viewport "+v,role:"presentation"},ce.default.createElement("div",{ref:o,className:"ag-header-container",role:"rowgroup"},m())))},Ze=(0,ce.memo)(gr),yr=()=>{const[e,t]=(0,ie.useState)(()=>new pe),[r,n]=(0,ie.useState)(),{context:s}=(0,ie.useContext)(ne),d=(0,ie.useRef)(null),c=(0,ie.useRef)(),o=(0,ie.useCallback)(u=>{if(d.current=u,c.current=u?s.createBean(new It.GridHeaderCtrl):s.destroyBean(c.current),!u)return;const g={addOrRemoveCssClass:(w,v)=>t(m=>m.setClass(w,v)),setHeightAndMinHeight:w=>n(w)};c.current.setComp(g,u,u)},[]),l=(0,ie.useMemo)(()=>"ag-header "+e.toString(),[e]),a=(0,ie.useMemo)(()=>({height:r,minHeight:r}),[r]);return ie.default.createElement("div",{ref:o,className:l,style:a,role:"presentation"},ie.default.createElement(Ze,{pinned:"left"}),ie.default.createElement(Ze,{pinned:null}),ie.default.createElement(Ze,{pinned:"right"}))},vr=(0,ie.memo)(yr),Rr=(e,t)=>{(0,Tt.useEffect)(()=>{const r=t.current;if(r){const n=r.parentElement;if(n){const s=document.createComment(e);return n.insertBefore(s,r),()=>{n.removeChild(s)}}}},[e])},we=Rr,wr=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new Nt.AgPromise(r=>{this.resolveInstanceCreated=r}),this.onValueChange=r=>this.updateValue(r),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){Ye(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"]}updateValue(e){this.value=e,this.refreshProps()}},Sr=e=>{const t=(0,Se.useRef)(e),r=(0,Se.useRef)(),n=(0,Se.useRef)(!1),s=(0,Se.useRef)(!1),[,d]=(0,Se.useState)(0);n.current&&(s.current=!0),(0,Se.useEffect)(()=>(n.current||(r.current=t.current(),n.current=!0),d(c=>c+1),()=>{s.current&&r.current?.()}),[])},br=e=>{const[t,r]=(0,Ae.useState)(),{context:n,popupService:s,localeService:d,gos:c,editService:o}=(0,Ae.useContext)(ne);return Sr(()=>{const{editDetails:l,cellCtrl:a,eParentCell:u}=e,{compDetails:g}=l,w=c.get("stopEditingWhenCellsLoseFocus"),v=n.createBean(o.createPopupEditorWrapper(g.params)),m=v.getGui();if(e.jsChildComp){const P=e.jsChildComp.getGui();P&&m.appendChild(P)}const f={column:a.getColumn(),rowNode:a.getRowNode(),type:"popupCellEditor",eventSource:u,ePopup:m,position:l.popupPosition,keepWithinBounds:!0},i=s.positionPopupByComponent.bind(s,f),C=d.getLocaleTextFunc(),b=s.addPopup({modal:w,eChild:m,closeOnEsc:!0,closedCallback:()=>{a.onPopupEditorClosed()},anchorToElement:u,positionCallback:i,ariaLabel:C("ariaLabelCellEditor","Cell Editor")}),R=b?b.hideFunc:void 0;return r(v),e.jsChildComp?.afterGuiAttached?.(),()=>{R?.(),n.destroyBean(v)}}),Ae.default.createElement(Ae.default.Fragment,null,t&&e.wrappedContent&&(0,Ht.createPortal)(e.wrappedContent,t.getGui()))},ft=(0,Ae.memo)(br),Pr=(e,t,r,n,s,d)=>{const{context:c}=(0,Ne.useContext)(ne),o=(0,Ne.useCallback)(()=>{const l=s.current;if(!l)return;const a=l.getGui();a&&a.parentElement&&a.parentElement.removeChild(a),c.destroyBean(l),s.current=void 0},[]);(0,Ne.useEffect)(()=>{const l=e!=null,a=e?.compDetails&&!e.compDetails.componentFromFramework,u=t&&r==null;if(!(l&&a&&!u)){o();return}const w=e.compDetails;if(s.current){const m=s.current,i=m.refresh!=null&&e.force==!1?m.refresh(w.params):!1;if(i===!0||i===void 0)return;o()}const v=w.newAgStackInstance();v?.then(m=>{if(!m)return;const f=m.getGui();if(!f)return;(t?r:d.current).appendChild(f),s.current=m})},[e,t,n]),(0,Ne.useEffect)(()=>o,[])},Er=Pr,Mr=(e,t,r)=>{const{compProxy:n}=e;r(n);const s=n.getProps(),d=be(t);return h.default.createElement(Be.Provider,{value:{setMethods:c=>n.setMethods(c)}},d?h.default.createElement(t,{...s}):h.default.createElement(t,{...s,ref:c=>n.setRef(c)}))},ht=(e,t,r)=>{const n=e.compProxy;return h.default.createElement(h.default.Fragment,null,n?Mr(e,t,r):h.default.createElement(t,{...e.compDetails.params,ref:r}))},_r=(e,t,r,n,s)=>{const d=e.compDetails,c=d.componentClass,o=d.componentFromFramework&&!e.popup,l=d.componentFromFramework&&e.popup,a=!d.componentFromFramework&&e.popup;return h.default.createElement(h.default.Fragment,null,o&&ht(e,c,t),l&&h.default.createElement(ft,{editDetails:e,cellCtrl:n,eParentCell:r,wrappedContent:ht(e,c,t)}),a&&s&&h.default.createElement(ft,{editDetails:e,cellCtrl:n,eParentCell:r,jsChildComp:s}))},kr=(e,t,r,n,s,d,c)=>{const{compDetails:o,value:l}=e,a=!o,u=o&&o.componentFromFramework,g=o&&o.componentClass,w=l?.toString?l.toString():l,v=()=>h.default.createElement(h.default.Fragment,null,a&&h.default.createElement(h.default.Fragment,null,w),u&&!d&&h.default.createElement(g,{...o.params,key:t,ref:n}),u&&d&&h.default.createElement(g,{...o.params,key:t}));return h.default.createElement(h.default.Fragment,null,s?h.default.createElement("span",{role:"presentation",id:`cell-${r}`,className:"ag-cell-value",ref:c},v()):v())},Fr=({cellCtrl:e,printLayout:t,editingRow:r})=>{const{context:n}=(0,h.useContext)(ne),{colIdSanitised:s,instanceId:d}=e,c=(0,h.useRef)(),[o,l]=(0,h.useState)(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[a,u]=(0,h.useState)(),[g,w]=(0,h.useState)(1),[v,m]=(0,h.useState)(),[f,i]=(0,h.useState)(!1),[C,b]=(0,h.useState)(!1),[R,P]=(0,h.useState)(!1),[E,q]=(0,h.useState)(),M=(0,h.useMemo)(()=>e.isForceWrapper(),[e]),k=(0,h.useMemo)(()=>e.getCellAriaRole(),[e]),O=(0,h.useRef)(null),p=(0,h.useRef)(null),y=(0,h.useRef)(),x=(0,h.useRef)(),oe=(0,h.useRef)(),N=(0,h.useRef)([]),J=(0,h.useRef)(),[I,D]=(0,h.useState)(0),W=(0,h.useCallback)(z=>{J.current=z,D(se=>se+1)},[]),K=o!=null&&(f||R||C),T=M||K,j=(0,h.useCallback)(z=>{if(x.current=z,z){const se=z.isCancelBeforeStart&&z.isCancelBeforeStart();setTimeout(()=>{se?(e.stopEditing(!0),e.focusCell(!0)):e.cellEditorAttached()})}},[e]),V=(0,h.useRef)();V.current||(V.current=new $e.CssClassManager(()=>O.current)),Er(o,T,J.current,I,y,O);const me=(0,h.useRef)();(0,h.useLayoutEffect)(()=>{const z=me.current,se=o;if(me.current=o,z==null||z.compDetails==null||se==null||se.compDetails==null)return;const ae=z.compDetails,U=se.compDetails;if(ae.componentClass!=U.componentClass||p.current?.refresh==null)return;p.current.refresh(U.params)!=!0&&w(le=>le+1)},[o]),(0,h.useLayoutEffect)(()=>{if(!(a&&!a.compDetails.componentFromFramework))return;const se=a.compDetails,ae=a.popup===!0,U=se.newAgStackInstance();return U.then(ee=>{if(!ee)return;const le=ee.getGui();j(ee),ae||((M?oe:O).current?.appendChild(le),ee.afterGuiAttached&&ee.afterGuiAttached()),q(ee)}),()=>{U.then(ee=>{const le=ee.getGui();n.destroyBean(ee),j(void 0),q(void 0),le?.parentElement?.removeChild(le)})}},[a]);const _=(0,h.useCallback)(z=>{if(oe.current=z,!z){N.current.forEach(ae=>ae()),N.current=[];return}const se=ae=>{if(ae){const U=ae.getGui();z.insertAdjacentElement("afterbegin",U),N.current.push(()=>{n.destroyBean(ae),(0,$e._removeFromParent)(U)})}return ae};if(f){const ae=e.createSelectionCheckbox();se(ae)}R&&se(e.createDndSource()),C&&se(e.createRowDragComp())},[e,n,R,C,f]),X=(0,h.useCallback)(z=>{if(O.current=z,c.current=z?n.createBean(new $e._EmptyBean):n.destroyBean(c.current),!z||!e)return;const se={addOrRemoveCssClass:(U,ee)=>V.current.addOrRemoveCssClass(U,ee),setUserStyles:U=>m(U),getFocusableElement:()=>O.current,setIncludeSelection:U=>i(U),setIncludeRowDrag:U=>b(U),setIncludeDndSource:U=>P(U),getCellEditor:()=>x.current||null,getCellRenderer:()=>p.current??y.current,getParentOfValue:()=>J.current??oe.current??O.current,setRenderDetails:(U,ee,le)=>{l(ve=>ve?.compDetails!==U||ve?.value!==ee||ve?.force!==le?{value:ee,compDetails:U,force:le}:ve)},setEditDetails:(U,ee,le,ve)=>{if(U){let Ee;ve?Ee=new wr(U.params,()=>w(Xe=>Xe+1)):U.componentFromFramework&&Ue(),u({compDetails:U,popup:ee,popupPosition:le,compProxy:Ee}),ee||l(void 0)}else u(Ee=>{Ee?.compProxy&&(x.current=void 0)})}},ae=oe.current||void 0;e.setComp(se,z,ae,t,r,c.current)},[]),Q=(0,h.useMemo)(()=>!!(o?.compDetails?.componentFromFramework&&be(o.compDetails.componentClass)),[o]);(0,h.useLayoutEffect)(()=>{O.current&&(V.current.addOrRemoveCssClass("ag-cell-value",!T),V.current.addOrRemoveCssClass("ag-cell-inline-editing",!!a&&!a.popup),V.current.addOrRemoveCssClass("ag-cell-popup-editing",!!a&&!!a.popup),V.current.addOrRemoveCssClass("ag-cell-not-inline-editing",!a||!!a.popup),e.getRowCtrl()?.setInlineEditingCss(),e.shouldRestoreFocus()&&!e.isEditing()&&O.current.focus({preventScroll:!0}))});const ge=()=>h.default.createElement(h.default.Fragment,null,o!=null&&kr(o,g,d,p,T,Q,W),a!=null&&_r(a,j,O.current,e,E)),Pe=(0,h.useCallback)(()=>e.onFocusOut(),[]);return h.default.createElement("div",{ref:X,style:v,role:k,"col-id":s,onBlur:Pe},T?h.default.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:_},ge()):ge())},Gr=(0,h.memo)(Fr),Ar=({rowCtrl:e,containerType:t})=>{const{context:r,gos:n}=(0,G.useContext)(ne),s=(0,G.useRef)(),d=(0,G.useRef)(e.getDomOrder()),c=e.isFullWidth(),o=e.getRowNode().displayed,[l,a]=(0,G.useState)(()=>o?e.getRowIndex():null),[u,g]=(0,G.useState)(()=>e.getRowId()),[w,v]=(0,G.useState)(()=>e.getBusinessKey()),[m,f]=(0,G.useState)(()=>e.getRowStyles()),i=(0,G.useRef)(null),C=(0,G.useRef)(null),[b,R]=(0,G.useState)(()=>null),[P,E]=(0,G.useState)(),[q,M]=(0,G.useState)(()=>o?e.getInitialRowTop(t):void 0),[k,O]=(0,G.useState)(()=>o?e.getInitialTransform(t):void 0),p=(0,G.useRef)(null),y=(0,G.useRef)(),x=(0,G.useRef)(!1),[oe,N]=(0,G.useState)(0);(0,G.useEffect)(()=>{if(x.current||!P||oe>10)return;const _=p.current?.firstChild;_?(e.setupDetailRowAutoHeight(_),x.current=!0):N(X=>X+1)},[P,oe]);const J=(0,G.useRef)();J.current||(J.current=new ct.CssClassManager(()=>p.current));const I=(0,G.useCallback)(_=>{if(p.current=_,s.current=_?r.createBean(new ct._EmptyBean):r.destroyBean(s.current),!_){e.unsetComp(t);return}if(!e.isAlive())return;const X={setTop:M,setTransform:O,addOrRemoveCssClass:(Q,ge)=>J.current.addOrRemoveCssClass(Q,ge),setDomOrder:Q=>d.current=Q,setRowIndex:a,setRowId:g,setRowBusinessKey:v,setUserStyles:f,setCellCtrls:(Q,ge)=>{C.current=i.current,i.current=Q;const Pe=Qe(C.current,Q,d.current);Pe!==C.current&&Ke(ge,()=>R(Pe))},showFullWidth:Q=>E(Q),getFullWidthCellRenderer:()=>y.current,refreshFullWidth:Q=>j.current?(E(ge=>({...ge,params:Q()})),!0):!y.current||!y.current.refresh?!1:y.current.refresh(Q())};e.setComp(X,_,t,s.current)},[]);(0,G.useLayoutEffect)(()=>xe(P,r,p.current,y),[P]);const D=(0,G.useMemo)(()=>{const _={top:q,transform:k};return Object.assign(_,m),_},[q,k,m]),W=c&&P?.componentFromFramework,K=!c&&b!=null,T=(0,G.useMemo)(()=>!!(P?.componentFromFramework&&be(P.componentClass)),[P]),j=(0,G.useRef)(!1);(0,G.useEffect)(()=>{j.current=T&&!!P&&!!n.get("reactiveCustomComponents")},[T,P]);const V=()=>b?.map(_=>G.default.createElement(Gr,{cellCtrl:_,editingRow:e.isEditing(),printLayout:e.isPrintLayout(),key:_.instanceId})),me=()=>{const _=P.componentClass;return G.default.createElement(G.default.Fragment,null,T?G.default.createElement(_,{...P.params}):G.default.createElement(_,{...P.params,ref:y}))};return G.default.createElement("div",{ref:I,role:"row",style:D,"row-index":l,"row-id":u,"row-business-key":w},K&&V(),W&&me())},xr=(0,G.memo)(Ar),Br=({name:e})=>{const{context:t}=(0,$.useContext)(ne),r=(0,$.useMemo)(()=>(0,at._getRowContainerOptions)(e),[e]),n=(0,$.useRef)(null),s=(0,$.useRef)(null),d=(0,$.useRef)([]),c=(0,$.useRef)([]),[o,l]=(0,$.useState)(()=>[]),a=(0,$.useRef)(!1),u=(0,$.useRef)(),g=(0,$.useMemo)(()=>fe(r.viewport),[r]),w=(0,$.useMemo)(()=>fe(r.container),[r]),v=r.type==="center",m=v?n:s;we(" AG Row Container "+e+" ",m);const f=(0,$.useCallback)(()=>v?n.current!=null&&s.current!=null:s.current!=null,[]),i=(0,$.useCallback)(()=>v?n.current==null&&s.current==null:s.current==null,[]),C=(0,$.useCallback)(()=>{if(i()&&(u.current=t.destroyBean(u.current)),f()){const E=M=>{const k=Qe(c.current,d.current,a.current);k!==c.current&&(c.current=k,Ke(M,()=>l(k)))},q={setHorizontalScroll:M=>{n.current&&(n.current.scrollLeft=M)},setViewportHeight:M=>{n.current&&(n.current.style.height=M)},setRowCtrls:({rowCtrls:M,useFlushSync:k})=>{const O=!!k&&d.current.length>0&&M.length>0;d.current=M,E(O)},setDomOrder:M=>{a.current!=M&&(a.current=M,E(!1))},setContainerWidth:M=>{s.current&&(s.current.style.width=M)},setOffsetTop:M=>{s.current&&(s.current.style.transform=`translateY(${M})`)}};u.current=t.createBean(new at.RowContainerCtrl(e)),u.current.setComp(q,s.current,n.current)}},[f,i]),b=(0,$.useCallback)(E=>{s.current=E,C()},[C]),R=(0,$.useCallback)(E=>{n.current=E,C()},[C]),P=()=>$.default.createElement("div",{className:w,ref:b,role:"rowgroup"},o.map(E=>$.default.createElement(xr,{rowCtrl:E,containerType:r.type,key:E.instanceId})));return $.default.createElement($.default.Fragment,null,v?$.default.createElement("div",{className:g,ref:R,role:"presentation"},P()):P())},Or=(0,$.memo)(Br),Ir=()=>{const{context:e,resizeObserverService:t}=(0,S.useContext)(ne),[r,n]=(0,S.useState)(""),[s,d]=(0,S.useState)(0),[c,o]=(0,S.useState)(0),[l,a]=(0,S.useState)("0px"),[u,g]=(0,S.useState)("0px"),[w,v]=(0,S.useState)("100%"),[m,f]=(0,S.useState)("0px"),[i,C]=(0,S.useState)("0px"),[b,R]=(0,S.useState)("100%"),[P,E]=(0,S.useState)(""),[q,M]=(0,S.useState)(""),[k,O]=(0,S.useState)(null),[p,y]=(0,S.useState)(""),[x,oe]=(0,S.useState)(null),[N,J]=(0,S.useState)("ag-layout-normal"),I=(0,S.useRef)();I.current||(I.current=new Re.CssClassManager(()=>D.current));const D=(0,S.useRef)(null),W=(0,S.useRef)(null),K=(0,S.useRef)(null),T=(0,S.useRef)(null),j=(0,S.useRef)(null),V=(0,S.useRef)(null),me=(0,S.useRef)(null),_=(0,S.useRef)([]),X=(0,S.useRef)([]);we(" AG Grid Body ",D),we(" AG Pinned Top ",W),we(" AG Sticky Top ",K),we(" AG Middle ",V),we(" AG Pinned Bottom ",me);const Q=(0,S.useCallback)(ye=>{if(D.current=ye,!ye){_.current=e.destroyBeans(_.current),X.current.forEach(Y=>Y()),X.current=[];return}if(!e)return;const Le=(Y,de)=>{Y.appendChild(de),X.current.push(()=>Y.removeChild(de))},et=Y=>{const de=e.createBean(new Y);return _.current.push(de),de},De=(Y,de,rs)=>{Le(Y,document.createComment(rs)),Le(Y,et(de).getGui())};De(ye,Re.FakeHScrollComp," AG Fake Horizontal Scroll "),De(ye,Re.OverlayWrapperComponent," AG Overlay Wrapper "),j.current&&De(j.current,Re.FakeVScrollComp," AG Fake Vertical Scroll ");const ts={setRowAnimationCssOnBodyViewport:n,setColumnCount:Y=>{D.current&&(0,Re._setAriaColCount)(D.current,Y)},setRowCount:Y=>{D.current&&(0,Re._setAriaRowCount)(D.current,Y)},setTopHeight:d,setBottomHeight:o,setStickyTopHeight:a,setStickyTopTop:g,setStickyTopWidth:v,setTopDisplay:E,setBottomDisplay:M,setColumnMovingCss:(Y,de)=>I.current.addOrRemoveCssClass(Y,de),updateLayoutClasses:J,setAlwaysVerticalScrollClass:O,setPinnedTopBottomOverflowY:y,setCellSelectableCss:(Y,de)=>oe(de?Y:null),setBodyViewportWidth:Y=>{V.current&&(V.current.style.width=Y)},registerBodyViewportResizeListener:Y=>{if(V.current){const de=t.observeResize(V.current,Y);X.current.push(()=>de())}},setStickyBottomHeight:f,setStickyBottomBottom:C,setStickyBottomWidth:R},gt=e.createBean(new Re.GridBodyCtrl);_.current.push(gt),gt.setComp(ts,ye,V.current,W.current,me.current,K.current,T.current)},[]),ge=(0,S.useMemo)(()=>fe("ag-root","ag-unselectable",N),[N]),Pe=(0,S.useMemo)(()=>fe("ag-body-viewport",r,N,k,x),[r,N,k,x]),z=(0,S.useMemo)(()=>fe("ag-body",N),[N]),se=(0,S.useMemo)(()=>fe("ag-floating-top",x),[x]),ae=(0,S.useMemo)(()=>fe("ag-sticky-top",x),[x]),U=(0,S.useMemo)(()=>fe("ag-sticky-bottom",m==="0px"?"ag-hidden":null,x),[x,m]),ee=(0,S.useMemo)(()=>fe("ag-floating-bottom",x),[x]),le=(0,S.useMemo)(()=>({height:s,minHeight:s,display:P,overflowY:p}),[s,P,p]),ve=(0,S.useMemo)(()=>({height:l,top:u,width:w}),[l,u,w]),Ee=(0,S.useMemo)(()=>({height:m,bottom:i,width:b}),[m,i,b]),Xe=(0,S.useMemo)(()=>({height:c,minHeight:c,display:q,overflowY:p}),[c,q,p]),es=ye=>S.default.createElement(Or,{name:ye,key:`${ye}-container`}),Ie=({section:ye,children:Le,className:et,style:De})=>S.default.createElement("div",{ref:ye,className:et,role:"presentation",style:De},Le.map(es));return S.default.createElement("div",{ref:Q,className:ge,role:"treegrid"},S.default.createElement(vr,null),Ie({section:W,className:se,style:le,children:["topLeft","topCenter","topRight","topFullWidth"]}),S.default.createElement("div",{className:z,ref:j,role:"presentation"},Ie({section:V,className:Pe,children:["left","center","right","fullWidth"]})),Ie({section:K,className:ae,style:ve,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),Ie({section:T,className:U,style:Ee,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),Ie({section:me,className:ee,style:Xe,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},Dr=(0,S.memo)(Ir),Wr=(e,t)=>{const{children:r,eFocusableElement:n,onTabKeyDown:s,gridCtrl:d,forceFocusOutWhenTabGuardsAreEmpty:c}=e,{context:o}=(0,ue.useContext)(ne),l=(0,ue.useRef)(null),a=(0,ue.useRef)(null),u=(0,ue.useRef)(),g=i=>{const C=i==null?void 0:parseInt(i,10).toString();[l,a].forEach(b=>{C===void 0?b.current?.removeAttribute("tabindex"):b.current?.setAttribute("tabindex",C)})};(0,ue.useImperativeHandle)(t,()=>({forceFocusOutOfContainer(i){u.current?.forceFocusOutOfContainer(i)}}));const w=(0,ue.useCallback)(()=>{const i=l.current,C=a.current;if(!i&&!C){u.current=o.destroyBean(u.current);return}if(i&&C){const b={setTabIndex:g};u.current=o.createBean(new He.TabGuardCtrl({comp:b,eTopGuard:i,eBottomGuard:C,eFocusableElement:n,onTabKeyDown:s,forceFocusOutWhenTabGuardsAreEmpty:c,focusInnerElement:R=>d.focusInnerElement(R)}))}},[]),v=(0,ue.useCallback)(i=>{l.current=i,w()},[w]),m=(0,ue.useCallback)(i=>{a.current=i,w()},[w]),f=i=>{const C=i==="top"?He.TabGuardClassNames.TAB_GUARD_TOP:He.TabGuardClassNames.TAB_GUARD_BOTTOM;return ue.default.createElement("div",{className:`${He.TabGuardClassNames.TAB_GUARD} ${C}`,role:"presentation",ref:i==="top"?v:m})};return ue.default.createElement(ue.default.Fragment,null,f("top"),r,f("bottom"))},Tr=(0,ue.forwardRef)(Wr),Nr=(0,ue.memo)(Tr),Hr=({context:e})=>{const[t,r]=(0,H.useState)(""),[n,s]=(0,H.useState)(""),[d,c]=(0,H.useState)(""),[o,l]=(0,H.useState)(null),[a,u]=(0,H.useState)(null),[g,w]=(0,H.useState)(!1),[v,m]=(0,H.useState)(),f=(0,H.useRef)(),i=(0,H.useRef)(null),C=(0,H.useRef)(),[b,R]=(0,H.useState)(null),P=(0,H.useRef)(()=>{}),E=(0,H.useRef)(),q=(0,H.useRef)([]),M=(0,H.useCallback)(()=>{},[]),k=(0,H.useMemo)(()=>e.isDestroyed()?null:e.getBeans(),[e]);we(" AG Grid ",i);const O=(0,H.useCallback)(N=>{if(i.current=N,f.current=N?e.createBean(new Ot.GridCtrl):e.destroyBean(f.current),!N||e.isDestroyed())return;const J=f.current;P.current=J.focusInnerElement.bind(J);const I={destroyGridUi:()=>{},setRtlClass:r,setGridThemeClass:s,forceFocusOutOfContainer:D=>{if(!D&&E.current?.isDisplayed()){E.current.forceFocusOutOfContainer(D);return}C.current?.forceFocusOutOfContainer(D)},updateLayoutClasses:c,getFocusableContainers:()=>{const D=[],W=i.current?.querySelector(".ag-root");return W&&D.push({getGui:()=>W}),q.current.forEach(K=>{K.isDisplayed()&&D.push(K)}),D},setCursor:l,setUserSelect:u};J.setComp(I,N,N),w(!0)},[]);(0,H.useEffect)(()=>{const N=f.current,J=i.current;if(!v||!k||!N||!b||!J)return;const I=[],{watermarkSelector:D,paginationSelector:W,sideBarSelector:K,statusBarSelector:T,gridHeaderDropZonesSelector:j}=N.getOptionalSelectors(),V=[];if(j){const _=e.createBean(new j.component),X=_.getGui();J.insertAdjacentElement("afterbegin",X),V.push(X),I.push(_)}if(K){const _=e.createBean(new K.component),X=_.getGui(),Q=b.querySelector(".ag-tab-guard-bottom");Q&&(Q.insertAdjacentElement("beforebegin",X),V.push(X)),I.push(_),q.current.push(_)}const me=_=>{const X=e.createBean(new _),Q=X.getGui();return J.insertAdjacentElement("beforeend",Q),V.push(Q),I.push(X),X};if(T&&me(T.component),W){const _=me(W.component);E.current=_,q.current.push(_)}return D&&me(D.component),()=>{e.destroyBeans(I),V.forEach(_=>{_.parentElement?.removeChild(_)})}},[v,b,k]);const p=(0,H.useMemo)(()=>fe("ag-root-wrapper",t,n,d),[t,n,d]),y=(0,H.useMemo)(()=>fe("ag-root-wrapper-body","ag-focus-managed",d),[d]),x=(0,H.useMemo)(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:o??""}),[a,o]),oe=(0,H.useCallback)(N=>{C.current=N,m(N!==null)},[]);return H.default.createElement("div",{ref:O,className:p,style:x,role:"presentation"},H.default.createElement("div",{className:y,ref:R,role:"presentation"},g&&b&&k&&H.default.createElement(ne.Provider,{value:k},H.default.createElement(Nr,{ref:oe,eFocusableElement:b,onTabKeyDown:M,gridCtrl:f.current,forceFocusOutWhenTabGuardsAreEmpty:!0},H.default.createElement(Dr,null)))))},qr=(0,H.memo)(Hr),Ur=class extends qt.BeanStub{wireBeans(e){this.ctrlsService=e.ctrlsService}areHeaderCellsRendered(){return this.ctrlsService.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(t=>t.areCellsRendered()))}},Ct=e=>{const t=(0,F.useRef)(),r=(0,F.useRef)(null),n=(0,F.useRef)(null),s=(0,F.useRef)([]),d=(0,F.useRef)([]),c=(0,F.useRef)(e),o=(0,F.useRef)(),l=(0,F.useRef)(),a=(0,F.useRef)(!1),[u,g]=(0,F.useState)(void 0),[,w]=(0,F.useState)(0),v=(0,F.useCallback)(i=>{if(r.current=i,!i){s.current.forEach(p=>p()),s.current.length=0;return}const C=e.modules||[];n.current||(n.current=new ir(()=>w(p=>p+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),s.current.push(()=>{n.current?.destroy(),n.current=null}));const b=(0,he._combineAttributesAndGridOptions)(e.gridOptions,e),R=()=>{if(a.current){const p=()=>o.current?.shouldQueueUpdates()?void 0:d.current.shift();let y=p();for(;y;)y(),y=p()}},P=new zr(R);o.current=P;const E=new Ur,q={providedBeanInstances:{frameworkComponentWrapper:new Vr(n.current,b.reactiveCustomComponents??(0,he._getGlobalGridOption)("reactiveCustomComponents")??!0),renderStatusService:E},modules:C,frameworkOverrides:P},M=p=>{g(p),p.createBean(E),s.current.push(()=>{p.destroy()}),p.getBean("ctrlsService").whenReady({addDestroyFunc:y=>{s.current.push(y)}},()=>{if(p.isDestroyed())return;const y=t.current;y&&e.setGridApi?.(y)})},k=p=>{p.getBean("ctrlsService").whenReady({addDestroyFunc:y=>{s.current.push(y)}},()=>{d.current.forEach(y=>y()),d.current.length=0,a.current=!0})},O=new he.GridCoreCreator;b.gridId??(b.gridId=l.current),t.current=O.create(i,b,M,k,q),s.current.push(()=>{t.current=void 0}),t.current&&(l.current=t.current.getGridId())},[]),m=(0,F.useMemo)(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),f=(0,F.useCallback)(i=>{a.current&&!o.current?.shouldQueueUpdates()?i():d.current.push(i)},[]);return(0,F.useEffect)(()=>{const i=Lr(c.current,e);c.current=e,f(()=>{t.current&&(0,he._processOnChange)(i,t.current)})},[e]),F.default.createElement("div",{style:m,className:e.className,ref:v},u&&!u.isDestroyed()?F.default.createElement(qr,{context:u}):null,n.current?.getPortals()??null)};function Lr(e,t){const r={};return Object.keys(t).forEach(n=>{const s=t[n];e[n]!==s&&(r[n]=s)}),r}var Vr=class extends he.BaseComponentWrapper{constructor(e,t){super(),this.parent=e,this.reactiveCustomComponents=t}createWrapper(e,t){if(this.reactiveCustomComponents){const s=(d=>{switch(d){case"filter":return Zt;case"floatingFilterComponent":return er;case"dateComponent":return Qt;case"dragAndDropImageComponent":return Yt;case"loadingOverlayComponent":return tr;case"noRowsOverlayComponent":return sr;case"statusPanel":return nr;case"toolPanel":return or;case"menuItem":return rr;case"cellRenderer":return Kt}})(t.propertyName);if(s)return new s(e,this.parent,t)}else switch(t.propertyName){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":Ue();break}const r=!t.cellRenderer&&t.propertyName!=="toolPanel";return new pt(e,this.parent,t,r)}},jr=(0,F.forwardRef)((e,t)=>{const{ctrlsFactory:r,context:n,gos:s,resizeObserverService:d,rowModel:c}=(0,F.useContext)(ne),[o,l]=(0,F.useState)(()=>new pe),[a,u]=(0,F.useState)(()=>new pe),[g,w]=(0,F.useState)(),[v,m]=(0,F.useState)(),f=(0,F.useRef)(),i=(0,F.useRef)(null),C=(0,F.useRef)(),b=(0,F.useMemo)(()=>he.ModuleRegistry.__getGridRegisteredModules(e.api.getGridId()),[e]),R=(0,F.useMemo)(()=>o.toString()+" ag-details-row",[o]),P=(0,F.useMemo)(()=>a.toString()+" ag-details-grid",[a]);t&&(0,F.useImperativeHandle)(t,()=>({refresh(){return f.current?.refresh()??!1}})),e.template&&(0,he._warnOnce)("detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://ag-grid.com/react-data-grid/master-detail-custom-detail/");const E=(0,F.useCallback)(M=>{if(i.current=M,!M){f.current=n.destroyBean(f.current),C.current?.();return}const k={addOrRemoveCssClass:(p,y)=>l(x=>x.setClass(p,y)),addOrRemoveDetailGridCssClass:(p,y)=>u(x=>x.setClass(p,y)),setDetailGrid:p=>w(p),setRowData:p=>m(p),getGui:()=>i.current},O=r.getInstance("detailCellRenderer");if(O&&(n.createBean(O),O.init(k,e),f.current=O,s.get("detailRowAutoHeight"))){const p=()=>{if(i.current==null)return;const y=i.current.clientHeight;y!=null&&y>0&&setTimeout(()=>{e.node.setRowHeight(y),((0,he._isClientSideRowModel)(s)||(0,he._isServerSideRowModel)(s))&&c.onRowHeightChanged()},0)};C.current=d.observeResize(M,p),p()}},[]),q=(0,F.useCallback)(M=>{f.current?.registerDetailWithMaster(M)},[]);return F.default.createElement("div",{className:R,ref:E},g&&F.default.createElement(Ct,{className:P,...g,modules:b,rowData:v,setGridApi:q}))}),zr=class extends he.VanillaFrameworkOverrides{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.frameworkComponents={agGroupCellRenderer:lt,agGroupRowRenderer:lt,agDetailCellRenderer:jr},this.wrapIncoming=(t,r)=>r==="ensureVisible"?jt(t):t(),this.renderingEngine="react"}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 Vt()}},$r=class extends st.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e,this.apiListeners.forEach(t=>t(e))}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return st.default.createElement(Ct,{...this.props,setGridApi:this.setGridApi})}};function Oe(e){const{setMethods:t}=(0,Ut.useContext)(Be);t(e)}function Jr(e){Oe(e)}function Kr(e){return Oe(e)}function Qr(e){return Oe(e)}function Yr(e){Oe(e)}function Zr(e){Oe(e)}if(typeof ke.exports=="object"&&typeof Ve=="object"){var Xr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Object.getOwnPropertyNames(t))!Object.prototype.hasOwnProperty.call(e,s)&&s!==r&&Object.defineProperty(e,s,{get:()=>t[s],enumerable:!(n=Object.getOwnPropertyDescriptor(t,s))||n.enumerable});return e};ke.exports=Xr(ke.exports,Ve)}return ke.exports});
{
"name": "ag-grid-react",
"version": "32.2.2",
"version": "32.3.0",
"description": "AG Grid React Component",

@@ -35,3 +35,3 @@ "main": "./dist/package/index.cjs.js",

"devDependencies": {
"ag-grid-community": "32.2.2",
"ag-grid-community": "32.3.0",
"gulp": "^4.0.0",

@@ -47,3 +47,3 @@ "gulp-replace": "^1.0.0",

"prop-types": "^15.8.1",
"ag-grid-community": "32.2.2"
"ag-grid-community": "32.3.0"
},

@@ -50,0 +50,0 @@ "peerDependencies": {

The MIT License
Copyright (c) 2015-2019 AG GRID LTD
Copyright (c) 2015-2024 AG GRID LTD

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "ag-grid-react",
"version": "32.2.2",
"version": "32.3.0",
"description": "AG Grid React Component",

@@ -35,3 +35,3 @@ "main": "./dist/package/index.cjs.js",

"devDependencies": {
"ag-grid-community": "32.2.2",
"ag-grid-community": "32.3.0",
"gulp": "^4.0.0",

@@ -47,3 +47,3 @@ "gulp-replace": "^1.0.0",

"prop-types": "^15.8.1",
"ag-grid-community": "32.2.2"
"ag-grid-community": "32.3.0"
},

@@ -50,0 +50,0 @@ "peerDependencies": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc