text: !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("prop-types"),require("react-dom/server"),require("react-dom"),require("ag-grid-community"),require("react")):"function"==typeof define&&define.amd?define(["exports","prop-types","react-dom/server","react-dom","ag-grid-community","react"],t):t(e.AgGridReact={},e.PropTypes,e.ReactDOMServer,e.ReactDOM,e.agGrid,e.React)}(this,function(t,e,o,r,ke,Ae){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var Ge="default"in Ae?Ae.default:Ae,a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function n(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Fe=function(){return(Fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function K(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)r[o]=a[i];return r}var i,s=(n(u,i=function(){}),u.prototype.getGui=function(){return this.eParentElement},u.prototype.destroy=function(){return this.componentInstance&&"function"==typeof this.componentInstance.destroy&&this.componentInstance.destroy(),this.portalManager.destroyPortal(this.portal)},u.prototype.createParentElement=function(e){var t=this.portalManager.getComponentWrappingElement(),t=document.createElement(t||"div");return ke._.addCssClass(t,"ag-react-container"),e.reactContainer=t},u.prototype.addParentContainerStyleAndClasses=function(){var t,n,r=this;this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&(t=this.eParentElement.style,n=this.componentInstance.getReactContainerStyle(),Object.keys(n).forEach(function(e){t[e]=n[e]})),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses()&&this.componentInstance.getReactContainerClasses().forEach(function(e){return ke._.addCssClass(r.eParentElement,e)}))},u.prototype.statelessComponentRendered=function(){return 0<this.eParentElement.childElementCount||0<this.eParentElement.childNodes.length},u.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},u.prototype.isStatelessComponent=function(){return this.statelessComponent},u.prototype.getReactComponentName=function(){return this.reactComponent.name},u.prototype.getMemoType=function(){return this.hasSymbol()?Symbol.for("react.memo"):60115},u.prototype.hasSymbol=function(){return"function"==typeof Symbol&&Symbol.for},u.prototype.isStateless=function(e){return"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===this.getMemoType()},u.prototype.hasMethod=function(e){var t=this.getFrameworkComponentInstance();return!!t&&null!==t[e]||this.fallbackMethodAvailable(e)},u.prototype.callMethod=function(e,t){var n=this,r=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(r){var o=r[e];return o?o.apply(r,t):this.fallbackMethodAvailable(e)?this.fallbackMethod(e,t&&t[0]?t[0]:{}):void 0}setTimeout(function(){return n.callMethod(e,t)})},u.prototype.addMethod=function(e,t){this[e]=t},u);function u(e,t,n){var r=i.call(this)||this;return r.portal=null,r.reactComponent=e,r.portalManager=t,r.componentType=n,r.statelessComponent=r.isStateless(r.reactComponent),r}var c=0;function l(){return"agPortalKey_"+ ++c}var p,f=(n(m,p=s),m.prototype.init=function(t){var n=this;return this.eParentElement=this.createParentElement(t),this.renderStaticMarkup(t),new ke.AgPromise(function(e){return n.createReactComponent(t,e)})},m.prototype.createReactComponent=function(e,t){var n=this;this.isStatelessComponent()||(e.ref=function(e){n.componentInstance=e,n.addParentContainerStyleAndClasses(),n.removeStaticMarkup()});e=Ae.createElement(this.reactComponent,e),e=r.createPortal(e,this.eParentElement,l());this.portal=e,this.portalManager.mountReactPortal(e,this,function(e){t(e),n.isStatelessComponent()&&(n.isSlowRenderer()&&n.removeStaticMarkup(),setTimeout(function(){n.removeStaticMarkup()}))})},m.prototype.fallbackMethodAvailable=function(e){return!1},m.prototype.fallbackMethod=function(e,t){},m.prototype.isSlowRenderer=function(){return this.staticRenderTime>=m.SLOW_RENDERING_THRESHOLD},m.prototype.isNullValue=function(){return""===this.staticMarkup},m.prototype.renderStaticMarkup=function(e){if(!(this.parentComponent.isDisableStaticMarkup()||this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())){var t=console.error,e=Ae.createElement(this.reactComponent,e);try{console.error=function(){};var n=Date.now(),r=o.renderToStaticMarkup(e);this.staticRenderTime=Date.now()-n,console.error=t,""===r?this.staticMarkup=r:r&&(this.staticMarkup=document.createElement("span"),this.staticMarkup.innerHTML=r,this.eParentElement.appendChild(this.staticMarkup))}catch(e){}finally{console.error=t}}},m.prototype.removeStaticMarkup=function(){!this.parentComponent.isDisableStaticMarkup()&&this.componentType.isCellRenderer()&&this.staticMarkup&&(this.staticMarkup.remove?(this.staticMarkup.remove(),this.staticMarkup=null):this.eParentElement.removeChild&&(this.eParentElement.removeChild(this.staticMarkup),this.staticMarkup=null))},m.prototype.rendered=function(){return this.isNullValue()||!!this.staticMarkup||this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},m.SLOW_RENDERING_THRESHOLD=3,m);function m(e,t,n,r){r=p.call(this,e,n,r)||this;return r.staticMarkup=null,r.staticRenderTime=0,r.parentComponent=t,r}var d,h,C=(n(g,d=Ae.Component),g.prototype.render=function(){return null},g.mapChildColumnDefs=function(e){return Ge.Children.map(e,function(e){return e?g.toColDef(e.props):null})},g.toColDef=function(e){var t=e.children,e=function(e,t){var n={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}(e,["children"]);return g.hasChildColumns(t)&&(e.children=g.mapChildColumnDefs(t)),e},g.hasChildColumns=function(e){return 0<Ge.Children.count(e)},g);function g(e){var t=d.call(this,e)||this;return t.props=e,t}function y(e,t){e.forEach(function(e){C[e]=t})}y(ke.ColDefUtil.BOOLEAN_PROPERTIES,e.bool),y(ke.ColDefUtil.STRING_PROPERTIES,e.string),y(ke.ColDefUtil.OBJECT_PROPERTIES,e.object),y(ke.ColDefUtil.ARRAY_PROPERTIES,e.array),y(ke.ColDefUtil.NUMBER_PROPERTIES,e.number),y(ke.ColDefUtil.FUNCTION_PROPERTIES,e.func),(h=t.ChangeDetectionStrategyType||(t.ChangeDetectionStrategyType={})).IdentityCheck="IdentityCheck",h.DeepValueCheck="DeepValueCheck",h.NoCheck="NoCheck";var E=(v.prototype.areEqual=function(e,t){return this.strategy(e,t)},v);function v(e){this.strategy=e}var S=(R.prototype.areEqual=function(e,t){return R.areEquivalent(R.copy(e),R.copy(t))},R.unwrapStringOrNumber=function(e){return e instanceof Number||e instanceof String?e.valueOf():e},R.copy=function(e){if(!e)return e;if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++)t.push(this.copy(e[n]));return t}return"object"!=typeof e?e:[{},e].reduce(function(t,n){return Object.keys(n).forEach(function(e){t[e]=n[e]}),t},{})},R.isNaN=function(e){return Number.isNaN?Number.isNaN(e):"number"==typeof e&&isNaN(e)},R.areEquivalent=function(t,n){if(t=R.unwrapStringOrNumber(t),n=R.unwrapStringOrNumber(n),t===n)return!0;if(null===t||null===n||typeof t!=typeof n)return!1;if(R.isNaN(t)&&R.isNaN(n))return!0;if(t instanceof Date)return n instanceof Date&&t.valueOf()===n.valueOf();if("function"==typeof t)return!1;if("object"!=typeof t||t.$$typeof&&"Symbol(react.element)"===t.$$typeof.toString())return t==n;if(Object.isFrozen(t)||Object.isFrozen(n))return t===n;var e=void 0===t.areEquivPropertyTracking,r=void 0===n.areEquivPropertyTracking;try{var o=void 0;if(e)t.areEquivPropertyTracking=[];else if(t.areEquivPropertyTracking.some(function(e){return e===n}))return!0;if(r)n.areEquivPropertyTracking=[];else if(n.areEquivPropertyTracking.some(function(e){return e===t}))return!0;t.areEquivPropertyTracking.push(n),n.areEquivPropertyTracking.push(t);var a={};for(o in t)"areEquivPropertyTracking"!=o&&(a[o]=null);for(o in n)"areEquivPropertyTracking"!=o&&(a[o]=null);for(o in a)if(!this.areEquivalent(t[o],n[o]))return!1;return!0}finally{e&&delete t.areEquivPropertyTracking,r&&delete n.areEquivPropertyTracking}},R);function R(){}var w=(O.prototype.getStrategy=function(e){return this.strategyMap[e]},O);function O(){var e;this.strategyMap=((e={})[t.ChangeDetectionStrategyType.DeepValueCheck]=new S,e[t.ChangeDetectionStrategyType.IdentityCheck]=new E(function(e,t){return e===t}),e[t.ChangeDetectionStrategyType.NoCheck]=new E(function(e,t){return!1}),e)}var b,I=(n(P,b=s),P.prototype.init=function(e){var t=this;return this.eParentElement=this.createParentElement(e),this.params=e,this.createOrUpdatePortal(e),new ke.AgPromise(function(e){return t.createReactComponent(e)})},P.prototype.createOrUpdatePortal=function(e){var t=this;this.isStatelessComponent()||(e.ref=function(e){t.componentInstance=e,t.addParentContainerStyleAndClasses()}),this.reactElement=Ae.createElement(this.reactComponent,Fe(Fe({},e),{key:this.key})),this.portal=r.createPortal(this.reactElement,this.eParentElement,this.portalKey)},P.prototype.createReactComponent=function(t){this.portalManager.mountReactPortal(this.portal,this,function(e){t(e)})},P.prototype.isNullValue=function(){return this.valueRenderedIsNull(this.params)},P.prototype.rendered=function(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())},P.prototype.valueRenderedIsNull=function(e){if(this.componentType.isCellRenderer&&!this.componentType.isCellRenderer())return!1;var t=console.error;try{return console.error=function(){},""===o.renderToStaticMarkup(Ae.createElement(this.reactComponent,e))}catch(e){}finally{console.error=t}return!1},P.prototype.refreshComponent=function(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)},P.prototype.fallbackMethod=function(e,t){e=this[e+"Component"];if(e)return e.bind(this)(t)},P.prototype.fallbackMethodAvailable=function(e){return!!this[e+"Component"]},P);function P(e,t,n){n=b.call(this,e,t,n)||this;return n.oldPortal=null,n.key=l(),n.portalKey=l(),n}var M=(T.prototype.getPortals=function(){return this.portals},T.prototype.destroy=function(){this.destroyed=!0},T.prototype.destroyPortal=function(t){this.portals=this.portals.filter(function(e){return e!==t}),this.batchUpdate()},T.prototype.getComponentWrappingElement=function(){return this.wrappingElement},T.prototype.mountReactPortal=function(e,t,n){this.portals=K(this.portals,[e]),this.waitForInstance(t,n),this.batchUpdate()},T.prototype.updateReactPortal=function(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()},T.prototype.batchUpdate=function(){var e=this;this.hasPendingPortalUpdate||(setTimeout(function(){e.destroyed||e.parent.forceUpdate(function(){e.hasPendingPortalUpdate=!1})}),this.hasPendingPortalUpdate=!0)},T.prototype.waitForInstance=function(e,t,n){var r=this;if(void 0===n&&(n=Date.now()),this.destroyed)t(null);else if(e.rendered())t(e);else{if(Date.now()-n>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate)return e.isNullValue()?void t(e):void console.error("AG Grid: React Component '"+e.getReactComponentName()+"' not created within "+this.maxComponentCreationTimeMs+"ms");window.setTimeout(function(){r.waitForInstance(e,t,n)})}},T.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3,T);function T(e,t,n){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.parent=e,this.maxComponentCreationTimeMs=n||T.MAX_COMPONENT_CREATION_TIME_IN_MS}var D,N=(n(k,D=Ae.Component),k.prototype.render=function(){var t=this;return Ge.createElement("div",{style:this.createStyleForDiv(),className:this.props.className,ref:function(e){t.eGridDiv=e}},this.portalManager.getPortals())},k.prototype.createStyleForDiv=function(){return Fe({height:"100%"},this.props.containerStyle||{})},k.prototype.componentDidMount=function(){var e=this.props.modules||[],t={providedBeanInstances:{agGridReact:this,frameworkComponentWrapper:new F(this,this.portalManager)},modules:e},n=this.props.gridOptions||{},e=this.props.children;C.hasChildColumns(e)&&(n.columnDefs=C.mapChildColumnDefs(e)),this.gridOptions=ke.ComponentUtil.copyAttributesToGridOptions(n,this.props),new ke.Grid(this.eGridDiv,this.gridOptions,t),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi,this.props.setGridApi(this.api,this.columnApi)},k.prototype.getStrategyTypeForProp=function(e){if("rowData"===e){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.isImmutableDataActive())return t.ChangeDetectionStrategyType.IdentityCheck}return t.ChangeDetectionStrategyType.DeepValueCheck},k.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData)},k.prototype.shouldComponentUpdate=function(e){return this.processPropsChanges(this.props,e),!1},k.prototype.componentDidUpdate=function(e){this.processPropsChanges(e,this.props)},k.prototype.processPropsChanges=function(e,t){var n={};this.extractGridPropertyChanges(e,t,n),this.extractDeclarativeColDefChanges(t,n),this.processSynchronousChanges(n),this.processAsynchronousChanges(n)},k.prototype.extractDeclarativeColDefChanges=function(e,t){var n,r,o,a;this.props.gridOptions&&this.props.gridOptions.columnDefs||this.props.columnDefs||(n=!!e.debug,r="columnDefs",o=this.gridOptions.columnDefs,C.hasChildColumns(e.children)?(a=this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(r)),e=C.mapChildColumnDefs(e.children),a.areEqual(o,e)||(n&&console.log("agGridReact: colDefs definitions changed"),t[r]={previousValue:o,currentValue:e})):o&&0<o.length&&(t[r]={previousValue:o,currentValue:[]}))},k.prototype.extractGridPropertyChanges=function(t,n,r){var o=this,a=!!n.debug;Object.keys(n).forEach(function(e){ke._.includes(ke.ComponentUtil.ALL_PROPERTIES,e)&&(o.changeDetectionService.getStrategy(o.getStrategyTypeForProp(e)).areEqual(t[e],n[e])||(a&&console.log("agGridReact: ["+e+"] property changed"),r[e]={previousValue:t[e],currentValue:n[e]}))}),ke.ComponentUtil.getEventCallbacks().forEach(function(e){t[e]!==n[e]&&(a&&console.log("agGridReact: ["+e+"] event callback changed"),r[e]={previousValue:t[e],currentValue:n[e]})})},k.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null),this.destroyed=!0,this.portalManager.destroy()},k.prototype.isDisableStaticMarkup=function(){return!0===this.props.disableStaticMarkup},k.prototype.isLegacyComponentRendering=function(){return!0===this.props.legacyComponentRendering},k.prototype.processSynchronousChanges=function(e){var t,n=Fe({},e);return 0<Object.keys(n).length&&(t={},this.SYNCHRONOUS_CHANGE_PROPERTIES.forEach(function(e){n[e]&&(t[e]=n[e],delete n[e])}),0<Object.keys(t).length&&this.api&&ke.ComponentUtil.processOnChange(t,this.gridOptions,this.api,this.columnApi)),n},k.prototype.processAsynchronousChanges=function(e){var t=this;0<Object.keys(e).length&&window.setTimeout(function(){t.api&&ke.ComponentUtil.processOnChange(e,t.gridOptions,t.api,t.columnApi)})},k.defaultProps={legacyComponentRendering:!1,disableStaticMarkup:!1,maxComponentCreationTimeMs:k.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3},k);function k(e){var t=D.call(this,e)||this;return t.props=e,t.changeDetectionService=new w,t.api=null,t.destroyed=!1,t.SYNCHRONOUS_CHANGE_PROPERTIES=["context"],t.portalManager=new M(t,e.componentWrappingElement,e.maxComponentCreationTimeMs),t}function A(e,t){e.forEach(function(e){N[e]=t})}N.propTypes={gridOptions:e.object},A(ke.ComponentUtil.getEventCallbacks(),e.func),A(ke.ComponentUtil.BOOLEAN_PROPERTIES,e.bool),A(ke.ComponentUtil.STRING_PROPERTIES,e.string),A(ke.ComponentUtil.OBJECT_PROPERTIES,e.object),A(ke.ComponentUtil.ARRAY_PROPERTIES,e.array),A(ke.ComponentUtil.NUMBER_PROPERTIES,e.number),A(ke.ComponentUtil.FUNCTION_PROPERTIES,e.func);var G,F=(n(x,G=ke.BaseComponentWrapper),x.prototype.createWrapper=function(e,t){return this.agGridReact.isLegacyComponentRendering()?new f(e,this.agGridReact,this.portalManager,t):new I(e,this.portalManager,t)},x);function x(e,t){var n=G.call(this)||this;return n.agGridReact=e,n.portalManager=t,n}function B(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return null!=e&&""!==e}).join(" ")}var xe=Ge.createContext({}),_e=(_.prototype.setClass=function(e,t){if(!!this.classesMap[e]==t)return this;var n=new _;return n.classesMap=Fe({},this.classesMap),n.classesMap[e]=t,n},_.prototype.toString=function(){var t=this;return Object.keys(this.classesMap).filter(function(e){return t.classesMap[e]}).join(" ")},_);function _(){this.classesMap={}}function Ue(e){return"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===("function"==typeof Symbol&&Symbol.for?Symbol.for("react.memo"):60115)}function Y(e,t,n,r){if(!(!e||e.componentFromFramework)){var o=Be(e);if(o){e=o.getGui();return n.appendChild(e),U(r,o),function(){var e=o.getGui();e&&e.parentElement&&e.parentElement.removeChild(e),t.destroyBean(o),r&&U(r,void 0)}}}}function L(r,o){Ae.useEffect(function(){var e=o.current,t=e.parentElement;if(t){var n=document.createComment(r);return t.insertBefore(n,e),function(){t.removeChild(n)}}},[])}var U=function(e,t){e&&(e instanceof Function?e(t):e.current=t)},Be=function(e){e=e.newAgStackInstance();if(e)return e.resolveNow(null,function(e){return e})},H=Ae.memo(function(e){var t=Ae.useContext(xe).context,n=Ae.useState(new _e),r=n[0],o=n[1],a=Ae.useState(),i=a[0],s=a[1],u=Ae.useState(),c=u[0],l=u[1],p=Ae.useState(),f=p[0],m=p[1],d=Ae.useState(),h=d[0],C=d[1],n=Ae.useState(),a=n[0],g=n[1],u=Ae.useState(),y=u[0],E=u[1],v=Ae.useRef(null),S=Ae.useRef(null),R=Ae.useRef(),w=e.ctrl;Ae.useEffect(function(){w.setComp({setWidth:function(e){return s(e)},addOrRemoveCssClass:function(t,n){return o(function(e){return e.setClass(t,n)})},setAriaSort:function(e){return C(e)},setColId:function(e){return m(e)},setTitle:function(e){return l(e)},setAriaDescribedBy:function(e){return g(e)},setUserCompDetails:function(e){return E(e)},getUserCompInstance:function(){return R.current||void 0}},v.current,S.current);var e=w.getSelectAllGui();S.current.insertAdjacentElement("afterend",e)},[]),Ae.useEffect(function(){return Y(y,t,v.current,R)},[y]),Ae.useEffect(function(){var t=void 0;v.current.childNodes.forEach(function(e){null!=e&&e!==S.current&&(t=e)}),w.setDragSource(t)},[y]);p=Ae.useMemo(function(){return{width:i}},[i]),d=Ae.useMemo(function(){return"ag-header-cell "+r.toString()},[r]),n=Ae.useMemo(function(){return!!(y&&y.componentFromFramework&&Ue(y.componentClass))},[y]),u=y&&y.componentFromFramework,e=y&&y.componentClass;return Ge.createElement("div",{ref:v,className:d,style:p,title:c,"col-id":f,"aria-sort":h,role:"columnheader",unselectable:"on",tabIndex:-1,"aria-describedby":a},Ge.createElement("div",{ref:S,className:"ag-header-cell-resize",role:"presentation"}),u&&n&&Ge.createElement(e,Fe({},y.params)),u&&!n&&Ge.createElement(e,Fe({},y.params,{ref:R})))}),j=Ae.memo(function(e){var t=Ae.useContext(xe).context,n=Ae.useState(new _e),r=n[0],o=n[1],a=Ae.useState(new _e),i=a[0],s=a[1],u=Ae.useState(),c=u[0],l=u[1],p=Ae.useState(),f=p[0],m=p[1],d=Ae.useState(),h=d[0],C=d[1],n=Ae.useState(),a=n[0],g=n[1],u=Ae.useState(),y=u[0],E=u[1],v=Ae.useRef(null),S=Ae.useRef(null),R=e.ctrl;Ae.useEffect(function(){R.setComp({setWidth:function(e){return l(e)},addOrRemoveCssClass:function(t,n){return o(function(e){return e.setClass(t,n)})},setColId:function(e){return C(e)},setTitle:function(e){return m(e)},setUserCompDetails:function(e){return E(e)},addOrRemoveResizableCssClass:function(t,n){return s(function(e){return e.setClass(t,n)})},setAriaExpanded:function(e){return g(e)}},v.current,S.current)},[]),Ae.useEffect(function(){return Y(y,t,v.current)},[y]),Ae.useEffect(function(){var t=void 0;v.current.childNodes.forEach(function(e){null!=e&&e!==S.current&&(t=e)}),t&&R.setDragSource(t)},[y]);p=Ae.useMemo(function(){return{width:c}},[c]),d=Ae.useMemo(function(){return"ag-header-group-cell "+r.toString()},[r]),n=Ae.useMemo(function(){return"ag-header-cell-resize "+i.toString()},[i]),u=y&&y.componentFromFramework,e=y&&y.componentClass;return Ge.createElement("div",{ref:v,className:d,style:p,title:f,"col-id":h,role:"columnheader",tabIndex:-1,"aria-expanded":a},u&&Ge.createElement(e,Fe({},y.params)),Ge.createElement("div",{ref:S,className:n}))}),W=Ae.memo(function(e){var t=Ae.useContext(xe).context,n=Ae.useState(new _e),r=n[0],o=n[1],a=Ae.useState(new _e),i=a[0],s=a[1],u=Ae.useState(new _e),c=u[0],l=u[1],p=Ae.useState(),f=p[0],m=p[1],d=Ae.useState(),h=d[0],C=d[1],g=Ae.useRef(null),y=Ae.useRef(null),E=Ae.useRef(null),v=Ae.useRef(null),S=Ae.useRef(),R=e.ctrl;Ae.useEffect(function(){R.setComp({addOrRemoveCssClass:function(t,n){return o(function(e){return e.setClass(t,n)})},addOrRemoveBodyCssClass:function(t,n){return s(function(e){return e.setClass(t,n)})},addOrRemoveButtonWrapperCssClass:function(t,n){return l(function(e){return e.setClass(t,n)})},setWidth:function(e){return m(e)},setCompDetails:function(e){return C(e)},getFloatingFilterComp:function(){return S.current?ke.AgPromise.resolve(S.current):null},setMenuIcon:function(e){return v.current.appendChild(e)}},g.current,v.current,y.current)},[]),Ae.useEffect(function(){return Y(h,t,y.current,S)},[h]);var w=Ae.useMemo(function(){return{width:f}},[f]),n=Ae.useMemo(function(){return"ag-header-cell ag-floating-filter "+r.toString()},[r]),a=Ae.useMemo(function(){return i.toString()},[i]),u=Ae.useMemo(function(){return"ag-floating-filter-button "+c.toString()},[i]),p=Ae.useMemo(function(){return!!(h&&h.componentFromFramework&&Ue(h.componentClass))},[h]),d=h&&h.componentFromFramework,e=h&&h.componentClass;return Ge.createElement("div",{ref:g,className:n,style:w,role:"gridcell",tabIndex:-1},Ge.createElement("div",{ref:y,className:a,role:"presentation"},d&&p&&Ge.createElement(e,Fe({},h.params)),d&&!p&&Ge.createElement(e,Fe({},h.params,{ref:S}))),Ge.createElement("div",{ref:E,className:u,role:"presentation"},Ge.createElement("button",{ref:v,type:"button","aria-label":"Open Filter Menu",className:"ag-floating-filter-button-button",tabIndex:-1})))}),V=Ae.memo(function(e){var o=Ae.useContext(xe).gridOptionsWrapper,t=Ae.useState(),n=t[0],r=t[1],a=Ae.useState(),i=a[0],s=a[1],u=Ae.useState(),c=u[0],l=u[1],p=Ae.useState(),f=p[0],m=p[1],d=Ae.useState(),t=d[0],h=d[1],a=Ae.useState([]),u=a[0],C=a[1],p=Ae.useRef(null),g=e.ctrl,y=g.getType()===ke.HeaderRowType.COLUMN,E=g.getType()===ke.HeaderRowType.COLUMN_GROUP,v=g.getType()===ke.HeaderRowType.FLOATING_FILTER,S=Ae.useCallback(function(e,t){if(o.isEnsureDomOrder())return t;var n=ke._.mapById(e,function(e){return e.getInstanceId()}),r=ke._.mapById(t,function(e){return e.getInstanceId()});return K(e.filter(function(e){return r.has(e.getInstanceId())}),t.filter(function(e){return!n.has(e.getInstanceId())}))},[]);Ae.useEffect(function(){g.setComp({setTransform:function(e){return r(e)},setHeight:function(e){return s(e)},setTop:function(e){return l(e)},setHeaderCtrls:function(t){return C(function(e){return S(e,t)})},setWidth:function(e){return m(e)},setAriaRowIndex:function(e){return h(e)}})},[]);d=Ae.useMemo(function(){return{transform:n,height:i,top:c,width:f}},[n,i,c,f]),a=Ae.useMemo(function(){var e=["ag-header-row"];return y&&e.push("ag-header-row-column"),E&&e.push("ag-header-row-column-group"),v&&e.push("ag-header-row-column-filter"),e.join(" ")},[]),e=Ae.useCallback(function(e){switch(g.getType()){case ke.HeaderRowType.COLUMN_GROUP:return Ge.createElement(j,{ctrl:e,key:e.getInstanceId()});case ke.HeaderRowType.FLOATING_FILTER:return Ge.createElement(W,{ctrl:e,key:e.getInstanceId()});default:return Ge.createElement(H,{ctrl:e,key:e.getInstanceId()})}},[]);return Ge.createElement("div",{ref:p,className:a,role:"row",style:d,"aria-rowindex":t},u.map(e))}),q=Ae.memo(function(n){var e=Ae.useState(new _e),t=e[0],r=e[1],o=Ae.useState(),a=o[0],i=o[1],s=Ae.useState(),u=s[0],c=s[1],l=Ae.useState(),p=l[0],f=l[1],m=Ae.useState([]),d=m[0],h=m[1],C=Ae.useContext(xe).context,g=Ae.useRef(null),y=n.pinned===ke.Constants.PINNED_LEFT,E=n.pinned===ke.Constants.PINNED_RIGHT,e=!y&&!E;Ae.useEffect(function(){var e={addOrRemoveCssClass:function(t,n){return r(function(e){return e.setClass(t,n)})},setCtrls:function(e){return h(e)},setCenterWidth:function(e){return i(e)},setContainerTransform:function(e){return c(e)},setPinnedContainerWidth:function(e){return f(e)}},t=C.createBean(new ke.HeaderRowContainerCtrl(n.pinned));return t.setComp(e,g.current),function(){C.destroyBean(t)}},[]);o=Ae.useMemo(function(){return t.toString()},[t]),s=function(){return d.map(function(e){return Ge.createElement(V,{ctrl:e,key:e.getInstanceId()})})},l=Ae.useMemo(function(){return{width:a,transform:u}},[a,u]),m=Ae.useMemo(function(){return{width:p,minWidth:p,maxWidth:p}},[p]);return Ge.createElement(Ge.Fragment,null,y&&Ge.createElement("div",{ref:g,className:"ag-pinned-left-header "+o,role:"presentation",style:m},s()),E&&Ge.createElement("div",{ref:g,className:"ag-pinned-right-header "+o,role:"presentation",style:m},s()),e&&Ge.createElement("div",{ref:g,className:"ag-header-viewport "+o,role:"presentation"},Ge.createElement("div",{className:"ag-header-container",role:"rowgroup",style:l},s())))}),z=Ae.memo(function(){var e=Ae.useState(new _e),t=e[0],r=e[1],n=Ae.useState(),o=n[0],a=n[1],i=Ae.useContext(xe).context,s=Ae.useRef(null);Ae.useEffect(function(){var e={addOrRemoveCssClass:function(t,n){return r(function(e){return e.setClass(t,n)})},setHeightAndMinHeight:function(e){return a(e)}},t=i.createBean(new ke.GridHeaderCtrl);return t.setComp(e,s.current,s.current),function(){i.destroyBean(t)}},[]);e=Ae.useMemo(function(){return"ag-header "+t.toString()},[t]),n=Ae.useMemo(function(){return{height:o,minHeight:o}},[o]);return Ge.createElement("div",{ref:s,className:e,style:n,role:"presentation",unselectable:"on"},Ge.createElement(q,{pinned:ke.Constants.PINNED_LEFT}),Ge.createElement(q,{pinned:null}),Ge.createElement(q,{pinned:ke.Constants.PINNED_RIGHT}))}),Le=Ae.memo(function(u){var e=Ae.useState(),t=e[0],c=e[1],e=Ae.useContext(xe),l=e.context,p=e.popupService,f=e.gridOptionsWrapper;return Ae.useEffect(function(){var e=u.editDetails,t=u.cellCtrl,n=u.eParentCell,r=e.compDetails,o=f.isStopEditingWhenCellsLoseFocus(),a=new ke.PopupEditorWrapper(r.params),r=a.getGui();!u.jsChildComp||(i=u.jsChildComp.getGui())&&r.appendChild(i);var i={column:t.getColumn(),rowNode:t.getRowNode(),type:"popupCellEditor",eventSource:n,ePopup:r,keepWithinBounds:!0},e=("under"===e.popupPosition?p.positionPopupUnderComponent:p.positionPopupOverComponent).bind(p,i),i=f.getLocaleTextFunc(),i=p.addPopup({modal:o,eChild:r,closeOnEsc:!0,closedCallback:function(){t.onPopupEditorClosed()},anchorToElement:n,positionCallback:e,ariaLabel:i("ariaLabelCellEditor","Cell Editor")}),s=i?i.hideFunc:void 0;return c(a),u.jsChildComp&&u.jsChildComp.afterGuiAttached&&u.jsChildComp.afterGuiAttached(),function(){null!=s&&s(),l.destroyBean(a)}},[]),Ge.createElement(Ge.Fragment,null,t&&u.wrappedContent&&r.createPortal(u.wrappedContent,t.getGui()))});(te=te=te||{})[te.ShowValue=0]="ShowValue",te[te.EditValue=1]="EditValue";function $(n){var r=Ae.useContext(xe).context,o=Ae.useRef(null),e=Ae.useRef(null),a=Ae.useRef(null),i=Ae.useRef(null),s=Ae.useRef(null),t=Ae.useState(),u=t[0],c=t[1],l=Ae.useState(),p=l[0],f=l[1],m=Ae.useState(),d=m[0],h=m[1],C=Ae.useState(new _e),g=C[0],y=C[1],E=Ae.useState(new _e),v=E[0],S=E[1],R=Ae.useState(new _e),w=R[0],O=R[1],b=Ae.useState(new _e),I=b[0],P=b[1];return Ae.useEffect(function(){return Y(u,r,e.current)},[u]),Ae.useEffect(function(){var e={setInnerRenderer:function(e,t){c(e),h(t)},setChildCount:function(e){return f(e)},addOrRemoveCssClass:function(t,n){return y(function(e){return e.setClass(t,n)})},setContractedDisplayed:function(t){return O(function(e){return e.setClass("ag-hidden",!t)})},setExpandedDisplayed:function(t){return S(function(e){return e.setClass("ag-hidden",!t)})},setCheckboxVisible:function(t){P(function(e){return e.setClass("ag-invisible",!t)})}},t=r.createBean(new ke.GroupCellRendererCtrl);return t.init(e,o.current,a.current,i.current,s.current,$,n),function(){r.destroyBean(t)}},[]),t=Ae.useMemo(function(){return"ag-cell-wrapper "+g.toString()},[g]),l=Ae.useMemo(function(){return"ag-group-expanded "+v.toString()},[v]),m=Ae.useMemo(function(){return"ag-group-contracted "+w.toString()},[w]),C=Ae.useMemo(function(){return"ag-group-checkbox "+I.toString()},[I]),E=u&&u.componentFromFramework,R=E?u.componentClass:void 0,b=null==u&&null!=d,Ge.createElement("span",Fe({className:t,ref:o},n.colDef?{}:{role:"gridcell"}),Ge.createElement("span",{className:l,ref:i}),Ge.createElement("span",{className:m,ref:s}),Ge.createElement("span",{className:C,ref:a}),Ge.createElement("span",{className:"ag-group-value",ref:e},b&&Ge.createElement(Ge.Fragment,null,d),E&&Ge.createElement(R,Fe({},u.params))),Ge.createElement("span",{className:"ag-group-child-count"},p))}var Z,X=Ae.memo(function(e){var n,r,o,a,i,s,u,c=Ae.useContext(xe).context,l=e.cellCtrl,t=e.printLayout,p=e.editingRow,f=Ae.useState(),m=f[0],d=f[1],h=Ae.useState(),C=h[0],g=h[1],y=Ae.useState(new _e),E=y[0],v=y[1],S=Ae.useState(),R=S[0],w=S[1],O=Ae.useState("on"),b=O[0],I=O[1],P=Ae.useState(),M=P[0],T=P[1],D=Ae.useState(),N=D[0],k=D[1],A=Ae.useState(),G=A[0],F=A[1],x=Ae.useState(),_=x[0],U=x[1],B=Ae.useState(),L=B[0],H=B[1],j=Ae.useState(),W=j[0],V=j[1],q=Ae.useState(),z=q[0],K=q[1],Y=Ae.useState(),e=Y[0],$=Y[1],f=Ae.useState(),h=f[0],Z=f[1],y=Ae.useState(),X=y[0],J=y[1],S=Ae.useState(),O=S[0],Q=S[1],P=Ae.useState(),D=P[0],ee=P[1],A=Ae.useState(),x=A[0],te=A[1],B=Ae.useState(!1),ne=B[0],re=B[1],j=Ae.useState(!1),oe=j[0],ae=j[1],q=Ae.useState(!1),ie=q[0],se=q[1],Y=Ae.useState(!1),f=Y[0],ue=Y[1],y=Ae.useState(),S=y[0],ce=y[1],le=Ae.useRef(null),pe=Ae.useRef(null),fe=Ae.useRef(),me=Ae.useRef(),P=Ae.useState(),de=P[0],he=P[1],A=Ae.useState(),Ce=A[0],ge=A[1],ye=null!=m&&(ne||ie||oe||f),Ee=Ae.useCallback(function(e,t){var n,r,o,a,i;(me.current=t)&&(n=e,r=t,e=(o=l).getColumn(),!n&&r.isPopup&&r.isPopup()&&(a="AG Grid: Found an issue in column "+e.getColId()+". If using ReactUI, specify an editor is a popup using colDef.cellEditorPopup=true",ke._.doOnce(function(){return console.warn(a)},"jsEditorComp-isPopup-"+o.getColumn().getColId())),n&&r.getPopupPosition&&null!=r.getPopupPosition()&&(i="AG Grid: AG Grid: Found an issue in column "+e.getColId()+". If using ReactUI, specify an editor popup position using colDef.cellEditorPopupPosition=[value]",ke._.doOnce(function(){return console.warn(i)},"jsEditorComp-getPopupPosition-"+o.getColumn().getColId())),t.isCancelBeforeStart&&t.isCancelBeforeStart()&&setTimeout(function(){return l.stopEditing()},0))},[]),B=Ae.useCallback(function(e){return Ee(!0,e)},[]),j=Ae.useCallback(function(e){return Ee(!1,e)},[]);n=m,r=ye,o=Ce,a=fe,i=le,q=Ae.useContext(xe),s=q.context,q.userComponentFactory,u=Ae.useCallback(function(){var e,t=a.current;t&&((e=t.getGui())&&e.parentElement&&e.parentElement.removeChild(e),s.destroyBean(t),a.current=void 0)},[]),Ae.useEffect(function(){var e=n&&n.compDetails&&!n.compDetails.componentFromFramework;if(null!=n&&e&&!(r&&null==o)){e=n.compDetails;if(a.current){var t=a.current,t=null!=t.refresh&&0==n.force&&t.refresh(e.params);if(!0===t||void 0===t)return;u()}t=e.newAgStackInstance();!t||(e=t.resolveNow(null,function(e){return e}))&&(t=e.getGui(),(r?o:i.current).appendChild(t),a.current=e)}else u()},[n,r,o]),Ae.useEffect(function(){return u},[]),Ae.useEffect(function(){if(C&&!C.compDetails.componentFromFramework){var e=C.compDetails,t=!0===C.popup,n=Be(e);if(n){var r=n.getGui();return Ee(t,n),t||(le.current.appendChild(r),n.afterGuiAttached&&n.afterGuiAttached()),ce(n),function(){c.destroyBean(n),Ee(t,void 0),ce(void 0),r&&r.parentElement&&r.parentElement.removeChild(r)}}}},[C]),Ae.useEffect(function(){if(l&&c&&(Z(de?"cell-"+l.getInstanceId():void 0),de)){var t=[],e=function(e){return e&&(de.insertAdjacentElement("afterbegin",e.getGui()),t.push(e)),e};return ne&&e(l.createSelectionCheckbox()),ie&&e(l.createDndSource()),oe&&e(l.createRowDragComp()),function(){c.destroyBeans(t)}}},[ie,oe,ne,de]);Y=Ae.useCallback(function(e){return he(e)},[]),y=Ae.useCallback(function(e){return ge(e)},[]);Ae.useEffect(function(){l&&l.setComp({addOrRemoveCssClass:function(t,n){return v(function(e){return e.setClass(t,n)})},setUserStyles:function(e){return w(e)},setAriaSelected:function(e){return V(e)},setAriaExpanded:function(e){return K(e)},getFocusableElement:function(){return le.current},setLeft:function(e){return T(e)},setWidth:function(e){return k(e)},setAriaColIndex:function(e){return $(e)},setHeight:function(e){return F(e)},setZIndex:function(e){return J(e)},setTabIndex:function(e){return H(e)},setRole:function(e){return Q(e)},setColId:function(e){return ee(e)},setTitle:function(e){return te(e)},setUnselectable:function(e){return I(e||void 0)},setTransition:function(e){return U(e)},setIncludeSelection:function(e){return re(e)},setIncludeRowDrag:function(e){return ae(e)},setIncludeDndSource:function(e){return se(e)},setForceWrapper:function(e){return ue(e)},getCellEditor:function(){return me.current||null},getCellRenderer:function(){return pe.current||fe.current},getParentOfValue:function(){return Ce||le.current},setRenderDetails:function(e,t,n){d({value:t,compDetails:e,force:n})},setEditDetails:function(e,t,n){e?(g({compDetails:e,popup:t,popupPosition:n}),t||d(void 0)):g(void 0)}},null,le.current,t,p)},[]);var ve,Se,Re,we,Oe,be,Ie,Pe,Me,Te,De,Ne,P=Ae.useMemo(function(){return!!(m&&m.compDetails&&m.compDetails.componentFromFramework&&Ue(m.compDetails.componentClass))},[m]),A=Ae.useMemo(function(){var e=E.toString();return ye||(e+=" ag-cell-value"),e},[E,ye]),f=Ae.useMemo(function(){var e={left:M,width:N,height:G,transition:_,zIndex:X};return ke._.assign(e,R),e},[M,N,G,_,X,R]),q=Ae.useMemo(function(){return l.getInstanceId()},[]);return Ge.createElement("div",{ref:le,className:A,style:f,tabIndex:L,"aria-selected":W,"aria-colindex":e,role:O,"aria-expanded":z,"col-id":D,title:x,unselectable:b,"aria-describedby":h},null!=m&&(Se=q,Re=pe,we=b,Oe=P,be=Y,Ie=y,Pe=(ve=m).compDetails,Me=ve.value,Te=!Pe,De=Pe&&Pe.componentFromFramework,Ne=Pe&&Pe.componentClass,ve=function(){return Ge.createElement(Ge.Fragment,null,Te&&Ge.createElement(Ge.Fragment,null,Me),De&&!Oe&&Ge.createElement(Ne,Fe({},Pe.params,{ref:Re})),De&&Oe&&Ge.createElement(Ne,Fe({},Pe.params)))},Ge.createElement(Ge.Fragment,null,ye?Ge.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:be},Ge.createElement("span",{role:"presentation",id:"cell-"+Se,className:"ag-cell-value",unselectable:we,ref:Ie},ve())):ve())),null!=C&&(Y=C,y=j,be=B,Se=le.current,we=l,Ie=S,ve=Y.compDetails,j=ve.componentClass,B=ve.componentFromFramework&&!Y.popup,S=ve.componentFromFramework&&Y.popup,ve=!ve.componentFromFramework&&Y.popup,Ge.createElement(Ge.Fragment,null,B&&Ge.createElement(j,Fe({},Y.compDetails.params,{ref:y})),S&&Ge.createElement(Le,{editDetails:Y,cellCtrl:we,eParentCell:Se,wrappedContent:Ge.createElement(j,Fe({},Y.compDetails.params,{ref:be}))}),ve&&Ie&&Ge.createElement(Le,{editDetails:Y,cellCtrl:we,eParentCell:Se,jsChildComp:Ie}))))}),J=Ae.memo(function(e){var t=Ae.useContext(xe).context,n=e.rowCtrl,r=e.pinned,o=Ae.useState(),a=o[0],i=o[1],s=Ae.useState(n.getInitialRowTop()),u=s[0],c=s[1],l=Ae.useState(n.getInitialTransform()),p=l[0],f=l[1],m=Ae.useState(new _e),d=m[0],h=m[1],C=Ae.useState(),g=C[0],y=C[1],E=Ae.useState(),v=E[0],S=E[1],R=Ae.useState(),w=R[0],O=R[1],b=Ae.useState(),I=b[0],P=b[1],e=Ae.useState(),o=e[0],M=e[1],s=Ae.useState(),l=s[0],T=s[1],m=Ae.useState(),C=m[0],D=m[1],E=Ae.useState(),R=E[0],N=E[1],b=Ae.useState(),e=b[0],k=b[1],s=Ae.useState(),A=s[0],G=s[1],m=Ae.useState({list:[],instanceIdMap:new Map}),F=m[0],x=m[1],E=Ae.useState(),_=E[0],U=E[1],b=Ae.useState(!1),B=b[0],L=b[1],s=Ae.useState(),H=s[0],j=s[1],W=Ae.useRef(null),V=Ae.useRef();Ae.useEffect(function(){n.setComp({setDisplay:function(e){return j(e)},setDomOrder:function(e){return L(e)},setHeight:function(e){return i(e)},setTop:function(e){return c(e)},setTransform:function(e){return f(e)},addOrRemoveCssClass:function(t,n){return h(function(e){return e.setClass(t,n)})},setRowIndex:function(e){return y(e)},setAriaRowIndex:function(e){return T(e)},setAriaExpanded:function(e){return D(e)},setAriaLabel:function(e){return N(e)},setRowId:function(e){return S(e)},setRowBusinessKey:function(e){return P(e)},setTabIndex:function(e){return M(e)},setUserStyles:function(e){return G(e)},setAriaSelected:function(e){return k(e)},setRole:function(e){return O(e)},setCellCtrls:function(t){return x(function(e){return function(n,e,t){if(t){var r={list:e,instanceIdMap:new Map};return e.forEach(function(e){return r.instanceIdMap.set(e.getInstanceId(),e)}),r}var o=[],a=[],i=new Map,s=new Map;return e.forEach(function(e){return s.set(e.getInstanceId(),e)}),n.list.forEach(function(e){var t=e.getInstanceId();s.has(t)&&(o.push(e),i.set(t,e))}),e.forEach(function(e){var t=e.getInstanceId();n.instanceIdMap.has(t)||(a.push(e),i.set(t,e))}),{list:K(o,a),instanceIdMap:i}}(e,t,B)})},showFullWidth:function(e){return U(e)},getFullWidthCellRenderer:function(){return V.current}},W.current,r)},[]),Ae.useEffect(function(){return Y(_,t,W.current,V)},[_]);var q,m=Ae.useMemo(function(){var e={height:a,top:u,transform:p,display:H};return ke._.assign(e,A),e},[a,u,p,A,H]),E=Ae.useMemo(function(){return d.toString()},[d]),b=_&&_.componentFromFramework,s=null!=F,z=Ae.useMemo(function(){return!!(_&&_.componentFromFramework&&Ue(_.componentClass))},[_]);return Ge.createElement("div",{ref:W,role:w,className:E,style:m,"row-index":g,"aria-rowindex":l,"aria-expanded":C,"aria-label":R,"aria-selected":e,"row-id":v,"row-business-key":I,tabIndex:o},s&&F.list.map(function(e){return Ge.createElement(X,{cellCtrl:e,editingRow:n.isEditing(),printLayout:n.isPrintLayout(),key:e.getInstanceId()})}),b&&(q=_.componentClass,Ge.createElement(Ge.Fragment,null,z&&Ge.createElement(q,Fe({},_.params)),!z&&Ge.createElement(q,Fe({},_.params,{ref:V})))))}),Q=Ae.memo(function(e){var r=Ae.useContext(xe).context,t=Ae.useState(""),n=t[0],o=t[1],a=Ae.useState([]),i=a[0],s=a[1],u=Ae.useState(!1),c=u[0],l=u[1],p=Ae.useState(""),f=p[0],m=p[1],d=e.name,h=Ae.useMemo(function(){return ke.RowContainerCtrl.getPinned(d)},[d]),C=Ae.useRef(null),g=Ae.useRef(null),y=Ae.useRef(null),E=Ae.useMemo(function(){return ke.RowContainerCtrl.getRowContainerCssClasses(d)},[d]),v=Ae.useMemo(function(){return B(E.wrapper)},[]),S=Ae.useMemo(function(){return B(E.viewport)},[]),R=Ae.useMemo(function(){return B(E.container)},[]),t=d===ke.RowContainerName.CENTER,a=d===ke.RowContainerName.TOP_CENTER||d===ke.RowContainerName.BOTTOM_CENTER,u=!t&&!a;L(" AG Row Container "+d+" ",t?C:a?g:y),Ae.useEffect(function(){var e=[],t={setViewportHeight:o,setRowCtrls:function(n){s(function(e){if(c)return n;var t=e.filter(function(e){return 0<=n.indexOf(e)}),e=n.filter(function(e){return t.indexOf(e)<0});return K(t,e)})},setDomOrder:function(e){return l(e)},setContainerWidth:function(e){return m(e)}},n=r.createBean(new ke.RowContainerCtrl(d));return e.push(n),n.setComp(t,y.current,g.current,C.current),function(){r.destroyBeans(e)}},[]);var p=Ae.useMemo(function(){return{height:n}},[n]),w=Ae.useMemo(function(){return{width:f}},[f]),e=function(){return Ge.createElement("div",{className:R,ref:y,role:"rowgroup",style:w,unselectable:"on"},i.map(function(e){return Ge.createElement(J,{rowCtrl:e,pinned:h,key:e.getInstanceId()})}))};return Ge.createElement(Ge.Fragment,null,t&&Ge.createElement("div",{className:v,ref:C,role:"presentation",unselectable:"on"},Ge.createElement("div",{className:S,ref:g,role:"presentation",style:p},e())),a&&Ge.createElement("div",{className:S,ref:g,role:"presentation",style:p},e()),u&&e())}),ee=Ae.memo(function(){var e=Ae.useContext(xe),o=e.context,a=e.agStackComponentsRegistry,i=e.resizeObserverService,t=Ae.useState(""),n=t[0],s=t[1],r=Ae.useState(0),u=r[0],c=r[1],l=Ae.useState(0),p=l[0],f=l[1],m=Ae.useState(0),d=m[0],h=m[1],C=Ae.useState(0),g=C[0],y=C[1],E=Ae.useState(""),v=E[0],S=E[1],e=Ae.useState(""),R=e[0],w=e[1],t=Ae.useState(null),O=t[0],b=t[1],r=Ae.useState(""),I=r[0],P=r[1],l=Ae.useState(null),M=l[0],T=l[1],m=Ae.useState(""),D=m[0],N=m[1],C=Ae.useState(null),k=C[0],A=C[1],G=Ae.useRef(null),F=Ae.useRef(null),x=Ae.useRef(null),_=Ae.useRef(null);L(" AG Grid Body ",G),L(" AG Pinned Top ",F),L(" AG Middle ",x),L(" AG Pinned Bottom ",_),Ae.useEffect(function(){var t=[],n=[];if(o){var e=function(e){e=a.getComponentClass(e),e=o.createBean(new e);return t.push(e),e};G.current.appendChild(document.createComment(" AG Fake Horizontal Scroll ")),G.current.appendChild(e("AG-FAKE-HORIZONTAL-SCROLL").getGui()),G.current.appendChild(document.createComment(" AG Overlay Wrapper ")),G.current.appendChild(e("AG-OVERLAY-WRAPPER").getGui());var r={setRowAnimationCssOnBodyViewport:s,setColumnCount:c,setRowCount:f,setTopHeight:h,setBottomHeight:y,setTopDisplay:S,setBottomDisplay:w,setColumnMovingCss:b,updateLayoutClasses:P,setAlwaysVerticalScrollClass:T,setPinnedTopBottomOverflowY:N,setCellSelectableCss:A,registerBodyViewportResizeListener:function(e){var t=i.observeResize(x.current,e);n.push(function(){return t()})}},e=o.createBean(new ke.GridBodyCtrl);return t.push(e),e.setComp(r,G.current,x.current,F.current,_.current),function(){o.destroyBeans(t),n.forEach(function(e){return e()})}}},[]);function U(e){return Ge.createElement(Q,{name:e,key:e+"-container"})}E=Ae.useMemo(function(){return B("ag-root","ag-unselectable",O,I)},[O,I]),e=Ae.useMemo(function(){return B("ag-body-viewport",n,I,M,k)},[n,I,M,k]),t=Ae.useMemo(function(){return B("ag-floating-top",k)},[k]),r=Ae.useMemo(function(){return B("ag-floating-bottom",k)},[k]),l=Ae.useMemo(function(){return{height:d,minHeight:d,display:v,overflowY:D}},[d,v,D]),m=Ae.useMemo(function(){return{height:g,minHeight:g,display:R,overflowY:D}},[g,R,D]),C=function(e){var t=e.section,n=e.children,r=e.className,o=e.style,e=e.unselectable;return Ge.createElement("div",{ref:t,className:r,role:"presentation",style:o,unselectable:e},n.map(U))};return Ge.createElement("div",{ref:G,className:E,role:"grid",unselectable:"on","aria-colcount":u,"aria-rowcount":p},Ge.createElement(z,null),C({section:F,className:t,style:l,unselectable:"on",children:[ke.RowContainerName.TOP_LEFT,ke.RowContainerName.TOP_CENTER,ke.RowContainerName.TOP_RIGHT,ke.RowContainerName.TOP_FULL_WITH]}),C({section:x,className:e,children:[ke.RowContainerName.LEFT,ke.RowContainerName.CENTER,ke.RowContainerName.RIGHT,ke.RowContainerName.FULL_WIDTH]}),C({section:_,className:r,style:m,unselectable:"on",children:[ke.RowContainerName.BOTTOM_LEFT,ke.RowContainerName.BOTTOM_CENTER,ke.RowContainerName.BOTTOM_RIGHT,ke.RowContainerName.BOTTOM_FULL_WITH]}))}),te=Ae.forwardRef(function(e,t){var n=e.children,r=e.eFocusableElement,o=e.onTabKeyDown,a=e.gridCtrl,i=Ae.useContext(xe).context,s=Ae.useRef(null),u=Ae.useRef(null),c=Ae.useRef(),e=Ae.useState(),l=e[0],p=e[1];Ae.useImperativeHandle(t,function(){return{forceFocusOutOfContainer:function(){c.current.forceFocusOutOfContainer()}}}),Ae.useEffect(function(){var e=s.current,t=u.current,n=c.current=i.createBean(new ke.TabGuardCtrl({comp:{setTabIndex:function(e){return p(null==e?void 0:parseInt(e,10))}},eTopGuard:e,eBottomGuard:t,eFocusableElement:r,onTabKeyDown:o,focusInnerElement:function(e){return a.focusInnerElement(e)}}));return function(){i.destroyBean(n)}},[]);t=function(e){return Ge.createElement("div",{className:"ag-tab-guard ag-tab-guard-"+e,role:"presentation",tabIndex:l,ref:"top"===e?s:u})};return Ge.createElement(Ge.Fragment,null,t("top"),n,t("bottom"))}),ne=Ae.memo(te),re=Ae.memo(function(e){var p=e.context,t=Ae.useState(""),n=t[0],r=t[1],o=Ae.useState(""),a=o[0],i=o[1],s=Ae.useState(""),u=s[0],c=s[1],l=Ae.useState(null),f=l[0],m=l[1],d=Ae.useState(null),h=d[0],C=d[1],g=Ae.useState(!1),e=g[0],y=g[1],t=Ae.useState(),E=t[0],v=t[1],S=Ae.useRef(null),R=Ae.useRef(null),w=Ae.useRef(),O=Ae.useRef(null),b=Ae.useRef(function(){}),o=Ae.useCallback(function(){},[]),I=Ae.useMemo(function(){return p.getBean("beans")},[]);L(" AG Grid ",R),Ae.useEffect(function(){var e=S.current=p.createBean(new ke.GridCtrl);return function(){p.destroyBean(e),S.current=null}},[]),Ae.useEffect(function(){var e=S.current;b.current=e.focusInnerElement.bind(e),e.setComp({destroyGridUi:function(){},setRtlClass:r,addOrRemoveKeyboardFocusClass:function(e){return i(e?ke.FocusService.AG_KEYBOARD_FOCUS:"")},forceFocusOutOfContainer:function(){w.current.forceFocusOutOfContainer()},updateLayoutClasses:c,getFocusableContainers:function(){var e=[],t=R.current.querySelector(".ag-root"),n=R.current.querySelector(".ag-side-bar");return t&&e.push(t),n&&e.push(n),e},setCursor:m,setUserSelect:C},R.current,R.current),y(!0)},[]),Ae.useEffect(function(){if(E){var e,t=S.current,n=[],r=I.agStackComponentsRegistry,o=r.getComponentClass("AG-GRID-HEADER-DROP-ZONES"),a=r.getComponentClass("AG-SIDE-BAR"),i=r.getComponentClass("AG-STATUS-BAR"),s=r.getComponentClass("AG-WATERMARK"),u=r.getComponentClass("AG-PAGINATION"),c=[],l=R.current,r=O.current;return t.showDropZones()&&o&&(e=(o=p.createBean(new o)).getGui(),l.insertAdjacentElement("afterbegin",e),c.push(e),n.push(o)),t.showSideBar()&&a&&(e=(a=p.createBean(new a)).getGui(),(r=r.querySelector(".ag-tab-guard-bottom"))&&(r.insertAdjacentElement("beforebegin",e),c.push(e)),n.push(a)),t.showStatusBar()&&i&&(e=(i=p.createBean(new i)).getGui(),l.insertAdjacentElement("beforeend",e),c.push(e),n.push(i)),u&&(e=(u=p.createBean(new u)).getGui(),l.insertAdjacentElement("beforeend",e),c.push(e),n.push(u)),t.showWatermark()&&s&&(e=(s=p.createBean(new s)).getGui(),l.insertAdjacentElement("beforeend",e),c.push(e),n.push(s)),function(){p.destroyBeans(n),c.forEach(function(e){e.parentElement&&e.parentElement.removeChild(e)})}}},[E]);s=Ae.useMemo(function(){return B("ag-root-wrapper",n,a,u)},[n,a,u]),l=Ae.useMemo(function(){return B("ag-root-wrapper-body","ag-focus-managed",u)},[u]),d=Ae.useMemo(function(){return{userSelect:null!=h?h:"",WebkitUserSelect:null!=h?h:"",cursor:null!=f?f:""}},[h,f]),g=O.current,t=Ae.useCallback(function(e){w.current=e,v(!0)},[]);return Ge.createElement("div",{ref:R,className:s,style:d},Ge.createElement("div",{className:l,ref:O},e&&g&&Ge.createElement(xe.Provider,{value:I},Ge.createElement(ne,{ref:t,eFocusableElement:g,onTabKeyDown:o,gridCtrl:S.current},Ge.createElement(ee,null)))))}),oe=Ae.memo($),ae=Ae.forwardRef(function(n,e){var t=Ae.useContext(xe),r=t.ctrlsFactory,o=t.context,a=t.gridOptionsWrapper,i=t.resizeObserverService,s=t.clientSideRowModel,u=t.serverSideRowModel,c=Ae.useState(new _e),l=c[0],p=c[1],f=Ae.useState(new _e),m=f[0],d=f[1],h=Ae.useState(),t=h[0],C=h[1],c=Ae.useState(),f=c[0],g=c[1],y=Ae.useRef(),E=Ae.useRef(null),h=Ae.useMemo(function(){return l.toString()+" ag-details-row"},[l]),c=Ae.useMemo(function(){return m.toString()+" ag-details-grid"},[m]);e&&Ae.useImperativeHandle(e,function(){return{refresh:function(){return y.current.refresh()}}}),Ae.useEffect(function(){n.template&&console.warn("AG Grid: detailCellRendererParams.template is not supported by React UI - this only works with frameworks that work against String templates. To change the template, please provide your own React Detail Cell Renderer.")},[]),Ae.useEffect(function(){var e={addOrRemoveCssClass:function(t,n){return p(function(e){return e.setClass(t,n)})},addOrRemoveDetailGridCssClass:function(t,n){return d(function(e){return e.setClass(t,n)})},setDetailGrid:function(e){return C(e)},setRowData:function(e){return g(e)}},t=r.getInstance("detailCellRenderer");if(t)return o.createBean(t),t.init(e,n),y.current=t,a.isDetailRowAutoHeight()&&(i.observeResize(E.current,e=function(){var e=E.current.clientHeight;null!=e&&0<e&&setTimeout(function(){n.node.setRowHeight(e),s?s.onRowHeightChanged():u&&u.onRowHeightChanged()},0)}),e()),function(){o.destroyBean(t)}},[]);e=Ae.useCallback(function(e,t){y.current.registerDetailWithMaster(e,t)},[]);return Ge.createElement("div",{className:h,ref:E},t&&Ge.createElement(ce,Fe({className:c},t,{rowData:f,setGridApi:e})))}),ie=(n(se,Z=ke.VanillaFrameworkOverrides),se.prototype.frameworkComponent=function(e){return this.frameworkComponents[e]},se);function se(){var e=null!==Z&&Z.apply(this,arguments)||this;return e.frameworkComponents={agGroupCellRenderer:oe,agGroupRowRenderer:oe,agDetailCellRenderer:ae},e}var ue,ce=(n(le,ue=Ae.Component),le.prototype.render=function(){return Ge.createElement("div",{style:this.createStyleForDiv(),className:this.props.className,ref:this.eGui},this.state.context&&Ge.createElement(re,{context:this.state.context}),this.portalManager.getPortals())},le.prototype.createStyleForDiv=function(){return Fe({height:"100%"},this.props.containerStyle||{})},le.prototype.componentDidMount=function(){var t=this,e=this.props.modules||[],n={providedBeanInstances:{frameworkComponentWrapper:new fe(this.portalManager)},modules:e,frameworkOverrides:new ie};this.gridOptions=Fe({},this.props.gridOptions);e=this.props.children;C.hasChildColumns(e)&&(this.gridOptions.columnDefs=C.mapChildColumnDefs(e)),this.gridOptions=ke.ComponentUtil.copyAttributesToGridOptions(this.gridOptions,this.props),(new ke.GridCoreCreator).create(this.eGui.current,this.gridOptions,function(e){t.setState({context:e})},n),this.destroyFuncs.push(function(){return t.gridOptions.api.destroy()}),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi,this.props.setGridApi(this.api,this.columnApi)},le.prototype.componentWillUnmount=function(){this.destroyFuncs.forEach(function(e){return e()})},le.prototype.componentDidUpdate=function(e){this.processPropsChanges(e,this.props)},le.prototype.processPropsChanges=function(e,t){var n={};this.extractGridPropertyChanges(e,t,n),this.extractDeclarativeColDefChanges(t,n),this.processChanges(n)},le.prototype.extractDeclarativeColDefChanges=function(e,t){var n,r,o,a;this.props.gridOptions&&this.props.gridOptions.columnDefs||this.props.columnDefs||(n=!!e.debug,r="columnDefs",o=this.gridOptions.columnDefs,C.hasChildColumns(e.children)?(a=this.changeDetectionService.getStrategy(this.getStrategyTypeForProp(r)),e=C.mapChildColumnDefs(e.children),a.areEqual(o,e)||(n&&console.log("agGridReact: colDefs definitions changed"),t[r]={previousValue:o,currentValue:e})):o&&0<o.length&&(t[r]={previousValue:o,currentValue:[]}))},le.prototype.extractGridPropertyChanges=function(t,n,r){var o=this,a=!!n.debug;Object.keys(n).forEach(function(e){ke._.includes(ke.ComponentUtil.ALL_PROPERTIES,e)&&(o.changeDetectionService.getStrategy(o.getStrategyTypeForProp(e)).areEqual(t[e],n[e])||(a&&console.log("agGridReact: ["+e+"] property changed"),r[e]={previousValue:t[e],currentValue:n[e]}))}),ke.ComponentUtil.getEventCallbacks().forEach(function(e){t[e]!==n[e]&&(a&&console.log("agGridReact: ["+e+"] event callback changed"),r[e]={previousValue:t[e],currentValue:n[e]})})},le.prototype.processChanges=function(e){this.api&&ke.ComponentUtil.processOnChange(e,this.gridOptions,this.api,this.columnApi)},le.prototype.getStrategyTypeForProp=function(e){if("rowData"===e){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.isImmutableDataActive())return t.ChangeDetectionStrategyType.IdentityCheck}return t.ChangeDetectionStrategyType.DeepValueCheck},le.prototype.isImmutableDataActive=function(){return this.props.deltaRowDataMode||this.props.immutableData||this.props.gridOptions&&(this.props.gridOptions.deltaRowDataMode||this.props.gridOptions.immutableData)},le);function le(e){var t=ue.call(this,e)||this;return t.props=e,t.destroyFuncs=[],t.changeDetectionService=new w,t.eGui=Ge.createRef(),t.state={context:void 0},t.portalManager=new M(t,e.componentWrappingElement,e.maxComponentCreationTimeMs),t}var pe,fe=(n(me,pe=ke.BaseComponentWrapper),me.prototype.createWrapper=function(e,t){return new I(e,this.parent,t)},me.prototype.unwrap=function(e){return e&&e.getFrameworkComponentInstance?e.getFrameworkComponentInstance():e},me);function me(e){var t=pe.call(this)||this;return t.parent=e,t}var de,te=(n(he,de=Ae.Component),he.prototype.render=function(){return this.props.reactUi?Ge.createElement(ce,Fe({},this.props,{setGridApi:this.setGridApi})):Ge.createElement(N,Fe({},this.props,{setGridApi:this.setGridApi}))},he);function he(){var n=null!==de&&de.apply(this,arguments)||this;return n.setGridApi=function(e,t){n.api=e,n.columnApi=t},n}t.AgGridReact=te,t.AgGridReactLegacy=N,t.AgGridReactFire=ce,t.AgGridColumn=C,Object.defineProperty(t,"__esModule",{value:!0})});
  