ag-grid-enterprise
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
1 lines • 3.31 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={7886:function(e,t,i){var n,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,l=(e,t,i,n)=>{for(var o,s=n>1?void 0:n?r(t,i):t,l=e.length-1;l>=0;l--)(o=e[l])&&(s=(n?o(t,i,s):o(s))||s);return n&&s&&a(t,i,s),s},d={};((e,t)=>{for(var i in t)a(e,i,{get:t[i],enumerable:!0})})(d,{ClientSideRowModelModule:()=>D}),e.exports=(n=d,((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))s.call(e,l)||l===i||a(e,l,{get:()=>t[l],enumerable:!(n=r(t,l))||n.enumerable});return e})(a({},"__esModule",{value:!0}),n));var c=i(3423),g=i(3423),h=i(3423),u=class e{constructor(t,i,n,a,r,o){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=t,this.gridOptionsService=i,this.eventService=n,this.columnModel=a,this.beans=o,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 h._.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,n=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=[]),n&&(n.childrenAfterFilter=i.childrenAfterFilter,n.childrenAfterGroup=i.childrenAfterGroup,n.childrenAfterAggFilter=i.childrenAfterAggFilter,n.childrenAfterSort=i.childrenAfterSort,n.childrenMapped=i.childrenMapped,n.allLeafChildren=i.allLeafChildren)}updateRowData(e,t){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(e.add);const i={remove:[],update:[],add:[]},n=[];return this.executeRemove(e,i,n),this.executeUpdate(e,i,n),this.executeAdd(e,i),this.updateSelection(n,"rowDataChanged"),t&&h._.sortRowNodesByOrder(this.rootNode.allLeafChildren,t),i}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(e){const t={type:h.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:h.Events.EVENT_SELECTION_CHANGED,source:t};this.eventService.dispatchEvent(e)}}executeAdd(t,i){var n;const{add:a,addIndex:r}=t;if(h._.missingOrEmpty(a))return;const o=a.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 a=0;a<t;a++)if((null==(n=e[a])?void 0:n.rowIndex)==r-1){i=a+1;break}const a=e.slice(0,i),s=e.slice(i,e.length);this.rootNode.allLeafChildren=[...a,...o,...s]}else this.rootNode.allLeafChildren=[...this.rootNode.allLeafChildren,...o];this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),i.add=o}executeRemove(e,t,i){const{remove:n}=e;if(h._.missingOrEmpty(n))return;const a={};n.forEach((e=>{const n=this.lookupRowNode(e);n&&(n.isSelected()&&i.push(n),n.clearRowTopAndRowIndex(),a[n.id]=!0,delete this.allNodesMap[n.id],t.remove.push(n))})),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter((e=>!a[e.id])),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(t,i,n){const{update:a}=t;h._.missingOrEmpty(a)||a.forEach((t=>{const a=this.lookupRowNode(t);a&&(a.updateData(t),!a.selectable&&a.isSelected()&&n.push(a),this.setMasterForRow(a,t,e.TOP_LEVEL,!1),i.update.push(a))}))}lookupRowNode(e){const t=this.gridOptionsService.getCallback("getRowId");let i;if(t){const n=t({data:e,level:0});if(i=this.allNodesMap[n],!i)return console.error(`AG Grid: could not find row id=${n}, 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 n=new h.RowNode(this.beans);n.group=!1,this.setMasterForRow(n,e,i,!0);const a=this.gridOptionsService.get("suppressParentsInRowNodes");return t&&!a&&(n.parent=t),n.level=i,n.setDataAndId(e,this.nextId.toString()),this.allNodesMap[n.id]&&console.warn(`AG Grid: duplicate node id '${n.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[n.id]=n,this.nextId++,n}setMasterForRow(e,t,i,n){if(this.gridOptionsService.get("treeData"))e.setMaster(!1),n&&(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(n){const t=this.columnModel.getRowGroupColumns(),n=i+(t?t.length:0);e.expanded=!!e.master&&this.isExpanded(n)}}}isExpanded(e){const t=this.gridOptionsService.get("groupDefaultExpanded");return-1===t||e<t}};u.TOP_LEVEL=0,u.ROOT_NODE_ID="ROOT_NODE_ID";var p=u,m=class extends g.BeanStub{constructor(){super(...arguments),this.onRowHeightChanged_debounced=g._.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:g.ClientSideRowModelSteps.EVERYTHING}),t=!this.gridOptionsService.get("suppressAnimationFrame"),i=this.refreshModel.bind(this,{step:g.ClientSideRowModelSteps.EVERYTHING,afterColumnsChanged:!0,keepRenderedRows:!0,animate:t});this.addManagedListener(this.eventService,g.Events.EVENT_NEW_COLUMNS_LOADED,i),this.addManagedListener(this.eventService,g.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,g.Events.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,g.Events.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:g.ClientSideRowModelSteps.PIVOT})),this.addManagedListener(this.eventService,g.Events.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,g.Events.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,g.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,g.Events.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this)),this.addManagedListener(this.eventService,g.Events.EVENT_GRID_READY,(()=>this.onGridReady())),this.addPropertyListeners(),this.rootNode=new g.RowNode(this.beans),this.nodeManager=new p(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"]),n=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),a=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly"]),r=new Set(["postSortRows","groupDisplayType","accentedSort"]),o=new Set([]),s=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter"]),l=[...e,...t,...i,...n,...n,...a,...r,...o,...s];this.addManagedPropertyListeners(l,(l=>{var d;const c=null==(d=l.changeSet)?void 0:d.properties;if(!c)return;const h=e=>c.some((t=>e.has(t)));h(e)?this.setRowData(this.rootNode.allLeafChildren.map((e=>e.data))):h(t)?this.refreshModel({step:g.ClientSideRowModelSteps.EVERYTHING}):h(i)?this.refreshModel({step:g.ClientSideRowModelSteps.FILTER}):h(n)?this.refreshModel({step:g.ClientSideRowModelSteps.PIVOT}):h(a)?this.refreshModel({step:g.ClientSideRowModelSteps.AGGREGATE}):h(r)?this.refreshModel({step:g.ClientSideRowModelSteps.SORT}):h(o)?this.refreshModel({step:g.ClientSideRowModelSteps.FILTER_AGGREGATES}):h(s)&&this.refreshModel({step:g.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,n){let a,r=!1;do{a=!1;const o=this.getRowIndexAtPixel(e),s=this.getRowIndexAtPixel(t),l=Math.max(o,i),d=Math.min(s,n);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),a=!0,r=!0}}a&&this.setRowTopAndRowIndex()}while(a);return r}setRowTopAndRowIndex(){const e=this.environment.getDefaultRowHeight();let t=0;const i=new Set,n=this.gridOptionsService.isDomLayout("normal");for(let a=0;a<this.rowsToDisplay.length;a++){const r=this.rowsToDisplay[a];if(null!=r.id&&i.add(r.id),null==r.rowHeight){const t=this.gridOptionsService.getRowHeightForNode(r,n,e);r.setRowHeight(t.height,t.estimated)}r.setRowTop(t),r.setRowIndex(a),t+=r.rowHeight}return i}clearRowTopAndRowIndex(e,t){const i=e.isActive(),n=e=>{e&&null!=e.id&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},a=e=>{if(n(e),n(e.detailNode),n(e.sibling),e.hasChildren()&&e.childrenAfterGroup){const t=-1==e.level;i&&!t&&!e.expanded||e.childrenAfterGroup.forEach(a)}};a(this.rootNode)}ensureRowsAtPixel(e,t,i=0){const n=this.getRowIndexAtPixel(t),a=this.getRow(n),r=!this.gridOptionsService.get("suppressAnimationFrame");return a!==e[0]&&(e.forEach((e=>{g._.removeFromArray(this.rootNode.allLeafChildren,e)})),e.forEach(((e,t)=>{g._.insertIntoArray(this.rootNode.allLeafChildren,e,Math.max(n+i,0)+t)})),this.refreshModel({step:g.ClientSideRowModelSteps.EVERYTHING,keepRenderedRows:!0,keepEditingRows:!0,animate:r}),!0)}highlightRowAtPixel(e,t){const i=null!=t?this.getRowIndexAtPixel(t):null,n=null!=i?this.getRow(i):null;if(!n||!e||n===e||null==t)return void(this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null));const a=this.getHighlightPosition(t,n);this.lastHighlightedRow&&this.lastHighlightedRow!==n&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),n.setHighlighted(a),this.lastHighlightedRow=n}getHighlightPosition(e,t){if(!t){const i=this.getRowIndexAtPixel(e);if(!(t=this.getRow(i||0)))return g.RowHighlightPosition.Below}const{rowTop:i,rowHeight:n}=t;return e-i<n/2?g.RowHighlightPosition.Above:g.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(g._.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:g.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()))?g.ClientSideRowModelSteps.FILTER:g.ClientSideRowModelSteps.FILTER_AGGREGATES;this.refreshModel({step:i,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=this.gridOptionsService.isAnimateRows();this.refreshModel({step:g.ClientSideRowModelSteps.SORT,keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:g.ClientSideRowModelSteps.PIVOT}):this.refreshModel({step:g.ClientSideRowModelSteps.AGGREGATE})}createChangePath(e){const t=g._.missingOrEmpty(e),i=new g.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=g.ClientSideRowModelSteps.EVERYTHING;const i={everything:g.ClientSideRowModelSteps.EVERYTHING,group:g.ClientSideRowModelSteps.EVERYTHING,filter:g.ClientSideRowModelSteps.FILTER,map:g.ClientSideRowModelSteps.MAP,aggregate:g.ClientSideRowModelSteps.AGGREGATE,sort:g.ClientSideRowModelSteps.SORT,pivot:g.ClientSideRowModelSteps.PIVOT};if(g._.exists(e)&&(t=i[e]),g._.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 g.ClientSideRowModelSteps.EVERYTHING:this.doRowGrouping(t.rowNodeTransactions,t.rowNodeOrder,i,!!t.afterColumnsChanged);case g.ClientSideRowModelSteps.FILTER:this.doFilter(i);case g.ClientSideRowModelSteps.PIVOT:this.doPivot(i);case g.ClientSideRowModelSteps.AGGREGATE:this.doAggregate(i);case g.ClientSideRowModelSteps.FILTER_AGGREGATES:this.doFilterAggregates(i);case g.ClientSideRowModelSteps.SORT:this.doSort(t.rowNodeTransactions,i);case g.ClientSideRowModelSteps.MAP:this.doRowsToDisplay()}const n=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(i,n),this.isRefreshingModel=!1;const a={type:g.Events.EVENT_MODEL_UPDATED,animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack};this.eventService.dispatchEvent(a)}isEmpty(){const e=g._.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return g._.missing(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return g._.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let i=!t,n=!1;const a=[],r=this.gridOptionsService.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort((o=>{if(n)return;if(i&&(o===t||o===e)&&(n=!0,o.group&&r))return void a.push(...o.allLeafChildren);if(!i){if(o!==t&&o!==e)return;i=!0}(!o.group||!r)&&a.push(o)})),a}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(g._.last(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let n=-1,a=-1;for(;;){const r=Math.floor((t+i)/2),o=this.rowsToDisplay[r];if(this.isRowInPixel(o,e))return r;o.rowTop<e?t=r+1:o.rowTop>e&&(i=r-1);if(n===t&&a===i)return r;n=t,a=i}}isRowInPixel(e,t){const i=e.rowTop,n=e.rowTop+e.rowHeight;return i<=t&&n>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:n,recursionType:a,includeFooterNodes:r}=e;let{index:o}=e;for(let e=0;e<i.length;e++){const t=i[e];if(n(t,o++),t.hasChildren()&&!t.footer){let e=null;switch(a){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&&(o=this.recursivelyWalkNodesAndCallback({nodes:[...e],callback:n,recursionType:a,index:o,includeFooterNodes:r}))}}const s=null==(t=i[0])?void 0:t.parent;if(!r||!s)return o;if(s===this.rootNode){if(!this.gridOptionsService.get("groupIncludeTotalFooter"))return o}else{if(!this.gridOptionsService.getGroupIncludeFooter()({node:s}))return o}return s.createFooter(),n(s.sibling,o++),o}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(),n=a=>{a&&a.forEach((a=>{const r=()=>{a.expanded=e,n(a.childrenAfterGroup)};if(t){return void(g._.exists(a.childrenAfterGroup)&&r())}if(i){return void(!a.leafGroup&&r())}a.group&&r()}))};this.rootNode&&n(this.rootNode.childrenAfterGroup),this.refreshModel({step:g.ClientSideRowModelSteps.MAP});const a=e?"expandAll":"collapseAll",r={type:g.Events.EVENT_EXPAND_COLLAPSE_ALL,source:a};this.eventService.dispatchEvent(r)}doSort(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})}doRowGrouping(e,t,i,n){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:n}),this.gridOptionsService.get("groupSelectsChildren")){if(this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",i)){const e={type:g.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:g.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(g.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:g.Events.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(e),this.refreshModel({step:g.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((n=>{const a=this.nodeManager.updateRowData(n.rowDataTransaction,void 0);t.push(a),n.callback&&e.push(n.callback.bind(null,a)),"number"==typeof n.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:g.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),n="number"==typeof e.addIndex;return this.commonUpdateRowData([i],t,n),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 n=!this.gridOptionsService.get("suppressAnimationFrame");i&&(t=this.createRowNodeOrder());const a={type:g.Events.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(a),this.refreshModel({step:g.ClientSideRowModelSteps.EVERYTHING,rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,keepEditingRows:!0,animate:n})}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:g.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,g.Autowired)("columnModel")],m.prototype,"columnModel",2),l([(0,g.Autowired)("selectionService")],m.prototype,"selectionService",2),l([(0,g.Autowired)("filterManager")],m.prototype,"filterManager",2),l([(0,g.Autowired)("valueCache")],m.prototype,"valueCache",2),l([(0,g.Autowired)("beans")],m.prototype,"beans",2),l([(0,g.Autowired)("filterStage")],m.prototype,"filterStage",2),l([(0,g.Autowired)("sortStage")],m.prototype,"sortStage",2),l([(0,g.Autowired)("flattenStage")],m.prototype,"flattenStage",2),l([(0,g.Optional)("groupStage")],m.prototype,"groupStage",2),l([(0,g.Optional)("aggregationStage")],m.prototype,"aggregationStage",2),l([(0,g.Optional)("pivotStage")],m.prototype,"pivotStage",2),l([(0,g.Optional)("filterAggregatesStage")],m.prototype,"filterAggregatesStage",2),l([g.PostConstruct],m.prototype,"init",1),m=l([(0,g.Bean)("rowModel")],m);var v=i(3423),f=class extends v.BeanStub{execute(e){const{changedPath:t}=e;this.filterService.filter(t)}};l([(0,v.Autowired)("filterService")],f.prototype,"filterService",2),f=l([(0,v.Bean)("filterStage")],f);var y=i(3423),b=class extends y.BeanStub{execute(e){const t=this.sortController.getSortOptions(),i=y._.exists(t)&&t.length>0,n=i&&y._.exists(e.rowNodeTransactions)&&this.gridOptionsService.get("deltaSort"),a=t.some((e=>this.gridOptionsService.isColumnsSortingCoupledToGroup()?e.column.isPrimary()&&e.column.isRowGroupActive():!!e.column.getColDef().showRowGroup));this.sortService.sort(t,i,n,e.rowNodeTransactions,e.changedPath,a)}};l([(0,y.Autowired)("sortService")],b.prototype,"sortService",2),l([(0,y.Autowired)("sortController")],b.prototype,"sortController",2),b=l([(0,y.Bean)("sortStage")],b);var C=i(3423),w=class extends C.BeanStub{execute(e){const t=e.rowNode,i=[],n=this.columnModel.isPivotMode(),a=n&&t.leafGroup,r=a?[t]:t.childrenAfterSort,o=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(o,r,i,n,0);return!a&&i.length>0&&o.groupIncludeTotalFooter&&(t.createFooter(),this.addRowNodeToRowsToDisplay(o,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,n,a){if(!C._.missingOrEmpty(t))for(let r=0;r<t.length;r++){const o=t[r],s=o.hasChildren(),l=n&&!s,d=e.groupRemoveSingleChildren&&s&&1===o.childrenAfterGroup.length,c=e.groupRemoveLowestSingleChildren&&s&&o.leafGroup&&1===o.childrenAfterGroup.length,g=n&&o.leafGroup,h=e.hideOpenParents&&o.expanded&&!o.master&&!g;if(!(l||h||d||c)&&this.addRowNodeToRowsToDisplay(e,o,i,a),!n||!o.leafGroup)if(s){const t=d||c;if(o.expanded||t){const r=t?a:a+1;this.recursivelyAddToRowsToDisplay(e,o.childrenAfterSort,i,n,r);e.getGroupIncludeFooter({node:o})?(o.createFooter(),this.addRowNodeToRowsToDisplay(e,o.sibling,i,r)):o.destroyFooter()}}else if(o.master&&o.expanded){const t=this.createDetailNode(o);this.addRowNodeToRowsToDisplay(e,t,i,a)}}}addRowNodeToRowsToDisplay(e,t,i,n){i.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:n)}createDetailNode(e){if(C._.exists(e.detailNode))return e.detailNode;const t=new C.RowNode(this.beans);return t.detail=!0,t.selectable=!1,t.parent=e,C._.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,t}};l([(0,C.Autowired)("columnModel")],w.prototype,"columnModel",2),l([(0,C.Autowired)("beans")],w.prototype,"beans",2),w=l([(0,C.Bean)("flattenStage")],w);var S=i(3423),x=class extends S.BeanStub{sort(e,t,i,n,a,r){const o=this.gridOptionsService.get("groupMaintainOrder"),s=this.columnModel.getAllGridColumns().some((e=>e.isRowGroupActive()));let l={};i&&n&&(l=this.calculateDirtyNodes(n));const d=this.columnModel.isPivotMode(),c=this.gridOptionsService.getCallback("postSortRows"),g=n=>{var g;this.pullDownGroupDataForHideOpenParents(n.childrenAfterAggFilter,!0);const h=d&&n.leafGroup;if(o&&s&&!n.leafGroup&&!r){const e=null==(g=this.columnModel.getRowGroupColumns())?void 0:g[n.level+1],t=null===(null==e?void 0:e.getSort()),i=n.childrenAfterAggFilter.slice(0);if(n.childrenAfterSort&&!t){const e={};n.childrenAfterSort.forEach(((t,i)=>{e[t.id]=i})),i.sort(((t,i)=>{var n,a;return(null!=(n=e[t.id])?n:0)-(null!=(a=e[i.id])?a:0)}))}n.childrenAfterSort=i}else n.childrenAfterSort=!t||h?n.childrenAfterAggFilter.slice(0):i?this.doDeltaSort(n,l,a,e):this.rowNodeSorter.doFullSort(n.childrenAfterAggFilter,e);if(n.sibling&&(n.sibling.childrenAfterSort=n.childrenAfterSort),this.updateChildIndexes(n),c){const e={nodes:n.childrenAfterSort};c(e)}};a&&a.forEachChangedNodeDepthFirst(g),this.updateGroupDataForHideOpenParents(a)}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,n){const a=e.childrenAfterAggFilter,r=e.childrenAfterSort;if(!r)return this.rowNodeSorter.doFullSort(a,n);const o={},s=[];a.forEach((e=>{t[e.id]||!i.canSkip(e)?s.push(e):o[e.id]=!0}));const l=r.filter((e=>o[e.id])),d=(e,t)=>({currentPos:t,rowNode:e}),c=s.map(d).sort(((e,t)=>this.rowNodeSorter.compareRowNodes(n,e,t)));return this.mergeSortedArrays(n,c,l.map(d)).map((({rowNode:e})=>e))}mergeSortedArrays(e,t,i){const n=[];let a=0,r=0;for(;a<t.length&&r<i.length;){this.rowNodeSorter.compareRowNodes(e,t[a],i[r])<0?n.push(t[a++]):n.push(i[r++])}for(;a<t.length;)n.push(t[a++]);for(;r<i.length;)n.push(i[r++]);return n}updateChildIndexes(e){if(S._.missing(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let i=0;i<t.length;i++){const n=t[i],a=0===i,r=i===e.childrenAfterSort.length-1;n.setFirstChild(a),n.setLastChild(r),n.setChildIndex(i)}}updateGroupDataForHideOpenParents(e){if(!this.gridOptionsService.get("groupHideOpenParents"))return;if(this.gridOptionsService.get("treeData"))return S._.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")&&!S._.missing(e)&&e.forEach((e=>{this.columnModel.getGroupDisplayColumns().forEach((i=>{const n=i.getColDef().showRowGroup;if("string"!=typeof n)return void console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");const a=n,r=this.columnModel.getPrimaryColumn(a);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,S.Autowired)("columnModel")],x.prototype,"columnModel",2),l([(0,S.Autowired)("rowNodeSorter")],x.prototype,"rowNodeSorter",2),x=l([(0,S.Bean)("sortService")],x);var E=i(3423),k=class extends E.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,n)=>{if(t.childrenAfterGroup)for(let a=0;a<t.childrenAfterGroup.length;a++){const r=t.childrenAfterGroup[a],o=n||this.filterManager.doesRowPassFilter({rowNode:r});r.childrenAfterGroup?e(t.childrenAfterGroup[a],o):i(r,o)}i(t,n)},n=t=>e(t,!1);t.executeFromRootNode(n)}else{const e=e=>i(e,!1);t.forEachChangedNodeDepthFirst(e,!0)}}doingTreeDataFiltering(){return this.gridOptionsService.get("treeData")&&!this.gridOptionsService.get("excludeChildrenWhenTreeDataFiltering")}};l([(0,E.Autowired)("filterManager")],k.prototype,"filterManager",2),k=l([(0,E.Bean)("filterService")],k);var T=i(3423),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,n]=t;this.clientSideRowModel.updateRowData(i,n)}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:[]},n=this.clientSideRowModel.getCopyOfNodesMap(),a=this.gridOptionsService.get("suppressMaintainUnsortedOrder")?void 0:{};return T._.exists(e)&&e.forEach(((e,r)=>{const o=t({data:e,level:0}),s=n[o];if(a&&(a[o]=r),s){s.data!==e&&i.update.push(e),n[o]=void 0}else i.add.push(e)})),T._.iterateObject(n,((e,t)=>{t&&i.remove.push(t.data)})),[i,a]}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 D={version:"31.2.0",moduleName:c.ModuleNames.ClientSideRowModelModule,rowModel:"clientSide",beans:[m,f,b,w,x,k,A]}},3423:function(e,t,i){var n,a=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,h=(e,t,i)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,u=(e,t)=>{for(var i in t||(t={}))c.call(t,i)&&h(e,i,t[i]);if(d)for(var i of d(t))g.call(t,i)&&h(e,i,t[i]);return e},p=(e,t)=>r(e,s(t)),m=(e,t)=>{for(var i in t)a(e,i,{get:t[i],enumerable:!0})},v=(e,t,i,n)=>{for(var r,s=n>1?void 0:n?o(t,i):t,l=e.length-1;l>=0;l--)(r=e[l])&&(s=(n?r(t,i,s):r(s))||s);return n&&s&&a(t,i,s),s},f=(e,t)=>(i,n)=>t(i,n,e),y={};m(y,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>ct,AbstractHeaderCellCtrl:()=>al,AgAbstractField:()=>Ha,AgAbstractLabel:()=>Ba,AgAutocomplete:()=>Sd,AgCheckbox:()=>$a,AgDialog:()=>md,AgGroupComponent:()=>od,AgInputDateField:()=>Ql,AgInputNumberField:()=>dr,AgInputRange:()=>Zl,AgInputTextArea:()=>Xl,AgInputTextField:()=>lr,AgMenuItemComponent:()=>hd,AgMenuItemRenderer:()=>vo,AgMenuList:()=>dd,AgMenuPanel:()=>cd,AgPanel:()=>pd,AgPickerField:()=>Ua,AgPromise:()=>ya,AgPromiseStatus:()=>fa,AgRadioButton:()=>Xa,AgRichSelect:()=>id,AgSelect:()=>ja,AgSlider:()=>ad,AgStackComponentsRegistry:()=>It,AgToggleButton:()=>$l,AlignedGridsService:()=>Rd,AnimateShowChangeCellRenderer:()=>zr,AnimateSlideCellRenderer:()=>Gr,AnimationFrameService:()=>Ll,AutoScrollService:()=>Ho,AutoWidthCalculator:()=>Nl,Autowired:()=>he,BarColumnLabelPlacement:()=>Yc,BaseComponentWrapper:()=>Kc,Bean:()=>ge,BeanStub:()=>rt,Beans:()=>hs,BodyDropPivotTarget:()=>Ks,BodyDropTarget:()=>$s,CellComp:()=>Us,CellCtrl:()=>bs,CellNavigationService:()=>Md,CellPositionUtils:()=>ac,CellRangeType:()=>ss,ChangedPath:()=>Ul,CheckboxCellEditor:()=>mo,CheckboxCellRenderer:()=>po,CheckboxSelectionComponent:()=>Br,ClientSideRowModelSteps:()=>Ol,ColDefUtil:()=>_o,Column:()=>xe,ColumnApi:()=>Ld,ColumnFactory:()=>ot,ColumnGroup:()=>lt,ColumnKeyCreator:()=>P,ColumnModel:()=>Tt,ColumnUtils:()=>Dt,Component:()=>Ta,ComponentUtil:()=>Ft,Context:()=>se,CssClassApplier:()=>vs,CssClassManager:()=>Ca,CtrlsService:()=>pc,DataTypeService:()=>Oc,DateCellEditor:()=>co,DateFilter:()=>ar,DateStringCellEditor:()=>ho,DisplayedGroupCreator:()=>Mt,DragAndDropService:()=>qr,DragService:()=>Wo,DragSourceType:()=>Wr,Environment:()=>Qd,EventService:()=>fe,Events:()=>dt,ExcelFactoryMode:()=>Vo,ExpansionService:()=>Fl,ExpressionService:()=>Fd,FilterManager:()=>Xo,FloatingFilterMapper:()=>No,FocusService:()=>Bd,GROUP_AUTO_COLUMN_ID:()=>ht,Grid:()=>Uc,GridApi:()=>Yo,GridBodyComp:()=>zs,GridBodyCtrl:()=>rs,GridComp:()=>_d,GridCoreCreator:()=>qc,GridCtrl:()=>Gd,GridHeaderComp:()=>xl,GridHeaderCtrl:()=>wl,GridOptionsService:()=>Ac,GroupCellRenderer:()=>Zr,GroupCellRendererCtrl:()=>Xr,GroupInstanceIdCreator:()=>gt,HeaderCellCtrl:()=>cl,HeaderFilterCellComp:()=>Jo,HeaderFilterCellCtrl:()=>sl,HeaderGroupCellCtrl:()=>ul,HeaderNavigationDirection:()=>bl,HeaderNavigationService:()=>Cl,HeaderPositionUtils:()=>cc,HeaderRowComp:()=>tl,HeaderRowContainerComp:()=>yl,HeaderRowContainerCtrl:()=>vl,HeaderRowCtrl:()=>ml,HeaderRowType:()=>el,HorizontalDirection:()=>Ur,HorizontalResizeService:()=>El,KeyCode:()=>Qn,LargeTextCellEditor:()=>Lr,LayoutCssClasses:()=>es,LocaleService:()=>Dc,Logger:()=>zd,LoggerFactory:()=>Nd,ManagedFocusFeature:()=>Ia,MenuService:()=>Il,ModuleNames:()=>ae,ModuleRegistry:()=>oe,MouseEventService:()=>_s,MoveColumnFeature:()=>Ys,NavigationService:()=>Vs,NumberCellEditor:()=>so,NumberFilter:()=>ur,NumberSequence:()=>va,Optional:()=>ue,PaginationProxy:()=>jl,PillDragComp:()=>Ed,PillDropZonePanel:()=>Td,PinnedRowModel:()=>Bl,PopupComponent:()=>Rr,PopupEditorWrapper:()=>Hs,PopupService:()=>fd,PositionableFeature:()=>Ga,PostConstruct:()=>de,PreConstruct:()=>le,PreDestroy:()=>ce,PropertyKeys:()=>Lt,ProvidedColumnGroup:()=>ke,ProvidedFilter:()=>Va,Qualifier:()=>me,QuerySelector:()=>Aa,RefSelector:()=>Da,ResizeObserverService:()=>Pl,RowAnimationCssClasses:()=>ns,RowContainerComp:()=>qs,RowContainerCtrl:()=>Ns,RowContainerName:()=>Rs,RowContainerType:()=>Ps,RowCtrl:()=>Ss,RowHighlightPosition:()=>Bo,RowNode:()=>Vr,RowNodeBlock:()=>ql,RowNodeBlockLoader:()=>Kl,RowNodeSorter:()=>uc,RowPositionUtils:()=>nc,RowRenderer:()=>Gl,ScalarFilter:()=>er,ScrollVisibleService:()=>Gs,SelectCellEditor:()=>Or,SelectableService:()=>Jd,SelectionHandleType:()=>os,ServerSideTransactionResultStatus:()=>Hl,SetLeftFeature:()=>rl,SimpleFilter:()=>Ja,SortController:()=>Vd,SortIndicatorComp:()=>kr,StandardMenuFactory:()=>kl,StylingService:()=>Yl,TabGuardClassNames:()=>Tl,TabGuardComp:()=>Dl,TabGuardCtrl:()=>Al,TabbedLayout:()=>Rl,TemplateService:()=>Id,TextCellEditor:()=>Nr,TextFilter:()=>vr,TextFloatingFilter:()=>wr,Timer:()=>ba,TooltipFeature:()=>xa,TooltipStateManager:()=>Sa,TouchListener:()=>xr,UserComponentFactory:()=>zo,UserComponentRegistry:()=>fo,ValueCache:()=>qd,ValueFormatterService:()=>Vl,ValueParserService:()=>Fc,ValueService:()=>Od,VanillaFrameworkOverrides:()=>Dd,VerticalDirection:()=>Hr,VirtualList:()=>td,VirtualListDragFeature:()=>Ko,_:()=>ma,__FORCE_MODULE_DETECTION:()=>jc,createGrid:()=>Hc,getRowContainerTypeForName:()=>Ls}),e.exports=(n=y,((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of l(t))c.call(e,r)||r===i||a(e,r,{get:()=>t[r],enumerable:!(n=o(t,r))||n.enumerable});return e})(a({},"__esModule",{value:!0}),n));var b={};function C(e){return null==e||""===e?null:e}function w(e,t=!1){return null!=e&&(""!==e||t)}function S(e){return!w(e)}function x(e){return null==e||0===e.length}function E(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function k(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 D(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function M(e,t,i=!1){const n=null==e,a=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),n&&a)return 0;if(n)return-1;if(a)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 R(e){if(e instanceof Set||e instanceof Map){const t=[];return e.forEach((e=>t.push(e))),t}return Object.values(e)}m(b,{attrToBoolean:()=>T,attrToNumber:()=>k,attrToString:()=>A,defaultComparator:()=>M,exists:()=>w,jsonEquals:()=>D,makeNull:()=>C,missing:()=>S,missingOrEmpty:()=>x,toStringOrNull:()=>E,values:()=>R});var P=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=E(e);let i=0;for(;;){let n;if(e?(n=e,0!==i&&(n+="_"+i)):t?(n=t,0!==i&&(n+="_"+i)):n=i,!this.existingKeys[n])return this.existingKeys[n]=!0,String(n);i++}}},L={};function O(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,n]of Object.entries(e))t(i,n)}function F(e){const t={},i=Object.keys(e);for(let n=0;n<i.length;n++){const a=i[n],r=e[a];t[a]=r}return t}function I(e,t){if(!e)return;const i=e,n={};return Object.keys(i).forEach((e=>{if(t&&t.indexOf(e)>=0)return;const a=i[e],r=V(a)&&a.constructor===Object;n[e]=r?I(a):a})),n}function N(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 z(e,t,i=!0,n=!1){w(t)&&O(t,((t,a)=>{let r=e[t];if(r!==a){if(n){if(null==r&&null!=a){"object"==typeof a&&a.constructor===Object&&(r={},e[t]=r)}}V(a)&&V(r)&&!Array.isArray(r)?z(r,a,i,n):(i||void 0!==a)&&(e[t]=a)}}))}function G(e,t,i){if(!t||!e)return;if(!i)return e[t];const n=t.split(".");let a=e;for(let e=0;e<n.length;e++){if(null==a)return;a=a[n[e]]}return a}function _(e,t=[],i){Object.keys(e).forEach((i=>{"object"!=typeof e[i]||t.includes(i)||(e[i]=void 0)}));const n=Object.getPrototypeOf(e),a={};Object.getOwnPropertyNames(n).forEach((e=>{if("function"==typeof n[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))};a[e]={value:t,writable:!0}}})),Object.defineProperties(e,a)}function V(e){return"object"==typeof e&&null!==e}m(L,{cloneObject:()=>F,deepCloneDefinition:()=>I,getAllValuesInObject:()=>N,getValueUsingField:()=>G,isNonNullObject:()=>V,iterateObject:()=>O,mergeDeep:()=>z,removeAllReferences:()=>_});var B={};m(B,{compose:()=>ie,debounce:()=>J,doOnce:()=>U,errorOnce:()=>q,executeAfter:()=>Z,executeInAWhile:()=>Y,executeNextVMTurn:()=>Q,getFunctionName:()=>K,isFunction:()=>j,noop:()=>ne,throttle:()=>ee,waitUntil:()=>te,warnOnce:()=>W});var H={};function U(e,t){H[t]||(e(),H[t]=!0)}function W(e){U((()=>console.warn("AG Grid: "+e)),e)}function q(e){U((()=>console.error("AG Grid: "+e)),e)}function K(e){if(e.name)return e.name;const t=/function\s+([^\(]+)/.exec(e.toString());return t&&2===t.length?t[1].trim():null}function j(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Y(e){Z(e,400)}var $=[],X=!1;function Q(e){$.push(e),X||(X=!0,window.setTimeout((()=>{const e=$.slice();$.length=0,X=!1,e.forEach((e=>e()))}),0))}function Z(e,t=0){e.length>0&&window.setTimeout((()=>e.forEach((e=>e()))),t)}function J(e,t){let i;return function(...n){const a=this;window.clearTimeout(i),i=window.setTimeout((function(){e.apply(a,n)}),t)}}function ee(e,t){let i=0;return function(...n){const a=(new Date).getTime();a-i<t||(i=a,e.apply(this,n))}}function te(e,t,i=100,n){const a=(new Date).getTime();let r=null,o=!1;const s=()=>{const s=(new Date).getTime()-a>i;(e()||s)&&(t(),o=!0,null!=r&&(window.clearInterval(r),r=null),s&&n&&console.warn(n))};s(),o||(r=window.setInterval(s,10))}function ie(...e){return t=>e.reduce(((e,t)=>t(e)),t)}var ne=()=>{},ae=(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))(ae||{}),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,n){e.runVersionChecks(t),void 0!==n?(e.areGridScopedModules=!0,void 0===e.gridModulesMap[n]&&(e.gridModulesMap[n]={}),e.gridModulesMap[n][t.moduleName]=t):e.globalModulesMap[t.moduleName]=t,e.setModuleBased(i)}static __unRegisterGridModules(t){delete e.gridModulesMap[t]}static __registerModules(t,i,n){e.setModuleBased(i),t&&t.forEach((t=>e.__register(t,i,n)))}static isValidModuleVersion(t){const[i,n]=t.version.split(".")||[],[a,r]=e.currentModuleVersion.split(".")||[];return i===a&&n===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,n){var a;if(this.__isRegistered(t,n))return!0;const r=i+t;let o;if(e.isBundled)o=`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==(a=Object.entries(ae).find((([e,i])=>i===t)))?void 0:a[0];o=`AG Grid: unable to use ${i} as the ${r} is not registered${e.areGridScopedModules?` for gridId: ${n}`:""}. 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 o=`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(o)}),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 n;return!!e.globalModulesMap[t]||!!(null==(n=e.gridModulesMap[i])?void 0:n[t])}static __getRegisteredModules(t){return[...R(e.globalModulesMap),...R(e.gridModulesMap[t]||{})]}static __getGridRegisteredModules(t){var i;return R(null!=(i=e.gridModulesMap[t])?i:{})||[]}static __isPackageBased(){return!e.moduleBased}};re.globalModulesMap={},re.gridModulesMap={},re.areGridScopedModules=!1;var oe=re,se=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 R(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"),w(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")}createBeans(){this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),O(this.beanWrappers,((e,t)=>{let i;t.bean.__agBeanMetaData&&t.bean.__agBeanMetaDat