ag-grid-community
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
1 lines • 1.05 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,i,s)=>{for(var n,a=s>1?void 0:s?r(t,i):t,l=e.length-1;l>=0;l--)(n=e[l])&&(a=(s?n(t,i,a):n(a))||a);return s&&a&&o(t,i,a),a},d={};((e,t)=>{for(var i in t)o(e,i,{get:t[i],enumerable:!0})})(d,{ClientSideRowModelModule:()=>P}),e.exports=(s=d,((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),u=i(423),c=i(423),p=class e{constructor(t,i,s,o,r,n){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=t,this.gridOptionsService=i,this.eventService=s,this.columnModel=o,this.beans=n,this.selectionService=r,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=e.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return c._.cloneObject(this.allNodesMap)}getRowNode(e){return this.allNodesMap[e]}setRowData(t){if("string"==typeof t)return void console.warn("AG Grid: rowData must be an array, however you passed in a string. If you are loading JSON, make sure you convert the JSON string to JavaScript objects first");this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t);const i=this.rootNode,s=this.rootNode.sibling;i.childrenAfterFilter=null,i.childrenAfterGroup=null,i.childrenAfterAggFilter=null,i.childrenAfterSort=null,i.childrenMapped=null,i.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?i.allLeafChildren=t.map((t=>this.createNode(t,this.rootNode,e.TOP_LEVEL))):(i.allLeafChildren=[],i.childrenAfterGroup=[]),s&&(s.childrenAfterFilter=i.childrenAfterFilter,s.childrenAfterGroup=i.childrenAfterGroup,s.childrenAfterAggFilter=i.childrenAfterAggFilter,s.childrenAfterSort=i.childrenAfterSort,s.childrenMapped=i.childrenMapped,s.allLeafChildren=i.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&&c._.sortRowNodesByOrder(this.rootNode.allLeafChildren,t),i}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(e){const t={type:c.Events.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:(null==e?void 0: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:c.Events.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(e)}}executeAdd(t,i){var s;const{add:o,addIndex:r}=t;if(c._.missingOrEmpty(o))return;const n=o.map((t=>this.createNode(t,this.rootNode,e.TOP_LEVEL)));if("number"==typeof r&&r>=0){const{allLeafChildren:e}=this.rootNode,t=e.length;let i=r;if(this.gridOptionsService.get("treeData")&&r>0&&t>0)for(let o=0;o<t;o++)if((null==(s=e[o])?void 0:s.rowIndex)==r-1){i=o+1;break}const o=e.slice(0,i),a=e.slice(i,e.length);this.rootNode.allLeafChildren=[...o,...n,...a]}else this.rootNode.allLeafChildren=[...this.rootNode.allLeafChildren,...n];this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),i.add=n}executeRemove(e,t,i){const{remove:s}=e;if(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])),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(t,i,s){const{update:o}=t;c._.missingOrEmpty(o)||o.forEach((t=>{const o=this.lookupRowNode(t);o&&(o.updateData(t),!o.selectable&&o.isSelected()&&s.push(o),this.setMasterForRow(o,t,e.TOP_LEVEL,!1),i.update.push(o))}))}lookupRowNode(e){const t=this.gridOptionsService.getCallback("getRowId");let i;if(t){const s=t({data:e,level:0});if(i=this.allNodesMap[s],!i)return console.error(`AG Grid: 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 console.error("AG Grid: could not find data item as object was not found",e),console.error("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);s.group=!1,this.setMasterForRow(s,e,i,!0);const o=this.gridOptionsService.get("suppressParentsInRowNodes");return t&&!o&&(s.parent=t),s.level=i,s.setDataAndId(e,this.nextId.toString()),this.allNodesMap[s.id]&&console.warn(`AG Grid: 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.gridOptionsService.get("treeData"))e.setMaster(!1),s&&(e.expanded=!1);else{if(this.gridOptionsService.get("masterDetail")){const i=this.gridOptionsService.get("isRowMaster");i?e.setMaster(i(t)):e.setMaster(!0)}else e.setMaster(!1);if(s){const t=this.columnModel.getRowGroupColumns(),s=i+(t?t.length:0);e.expanded=!!e.master&&this.isExpanded(s)}}}isExpanded(e){const t=this.gridOptionsService.get("groupDefaultExpanded");return-1===t||e<t}};p.TOP_LEVEL=0,p.ROOT_NODE_ID="ROOT_NODE_ID";var g=p,m=class extends u.BeanStub{constructor(){super(...arguments),this.onRowHeightChanged_debounced=u._.debounce(this.onRowHeightChanged.bind(this),100),this.rowsToDisplay=[],this.hasStarted=!1,this.shouldSkipSettingDataOnStart=!1,this.isRefreshingModel=!1,this.rowCountReady=!1}init(){const e=this.refreshModel.bind(this,{step:u.ClientSideRowModelSteps.EVERYTHING}),t=!this.gridOptionsService.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:u.ClientSideRowModelSteps.EVERYTHING,afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedListener(this.eventService,u.Events.EVENT_NEW_COLUMNS_LOADED,i),this.addManagedListener(this.eventService,u.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,u.Events.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,u.Events.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:u.ClientSideRowModelSteps.PIVOT})),this.addManagedListener(this.eventService,u.Events.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,u.Events.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,u.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,u.Events.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this)),this.addManagedListener(this.eventService,u.Events.EVENT_GRID_READY,(()=>this.onGridReady())),this.addPropertyListeners(),this.rootNode=new u.RowNode(this.beans),this.nodeManager=new g(this.rootNode,this.gridOptionsService,this.eventService,this.columnModel,this.selectionService,this.beans)}addPropertyListeners(){const e=new Set(["treeData","masterDetail"]),t=new Set(["suppressParentsInRowNodes","groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),i=new Set(["excludeChildrenWhenTreeDataFiltering"]),s=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),o=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly"]),r=new Set(["postSortRows","groupDisplayType","accentedSort"]),n=new Set([]),a=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter"]),l=[...e,...t,...i,...s,...s,...o,...r,...n,...a];this.addManagedPropertyListeners(l,(l=>{var d;const h=null==(d=l.changeSet)?void 0:d.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:u.ClientSideRowModelSteps.EVERYTHING}):c(i)?this.refreshModel({step:u.ClientSideRowModelSteps.FILTER}):c(s)?this.refreshModel({step:u.ClientSideRowModelSteps.PIVOT}):c(o)?this.refreshModel({step:u.ClientSideRowModelSteps.AGGREGATE}):c(r)?this.refreshModel({step:u.ClientSideRowModelSteps.SORT}):c(n)?this.refreshModel({step:u.ClientSideRowModelSteps.FILTER_AGGREGATES}):c(a)&&this.refreshModel({step:u.ClientSideRowModelSteps.MAP})})),this.addManagedPropertyListener("rowHeight",(()=>this.resetRowHeights()))}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}setInitialData(){const e=this.gridOptionsService.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),d=Math.min(a,s);for(let e=l;e<=d;e++){const t=this.getRow(e);if(t.rowHeightEstimated){const e=this.gridOptionsService.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.gridOptionsService.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.gridOptionsService.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.gridOptionsService.get("suppressAnimationFrame");return o!==e[0]&&(e.forEach((e=>{u._.removeFromArray(this.rootNode.allLeafChildren,e)})),e.forEach(((e,t)=>{u._.insertIntoArray(this.rootNode.allLeafChildren,e,Math.max(s+i,0)+t)})),this.refreshModel({step:u.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 u.RowHighlightPosition.Below}const{rowTop:i,rowHeight:s}=t;return e-i<s/2?u.RowHighlightPosition.Above:u.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.childrenAfterAggFilter;return e?e.length:0}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let t=this.rootNode.childrenAfterSort[e];if(this.gridOptionsService.get("groupHideOpenParents"))for(;t.expanded&&t.childrenAfterSort&&t.childrenAfterSort.length>0;)t=t.childrenAfterSort[0];return t.rowIndex}getRowBounds(e){if(u._.missing(this.rowsToDisplay))return null;const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=this.gridOptionsService.isAnimateRows();this.refreshModel({step:u.ClientSideRowModelSteps.MAP,keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=this.gridOptionsService.isAnimateRows(),i=0===e.columns.length||e.columns.some((e=>e.isPrimary()))?u.ClientSideRowModelSteps.FILTER:u.ClientSideRowModelSteps.FILTER_AGGREGATES;this.refreshModel({step:i,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=this.gridOptionsService.isAnimateRows();this.refreshModel({step:u.ClientSideRowModelSteps.SORT,keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:u.ClientSideRowModelSteps.PIVOT}):this.refreshModel({step:u.ClientSideRowModelSteps.AGGREGATE})}createChangePath(e){const t=u._.missingOrEmpty(e),i=new u.ChangedPath(!1,this.rootNode);return(t||this.gridOptionsService.get("treeData"))&&i.setInactive(),i}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gridOptionsService.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=u.ClientSideRowModelSteps.EVERYTHING;const i={everything:u.ClientSideRowModelSteps.EVERYTHING,group:u.ClientSideRowModelSteps.EVERYTHING,filter:u.ClientSideRowModelSteps.FILTER,map:u.ClientSideRowModelSteps.MAP,aggregate:u.ClientSideRowModelSteps.AGGREGATE,sort:u.ClientSideRowModelSteps.SORT,pivot:u.ClientSideRowModelSteps.PIVOT};if(u._.exists(e)&&(t=i[e]),u._.missing(t))return void console.error(`AG Grid: invalid step ${e}, available steps are ${Object.keys(i).join(", ")}`);return{step:t,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gridOptionsService.get("suppressAnimationFrame")}}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.shouldRowModelIgnoreRefresh())return;let 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 u.ClientSideRowModelSteps.EVERYTHING:this.doRowGrouping(t.rowNodeTransactions,t.rowNodeOrder,i,!!t.afterColumnsChanged);case u.ClientSideRowModelSteps.FILTER:this.doFilter(i);case u.ClientSideRowModelSteps.PIVOT:this.doPivot(i);case u.ClientSideRowModelSteps.AGGREGATE:this.doAggregate(i);case u.ClientSideRowModelSteps.FILTER_AGGREGATES:this.doFilterAggregates(i);case u.ClientSideRowModelSteps.SORT:this.doSort(t.rowNodeTransactions,i);case u.ClientSideRowModelSteps.MAP:this.doRowsToDisplay()}const s=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,s),this.isRefreshingModel=!1;const o={type:u.Events.EVENT_MODEL_UPDATED,animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(o)}isEmpty(){const e=u._.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return u._.missing(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return u._.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!t,s=!1;const o=[],r=this.gridOptionsService.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){console.error("AG Grid: 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(u._.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){var t;const{nodes:i,callback:s,recursionType:o,includeFooterNodes:r}=e;let{index:n}=e;for(let e=0;e<i.length;e++){const t=i[e];if(s(t,n++),t.hasChildren()&&!t.footer){let e=null;switch(o){case 0:e=t.childrenAfterGroup;break;case 1:e=t.childrenAfterAggFilter;break;case 2:e=t.childrenAfterSort;break;case 3:e=t.leafGroup?null:t.childrenAfterSort}e&&(n=this.recursivelyWalkNodesAndCallback({nodes:[...e],callback:s,recursionType:o,index:n,includeFooterNodes:r}))}}const a=null==(t=i[0])?void 0:t.parent;if(!r||!a)return n;if(a===this.rootNode){if(!this.gridOptionsService.get("groupIncludeTotalFooter"))return n}else{if(!this.gridOptionsService.getGroupIncludeFooter()({node:a}))return n}return a.createFooter(),s(a.sibling,n++),n}doAggregate(e){this.aggregationStage&&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.gridOptionsService.get("treeData"),i=this.columnModel.isPivotActive(),s=o=>{o&&o.forEach((o=>{const r=()=>{o.expanded=e,s(o.childrenAfterGroup)};if(t){return void(u._.exists(o.childrenAfterGroup)&&r())}if(i){return void(!o.leafGroup&&r())}o.group&&r()}))};this.rootNode&&s(this.rootNode.childrenAfterGroup),this.refreshModel({step:u.ClientSideRowModelSteps.MAP});const o=e?"expandAll":"collapseAll",r={type:u.Events.EVENT_EXPAND_COLLAPSE_ALL,source:o};this.eventService.dispatchEvent(r)}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.gridOptionsService.get("groupSelectsChildren")){if(this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",i)){const e={type:u.Events.EVENT_SELECTION_CHANGED,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:u.Events.EVENT_ROW_COUNT_READY}))}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){this.pivotStage&&this.pivotStage.execute({rowNode:this.rootNode,changedPath:e})}getCopyOfNodesMap(){return this.nodeManager.getCopyOfNodesMap()}getRowNode(e){if("string"==typeof e&&0==e.indexOf(u.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(){const e={type:u.Events.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(e),this.refreshModel({step:u.ClientSideRowModelSteps.EVERYTHING,newData:!0})}batchUpdateRowData(e,t){if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];const e=this.gridOptionsService.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:u.Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED,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.gridOptionsService.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.gridOptionsService.get("suppressAnimationFrame");i&&(t=this.createRowNodeOrder());const o={type:u.Events.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(o),this.refreshModel({step:u.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:u.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(){this.columnModel.isAutoRowHeightActive()||this.resetRowHeights()}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}};l([(0,u.Autowired)("columnModel")],m.prototype,"columnModel",2),l([(0,u.Autowired)("selectionService")],m.prototype,"selectionService",2),l([(0,u.Autowired)("filterManager")],m.prototype,"filterManager",2),l([(0,u.Autowired)("valueCache")],m.prototype,"valueCache",2),l([(0,u.Autowired)("beans")],m.prototype,"beans",2),l([(0,u.Autowired)("filterStage")],m.prototype,"filterStage",2),l([(0,u.Autowired)("sortStage")],m.prototype,"sortStage",2),l([(0,u.Autowired)("flattenStage")],m.prototype,"flattenStage",2),l([(0,u.Optional)("groupStage")],m.prototype,"groupStage",2),l([(0,u.Optional)("aggregationStage")],m.prototype,"aggregationStage",2),l([(0,u.Optional)("pivotStage")],m.prototype,"pivotStage",2),l([(0,u.Optional)("filterAggregatesStage")],m.prototype,"filterAggregatesStage",2),l([u.PostConstruct],m.prototype,"init",1),m=l([(0,u.Bean)("rowModel")],m);var C=i(423),v=class extends C.BeanStub{execute(e){const{changedPath:t}=e;this.filterService.filter(t)}};l([(0,C.Autowired)("filterService")],v.prototype,"filterService",2),v=l([(0,C.Bean)("filterStage")],v);var f=i(423),S=class extends f.BeanStub{execute(e){const t=this.sortController.getSortOptions(),i=f._.exists(t)&&t.length>0,s=i&&f._.exists(e.rowNodeTransactions)&&this.gridOptionsService.get("deltaSort"),o=t.some((e=>this.gridOptionsService.isColumnsSortingCoupledToGroup()?e.column.isPrimary()&&e.column.isRowGroupActive():!!e.column.getColDef().showRowGroup));this.sortService.sort(t,i,s,e.rowNodeTransactions,e.changedPath,o)}};l([(0,f.Autowired)("sortService")],S.prototype,"sortService",2),l([(0,f.Autowired)("sortController")],S.prototype,"sortController",2),S=l([(0,f.Bean)("sortStage")],S);var w=i(423),E=class extends w.BeanStub{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);return!o&&i.length>0&&n.groupIncludeTotalFooter&&(t.createFooter(),this.addRowNodeToRowsToDisplay(n,t.sibling,i,0)),i}getFlattenDetails(){const e=this.gridOptionsService.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gridOptionsService.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gridOptionsService.isGroupMultiAutoColumn(),hideOpenParents:this.gridOptionsService.get("groupHideOpenParents"),groupIncludeTotalFooter:this.gridOptionsService.get("groupIncludeTotalFooter"),getGroupIncludeFooter:this.gridOptionsService.getGroupIncludeFooter()}}recursivelyAddToRowsToDisplay(e,t,i,s,o){if(!w._.missingOrEmpty(t))for(let r=0;r<t.length;r++){const n=t[r],a=n.hasChildren(),l=s&&!a,d=e.groupRemoveSingleChildren&&a&&1===n.childrenAfterGroup.length,h=e.groupRemoveLowestSingleChildren&&a&&n.leafGroup&&1===n.childrenAfterGroup.length,u=s&&n.leafGroup,c=e.hideOpenParents&&n.expanded&&!n.master&&!u;if(!(l||c||d||h)&&this.addRowNodeToRowsToDisplay(e,n,i,o),!s||!n.leafGroup)if(a){const t=d||h;if(n.expanded||t){const r=t?o:o+1;this.recursivelyAddToRowsToDisplay(e,n.childrenAfterSort,i,s,r);e.getGroupIncludeFooter({node:n})?(n.createFooter(),this.addRowNodeToRowsToDisplay(e,n.sibling,i,r)):n.destroyFooter()}}else if(n.master&&n.expanded){const t=this.createDetailNode(n);this.addRowNodeToRowsToDisplay(e,t,i,o)}}}addRowNodeToRowsToDisplay(e,t,i,s){i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:s)}createDetailNode(e){if(w._.exists(e.detailNode))return e.detailNode;const t=new w.RowNode(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,w._.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}};l([(0,w.Autowired)("columnModel")],E.prototype,"columnModel",2),l([(0,w.Autowired)("beans")],E.prototype,"beans",2),E=l([(0,w.Bean)("flattenStage")],E);var y=i(423),R=class extends y.BeanStub{sort(e,t,i,s,o,r){const n=this.gridOptionsService.get("groupMaintainOrder"),a=this.columnModel.getAllGridColumns().some((e=>e.isRowGroupActive()));let l={};i&&s&&(l=this.calculateDirtyNodes(s));const d=this.columnModel.isPivotMode(),h=this.gridOptionsService.getCallback("postSortRows"),u=s=>{var u;this.pullDownGroupDataForHideOpenParents(s.childrenAfterAggFilter,!0);const c=d&&s.leafGroup;if(n&&a&&!s.leafGroup&&!r){const e=null==(u=this.columnModel.getRowGroupColumns())?void 0:u[s.level+1],t=null===(null==e?void 0: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)=>{var s,o;return(null!=(s=e[t.id])?s:0)-(null!=(o=e[i.id])?o: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),h){const e={nodes:s.childrenAfterSort};h(e)}};o&&o.forEachChangedNodeDepthFirst(u),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])),d=(e,t)=>({currentPos:t,rowNode:e}),h=a.map(d).sort(((e,t)=>this.rowNodeSorter.compareRowNodes(s,e,t)));return this.mergeSortedArrays(s,h,l.map(d)).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(y._.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.gridOptionsService.get("groupHideOpenParents"))return;if(this.gridOptionsService.get("treeData"))return y._.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.gridOptionsService.get("groupHideOpenParents")&&!y._.missing(e)&&e.forEach((e=>{this.columnModel.getGroupDisplayColumns().forEach((i=>{const s=i.getColDef().showRowGroup;if("string"!=typeof s)return void console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");const o=s,r=this.columnModel.getPrimaryColumn(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)}}))}))}};l([(0,y.Autowired)("columnModel")],R.prototype,"columnModel",2),l([(0,y.Autowired)("rowNodeSorter")],R.prototype,"rowNodeSorter",2),R=l([(0,y.Bean)("sortService")],R);var b=i(423),D=class extends b.BeanStub{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.gridOptionsService.get("treeData")&&!this.gridOptionsService.get("excludeChildrenWhenTreeDataFiltering")}};l([(0,b.Autowired)("filterManager")],D.prototype,"filterManager",2),D=l([(0,b.Bean)("filterService")],D);var T=i(423),A=class extends T.BeanStub{postConstruct(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",(()=>this.onRowDataUpdated())))}isActive(){const e=this.gridOptionsService.exists("getRowId");return!this.gridOptionsService.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(T._.missing(this.clientSideRowModel))return void console.error("AG Grid: ImmutableService only works with ClientSideRowModel");const t=this.gridOptionsService.getCallback("getRowId");if(null==t)return void console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");const i={remove:[],update:[],add:[]},s=this.clientSideRowModel.getCopyOfNodesMap(),o=this.gridOptionsService.get("suppressMaintainUnsortedOrder")?void 0:{};return T._.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)})),T._.iterateObject(s,((e,t)=>{t&&i.remove.push(t.data)})),[i,o]}onRowDataUpdated(){const e=this.gridOptionsService.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}};l([(0,T.Autowired)("rowModel")],A.prototype,"rowModel",2),l([(0,T.Autowired)("rowRenderer")],A.prototype,"rowRenderer",2),l([(0,T.Autowired)("selectionService")],A.prototype,"selectionService",2),l([T.PostConstruct],A.prototype,"postConstruct",1),A=l([(0,T.Bean)("immutableService")],A);var P={version:"31.2.0",moduleName:h.ModuleNames.ClientSideRowModelModule,rowModel:"clientSide",beans:[m,v,S,E,R,D,A]}},423:function(e,t,i){var s,o=Object.defineProperty,r=Object.defineProperties,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,c=(e,t,i)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,p=(e,t)=>{for(var i in t||(t={}))h.call(t,i)&&c(e,i,t[i]);if(d)for(var i of d(t))u.call(t,i)&&c(e,i,t[i]);return e},g=(e,t)=>r(e,a(t)),m=(e,t)=>{for(var i in t)o(e,i,{get:t[i],enumerable:!0})},C=(e,t,i,s)=>{for(var r,a=s>1?void 0:s?n(t,i):t,l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s?r(t,i,a):r(a))||a);return s&&a&&o(t,i,a),a},v=(e,t)=>(i,s)=>t(i,s,e),f={};m(f,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>ht,AbstractHeaderCellCtrl:()=>ol,AgAbstractField:()=>Wo,AgAbstractLabel:()=>Bo,AgAutocomplete:()=>yd,AgCheckbox:()=>qo,AgDialog:()=>md,AgGroupComponent:()=>nd,AgInputDateField:()=>Xl,AgInputNumberField:()=>dr,AgInputRange:()=>Jl,AgInputTextArea:()=>Ql,AgInputTextField:()=>lr,AgMenuItemComponent:()=>cd,AgMenuItemRenderer:()=>Cn,AgMenuList:()=>dd,AgMenuPanel:()=>hd,AgPanel:()=>gd,AgPickerField:()=>Uo,AgPromise:()=>fo,AgPromiseStatus:()=>vo,AgRadioButton:()=>Qo,AgRichSelect:()=>id,AgSelect:()=>$o,AgSlider:()=>od,AgStackComponentsRegistry:()=>Gt,AgToggleButton:()=>ql,AlignedGridsService:()=>Od,AnimateShowChangeCellRenderer:()=>_r,AnimateSlideCellRenderer:()=>Vr,AnimationFrameService:()=>Ml,AutoScrollService:()=>Wn,AutoWidthCalculator:()=>xl,Autowired:()=>ce,BarColumnLabelPlacement:()=>Yh,BaseComponentWrapper:()=>jh,Bean:()=>ue,BeanStub:()=>rt,Beans:()=>ca,BodyDropPivotTarget:()=>ja,BodyDropTarget:()=>qa,CellComp:()=>Ua,CellCtrl:()=>Sa,CellNavigationService:()=>Fd,CellPositionUtils:()=>oh,CellRangeType:()=>aa,ChangedPath:()=>Ul,CheckboxCellEditor:()=>mn,CheckboxCellRenderer:()=>gn,CheckboxSelectionComponent:()=>Br,ClientSideRowModelSteps:()=>Il,ColDefUtil:()=>Hn,Column:()=>Re,ColumnApi:()=>Md,ColumnFactory:()=>nt,ColumnGroup:()=>lt,ColumnKeyCreator:()=>L,ColumnModel:()=>Tt,ColumnUtils:()=>Pt,Component:()=>To,ComponentUtil:()=>Nt,Context:()=>ae,CssClassApplier:()=>Ca,CssClassManager:()=>wo,CtrlsService:()=>gh,DataTypeService:()=>Ih,DateCellEditor:()=>hn,DateFilter:()=>or,DateStringCellEditor:()=>cn,DisplayedGroupCreator:()=>Ft,DragAndDropService:()=>Kr,DragService:()=>zn,DragSourceType:()=>zr,Environment:()=>Xd,EventService:()=>ve,Events:()=>dt,ExcelFactoryMode:()=>kn,ExpansionService:()=>Nl,ExpressionService:()=>Nd,FilterManager:()=>Qn,FloatingFilterMapper:()=>xn,FocusService:()=>Bd,GROUP_AUTO_COLUMN_ID:()=>ct,Grid:()=>Uh,GridApi:()=>Yn,GridBodyComp:()=>_a,GridBodyCtrl:()=>ra,GridComp:()=>Hd,GridCoreCreator:()=>Kh,GridCtrl:()=>Vd,GridHeaderComp:()=>Rl,GridHeaderCtrl:()=>El,GridOptionsService:()=>Ah,GroupCellRenderer:()=>Jr,GroupCellRendererCtrl:()=>Qr,GroupInstanceIdCreator:()=>ut,HeaderCellCtrl:()=>hl,HeaderFilterCellComp:()=>Zn,HeaderFilterCellCtrl:()=>al,HeaderGroupCellCtrl:()=>pl,HeaderNavigationDirection:()=>Sl,HeaderNavigationService:()=>wl,HeaderPositionUtils:()=>hh,HeaderRowComp:()=>tl,HeaderRowContainerComp:()=>fl,HeaderRowContainerCtrl:()=>Cl,HeaderRowCtrl:()=>ml,HeaderRowType:()=>el,HorizontalDirection:()=>Ur,HorizontalResizeService:()=>bl,KeyCode:()=>Qs,LargeTextCellEditor:()=>Mr,LayoutCssClasses:()=>ea,LocaleService:()=>Ph,Logger:()=>_d,LoggerFactory:()=>xd,ManagedFocusFeature:()=>Go,MenuService:()=>Gl,ModuleNames:()=>oe,ModuleRegistry:()=>ne,MouseEventService:()=>Ha,MoveColumnFeature:()=>Ya,NavigationService:()=>ka,NumberCellEditor:()=>ln,NumberFilter:()=>pr,NumberSequence:()=>Co,Optional:()=>pe,PaginationProxy:()=>$l,PillDragComp:()=>bd,PillDropZonePanel:()=>Td,PinnedRowModel:()=>Bl,PopupComponent:()=>Or,PopupEditorWrapper:()=>Wa,PopupService:()=>vd,PositionableFeature:()=>Vo,PostConstruct:()=>de,PreConstruct:()=>le,PreDestroy:()=>he,PropertyKeys:()=>Mt,ProvidedColumnGroup:()=>De,ProvidedFilter:()=>ko,Qualifier:()=>me,QuerySelector:()=>Ao,RefSelector:()=>Po,ResizeObserverService:()=>Ll,RowAnimationCssClasses:()=>sa,RowContainerComp:()=>Ka,RowContainerCtrl:()=>xa,RowContainerName:()=>Oa,RowContainerType:()=>La,RowCtrl:()=>ya,RowHighlightPosition:()=>Bn,RowNode:()=>kr,RowNodeBlock:()=>Kl,RowNodeBlockLoader:()=>jl,RowNodeSorter:()=>ph,RowPositionUtils:()=>sh,RowRenderer:()=>Vl,ScalarFilter:()=>er,ScrollVisibleService:()=>Va,SelectCellEditor:()=>Ir,SelectableService:()=>Zd,SelectionHandleType:()=>na,ServerSideTransactionResultStatus:()=>Wl,SetLeftFeature:()=>rl,SimpleFilter:()=>Zo,SortController:()=>kd,SortIndicatorComp:()=>Dr,StandardMenuFactory:()=>Dl,StylingService:()=>Yl,TabGuardClassNames:()=>Tl,TabGuardComp:()=>Pl,TabGuardCtrl:()=>Al,TabbedLayout:()=>Ol,TemplateService:()=>Gd,TextCellEditor:()=>xr,TextFilter:()=>Cr,TextFloatingFilter:()=>Er,Timer:()=>So,TooltipFeature:()=>Ro,TooltipStateManager:()=>yo,TouchListener:()=>Rr,UserComponentFactory:()=>_n,UserComponentRegistry:()=>vn,ValueCache:()=>Kd,ValueFormatterService:()=>kl,ValueParserService:()=>Nh,ValueService:()=>Id,VanillaFrameworkOverrides:()=>Pd,VerticalDirection:()=>Wr,VirtualList:()=>td,VirtualListDragFeature:()=>jn,_:()=>mo,__FORCE_MODULE_DETECTION:()=>$h,createGrid:()=>Wh,getRowContainerTypeForName:()=>Ma}),e.exports=(s=f,((e,t,i,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of l(t))h.call(e,r)||r===i||o(e,r,{get:()=>t[r],enumerable:!(s=n(t,r))||s.enumerable});return e})(o({},"__esModule",{value:!0}),s));var S={};function w(e){return null==e||""===e?null:e}function E(e,t=!1){return null!=e&&(""!==e||t)}function y(e){return!E(e)}function R(e){return null==e||0===e.length}function b(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function D(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 T(e){if(void 0!==e)return null!==e&&""!==e&&("boolean"==typeof e?e:/true/i.test(e))}function A(e){if(null!=e&&""!==e)return e}function P(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function F(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 O(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach((e=>t.push(e))),t}return Object.values(e)}m(S,{attrToBoolean:()=>T,attrToNumber:()=>D,attrToString:()=>A,defaultComparator:()=>F,exists:()=>E,jsonEquals:()=>P,makeNull:()=>w,missing:()=>y,missingOrEmpty:()=>R,toStringOrNull:()=>b,values:()=>O});var L=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=b(e);let i=0;for(;;){let s;if(e?(s=e,0!==i&&(s+="_"+i)):t?(s=t,0!==i&&(s+="_"+i)):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++}}},M={};function I(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 N(e){const t={},i=Object.keys(e);for(let s=0;s<i.length;s++){const o=i[s],r=e[o];t[o]=r}return t}function G(e,t){if(!e)return;const i=e,s={};return Object.keys(i).forEach((e=>{if(t&&t.indexOf(e)>=0)return;const o=i[e],r=k(o)&&o.constructor===Object;s[e]=r?G(o):o})),s}function x(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 _(e,t,i=!0,s=!1){E(t)&&I(t,((t,o)=>{let r=e[t];if(r!==o){if(s){if(null==r&&null!=o){"object"==typeof o&&o.constructor===Object&&(r={},e[t]=r)}}k(o)&&k(r)&&!Array.isArray(r)?_(r,o,i,s):(i||void 0!==o)&&(e[t]=o)}}))}function V(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 H(e,t=[],i){Object.keys(e).forEach((i=>{"object"!=typeof e[i]||t.includes(i)||(e[i]=void 0)}));const s=Object.getPrototypeOf(e),o={};Object.getOwnPropertyNames(s).forEach((e=>{if("function"==typeof s[e]&&!t.includes(e)){const t=()=>{console.warn((e=>`AG Grid: Grid API function ${e}() cannot be called as the grid has been destroyed.\n It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${i}`)(e))};o[e]={value:t,writable:!0}}})),Object.defineProperties(e,o)}function k(e){return"object"==typeof e&&null!==e}m(M,{cloneObject:()=>N,deepCloneDefinition:()=>G,getAllValuesInObject:()=>x,getValueUsingField:()=>V,isNonNullObject:()=>k,iterateObject:()=>I,mergeDeep:()=>_,removeAllReferences:()=>H});var B={};m(B,{compose:()=>ie,debounce:()=>Z,doOnce:()=>U,errorOnce:()=>K,executeAfter:()=>J,executeInAWhile:()=>Y,executeNextVMTurn:()=>X,getFunctionName:()=>j,isFunction:()=>$,noop:()=>se,throttle:()=>ee,waitUntil:()=>te,warnOnce:()=>z});var W={};function U(e,t){W[t]||(e(),W[t]=!0)}function z(e){U((()=>console.warn("AG Grid: "+e)),e)}function K(e){U((()=>console.error("AG Grid: "+e)),e)}function j(e){if(e.name)return e.name;const t=/function\s+([^\(]+)/.exec(e.toString());return t&&2===t.length?t[1].trim():null}function $(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Y(e){J(e,400)}var q=[],Q=!1;function X(e){q.push(e),Q||(Q=!0,window.setTimeout((()=>{const e=q.slice();q.length=0,Q=!1,e.forEach((e=>e()))}),0))}function J(e,t=0){e.length>0&&window.setTimeout((()=>e.forEach((e=>e()))),t)}function Z(e,t){let i;return function(...s){const o=this;window.clearTimeout(i),i=window.setTimeout((function(){e.apply(o,s)}),t)}}function ee(e,t){let i=0;return function(...s){const o=(new Date).getTime();o-i<t||(i=o,e.apply(this,s))}}function te(e,t,i=100,s){const o=(new Date).getTime();let r=null,n=!1;const a=()=>{const a=(new Date).getTime()-o>i;(e()||a)&&(t(),n=!0,null!=r&&(window.clearInterval(r),r=null),a&&s&&console.warn(s))};a(),n||(r=window.setInterval(a,10))}function ie(...e){return t=>e.reduce(((e,t)=>t(e)),t)}var se=()=>{},oe=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(oe||{}),re=class e{static register(t){e.__register(t,!0,void 0)}static registerModules(t){e.__registerModules(t,!0,void 0)}static __register(t,i,s){e.runVersionChecks(t),void 0!==s?(e.areGridScopedModules=!0,void 0===e.gridModulesMap[s]&&(e.gridModulesMap[s]={}),e.gridModulesMap[s][t.moduleName]=t):e.globalModulesMap[t.moduleName]=t,e.setModuleBased(i)}static __unRegisterGridModules(t){delete e.gridModulesMap[t]}static __registerModules(t,i,s){e.setModuleBased(i),t&&t.forEach((t=>e.__register(t,i,s)))}static isValidModuleVersion(t){const[i,s]=t.version.split(".")||[],[o,r]=e.currentModuleVersion.split(".")||[];return i===o&&s===r}static runVersionChecks(t){if(e.currentModuleVersion||(e.currentModuleVersion=t.version),t.version?e.isValidModuleVersion(t)||console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is version ${t.version} but the other modules are version ${this.currentModuleVersion}. Please update all modules to the same version.`):console.error(`AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '${t.moduleName}' is incompatible. Please update all modules to the same version.`),t.validate){const e=t.validate();if(!e.isValid){const t=e;console.error(`AG Grid: ${t.message}`)}}}static setModuleBased(t){void 0===e.moduleBased?e.moduleBased=t:e.moduleBased!==t&&U((()=>{console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.")}),"ModulePackageCheck")}static __setIsBundled(){e.isBundled=!0}static __assertRegistered(t,i,s){var o;if(this.__isRegistered(t,s))return!0;const r=i+t;let n;if(e.isBundled)n=`AG Grid: unable to use ${i} as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:\n \n <script src="https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js"><\/script>\n \nFor more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(e.moduleBased||void 0===e.moduleBased){let r=null==(o=Object.entries(oe).find((([e,i])=>i===t)))?void 0:o[0];n=`AG Grid: unable to use ${i} as the ${r} is not registered${e.areGridScopedModules?` for gridId: ${s}`:""}. Check if you have registered the module:\n \n import { ModuleRegistry } from '@ag-grid-community/core';\n import { ${r} } from '${t}';\n \n ModuleRegistry.registerModules([ ${r} ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/`}else n=`AG Grid: unable to use ${i} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:\n \n import 'ag-grid-enterprise';\n \nFor more info see: https://www.ag-grid.com/javascript-grid/packages/`;return U((()=>{console.warn(n)}),r),!1}static __warnEnterpriseChartDisabled(e){const t=`AG Grid: the '${e}' chart type is not supported in AG Charts Community as 'ag-grid-charts-enterprise' or '@ag-grid-enterprise/charts-enterprise' hasn't been loaded. See https://www.ag-grid.com/javascript-data-grid/integrated-charts-installation/ for more details.`;U((()=>{console.warn(t)}),"ag-charts-enterprise:"+e)}static __isRegistered(t,i){var s;return!!e.globalModulesMap[t]||!!(null==(s=e.gridModulesMap[i])?void 0:s[t])}static __getRegisteredModules(t){return[...O(e.globalModulesMap),...O(e.gridModulesMap[t]||{})]}static __getGridRegisteredModules(t){var i;return O(null!=(i=e.gridModulesMap[t])?i:{})||[]}static __isPackageBased(){return!e.moduleBased}};re.globalModulesMap={},re.gridModulesMap={},re.areGridScopedModules=!1;var ne=re,ae=class{constructor(e,t){if(this.beanWrappers={},this.destroyed=!1,!e||!e.beanClasses)return;this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),this.createBeans();const i=this.getBeanInstances();this.wireBeans(i),this.logger.log(">> ag-Application Context ready - component is alive")}getBeanInstances(){return O(this.beanWrappers).map((e=>e.beanInstance))}createBean(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],t),e}wireBeans(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),E(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")}createBeans(){this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),I(this.beanWrappers,((e,t)=>{let i;t.bean.__agBeanMetaData&&t.bean.__agBeanMetaData.autowireM