ag-grid-enterprise
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
1 lines • 2.43 MB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.agGrid=t():e.agGrid=t()}(self,(function(){return function(){var e={886:function(e,t,i){var s,o=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l={};((e,t)=>{for(var i in t)o(e,i,{get:t[i],enumerable:!0})})(l,{ClientSideRowModelModule:()=>F}),e.exports=(s=l,((e,t,i,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of n(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(s=r(t,l))||s.enumerable});return e})(o({},"__esModule",{value:!0}),s));var h=i(423),d=i(423),c=i(423),u=class{constructor(e,t,i,s,o,r){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=e,this.gos=t,this.eventService=i,this.funcColsService=s,this.beans=r,this.selectionService=o,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id="ROOT_NODE_ID",this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return(0,c._cloneObject)(this.allNodesMap)}getRowNode(e){return this.allNodesMap[e]}setRowData(e){if("string"==typeof e)return void(0,c._warnOnce)("rowData must be an array.");this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e);const t=this.rootNode,i=this.rootNode.sibling;t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.nextId=0,this.allNodesMap={},e?t.allLeafChildren=e.map((e=>this.createNode(e,this.rootNode,0))):(t.allLeafChildren=[],t.childrenAfterGroup=[]),i&&(i.childrenAfterFilter=t.childrenAfterFilter,i.childrenAfterGroup=t.childrenAfterGroup,i.childrenAfterAggFilter=t.childrenAfterAggFilter,i.childrenAfterSort=t.childrenAfterSort,i.childrenMapped=t.childrenMapped,i.allLeafChildren=t.allLeafChildren)}updateRowData(e,t){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e.add);const i={remove:[],update:[],add:[]},s=[];return this.executeRemove(e,i,s),this.executeUpdate(e,i,s),this.executeAdd(e,i),this.updateSelection(s,"rowDataChanged"),t&&(0,c._sortRowNodesByOrder)(this.rootNode.allLeafChildren,t),i}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(e){const t={type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null};this.eventService.dispatchEvent(t)}updateSelection(e,t){const i=e.length>0;if(i&&this.selectionService.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),this.selectionService.updateGroupsFromChildrenSelections(t),i){const e={type:"selectionChanged",source:t};this.eventService.dispatchEvent(e)}}executeAdd(e,t){const{add:i,addIndex:s}=e;if((0,c._missingOrEmpty)(i))return;const o=i.map((e=>this.createNode(e,this.rootNode,0))),r=this.rootNode.allLeafChildren;if("number"==typeof s&&s>=0){const e=r.length;let t=s;if(this.gos.get("treeData")&&s>0&&e>0)for(let i=0;i<e;i++)if(r[i]?.rowIndex==s-1){t=i+1;break}const i=r.slice(0,t),n=r.slice(t,r.length);this.rootNode.allLeafChildren=[...i,...o,...n]}else this.rootNode.allLeafChildren=[...r,...o];this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=r),t.add=o}executeRemove(e,t,i){const{remove:s}=e;if((0,c._missingOrEmpty)(s))return;const o={};s.forEach((e=>{const s=this.lookupRowNode(e);s&&(s.isSelected()&&i.push(s),s.clearRowTopAndRowIndex(),o[s.id]=!0,delete this.allNodesMap[s.id],t.remove.push(s))})),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren?.filter((e=>!o[e.id]))??null,this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(e,t,i){const{update:s}=e;(0,c._missingOrEmpty)(s)||s.forEach((e=>{const s=this.lookupRowNode(e);s&&(s.updateData(e),!s.selectable&&s.isSelected()&&i.push(s),this.setMasterForRow(s,e,0,!1),t.update.push(s))}))}lookupRowNode(e){const t=this.gos.getRowIdCallback();let i;if(t){const s=t({data:e,level:0});if(i=this.allNodesMap[s],!i)return(0,c._errorOnce)(`could not find row id=${s}, data item was not found for this id`),null}else if(i=this.rootNode.allLeafChildren?.find((t=>t.data===e)),!i)return(0,c._errorOnce)("could not find data item as object was not found",e),(0,c._errorOnce)("Consider using getRowId to help the Grid find matching row data"),null;return i||null}createNode(e,t,i){const s=new c.RowNode(this.beans);return s.group=!1,this.setMasterForRow(s,e,i,!0),t&&(s.parent=t),s.level=i,s.setDataAndId(e,this.nextId.toString()),this.allNodesMap[s.id]&&(0,c._warnOnce)(`duplicate node id '${s.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[s.id]=s,this.nextId++,s}setMasterForRow(e,t,i,s){if(this.gos.get("treeData"))e.setMaster(!1),s&&(e.expanded=!1);else{if(this.gos.get("masterDetail")){const i=this.gos.get("isRowMaster");i?e.setMaster(i(t)):e.setMaster(!0)}else e.setMaster(!1);if(s){const t=this.funcColsService.getRowGroupColumns(),s=i+(t?t.length:0);e.expanded=!!e.master&&this.isExpanded(s)}}}isExpanded(e){const t=this.gos.get("groupDefaultExpanded");return-1===t||e<t}},p=class extends d.BeanStub{constructor(){super(...arguments),this.beanName="rowModel",this.onRowHeightChanged_debounced=(0,d._debounce)(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1}wireBeans(e){this.beans=e,this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.selectionService=e.selectionService,this.valueCache=e.valueCache,this.environment=e.environment,this.filterStage=e.filterStage,this.sortStage=e.sortStage,this.flattenStage=e.flattenStage,this.groupStage=e.groupStage,this.aggregationStage=e.aggregationStage,this.pivotStage=e.pivotStage,this.filterAggregatesStage=e.filterAggregatesStage}postConstruct(){const e=this.refreshModel.bind(this,{step:d.ClientSideRowModelSteps.EVERYTHING}),t=!this.gos.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:d.ClientSideRowModelSteps.EVERYTHING,afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:e,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:d.ClientSideRowModelSteps.PIVOT}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:e,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new d.RowNode(this.beans),this.nodeManager=new u(this.rootNode,this.gos,this.eventService,this.funcColsService,this.selectionService,this.beans)}addPropertyListeners(){const e=new Set(["treeData","masterDetail"]),t=new Set(["groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),s=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),o=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),r=new Set(["postSortRows","groupDisplayType","accentedSort"]),n=new Set([]),a=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),l=[...e,...t,...i,...s,...s,...o,...r,...n,...a];this.addManagedPropertyListeners(l,(l=>{const h=l.changeSet?.properties;if(!h)return;const c=e=>h.some((t=>e.has(t)));c(e)?this.setRowData(this.rootNode.allLeafChildren.map((e=>e.data))):c(t)?this.refreshModel({step:d.ClientSideRowModelSteps.EVERYTHING}):c(i)?this.refreshModel({step:d.ClientSideRowModelSteps.FILTER}):c(s)?this.refreshModel({step:d.ClientSideRowModelSteps.PIVOT}):c(o)?this.refreshModel({step:d.ClientSideRowModelSteps.AGGREGATE}):c(r)?this.refreshModel({step:d.ClientSideRowModelSteps.SORT}):c(n)?this.refreshModel({step:d.ClientSideRowModelSteps.FILTER_AGGREGATES}):c(a)&&this.refreshModel({step:d.ClientSideRowModelSteps.MAP})})),this.addManagedPropertyListener("rowHeight",(()=>this.resetRowHeights()))}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}setInitialData(){const e=this.gos.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))}ensureRowHeightsValid(e,t,i,s){let o,r=!1;do{o=!1;const n=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(n,i),h=Math.min(a,s);for(let e=l;e<=h;e++){const t=this.getRow(e);if(t.rowHeightEstimated){const e=this.gos.getRowHeightForNode(t);t.setRowHeight(e.height),o=!0,r=!0}}o&&this.setRowTopAndRowIndex()}while(o);return r}setRowTopAndRowIndex(){const e=this.environment.getDefaultRowHeight();let t=0;const i=new Set,s=this.gos.isDomLayout("normal");for(let o=0;o<this.rowsToDisplay.length;o++){const r=this.rowsToDisplay[o];if(null!=r.id&&i.add(r.id),null==r.rowHeight){const t=this.gos.getRowHeightForNode(r,s,e);r.setRowHeight(t.height,t.estimated)}r.setRowTop(t),r.setRowIndex(o),t+=r.rowHeight}return i}clearRowTopAndRowIndex(e,t){const i=e.isActive(),s=e=>{e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},o=e=>{if(s(e),s(e.detailNode),s(e.sibling),e.hasChildren()&&e.childrenAfterGroup){const t=-1==e.level;i&&!t&&!e.expanded||e.childrenAfterGroup.forEach(o)}};o(this.rootNode)}ensureRowsAtPixel(e,t,i=0){const s=this.getRowIndexAtPixel(t),o=this.getRow(s),r=!this.gos.get("suppressAnimationFrame");return o!==e[0]&&(e.forEach((e=>{(0,d._removeFromArray)(this.rootNode.allLeafChildren,e)})),e.forEach(((e,t)=>{(0,d._insertIntoArray)(this.rootNode.allLeafChildren,e,Math.max(s+i,0)+t)})),this.refreshModel({step:d.ClientSideRowModelSteps.EVERYTHING,keepRenderedRows:!0,keepEditingRows:!0,animate:r}),!0)}highlightRowAtPixel(e,t){const i=null!=t?this.getRowIndexAtPixel(t):null,s=null!=i?this.getRow(i):null;if(!s||!e||s===e||null==t)return void(this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null));const o=this.getHighlightPosition(t,s);this.lastHighlightedRow&&this.lastHighlightedRow!==s&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),s.setHighlighted(o),this.lastHighlightedRow=s}getHighlightPosition(e,t){if(!t){const i=this.getRowIndexAtPixel(e);if(!(t=this.getRow(i||0)))return d.RowHighlightPosition.Below}const{rowTop:i,rowHeight:s}=t;return e-i<s/2?d.RowHighlightPosition.Above:d.RowHighlightPosition.Below}getLastHighlightedRowNode(){return this.lastHighlightedRow}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return 1;const e=this.rootNode.sibling?1:0,t=this.rootNode.childrenAfterAggFilter;return(t?t.length:0)+e}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let t=e;if(this.rowsToDisplay[0].footer){if(0===e)return 0;t-=1}let i=this.rootNode.childrenAfterSort[t];if(this.gos.get("groupHideOpenParents"))for(;i.expanded&&i.childrenAfterSort&&i.childrenAfterSort.length>0;)i=i.childrenAfterSort[0];return i.rowIndex}getRowBounds(e){if((0,d._missing)(this.rowsToDisplay))return null;const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=this.gos.isAnimateRows();this.refreshModel({step:d.ClientSideRowModelSteps.MAP,keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=this.gos.isAnimateRows(),i=0===e.columns.length||e.columns.some((e=>e.isPrimary()))?d.ClientSideRowModelSteps.FILTER:d.ClientSideRowModelSteps.FILTER_AGGREGATES;this.refreshModel({step:i,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=this.gos.isAnimateRows();this.refreshModel({step:d.ClientSideRowModelSteps.SORT,keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:d.ClientSideRowModelSteps.PIVOT}):this.refreshModel({step:d.ClientSideRowModelSteps.AGGREGATE})}createChangePath(e){const t=(0,d._missingOrEmpty)(e),i=new d.ChangedPath(!1,this.rootNode);return(t||this.gos.get("treeData"))&&i.setInactive(),i}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;if(null==e.rowNodeTransactions)return!1;const t=e.rowNodeTransactions.filter((e=>null!=e.add&&e.add.length>0||null!=e.remove&&e.remove.length>0));return null==t||0==t.length}buildRefreshModelParams(e){let t=d.ClientSideRowModelSteps.EVERYTHING;const i={everything:d.ClientSideRowModelSteps.EVERYTHING,group:d.ClientSideRowModelSteps.EVERYTHING,filter:d.ClientSideRowModelSteps.FILTER,map:d.ClientSideRowModelSteps.MAP,aggregate:d.ClientSideRowModelSteps.AGGREGATE,sort:d.ClientSideRowModelSteps.SORT,pivot:d.ClientSideRowModelSteps.PIVOT};if((0,d._exists)(e)&&(t=i[e]),(0,d._missing)(t))return void(0,d._errorOnce)(`invalid step ${e}, available steps are ${Object.keys(i).join(", ")}`);return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gos.get("suppressAnimationFrame")}}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.isChangeEventsDispatching())return;const t="object"==typeof e&&"step"in e?e:this.buildRefreshModelParams(e);if(!t)return;if(this.isSuppressModelUpdateAfterUpdateTransaction(t))return;const i=this.createChangePath(t.rowNodeTransactions);switch(this.isRefreshingModel=!0,t.step){case d.ClientSideRowModelSteps.EVERYTHING:this.doRowGrouping(t.rowNodeTransactions,t.rowNodeOrder,i,!!t.afterColumnsChanged);case d.ClientSideRowModelSteps.FILTER:this.doFilter(i);case d.ClientSideRowModelSteps.PIVOT:this.doPivot(i);case d.ClientSideRowModelSteps.AGGREGATE:this.doAggregate(i);case d.ClientSideRowModelSteps.FILTER_AGGREGATES:this.doFilterAggregates(i);case d.ClientSideRowModelSteps.SORT:this.doSort(t.rowNodeTransactions,i);case d.ClientSideRowModelSteps.MAP:this.doRowsToDisplay()}const s=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,s),this.isRefreshingModel=!1;const o={type:"modelUpdated",animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(o)}isEmpty(){const e=(0,d._missing)(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return(0,d._missing)(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return(0,d._exists)(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!1,s=!1;const o=[],r=this.gos.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort((n=>{if(s)return;if(i&&(n===t||n===e)&&(s=!0,n.group&&r))return void o.push(...n.allLeafChildren);if(!i){if(n!==t&&n!==e)return;i=!0}(!n.group||!r)&&o.push(n)})),o}setDatasource(e){(0,d._errorOnce)("should never call setDatasource on clientSideRowController")}getTopLevelNodes(){return this.rootNode?this.rootNode.childrenAfterGroup:null}getRootNode(){return this.rootNode}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){if(this.isEmpty()||0===this.rowsToDisplay.length)return-1;let t=0,i=this.rowsToDisplay.length-1;if(e<=0)return 0;if((0,d._last)(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let s=-1,o=-1;for(;;){const r=Math.floor((t+i)/2),n=this.rowsToDisplay[r];if(this.isRowInPixel(n,e))return r;n.rowTop<e?t=r+1:n.rowTop>e&&(i=r-1);if(s===t&&o===i)return r;s=t,o=i}}isRowInPixel(e,t){const i=e.rowTop,s=e.rowTop+e.rowHeight;return i<=t&&s>t}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach(((t,i)=>e(t,i)))}forEachNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterGroup||[]],callback:e,recursionType:0,index:0,includeFooterNodes:t})}forEachNodeAfterFilter(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterAggFilter||[]],callback:e,recursionType:1,index:0,includeFooterNodes:t})}forEachNodeAfterFilterAndSort(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterSort||[]],callback:e,recursionType:2,index:0,includeFooterNodes:t})}forEachPivotNode(e,t=!1){this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:3,index:0,includeFooterNodes:t})}recursivelyWalkNodesAndCallback(e){const{nodes:t,callback:i,recursionType:s,includeFooterNodes:o}=e;let{index:r}=e;const n=e=>{const s=t[0]?.parent;if(!s)return;const n=o&&this.gos.getGrandTotalRow(),a=this.gos.getGroupTotalRowCallback(),l=o&&a({node:s});s===this.rootNode?n===e&&(s.createFooter(),i(s.sibling,r++)):l===e&&(s.createFooter(),i(s.sibling,r++))};n("top");for(let e=0;e<t.length;e++){const n=t[e];if(i(n,r++),n.hasChildren()&&!n.footer){let e=null;switch(s){case 0:e=n.childrenAfterGroup;break;case 1:e=n.childrenAfterAggFilter;break;case 2:e=n.childrenAfterSort;break;case 3:e=n.leafGroup?null:n.childrenAfterSort}e&&(r=this.recursivelyWalkNodesAndCallback({nodes:[...e],callback:i,recursionType:s,index:r,includeFooterNodes:o}))}}return n("bottom"),r}doAggregate(e){this.aggregationStage?.execute({rowNode:this.rootNode,changedPath:e})}doFilterAggregates(e){this.filterAggregatesStage?this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:e}):this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter}expandOrCollapseAll(e){const t=this.gos.get("treeData"),i=this.columnModel.isPivotActive(),s=o=>{o&&o.forEach((o=>{const r=()=>{o.expanded=e,s(o.childrenAfterGroup)};if(t){return void((0,d._exists)(o.childrenAfterGroup)&&r())}if(i){return void(!o.leafGroup&&r())}o.group&&r()}))};this.rootNode&&s(this.rootNode.childrenAfterGroup),this.refreshModel({step:d.ClientSideRowModelSteps.MAP});const o={type:"expandOrCollapseAll",source:e?"expandAll":"collapseAll"};this.eventService.dispatchEvent(o)}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,i,s){if(this.groupStage){if(e?this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,rowNodeOrder:t,changedPath:i}):this.groupStage.execute({rowNode:this.rootNode,changedPath:i,afterColumnsChanged:s}),this.gos.get("groupSelectsChildren")){if(this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",i)){const e={type:"selectionChanged",source:"rowGroupChanged"};this.eventService.dispatchEvent(e)}}}else this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren,this.rootNode.sibling&&(this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup),this.rootNode.updateHasChildren();this.nodeManager.isRowCountReady()&&(this.rowCountReady=!0,this.eventService.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){this.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getCopyOfNodesMap(){return this.nodeManager.getCopyOfNodesMap()}getRowNode(e){if("string"==typeof e&&0==e.indexOf(d.RowNode.ID_PREFIX_ROW_GROUP)){let t;return this.forEachNode((i=>{i.id===e&&(t=i)})),t}return this.nodeManager.getRowNode(e)}setRowData(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}dispatchUpdateEventsAndRefresh(){this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:d.ClientSideRowModelSteps.EVERYTHING,newData:!0})}batchUpdateRowData(e,t){if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];const e=this.gos.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout((()=>{this.executeBatchUpdateRowData()}),e)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache.onDataChanged();const e=[],t=[];let i=!1;if(this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach((s=>{const o=this.nodeManager.updateRowData(s.rowDataTransaction,void 0);t.push(o),s.callback&&e.push(s.callback.bind(null,o)),"number"==typeof s.rowDataTransaction.addIndex&&(i=!0)})),this.commonUpdateRowData(t,void 0,i),e.length>0&&window.setTimeout((()=>{e.forEach((e=>e()))}),0),t.length>0){const e={type:"asyncTransactionsFlushed",results:t};this.eventService.dispatchEvent(e)}this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e,t){this.valueCache.onDataChanged();const i=this.nodeManager.updateRowData(e,t),s="number"==typeof e.addIndex;return this.commonUpdateRowData([i],t,s),i}createRowNodeOrder(){if(this.gos.get("suppressMaintainUnsortedOrder"))return;const e={};if(this.rootNode&&this.rootNode.allLeafChildren)for(let t=0;t<this.rootNode.allLeafChildren.length;t++){e[this.rootNode.allLeafChildren[t].id]=t}return e}commonUpdateRowData(e,t,i){if(!this.hasStarted)return;const s=!this.gos.get("suppressAnimationFrame");i&&(t=this.createRowNodeOrder());this.eventService.dispatchEvent({type:"rowDataUpdated"}),this.refreshModel({step:d.ClientSideRowModelSteps.EVERYTHING,rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,keepEditingRows:!0,animate:s})}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:d.ClientSideRowModelSteps.MAP,keepRenderedRows:!0,keepEditingRows:!0,keepUndoRedoStack:!0})}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,!0),this.rootNode.sibling&&this.rootNode.sibling.setRowHeight(this.rootNode.sibling.rowHeight,!0),e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode((t=>{t.setRowHeight(t.rowHeight,!0);const i=t.detailNode;i&&i.setRowHeight(i.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0})),e}onGridStylesChanges(e){if(e.rowHeightChanged){if(this.columnModel.isAutoRowHeightActive())return;this.resetRowHeights()}}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}},g=i(423);var m=i(423),f=class extends m.BeanStub{constructor(){super(...arguments),this.beanName="filterStage"}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){const t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const i=(t,i)=>{t.hasChildren()?t.childrenAfterFilter=e&&!i?t.childrenAfterGroup.filter((e=>{const t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,i=e.data&&this.filterManager.doesRowPassFilter({rowNode:e});return t||i})):t.childrenAfterGroup:t.childrenAfterFilter=t.childrenAfterGroup,t.sibling&&(t.sibling.childrenAfterFilter=t.childrenAfterFilter)};if(this.doingTreeDataFiltering()){const e=(t,s)=>{if(t.childrenAfterGroup)for(let o=0;o<t.childrenAfterGroup.length;o++){const r=t.childrenAfterGroup[o],n=s||this.filterManager.doesRowPassFilter({rowNode:r});r.childrenAfterGroup?e(t.childrenAfterGroup[o],n):i(r,n)}i(t,s)},s=t=>e(t,!1);t.executeFromRootNode(s)}else{const e=e=>i(e,!1);t.forEachChangedNodeDepthFirst(e,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},v=i(423),C=class extends v.BeanStub{constructor(){super(...arguments),this.beanName="flattenStage"}wireBeans(e){this.beans=e,this.columnModel=e.columnModel}execute(e){const t=e.rowNode,i=[],s=this.columnModel.isPivotMode(),o=s&&t.leafGroup,r=o?[t]:t.childrenAfterSort,n=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(n,r,i,s,0);if(!o&&i.length>0&&n.grandTotalRow){t.createFooter();const e="top"===n.grandTotalRow;this.addRowNodeToRowsToDisplay(n,t.sibling,i,0,e)}return i}getFlattenDetails(){const e=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gos.isGroupMultiAutoColumn(),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:this.gos.getGrandTotalRow(),groupTotalRow:this.gos.getGroupTotalRowCallback()}}recursivelyAddToRowsToDisplay(e,t,i,s,o){if(!(0,v._missingOrEmpty)(t))for(let r=0;r<t.length;r++){const n=t[r],a=n.hasChildren(),l=s&&!a,h=e.groupRemoveSingleChildren&&a&&1===n.childrenAfterGroup.length,d=e.groupRemoveLowestSingleChildren&&a&&n.leafGroup&&1===n.childrenAfterGroup.length,c=s&&n.leafGroup,u=e.hideOpenParents&&n.expanded&&!n.master&&!c;if(!(l||u||h||d)&&this.addRowNodeToRowsToDisplay(e,n,i,o),!s||!n.leafGroup)if(a){const t=h||d;if(n.expanded||t){const r=e.groupTotalRow({node:n});r||n.destroyFooter();const a=t?o:o+1;"top"===r&&(n.createFooter(),this.addRowNodeToRowsToDisplay(e,n.sibling,i,a)),this.recursivelyAddToRowsToDisplay(e,n.childrenAfterSort,i,s,a),"bottom"===r&&(n.createFooter(),this.addRowNodeToRowsToDisplay(e,n.sibling,i,a))}}else if(n.master&&n.expanded){const t=this.createDetailNode(n);this.addRowNodeToRowsToDisplay(e,t,i,o)}}}addRowNodeToRowsToDisplay(e,t,i,s,o){o?i.unshift(t):i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:s)}createDetailNode(e){if((0,v._exists)(e.detailNode))return e.detailNode;const t=new v.RowNode(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,(0,v._exists)(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}},y=i(423),S=class extends y.BeanStub{constructor(){super(...arguments),this.beanName="immutableService"}wireBeans(e){this.rowModel=e.rowModel,this.selectionService=e.selectionService}postConstruct(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",(()=>this.onRowDataUpdated())))}isActive(){const e=this.gos.exists("getRowId");return!this.gos.get("resetRowDataOnUpdate")&&e}setRowData(e){const t=this.createTransactionForRowData(e);if(!t)return;const[i,s]=t;this.clientSideRowModel.updateRowData(i,s)}createTransactionForRowData(e){if((0,y._missing)(this.clientSideRowModel))return void(0,y._errorOnce)("ImmutableService only works with ClientSideRowModel");const t=this.gos.getRowIdCallback();if(null==t)return void(0,y._errorOnce)("ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");const i={remove:[],update:[],add:[]},s=this.clientSideRowModel.getCopyOfNodesMap(),o=this.gos.get("suppressMaintainUnsortedOrder")?void 0:{};return(0,y._exists)(e)&&e.forEach(((e,r)=>{const n=t({data:e,level:0}),a=s[n];if(o&&(o[n]=r),a){a.data!==e&&i.update.push(e),s[n]=void 0}else i.add.push(e)})),(0,y._iterateObject)(s,((e,t)=>{t&&i.remove.push(t.data)})),[i,o]}onRowDataUpdated(){const e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}},w=i(423),b=class extends w.BeanStub{constructor(){super(...arguments),this.beanName="sortService"}wireBeans(e){this.columnModel=e.columnModel,this.funcColsService=e.funcColsService,this.rowNodeSorter=e.rowNodeSorter,this.showRowGroupColsService=e.showRowGroupColsService}sort(e,t,i,s,o,r){const n=this.gos.get("groupMaintainOrder"),a=this.columnModel.getCols().some((e=>e.isRowGroupActive()));let l={};i&&s&&(l=this.calculateDirtyNodes(s));const h=this.columnModel.isPivotMode(),d=this.gos.getCallback("postSortRows"),c=s=>{this.pullDownGroupDataForHideOpenParents(s.childrenAfterAggFilter,!0);const c=h&&s.leafGroup;if(n&&a&&!s.leafGroup&&!r){const e=this.funcColsService.getRowGroupColumns()?.[s.level+1],t=null===e?.getSort(),i=s.childrenAfterAggFilter.slice(0);if(s.childrenAfterSort&&!t){const e={};s.childrenAfterSort.forEach(((t,i)=>{e[t.id]=i})),i.sort(((t,i)=>(e[t.id]??0)-(e[i.id]??0)))}s.childrenAfterSort=i}else s.childrenAfterSort=!t||c?s.childrenAfterAggFilter.slice(0):i?this.doDeltaSort(s,l,o,e):this.rowNodeSorter.doFullSort(s.childrenAfterAggFilter,e);if(s.sibling&&(s.sibling.childrenAfterSort=s.childrenAfterSort),this.updateChildIndexes(s),d){const e={nodes:s.childrenAfterSort};d(e)}};o&&o.forEachChangedNodeDepthFirst(c),this.updateGroupDataForHideOpenParents(o)}calculateDirtyNodes(e){const t={},i=e=>{e&&e.forEach((e=>t[e.id]=!0))};return e&&e.forEach((e=>{i(e.add),i(e.update),i(e.remove)})),t}doDeltaSort(e,t,i,s){const o=e.childrenAfterAggFilter,r=e.childrenAfterSort;if(!r)return this.rowNodeSorter.doFullSort(o,s);const n={},a=[];o.forEach((e=>{t[e.id]||!i.canSkip(e)?a.push(e):n[e.id]=!0}));const l=r.filter((e=>n[e.id])),h=(e,t)=>({currentPos:t,rowNode:e}),d=a.map(h).sort(((e,t)=>this.rowNodeSorter.compareRowNodes(s,e,t)));return this.mergeSortedArrays(s,d,l.map(h)).map((({rowNode:e})=>e))}mergeSortedArrays(e,t,i){const s=[];let o=0,r=0;for(;o<t.length&&r<i.length;){this.rowNodeSorter.compareRowNodes(e,t[o],i[r])<0?s.push(t[o++]):s.push(i[r++])}for(;o<t.length;)s.push(t[o++]);for(;r<i.length;)s.push(i[r++]);return s}updateChildIndexes(e){if((0,w._missing)(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let i=0;i<t.length;i++){const s=t[i],o=0===i,r=i===e.childrenAfterSort.length-1;s.setFirstChild(o),s.setLastChild(r),s.setChildIndex(i)}}updateGroupDataForHideOpenParents(e){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return(0,w._warnOnce)("The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them."),!1;const t=e=>{this.pullDownGroupDataForHideOpenParents(e.childrenAfterSort,!1),e.childrenAfterSort.forEach((e=>{e.hasChildren()&&t(e)}))};e&&e.executeFromRootNode((e=>t(e)))}pullDownGroupDataForHideOpenParents(e,t){this.gos.get("groupHideOpenParents")&&!(0,w._missing)(e)&&e.forEach((e=>{(this.showRowGroupColsService?.getShowRowGroupCols()??[]).forEach((i=>{const s=i.getColDef().showRowGroup;if("string"!=typeof s)return void(0,w._errorOnce)("groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");const o=s,r=this.columnModel.getColDefCol(o);if(!(r===e.rowGroupColumn))if(t)e.setGroupValue(i.getId(),void 0);else{const t=e.getFirstChildOfFirstChild(r);t&&e.setGroupValue(i.getId(),t.key)}}))}))}},x=i(423),R=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="sortStage"}wireBeans(e){this.sortService=e.sortService,this.sortController=e.sortController}execute(e){const t=this.sortController.getSortOptions(),i=(0,x._exists)(t)&&t.length>0,s=i&&(0,x._exists)(e.rowNodeTransactions)&&this.gos.get("deltaSort"),o=t.some((e=>this.gos.isColumnsSortingCoupledToGroup()?e.column.isPrimary()&&e.column.isRowGroupActive():!!e.column.getColDef().showRowGroup));this.sortService.sort(t,i,s,e.rowNodeTransactions,e.changedPath,o)}},M="32.0.2",D={version:M,moduleName:`${h.ModuleNames.ClientSideRowModelModule}-core`,rowModel:"clientSide",beans:[p,f,R,C,b,S]},P={version:M,moduleName:`${h.ModuleNames.ClientSideRowModelModule}-api`,beans:[h.RowModelHelperService],apiFunctions:{onGroupExpandedOrCollapsed:function(e){e.expansionService.onGroupExpandedOrCollapsed()},refreshClientSideRowModel:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.refreshModel(t)},forEachLeafNode:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.forEachLeafNode(t)},forEachNodeAfterFilter:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.forEachNodeAfterFilter(t)},forEachNodeAfterFilterAndSort:function(e,t){e.rowModelHelperService?.getClientSideRowModel()?.forEachNodeAfterFilterAndSort(t)},resetRowHeights:function(e){e.columnModel.isAutoRowHeightActive()?(0,g._warnOnce)("calling gridApi.resetRowHeights() makes no sense when using Auto Row Height."):e.rowModelHelperService?.getClientSideRowModel()?.resetRowHeights()},applyTransaction:function(e,t){return e.frameworkOverrides.wrapIncoming((()=>e.rowModelHelperService?.getClientSideRowModel()?.updateRowData(t)))},applyTransactionAsync:function(e,t,i){e.frameworkOverrides.wrapIncoming((()=>e.rowModelHelperService?.getClientSideRowModel()?.batchUpdateRowData(t,i)))},flushAsyncTransactions:function(e){e.frameworkOverrides.wrapIncoming((()=>e.rowModelHelperService?.getClientSideRowModel()?.flushAsyncTransactions()))},getBestCostNodeSelection:function(e){return e.selectionService.getBestCostNodeSelection()}},dependantModules:[D,h._CsrmSsrmSharedApiModule]},F={version:M,moduleName:h.ModuleNames.ClientSideRowModelModule,dependantModules:[D,P]}},423:function(e,t,i){var s,o=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l={};((e,t)=>{for(var i in t)o(e,i,{get:t[i],enumerable:!0})})(l,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>Bh,AbstractHeaderCellCtrl:()=>ar,AgAbstractField:()=>os,AgAbstractInputField:()=>rs,AgAbstractLabel:()=>ss,AgCheckbox:()=>ns,AgCheckboxSelector:()=>as,AgColumn:()=>se,AgColumnGroup:()=>Ye,AgInputDateField:()=>Ea,AgInputNumberField:()=>Eo,AgInputNumberFieldSelector:()=>To,AgInputTextArea:()=>ya,AgInputTextField:()=>Po,AgInputTextFieldSelector:()=>Fo,AgPickerField:()=>yo,AgPromise:()=>ys,AgProvidedColumnGroup:()=>re,AgRadioButton:()=>vo,AgSelect:()=>So,AgSelectSelector:()=>wo,AgToggleButton:()=>ol,AgToggleButtonSelector:()=>rl,AnimateShowChangeCellRenderer:()=>es,AnimateSlideCellRenderer:()=>ts,AnimationFrameService:()=>ma,AriaAnnouncementService:()=>qh,AutoScrollService:()=>qs,AutoWidthCalculator:()=>ja,BarColumnLabelPlacement:()=>Rd,BaseComponentWrapper:()=>wd,BeanStub:()=>I,BodyDropPivotTarget:()=>Gr,BodyDropTarget:()=>Wr,CellComp:()=>fn,CellCtrl:()=>In,CellNavigationService:()=>gl,CellPositionUtils:()=>Al,CellRangeType:()=>Pn,ChangedPath:()=>id,ChartMappings:()=>xd,CheckboxCellEditor:()=>Oa,CheckboxCellRenderer:()=>ls,CheckboxSelectionComponent:()=>Sn,ClientSideRowModelSteps:()=>fa,ColumnApplyStateService:()=>Oe,ColumnAutosizeService:()=>Le,ColumnFactory:()=>Fe,ColumnKeyCreator:()=>we,ColumnModel:()=>Te,ColumnMoveService:()=>Ge,ColumnNameService:()=>We,ColumnSizeService:()=>Ke,CommunityFeaturesModule:()=>Nh,Component:()=>Hi,ComponentUtil:()=>rt,Context:()=>Ws,CssClassManager:()=>vt,CtrlsService:()=>Tl,DataTypeService:()=>ql,DateCellEditor:()=>Ia,DateFilter:()=>Qo,DateStringCellEditor:()=>ka,DragAndDropService:()=>Ys,DragService:()=>Js,DragSourceType:()=>js,Environment:()=>Gl,EventService:()=>_l,ExcelFactoryMode:()=>Us,ExpansionService:()=>va,ExpressionService:()=>hd,FakeHScrollComp:()=>ln,FakeVScrollComp:()=>cn,FilterManager:()=>ro,FilterWrapperComp:()=>no,FocusService:()=>zl,FuncColsService:()=>ke,GROUP_AUTO_COLUMN_ID:()=>be,Grid:()=>md,GridBodyComp:()=>ra,GridBodyCtrl:()=>mn,GridComp:()=>Kl,GridCoreCreator:()=>vd,GridCoreModule:()=>kh,GridCtrl:()=>Ul,GridHeaderComp:()=>en,GridHeaderCtrl:()=>Or,GridOptionsService:()=>Wh,GroupInstanceIdCreator:()=>qe,HeaderCellCtrl:()=>$r,HeaderFilterCellComp:()=>Fr,HeaderFilterCellCtrl:()=>hr,HeaderGroupCellCtrl:()=>qr,HeaderNavigationDirection:()=>Lr,HeaderNavigationService:()=>kr,HeaderPositionUtils:()=>Uh,HeaderRowComp:()=>Ir,HeaderRowContainerComp:()=>Qr,HeaderRowContainerCtrl:()=>Jr,HeaderRowCtrl:()=>Zr,HeaderRowType:()=>Ar,HorizontalDirection:()=>$s,HorizontalResizeService:()=>ua,KeyCode:()=>is,LargeTextCellEditor:()=>wa,LayoutCssClasses:()=>sn,LocalEventService:()=>h,LocaleService:()=>Kh,ManagedFocusFeature:()=>uo,MenuService:()=>Ca,ModuleNames:()=>Zi,ModuleRegistry:()=>Qi,MouseEventService:()=>da,MoveColumnFeature:()=>zr,NavigationService:()=>ca,NumberCellEditor:()=>Fa,NumberFilter:()=>Oo,NumberSequence:()=>Oi,OverlayWrapperComponent:()=>rn,PinnedRowModel:()=>Za,PivotResultColsService:()=>Ue,PopupComponent:()=>gs,PopupEditorWrapper:()=>ba,PopupService:()=>cl,PositionableFeature:()=>ho,PropertyKeys:()=>st,ProvidedFilter:()=>fo,RefPlaceholder:()=>_i,ResizeObserverService:()=>ga,RowContainerComp:()=>ta,RowContainerCtrl:()=>ea,RowCtrl:()=>On,RowDragComp:()=>Qs,RowHighlightPosition:()=>Xs,RowModelHelperService:()=>Cd,RowNode:()=>oo,RowNodeBlock:()=>Qa,RowNodeBlockLoader:()=>el,RowNodeSorter:()=>td,RowPositionUtils:()=>Ll,RowRenderer:()=>qa,ScalarFilter:()=>Ro,ScrollVisibleService:()=>aa,SelectCellEditor:()=>xa,SelectableService:()=>od,SelectionHandleType:()=>Dn,ServerSideTransactionResultStatus:()=>Ja,SetLeftFeature:()=>er,SimpleFilter:()=>xo,SortController:()=>nd,SortIndicatorComp:()=>ji,SortIndicatorSelector:()=>Yi,StandardMenuFactory:()=>pa,StylingService:()=>sl,TabGuardClassNames:()=>nl,TabGuardComp:()=>hl,TabGuardCtrl:()=>al,TabGuardFeature:()=>ll,TextCellEditor:()=>Da,TextFilter:()=>Vo,TextFloatingFilter:()=>fr,TooltipFeature:()=>Bi,TooltipStateManager:()=>Gi,TouchListener:()=>$i,UserComponentFactory:()=>_s,UserComponentRegistry:()=>Cs,ValueCache:()=>dd,ValueService:()=>cd,VanillaFrameworkOverrides:()=>pl,VerticalDirection:()=>Ks,VisibleColsService:()=>Xe,_ColumnFilterModule:()=>yr,_CommunityMenuApiModule:()=>th,_CsrmSsrmSharedApiModule:()=>yd,_EditCoreModule:()=>Ha,_FilterCoreModule:()=>vr,_FloatingFilterModule:()=>br,_ReadOnlyFloatingFilterModule:()=>xr,_RowNodeBlockModule:()=>tl,_SsrmInfiniteSharedApiModule:()=>Sd,_addFocusableContainerListener:()=>rh,_areEqual:()=>u,_bindCellRendererToHtmlElement:()=>ki,_capitalise:()=>He,_clearElement:()=>yi,_cloneObject:()=>j,_combineAttributesAndGridOptions:()=>nt,_compose:()=>Se,_createIcon:()=>Wi,_createIconNoSpan:()=>Ui,_debounce:()=>ve,_defaultComparator:()=>W,_doOnce:()=>le,_errorOnce:()=>ce,_escapeString:()=>ze,_exists:()=>O,_existsAndNotEmpty:()=>d,_flatten:()=>w,_forEachReverse:()=>x,_formatNumberCommas:()=>Uo,_formatNumberTwoDecimalPlacesAndCommas:()=>Wo,_fuzzySuggestions:()=>fs,_getAbsoluteHeight:()=>pi,_getAbsoluteWidth:()=>gi,_getAllValuesInObject:()=>q,_getAriaPosInSet:()=>xt,_getCtrlForEventTarget:()=>T,_getHeaderClassesFromColDef:()=>tr,_getInnerHeight:()=>ci,_getInnerWidth:()=>ui,_getRowContainerOptions:()=>Kn,_getToolPanelClassesFromColDef:()=>ir,_includes:()=>S,_insertArrayIntoArray:()=>C,_insertIntoArray:()=>v,_isElementInEventPath:()=>A,_isEventFromPrintableCharacter:()=>Mo,_isIOSUserAgent:()=>Jt,_isNodeOrElement:()=>Ai,_isStopPropagationForAgGrid:()=>F,_isVisible:()=>bi,_iterateObject:()=>$,_jsonEquals:()=>z,_last:()=>c,_loadTemplate:()=>xi,_log:()=>he,_makeNull:()=>k,_mergeDeep:()=>X,_missing:()=>N,_missingOrEmpty:()=>G,_parseDateTimeFromString:()=>Yo,_processOnChange:()=>at,_radioCssClass:()=>si,_removeAriaExpanded:()=>Lt,_removeAriaSort:()=>zt,_removeFromArray:()=>f,_removeFromParent:()=>Si,_removeRepeatsFromArray:()=>g,_serialiseDate:()=>Ko,_setAriaActiveDescendant:()=>At,_setAriaChecked:()=>Ut,_setAriaColCount:()=>Bt,_setAriaColIndex:()=>Vt,_setAriaColSpan:()=>_t,_setAriaControls:()=>Kt,_setAriaDescribedBy:()=>Dt,_setAriaDisabled:()=>Et,_setAriaExpanded:()=>It,_setAriaHidden:()=>Tt,_setAriaLabel:()=>Rt,_setAriaLabelledBy:()=>Mt,_setAriaLevel:()=>Ft,_setAriaPosInSet:()=>Ot,_setAriaRole:()=>bt,_setAriaRowCount:()=>Nt,_setAriaRowIndex:()=>Gt,_setAriaSelected:()=>Wt,_setAriaSetSize:()=>kt,_setAriaSort:()=>Ht,_setDisabled:()=>li,_setDisplayed:()=>ni,_setFixedWidth:()=>Fi,_setVisible:()=>ai,_shallowCompare:()=>p,_sortRowNodesByOrder:()=>bd,_stopPropagationForAgGrid:()=>P,_toStringOrNull:()=>B,_unwrapUserComp:()=>Hs,_utf8_encode:()=>_e,_values:()=>U,_waitUntil:()=>ye,_warnOnce:()=>de,createGrid:()=>gd,getDefaultFloatingFilterType:()=>cr,isColumn:()=>ie,isColumnGroup:()=>je,isProvidedColumnGroup:()=>oe,isSelectionUIEvent:()=>Vh,provideGlobalGridOptions:()=>pd}),e.exports=(s=l,((e,t,i,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of n(t))a.call(e,l)||l===i||o(e,l,{get:()=>t[l],enumerable:!(s=r(t,l))||s.enumerable});return e})(o({},"__esModule",{value:!0}),s));var h=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let o=s.get(e);return!o&&i&&(o=new Set,s.set(e,o)),o}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const s=this.getListeners(e,i,!1);if(s&&(s.delete(t),0===s.size)){(i?this.allAsyncListeners:this.allSyncListeners).delete(e)}}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}const s=(i,s)=>i.forEach((i=>{if(!s.has(i))return;const o=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming((()=>i(e))):()=>i(e);t?this.dispatchAsync(o):o()})),o=this.getListeners(i,t,!1)??new Set,r=new Set(o);r.size>0&&s(r,o);new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach((s=>{const o=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming((()=>s(i,e))):()=>s(i,e);t?this.dispatchAsync(o):o()}))}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const e=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(e):e(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach((e=>e()))}};function d(e){return null!=e&&e.length>0}function c(e){if(e&&e.length)return e[e.length-1]}function u(e,t,i){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every(((e,s)=>i?i(e,t[s]):t[s]===e))}function p(e,t){return u(e,t)}function g(e,t){if(e)for(let i=e.length-2;i>=0;i--){const s=e[i]===t,o=e[i+1]===t;s&&o&&e.splice(i+1,1)}}function m(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function f(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function v(e,t,i){e.splice(i,0,t)}function C(e,t,i){if(null!=e&&null!=t)for(let s=t.length-1;s>=0;s--){v(e,t[s],i)}}function y(e,t,i){!function(e,t){for(let i=0;i<t.length;i++)f(e,t[i])}(e,t),t.slice().reverse().forEach((t=>v(e,t,i)))}function S(e,t){return e.indexOf(t)>-1}function w(e){return[].concat.apply([],e)}function b(e,t){null!=t&&null!=e&&t.forEach((t=>e.push(t)))}function x(e,t){if(null!=e)for(let i=e.length-1;i>=0;i--)t(e[i],i)}var R="__ag_Grid_Stop_Propagation",M=["touchstart","touchend","touchmove","touchcancel","scroll"],D={};function P(e){e[R]=!0}function F(e){return!0===e[R]}var E=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return t=>{if("boolean"==typeof D[t])return D[t];const i=document.createElement(e[t]||"div");return D[t="on"+t]=t in i}})();function T(e,t,i){let s=t;for(;s;){const t=e.getDomData(s,i);if(t)return t;s=s.parentElement}return null}function A(e,t){return!(!t||!e)&&function(e){const t=e;if(t.path)return t.path;if(t.composedPath)return t.composedPath();return function(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}(t)}(t).indexOf(e)>=0}var I=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.gridId=e.context.getGridId(),this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;e<this.destroyFunctions.length;e++)this.destroyFunctions[e]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t){this.localEventService||(this.localEventService=new h),this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)}dispatchLocalEvent(e){this.localEventService&&this.localEventService.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventService,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const i=[];for(const s in t){const o=t[s];o&&i.push(this._setupListener(e,s,o))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;e instanceof HTMLElement?function(e,t,i,s){const o=S(M,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,s,o)}(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);const s=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter((e=>e!==s)),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);const i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter((e=>e!==i)),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,s=e=>{if(e.changeSet){if(e.changeSet&&e.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=e.changeSet.id}const s={type:"gridPropertyChanged",changeSet:e.changeSet,source:e.source};t(s)};e.forEach((e=>this.setupGridOptionListener(e,s)))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}},L=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=t=>{this.frameworkOverrides.wrapOutgoing((()=>e(t)))},this.wrappedListeners.set(e,t)),t}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(t,i)=>{this.frameworkOverrides.wrapOutgoing((()=>e(t,i)))},this.wrappedGlobalListeners.set(e,t)),t}unwrap(e){return this.wrappedListeners.get(e)??e}unwrapGlobal(e){return this.wrappedGlobalListeners.get(e)??e}};function k(e){return null==e||""===e?null:e}function O(e,t=!1){return null!=e&&(""!==e||t)}function N(e){return!O(e)}function G(e){return null==e||0===e.length}function B(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function V(e){if(void 0===e)return;if(null===e||""===e)return null;if("number"==typeof e)return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t}function _(e){if(void 0!==e)return null!==e&&""!==e&&H(e)}function H(e){return"boolean"==typeof e?e:"string"==typeof e&&("TRUE"===e.toUpperCase()||""==e)}function z(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function W(e,t,i=!1){const s=null==e,o=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function r(e,t){return e>t?1:e<t?-1:0}if("string"!=typeof e)return r(e,t);if(!i)return r(e,t);try{return e.localeCompare(t)}catch(i){return r(e,t)}}function U(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach((e=>t.push(e))),t}return Object.values(e)}var K=new Set(["__proto__","constructor","prototype"]);function $(e,t){if(null!=e)if(Array.isArray(e))for(let i=0;i<e.length;i++)t(i.toString(),e[i]);else for(const[i,s]of Object.entries(e))t(i,s)}function j(e){const t={},i=Object.keys(e);for(let s=0;s<i.length;s++){if(K.has(i[s]))continue;const o=i[s],r=e[o];t[o]=r}return t}function Y(e,t){if(!e)return;const i=e,s={};return Object.keys(i).forEach((e=>{if(t&&t.indexOf(e)>=0||K.has(e))return;const o=i[e],r=J(o)&&o.constructor===Object;s[e]=r?Y(o):o})),s}function q(e){if(!e)return[];const t=Object;if("function"==typeof t.values)return t.values(e);const i=[];for(const t in e)e.hasOwnProperty(t)&&e.propertyIsEnumerable(t)&&i.push(e[t]);return i}function X(e,t,i=!0,s=!1){O(t)&&$(t,((t,o)=>{if(K.has(t))return;let r=e[t];if(r!==o){if(s){if(null==r&&null!=o){"object"==typeof o&&o.constructor===Object&&(r={},e[t]=r)}}J(o)&&J(r)&&!Array.isArray(r)?X(r,o,i,s):(i||void 0!==o)&&(e[t]=o)}}))}function Z(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let o=e;for(let e=0;e<s.length;e++){if(null==o)return;o=o[s[e]]}return o}function J(e){return"object"==typeof e&&null!==e}var Q={resizable:!0,sortable:!0},ee=0;function te(){return ee++}function ie(e){return e instanceof se}var se=class extends I{constructor(e,t,i,s){super(),this.isColumn=!0,this.instanceId=te(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.columnEventService=new h,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.setState(e)}wireBeans(e){this.columnHoverService=e.columnHoverService}getInstanceId(){return this.instanceId}setState(e){void 0!==e.sort?"asc"!==e.sort&&"desc"!==e.sort||(this.sort=e.sort):"asc"!==e.initialSort&&"desc"!==e.initialSort||(this.sort=e.initialSort);const t=e.sortIndex,i=e.initialSortIndex;void 0!==t?null!==t&&(this.sortIndex=t):null!==i&&(this.sortIndex=i);const