1"use strict";(self.webpackChunkiApartmentApp=self.webpackChunkiApartmentApp||[]).push([[5494],{15494:(fu,pr,rs)=>{rs.d(pr,{$V:()=>oo,xs:()=>ns});var D=rs(54438),mt=rs(43913);let io=(()=>{class Q extends mt.pow{constructor(x){super("angular"),this._ngZone=x,this.isRunningWithinTestZone=!1,this.wrapIncoming=(K,U)=>this.runOutside(K,U),this.wrapOutgoing=K=>this.runInsideAngular(K),this.isRunningWithinTestZone=window?.AG_GRID_UNDER_TEST??!!window?.Zone?.AsyncTestZoneSpec,this.runOutside=this._ngZone?this.isRunningWithinTestZone?(K,U)=>"resize-observer"===U?this._ngZone.runOutsideAngular(K):K():K=>this._ngZone.runOutsideAngular(K):K=>K()}get shouldWrapOutgoing(){return this._ngZone&&D.SKi.isInAngularZone()}isFrameworkComponent(x){if(!x)return!1;const K=x.prototype;return K&&"agInit"in K}runInsideAngular(x){return this._ngZone?this._ngZone.run(x):x()}runOutsideAngular(x,K){return this.runOutside(x,K)}}return Q.\u0275fac=function(x){return new(x||Q)(D.KVO(D.SKi))},Q.\u0275prov=D.jDH({token:Q,factory:Q.\u0275fac}),Q})(),so=(()=>{class Q extends mt.Cf3{setViewContainerRef(x,K){this.viewContainerRef=x,this.angularFrameworkOverrides=K}createWrapper(x,K){let U=this.angularFrameworkOverrides,d=this,Ct=new class Se extends Ci{init(y){U.runInsideAngular(()=>{super.init(y),this._componentRef.changeDetectorRef.detectChanges()})}createComponent(){return U.runInsideAngular(()=>d.createComponent(x))}hasMethod(y){return null!=Ct.getFrameworkComponentInstance()[y]}callMethod(y,_){const Fe=this.getFrameworkComponentInstance();return U.runInsideAngular(()=>Ct.getFrameworkComponentInstance()[y].apply(Fe,_))}addMethod(y,_){Ct[y]=_}};return Ct}createComponent(x){return this.viewContainerRef.createComponent(x)}}return Q.\u0275fac=(()=>{let M;return function(K){return(M||(M=D.xGo(Q)))(K||Q)}})(),Q.\u0275prov=D.jDH({token:Q,factory:Q.\u0275fac}),Q})();class Ci{init(M){this._params=M,this._componentRef=this.createComponent(),this._agAwareComponent=this._componentRef.instance,this._frameworkComponentInstance=this._componentRef.instance,this._eGui=this._componentRef.location.nativeElement,this._agAwareComponent.agInit(this._params)}getGui(){return this._eGui}getRootElement(){return this._eGui.firstChild}destroy(){this._frameworkComponentInstance&&"function"==typeof this._frameworkComponentInstance.destroy&&this._frameworkComponentInstance.destroy(),this._componentRef&&this._componentRef.destroy()}getFrameworkComponentInstance(){return this._frameworkComponentInstance}}let ns=(()=>{class Q{constructor(x,K,U,d){this.viewContainerRef=K,this.angularFrameworkOverrides=U,this.frameworkComponentWrapper=d,this._initialised=!1,this._destroyed=!1,this._fullyReady=mt.oY$.resolve(!0),this.statusBar=void 0,this.sideBar=void 0,this.suppressContextMenu=void 0,this.preventDefaultOnContextMenu=void 0,this.allowContextMenuWithControlKey=void 0,this.columnMenu=void 0,this.suppressMenuHide=void 0,this.enableBrowserTooltips=void 0,this.tooltipTrigger=void 0,this.tooltipShowDelay=void 0,this.tooltipHideDelay=void 0,this.tooltipMouseTrack=void 0,this.tooltipShowMode=void 0,this.tooltipInteraction=void 0,this.popupParent=void 0,this.copyHeadersToClipboard=void 0,this.copyGroupHeadersToClipboard=void 0,this.clipboardDelimiter=void 0,this.suppressCopyRowsToClipboard=void 0,this.suppressCopySingleCellRanges=void 0,this.suppressLastEmptyLineOnPaste=void 0,this.suppressClipboardPaste=void 0,this.suppressClipboardApi=void 0,this.suppressCutToClipboard=void 0,this.columnDefs=void 0,this.defaultColDef=void 0,this.defaultColGroupDef=void 0,this.columnTypes=void 0,this.dataTypeDefinitions=void 0,this.maintainColumnOrder=void 0,this.suppressFieldDotNotation=void 0,this.headerHeight=void 0,this.groupHeaderHeight=void 0,this.floatingFiltersHeight=void 0,this.pivotHeaderHeight=void 0,this.pivotGroupHeaderHeight=void 0,this.allowDragFromColumnsToolPanel=void 0,this.suppressMovableColumns=void 0,this.suppressColumnMoveAnimation=void 0,this.suppressDragLeaveHidesColumns=void 0,this.suppressRowGroupHidesColumns=void 0,this.colResizeDefault=void 0,this.suppressAutoSize=void 0,this.autoSizePadding=void 0,this.skipHeaderOnAutoSize=void 0,this.autoSizeStrategy=void 0,this.components=void 0,this.editType=void 0,this.singleClickEdit=void 0,this.suppressClickEdit=void 0,this.readOnlyEdit=void 0,this.stopEditingWhenCellsLoseFocus=void 0,this.enterMovesDown=void 0,this.enterMovesDownAfterEdit=void 0,this.enterNavigatesVertically=void 0,this.enterNavigatesVerticallyAfterEdit=void 0,this.enableCellEditingOnBackspace=void 0,this.undoRedoCellEditing=void 0,this.undoRedoCellEditingLimit=void 0,this.defaultCsvExportParams=void 0,this.suppressCsvExport=void 0,this.defaultExcelExportParams=void 0,this.suppressExcelExport=void 0,this.excelStyles=void 0,this.quickFilterText=void 0,this.cacheQuickFilter=void 0,this.excludeHiddenColumnsFromQuickFilter=void 0,this.includeHiddenColumnsInQuickFilter=void 0,this.quickFilterParser=void 0,this.quickFilterMatcher=void 0,this.applyQuickFilterBeforePivotOrAgg=void 0,this.excludeChildrenWhenTreeDataFiltering=void 0,this.enableAdvancedFilter=void 0,this.advancedFilterModel=void 0,this.includeHiddenColumnsInAdvancedFilter=void 0,this.advancedFilterParent=void 0,this.advancedFilterBuilderParams=void 0,this.suppressAdvancedFilterEval=void 0,this.enableCharts=void 0,this.chartThemes=void 0,this.customChartThemes=void 0,this.chartThemeOverrides=void 0,this.enableChartToolPanelsButton=void 0,this.suppressChartToolPanelsButton=void 0,this.chartToolPanelsDef=void 0,this.chartMenuItems=void 0,this.loadingCellRenderer=void 0,this.loadingCellRendererParams=void 0,this.loadingCellRendererSelector=void 0,this.localeText=void 0,this.masterDetail=void 0,this.keepDetailRows=void 0,this.keepDetailRowsCount=void 0,this.detailCellRenderer=void 0,this.detailCellRendererParams=void 0,this.detailRowHeight=void 0,this.detailRowAutoHeight=void 0,this.context=void 0,this.alignedGrids=void 0,this.tabIndex=void 0,this.rowBuffer=void 0,this.valueCache=void 0,this.valueCacheNeverExpires=void 0,this.enableCellExpressions=void 0,this.suppressParentsInRowNodes=void 0,this.suppressTouch=void 0,this.suppressFocusAfterRefresh=void 0,this.suppressAsyncEvents=void 0,this.suppressBrowserResizeObserver=void 0,this.suppressPropertyNamesCheck=void 0,this.suppressChangeDetection=void 0,this.debug=void 0,this.overlayLoadingTemplate=void 0,this.loadingOverlayComponent=void 0,this.loadingOverlayComponentParams=void 0,this.suppressLoadingOverlay=void 0,this.overlayNoRowsTemplate=void 0,this.noRowsOverlayComponent=void 0,this.noRowsOverlayComponentParams=void 0,this.suppressNoRowsOverlay=void 0,this.pagination=void 0,this.paginationPageSize=void 0,this.paginationPageSizeSelector=void 0,this.paginationAutoPageSize=void 0,this.paginateChildRows=void 0,this.suppressPaginationPanel=void 0,this.pivotMode=void 0,this.pivotPanelShow=void 0,this.pivotMaxGeneratedColumns=void 0,this.pivotDefaultExpanded=void 0,this.pivotColumnGroupTotals=void 0,this.pivotRowTotals=void 0,this.pivotSuppressAutoColumn=void 0,this.suppressExpandablePivotGroups=void 0,this.functionsReadOnly=void 0,this.aggFuncs=void 0,this.suppressAggFuncInHeader=void 0,this.alwaysAggregateAtRootLevel=void 0,this.suppressAggAtRootLevel=void 0,this.aggregateOnlyChangedColumns=void 0,this.suppressAggFilteredOnly=void 0,this.removePivotHeaderRowWhenSingleValueColumn=void 0,this.animateRows=void 0,this.enableCellChangeFlash=void 0,this.cellFlashDuration=void 0,this.cellFlashDelay=void 0,this.cellFadeDuration=void 0,this.cellFadeDelay=void 0,this.allowShowChangeAfterFilter=void 0,this.domLayout=void 0,this.ensureDomOrder=void 0,this.enableRtl=void 0,this.suppressColumnVirtualisation=void 0,this.suppressMaxRenderedRowRestriction=void 0,this.suppressRowVirtualisation=void 0,this.rowDragManaged=void 0,this.suppressRowDrag=void 0,this.suppressMoveWhenRowDragging=void 0,this.rowDragEntireRow=void 0,this.rowDragMultiRow=void 0,this.rowDragText=void 0,this.fullWidthCellRenderer=void 0,this.fullWidthCellRendererParams=void 0,this.embedFullWidthRows=void 0,this.suppressGroupMaintainValueType=void 0,this.groupDisplayType=void 0,this.groupDefaultExpanded=void 0,this.autoGroupColumnDef=void 0,this.groupMaintainOrder=void 0,this.groupSelectsChildren=void 0,this.groupLockGroupColumns=void 0,this.groupAggFiltering=void 0,this.groupIncludeFooter=void 0,this.groupIncludeTotalFooter=void 0,this.groupTotalRow=void 0,this.grandTotalRow=void 0,this.suppressStickyTotalRow=void 0,this.groupSuppressBlankHeader=void 0,this.groupSelectsFiltered=void 0,this.showOpenedGroup=void 0,this.groupRemoveSingleChildren=void 0,this.groupRemoveLowestSingleChildren=void 0,this.groupHideOpenParents=void 0,this.groupAllowUnbalanced=void 0,this.rowGroupPanelShow=void 0,this.groupRowRenderer=void 0,this.groupRowRendererParams=void 0,this.suppressMakeColumnVisibleAfterUnGroup=void 0,this.treeData=void 0,this.rowGroupPanelSuppressSort=void 0,this.suppressGroupRowsSticky=void 0,this.pinnedTopRowData=void 0,this.pinnedBottomRowData=void 0,this.rowModelType=void 0,this.rowData=void 0,this.asyncTransactionWaitMillis=void 0,this.suppressModelUpdateAfterUpdateTransaction=void 0,this.datasource=void 0,this.cacheOverflowSize=void 0,this.infiniteInitialRowCount=void 0,this.serverSideInitialRowCount=void 0,this.suppressServerSideInfiniteScroll=void 0,this.suppressServerSideFullWidthLoadingRow=void 0,this.cacheBlockSize=void 0,this.maxBlocksInCache=void 0,this.maxConcurrentDatasourceRequests=void 0,this.blockLoadDebounceMillis=void 0,this.purgeClosedRowNodes=void 0,this.serverSideDatasource=void 0,this.serverSideSortAllLevels=void 0,this.serverSideEnableClientSideSort=void 0,this.serverSideOnlyRefreshFilteredGroups=void 0,this.serverSideFilterAllLevels=void 0,this.serverSideSortOnServer=void 0,this.serverSideFilterOnServer=void 0,this.serverSidePivotResultFieldSeparator=void 0,this.viewportDatasource=void 0,this.viewportRowModelPageSize=void 0,this.viewportRowModelBufferSize=void 0,this.alwaysShowHorizontalScroll=void 0,this.alwaysShowVerticalScroll=void 0,this.debounceVerticalScrollbar=void 0,this.suppressHorizontalScroll=void 0,this.suppressScrollOnNewData=void 0,this.suppressScrollWhenPopupsAreOpen=void 0,this.suppressAnimationFrame=void 0,this.suppressMiddleClickScrolls=void 0,this.suppressPreventDefaultOnMouseWheel=void 0,this.scrollbarWidth=void 0,this.rowSelection=void 0,this.rowMultiSelectWithClick=void 0,this.suppressRowDeselection=void 0,this.suppressRowClickSelection=void 0,this.suppressCellFocus=void 0,this.suppressHeaderFocus=void 0,this.suppressMultiRangeSelection=void 0,this.enableCellTextSelection=void 0,this.enableRangeSelection=void 0,this.enableRangeHandle=void 0,this.enableFillHandle=void 0,this.fillHandleDirection=void 0,this.suppressClearOnFillReduction=void 0,this.sortingOrder=void 0,this.accentedSort=void 0,this.unSortIcon=void 0,this.suppressMultiSort=void 0,this.alwaysMultiSort=void 0,this.multiSortKey=void 0,this.suppressMaintainUnsortedOrder=void 0,this.icons=void 0,this.rowHeight=void 0,this.rowStyle=void 0,this.rowClass=void 0,this.rowClassRules=void 0,this.suppressRowHoverHighlight=void 0,this.suppressRowTransform=void 0,this.columnHoverHighlight=void 0,this.gridId=void 0,this.deltaSort=void 0,this.treeDataDisplayType=void 0,this.functionsPassive=void 0,this.enableGroupEdit=void 0,this.initialState=void 0,this.getContextMenuItems=void 0,this.getMainMenuItems=void 0,this.postProcessPopup=void 0,this.processUnpinnedColumns=void 0,this.processCellForClipboard=void 0,this.processHeaderForClipboard=void 0,this.processGroupHeaderForClipboard=void 0,this.processCellFromClipboard=void 0,this.sendToClipboard=void 0,this.processDataFromClipboard=void 0,this.isExternalFilterPresent=void 0,this.doesExternalFilterPass=void 0,this.getChartToolbarItems=void 0,this.createChartContainer=void 0,this.navigateToNextHeader=void 0,this.tabToNextHeader=void 0,this.navigateToNextCell=void 0,this.tabToNextCell=void 0,this.getLocaleText=void 0,this.getDocument=void 0,this.paginationNumberFormatter=void 0,this.getGroupRowAgg
1=void 0,this.isGroupOpenByDefault=void 0,this.initialGroupOrderComparator=void 0,this.processPivotResultColDef=void 0,this.processPivotResultColGroupDef=void 0,this.getDataPath=void 0,this.getChildCount=void 0,this.getServerSideGroupLevelParams=void 0,this.isServerSideGroupOpenByDefault=void 0,this.isApplyServerSideTransaction=void 0,this.isServerSideGroup=void 0,this.getServerSideGroupKey=void 0,this.getBusinessKeyForNode=void 0,this.getRowId=void 0,this.resetRowDataOnUpdate=void 0,this.processRowPostCreate=void 0,this.isRowSelectable=void 0,this.isRowMaster=void 0,this.fillOperation=void 0,this.postSortRows=void 0,this.getRowStyle=void 0,this.getRowClass=void 0,this.getRowHeight=void 0,this.isFullWidthRow=void 0,this.toolPanelVisibleChanged=new D.bkB,this.toolPanelSizeChanged=new D.bkB,this.columnMenuVisibleChanged=new D.bkB,this.contextMenuVisibleChanged=new D.bkB,this.cutStart=new D.bkB,this.cutEnd=new D.bkB,this.pasteStart=new D.bkB,this.pasteEnd=new D.bkB,this.columnVisible=new D.bkB,this.columnPinned=new D.bkB,this.columnResized=new D.bkB,this.columnMoved=new D.bkB,this.columnValueChanged=new D.bkB,this.columnPivotModeChanged=new D.bkB,this.columnPivotChanged=new D.bkB,this.columnGroupOpened=new D.bkB,this.newColumnsLoaded=new D.bkB,this.gridColumnsChanged=new D.bkB,this.displayedColumnsChanged=new D.bkB,this.virtualColumnsChanged=new D.bkB,this.columnEverythingChanged=new D.bkB,this.columnHeaderMouseOver=new D.bkB,this.columnHeaderMouseLeave=new D.bkB,this.columnHeaderClicked=new D.bkB,this.columnHeaderContextMenu=new D.bkB,this.componentStateChanged=new D.bkB,this.cellValueChanged=new D.bkB,this.cellEditRequest=new D.bkB,this.rowValueChanged=new D.bkB,this.cellEditingStarted=new D.bkB,this.cellEditingStopped=new D.bkB,this.rowEditingStarted=new D.bkB,this.rowEditingStopped=new D.bkB,this.undoStarted=new D.bkB,this.undoEnded=new D.bkB,this.redoStarted=new D.bkB,this.redoEnded=new D.bkB,this.rangeDeleteStart=new D.bkB,this.rangeDeleteEnd=new D.bkB,this.fillStart=new D.bkB,this.fillEnd=new D.bkB,this.filterOpened=new D.bkB,this.filterChanged=new D.bkB,this.filterModified=new D.bkB,this.advancedFilterBuilderVisibleChanged=new D.bkB,this.chartCreated=new D.bkB,this.chartRangeSelectionChanged=new D.bkB,this.chartOptionsChanged=new D.bkB,this.chartDestroyed=new D.bkB,this.cellKeyDown=new D.bkB,this.gridReady=new D.bkB,this.gridPreDestroyed=new D.bkB,this.firstDataRendered=new D.bkB,this.gridSizeChanged=new D.bkB,this.modelUpdated=new D.bkB,this.virtualRowRemoved=new D.bkB,this.viewportChanged=new D.bkB,this.bodyScroll=new D.bkB,this.bodyScrollEnd=new D.bkB,this.dragStarted=new D.bkB,this.dragStopped=new D.bkB,this.stateUpdated=new D.bkB,this.paginationChanged=new D.bkB,this.rowDragEnter=new D.bkB,this.rowDragMove=new D.bkB,this.rowDragLeave=new D.bkB,this.rowDragEnd=new D.bkB,this.columnRowGroupChanged=new D.bkB,this.rowGroupOpened=new D.bkB,this.expandOrCollapseAll=new D.bkB,this.pivotMaxColumnsExceeded=new D.bkB,this.pinnedRowDataChanged=new D.bkB,this.rowDataUpdated=new D.bkB,this.asyncTransactionsFlushed=new D.bkB,this.storeRefreshed=new D.bkB,this.cellClicked=new D.bkB,this.cellDoubleClicked=new D.bkB,this.cellFocused=new D.bkB,this.cellMouseOver=new D.bkB,this.cellMouseOut=new D.bkB,this.cellMouseDown=new D.bkB,this.rowClicked=new D.bkB,this.rowDoubleClicked=new D.bkB,this.rowSelected=new D.bkB,this.selectionChanged=new D.bkB,this.cellContextMenu=new D.bkB,this.rangeSelectionChanged=new D.bkB,this.tooltipShow=new D.bkB,this.tooltipHide=new D.bkB,this.sortChanged=new D.bkB,this.columnRowGroupChangeRequest=new D.bkB,this.columnPivotChangeRequest=new D.bkB,this.columnValueChangeRequest=new D.bkB,this.columnAggFuncChangeRequest=new D.bkB,this._nativeElement=x.nativeElement}ngAfterViewInit(){this.angularFrameworkOverrides.runOutsideAngular(()=>{this.frameworkComponentWrapper.setViewContainerRef(this.viewContainerRef,this.angularFrameworkOverrides);const x=mt.kNx.combineAttributesAndGridOptions(this.gridOptions,this);this.gridParams={globalEventListener:this.globalEventListener.bind(this),frameworkOverrides:this.angularFrameworkOverrides,providedBeanInstances:{frameworkComponentWrapper:this.frameworkComponentWrapper},modules:this.modules||[]};const K=(0,mt.Dvw)(this._nativeElement,x,this.gridParams);K&&(this.api=K,this.columnApi=new mt.jf3(K));const U=this.gridPreDestroyed;(U.observed??U.observers.length>0)&&console.warn('AG Grid: gridPreDestroyed event listener registered via (gridPreDestroyed)="method($event)" will be ignored! Please assign via gridOptions.gridPreDestroyed and pass to the grid as [gridOptions]="gridOptions"'),this._initialised=!0,this._fullyReady.resolveNow(null,d=>d)})}ngOnChanges(x){this._initialised&&this.angularFrameworkOverrides.runOutsideAngular(()=>{const K={};
1Object.entries(x).forEach(([U,d])=>{K[U]=d.currentValue}),mt.kNx.processOnChange(K,this.api)})}ngOnDestroy(){this._initialised&&(this._destroyed=!0,this.api?.destroy())}isEmitterUsed(x){const U=this[x],d=U?.observed??U?.observers?.length>0,Se=`on${x.charAt(0).toUpperCase()}${x.substring(1)}`;return d||!!this.gridOptions&&!!this.gridOptions[Se]}globalEventListener(x,K){if(this._destroyed)return;const U=this[x];if(U&&this.isEmitterUsed(x)){const d=()=>this.angularFrameworkOverrides.runInsideAngular(()=>U.emit(K));"gridReady"===x?this._fullyReady.then(()=>d()):d()}}}return Q.\u0275fac=function(x){return new(x||Q)(D.rXU(D.aKT),D.rXU(D.c1b),D.rXU(io),D.rXU(so))},Q.\u0275cmp=D.VBU({type:Q,selectors:[["ag-grid-angular"]],inputs:{gridOptions:"gridOptions",modules:"modules",statusBar:"statusBar",sideBar:"sideBar",suppressContextMenu:"suppressContextMenu",preventDefaultOnContextMenu:"preventDefaultOnContextMenu",allowContextMenuWithControlKey:"allowContextMenuWithControlKey",columnMenu:"columnMenu",suppressMenuHide:"suppressMenuHide",enableBrowserTooltips:"enableBrowserTooltips",tooltipTrigger:"tooltipTrigger",tooltipShowDelay:"tooltipShowDelay",tooltipHideDelay:"tooltipHideDelay",tooltipMouseTrack:"tooltipMouseTrack",tooltipShowMode:"tooltipShowMode",tooltipInteraction:"tooltipInteraction",popupParent:"popupParent",copyHeadersToClipboard:"copyHeadersToClipboard",copyGroupHeadersToClipboard:"copyGroupHeadersToClipboard",clipboardDelimiter:"clipboardDelimiter",suppressCopyRowsToClipboard:"suppressCopyRowsToClipboard",suppressCopySingleCellRanges:"suppressCopySingleCellRanges",suppressLastEmptyLineOnPaste:"suppressLastEmptyLineOnPaste",suppressClipboardPaste:"suppressClipboardPaste",suppressClipboardApi:"suppressClipboardApi",suppressCutToClipboard:"suppressCutToClipboard",columnDefs:"columnDefs",defaultColDef:"defaultColDef",defaultColGroupDef:"defaultColGroupDef",columnTypes:"columnTypes",dataTypeDefinitions:"dataTypeDefinitions",maintainColumnOrder:"maintainColumnOrder",suppressFieldDotNotation:"suppressFieldDotNotation",headerHeight:"headerHeight",groupHeaderHeight:"groupHeaderHeight",floatingFiltersHeight:"floatingFiltersHeight",pivotHeaderHeight:"pivotHeaderHeight",pivotGroupHeaderHeight:"pivotGroupHeaderHeight",allowDragFromColumnsToolPanel:"allowDragFromColumnsToolPanel",suppressMovableColumns:"suppressMovableColumns",suppressColumnMoveAnimation:"suppressColumnMoveAnimation",suppressDragLeaveHidesColumns:"suppressDragLeaveHidesColumns",suppressRowGroupHidesColumns:"suppressRowGroupHidesColumns",colResizeDefault:"colResizeDefault",suppressAutoSize:"suppressAutoSize",autoSizePadding:"autoSizePadding",skipHeaderOnAutoSize:"skipHeaderOnAutoSize",autoSizeStrategy:"autoSizeStrategy",components:"components",editType:"editType",singleClickEdit:"singleClickEdit",suppressClickEdit:"suppressClickEdit",readOnlyEdit:"readOnlyEdit",stopEditingWhenCellsLoseFocus:"stopEditingWhenCellsLoseFocus",enterMovesDown:"enterMovesDown",enterMovesDownAfterEdit:"enterMovesDownAfterEdit",enterNavigatesVertically:"enterNavigatesVertically",enterNavigatesVerticallyAfterEdit:"enterNavigatesVerticallyAfterEdit",enableCellEditingOnBackspace:"enableCellEditingOnBackspace",undoRedoCellEditing:"undoRedoCellEditing",undoRedoCellEditingLimit:"undoRedoCellEditingLimit",defaultCsvExportParams:"defaultCsvExportParams",suppressCsvExport:"suppressCsvExport",defaultExcelExportParams:"defaultExcelExportParams",suppressExcelExport:"suppressExcelExport",excelStyles:"excelStyles",quickFilterText:"quickFilterText",cacheQuickFilter:"cacheQuickFilter",excludeHiddenColumnsFromQuickFilter:"excludeHiddenColumnsFromQuickFilter",includeHiddenColumnsInQuickFilter:"includeHiddenColumnsInQuickFilter",quickFilterParser:"quickFilterParser",quickFilterMatcher:"quickFilterMatcher",applyQuickFilterBeforePivotOrAgg:"applyQuickFilterBeforePivotOrAgg",excludeChildrenWhenTreeDataFiltering:"excludeChildrenWhenTreeDataFiltering",enableAdvancedFilter:"enableAdvancedFilter",advancedFilterModel:"advancedFilterModel",includeHiddenColumnsInAdvancedFilter:"includeHiddenColumnsInAdvancedFilter",advancedFilterParent:"advancedFilterParent",advancedFilterBuilderParams:"advancedFilterBuilderParams",suppressAdvancedFilterEval:"suppressAdvancedFilterEval",enableCharts:"enableCharts",chartThemes:"chartThemes",customChartThemes:"customChartThemes",chartThemeOverrides:"chartThemeOverrides",enableChartToolPanelsButton:"enableChartToolPanelsButton",suppressChartToolPanelsButton:"suppressChartToolPanelsButton",chartToolPanelsDef:"chartToolPanelsDef",chartMenuItems:"chartMenuItems",loadingCellRenderer:"loadingCellRenderer",loadingCellRendererParams:"loadingCellRendererParams",loadingCellRendererSelector:"loadingCellRendererSelector",localeText:"localeText",masterDetail:"masterDetail",keepDetailRows:"keepDetailRows",keepDetailRowsCount:"keepDetailRowsCount",detailCellRenderer:"detailCellRenderer",detailCellRendererParams:"detailCellRendererParams",detailRowHeight:"detailRowHeight",detailRowAutoHeight:"detailRowAutoHeight",context:"context",alignedGrids:"al
1ignedGrids",tabIndex:"tabIndex",rowBuffer:"rowBuffer",valueCache:"valueCache",valueCacheNeverExpires:"valueCacheNeverExpires",enableCellExpressions:"enableCellExpressions",suppressParentsInRowNodes:"suppressParentsInRowNodes",suppressTouch:"suppressTouch",suppressFocusAfterRefresh:"suppressFocusAfterRefresh",suppressAsyncEvents:"suppressAsyncEvents",suppressBrowserResizeObserver:"suppressBrowserResizeObserver",suppressPropertyNamesCheck:"suppressPropertyNamesCheck",suppressChangeDetection:"suppressChangeDetection",debug:"debug",overlayLoadingTemplate:"overlayLoadingTemplate",loadingOverlayComponent:"loadingOverlayComponent",loadingOverlayComponentParams:"loadingOverlayComponentParams",suppressLoadingOverlay:"suppressLoadingOverlay",overlayNoRowsTemplate:"overlayNoRowsTemplate",noRowsOverlayComponent:"noRowsOverlayComponent",noRowsOverlayComponentParams:"noRowsOverlayComponentParams",suppressNoRowsOverlay:"suppressNoRowsOverlay",pagination:"pagination",paginationPageSize:"paginationPageSize",paginationPageSizeSelector:"paginationPageSizeSelector",paginationAutoPageSize:"paginationAutoPageSize",paginateChildRows:"paginateChildRows",suppressPaginationPanel:"suppressPaginationPanel",pivotMode:"pivotMode",pivotPanelShow:"pivotPanelShow",pivotMaxGeneratedColumns:"pivotMaxGeneratedColumns",pivotDefaultExpanded:"pivotDefaultExpanded",pivotColumnGroupTotals:"pivotColumnGroupTotals",pivotRowTotals:"pivotRowTotals",pivotSuppressAutoColumn:"pivotSuppressAutoColumn",suppressExpandablePivotGroups:"suppressExpandablePivotGroups",functionsReadOnly:"functionsReadOnly",aggFuncs:"aggFuncs",suppressAggFuncInHeader:"suppressAggFuncInHeader",alwaysAggregateAtRootLevel:"alwaysAggregateAtRootLevel",suppressAggAtRootLevel:"suppressAggAtRootLevel",aggregateOnlyChangedColumns:"aggregateOnlyChangedColumns",suppressAggFilteredOnly:"suppressAggFilteredOnly",removePivotHeaderRowWhenSingleValueColumn:"removePivotHeaderRowWhenSingleValueColumn",animateRows:"animateRows",enableCellChangeFlash:"enableCellChangeFlash",cellFlashDuration:"cellFlashDuration",cellFlashDelay:"cellFlashDelay",cellFadeDuration:"cellFadeDuration",cellFadeDelay:"cellFadeDelay",allowShowChangeAfterFilter:"allowShowChangeAfterFilter",domLayout:"domLayout",ensureDomOrder:"ensureDomOrder",enableRtl:"enableRtl",suppressColumnVirtualisation:"suppressColumnVirtualisation",suppressMaxRenderedRowRestriction:"suppressMaxRenderedRowRestriction",suppressRowVirtualisation:"suppressRowVirtualisation",rowDragManaged:"rowDragManaged",suppressRowDrag:"suppressRowDrag",suppressMoveWhenRowDragging:"suppressMoveWhenRowDragging",rowDragEntireRow:"rowDragEntireRow",rowDragMultiRow:"rowDragMultiRow",rowDragText:"rowDragText",fullWidthCellRenderer:"fullWidthCellRenderer",fullWidthCellRendererParams:"fullWidthCellRendererParams",embedFullWidthRows:"embedFullWidthRows",suppressGroupMaintainValueType:"suppressGroupMaintainValueType",groupDisplayType:"groupDisplayType",groupDefaultExpanded:"groupDefaultExpanded",autoGroupColumnDef:"autoGroupColumnDef",groupMaintainOrder:"groupMaintainOrder",groupSelectsChildren:"groupSelectsChildren",groupLockGroupColumns:"groupLockGroupColumns",groupAggFiltering:"groupAggFiltering",groupIncludeFooter:"groupIncludeFooter",groupIncludeTotalFooter:"groupIncludeTotalFooter",groupTotalRow:"groupTotalRow",grandTotalRow:"grandTotalRow",suppressStickyTotalRow:"suppressStickyTotalRow",groupSuppressBlankHeader:"groupSuppressBlankHeader",groupSelectsFiltered:"groupSelectsFiltered",showOpenedGroup:"showOpenedGroup",groupRemoveSingleChildren:"groupRemoveSingleChildren",groupRemoveLowestSingleChildren:"groupRemoveLowestSingleChildren",groupHideOpenParents:"groupHideOpenParents",groupAllowUnbalanced:"groupAllowUnbalanced",rowGroupPanelShow:"rowGroupPanelShow",groupRowRenderer:"groupRowRenderer",groupRowRendererParams:"groupRowRendererParams",suppressMakeColumnVisibleAfterUnGroup:"suppressMakeColumnVisibleAfterUnGroup",treeData:"treeData",rowGroupPanelSuppressSort:"rowGroupPanelSuppressSort",suppressGroupRowsSticky:"suppressGroupRowsSticky",pinnedTopRowData:"pinnedTopRowData",pinnedBottomRowData:"pinnedBottomRowData",rowModelType:"rowModelType",rowData:"rowData",asyncTransactionWaitMillis:"asyncTransactionWaitMillis",suppressModelUpdateAfterUpdateTransaction:"suppressModelUpdateAfterUpdateTransaction",datasource:"datasource",cac
1heOverflowSize:"cacheOverflowSize",infiniteInitialRowCount:"infiniteInitialRowCount",serverSideInitialRowCount:"serverSideInitialRowCount",suppressServerSideInfiniteScroll:"suppressServerSideInfiniteScroll",suppressServerSideFullWidthLoadingRow:"suppressServerSideFullWidthLoadingRow",cacheBlockSize:"cacheBlockSize",maxBlocksInCache:"maxBlocksInCache",maxConcurrentDatasourceRequests:"maxConcurrentDatasourceRequests",blockLoadDebounceMillis:"blockLoadDebounceMillis",purgeClosedRowNodes:"purgeClosedRowNodes",serverSideDatasource:"serverSideDatasource",serverSideSortAllLevels:"serverSideSortAllLevels",serverSideEnableClientSideSort:"serverSideEnableClientSideSort",serverSideOnlyRefreshFilteredGroups:"serverSideOnlyRefreshFilteredGroups",serverSideFilterAllLevels:"serverSideFilterAllLevels",serverSideSortOnServer:"serverSideSortOnServer",serverSideFilterOnServer:"serverSideFilterOnServer",serverSidePivotResultFieldSeparator:"serverSidePivotResultFieldSeparator",viewportDatasource:"viewportDatasource",viewportRowModelPageSize:"viewportRowModelPageSize",viewportRowModelBufferSize:"viewportRowModelBufferSize",alwaysShowHorizontalScroll:"alwaysShowHorizontalScroll",alwaysShowVerticalScroll:"alwaysShowVerticalScroll",debounceVerticalScrollbar:"debounceVerticalScrollbar",suppressHorizontalScroll:"suppressHorizontalScroll",suppressScrollOnNewData:"suppressScrollOnNewData",suppressScrollWhenPopupsAreOpen:"suppressScrollWhenPopupsAreOpen",suppressAnimationFrame:"suppressAnimationFrame",suppressMiddleClickScrolls:"suppressMiddleClickScrolls",suppressPreventDefaultOnMouseWheel:"suppressPreventDefaultOnMouseWheel",scrollbarWidth:"scrollbarWidth",rowSelection:"rowSelection",rowMultiSelectWithClick:"rowMultiSelectWithClick",suppressRowDeselection:"suppressRowDeselection",suppressRowClickSelection:"suppressRowClickSelection",suppressCellFocus:"suppressCellFocus",suppressHeaderFocus:"suppressHeaderFocus",suppressMultiRangeSelection:"suppressMultiRangeSelection",enableCellTextSelection:"enableCellTextSelection",enableRangeSelection:"enableRangeSelection",enableRangeHandle:"enableRangeHandle",enableFillHandle:"enableFillHandle",fillHandleDirection:"fillHandleDirection",suppressClearOnFillReduction:"suppressClearOnFillReduction",sortingOrder:"sortingOrder",accentedSort:"accentedSort",unSortIcon:"unSortIcon",suppressMultiSort:"suppressMultiSort",alwaysMultiSort:"alwaysMultiSort",multiSortKey:"multiSortKey",suppressMaintainUnsortedOrder:"suppressMaintainUnsortedOrder",icons:"icons",rowHeight:"rowHeight",rowStyle:"rowStyle",rowClass:"rowClass",rowClassRules:"rowClassRules",suppressRowHoverHighlight:"suppressRowHoverHighlight",suppressRowTransform:"suppressRowTransform",columnHoverHighlight:"columnHoverHighlight",gridId:"gridId",deltaSort:"deltaSort",treeDataDisplayType:"treeDataDisplayType",functionsPassive:"functionsPassive",enableGroupEdit:"enableGroupEdit",initialState:"initialState",getContextMenuItems:"getContextMenuItems",getMainMenuItems:"getMainMenuItems",postProcessPopup:"postProcessPopup",processUnpinnedColumns:"processUnpinnedColumns",processCellForClipboard:"processCellForClipboard",processHeaderForClipboard:"processHeaderForClipboard",processGroupHeaderForClipboard:"processGroupHeaderForClipboard",processCellFromClipboard:"processCellFromClipboard",sendToClipboard:"sendToClipboard",processDataFromClipboard:"processDataFromClipboard",isExternalFilterPresent:"isExternalFilterPresent",doesExternalFilterPass:"doesExternalFilterPass",getChartToolbarItems:"getChartToolbarItems",createChartContainer:"createChartContainer",navigateToNextHeader:"navigateToNextHeader",tabToNextHeader:"tabToNextHeader",navigateToNextCell:"navigateToNextCell",tabToNextCell:"tabToNextCell",getLocaleText:"getLocaleText",getDocument:"getDocument",paginationNumberFormatter:"paginationNumberFormatter",getGroupRowAgg:"getGroupRowAgg",isGroupOpenByDefault:"isGroupOpenByDefault",initialGroupOrderComparator:"initialGroupOrderComparator",processPivotResultColDef:"processPivotResultColDef",processPivotResultColGroupDef:"processPivotResultColGroupDef",getDataPath:"getDataPath",getChildCount:"getChildCount",getServerSideGroupLevelParams:"getServerSideGroupLevelParams",isServerSideGroupOpenByDefault:"isServerSideGroupOpenByDefault",isApplyServerSideTransaction:"isApplyServerSideTransaction",isServerSideGroup:"isServerSideGroup",getServerSideGroupKey:"getServerSideGroupKey",getBusinessKeyForNode:"getBusinessKeyForNode",getRowId:"getRowId",resetRowDataOnUpdate:"resetRowDataOnUpdate",processRowPostCreate:"processRowPostCreate",isRowSelectable:"isRowSelectable",isRowMaster:"isRowMaster",fillOperation:"fillOperation",postSortRows:"postSortRows",getRowStyle:"getRowStyle",getRowClass:"getRowClass",getRowHeight:"getRowHeight",isFullWidthRow:"isFullWidthRow"},outputs:{toolPanelVisibleChanged:"toolPanelVisibleChanged",toolPanelSizeChanged:"toolPanelSizeChanged",columnMenuVisibleChanged:"columnMenuVisibleChanged",contextMenuVisibleChanged:"contextMenuVisibleChanged",cutStart:"cutStart",cutEnd:"cutEnd",pasteStart:"pasteStart",pasteEnd:"pasteEnd",columnVisible:"columnVisible",columnPinned:"columnPinned",columnResized:"columnResized",columnMoved:"columnMoved",columnValueChanged:"columnValueChanged",columnPivotModeChanged:"columnPivotModeChanged",columnPivotChanged:"columnPivotChanged",columnGroupOpened:"columnGroupOpened",newColumnsLoaded:"newColumnsLoaded",gridColumnsChanged:"gridColumnsChanged",displayedColumnsChanged:"displayedColumnsChanged",virtualColumnsChanged:"virtualColumnsChanged",columnEverythingChanged:"columnEverythingChanged",columnHeaderMouseOver:"columnHeaderMouseOver",columnHeaderMouseLeave:"columnHeaderMouseLeave",columnHeaderClicked:"columnHeaderClicked",columnHeaderContextMenu:"columnHeaderContextMenu",componentStateChanged:"componentStateChanged",cellValueChanged:"cellV
1alueChanged",cellEditRequest:"cellEditRequest",rowValueChanged:"rowValueChanged",cellEditingStarted:"cellEditingStarted",cellEditingStopped:"cellEditingStopped",rowEditingStarted:"rowEditingStarted",rowEditingStopped:"rowEditingStopped",undoStarted:"undoStarted",undoEnded:"undoEnded",redoStarted:"redoStarted",redoEnded:"redoEnded",rangeDeleteStart:"rangeDeleteStart",rangeDeleteEnd:"rangeDeleteEnd",fillStart:"fillStart",fillEnd:"fillEnd",filterOpened:"filterOpened",filterChanged:"filterChanged",filterModified:"filterModified",advancedFilterBuilderVisibleChanged:"advancedFilterBuilderVisibleChanged",chartCreated:"chartCreated",chartRangeSelectionChanged:"chartRangeSelectionChanged",chartOptionsChanged:"chartOptionsChanged",chartDestroyed:"chartDestroyed",cellKeyDown:"cellKeyDown",gridReady:"gridReady",gridPreDestroyed:"gridPreDestroyed",firstDataRendered:"firstDataRendered",gridSizeChanged:"gridSizeChanged",modelUpdated:"modelUpdated",virtualRowRemoved:"virtualRowRemoved",viewportChanged:"viewportChanged",bodyScroll:"bodyScroll",bodyScrollEnd:"bodyScrollEnd",dragStarted:"dragStarted",dragStopped:"dragStopped",stateUpdated:"stateUpdated",paginationChanged:"paginationChanged",rowDragEnter:"rowDragEnter",rowDragMove:"rowDragMove",rowDragLeave:"rowDragLeave",rowDragEnd:"rowDragEnd",columnRowGroupChanged:"columnRowGroupChanged",rowGroupOpened:"rowGroupOpened",expandOrCollapseAll:"expandOrCollapseAll",pivotMaxColumnsExceeded:"pivotMaxColumnsExceeded",pinnedRowDataChanged:"pinnedRowDataChanged",rowDataUpdated:"rowDataUpdated",asyncTransactionsFlushed:"asyncTransactionsFlushed",storeRefreshed:"storeRefreshed",cellClicked:"cellClicked",cellDoubleClicked:"cellDoubleClicked",cellFocused:"cellFocused",cellMouseOver:"cellMouseOver",cellMouseOut:"cellMouseOut",cellMouseDown:"cellMouseDown",rowClicked:"rowClicked",rowDoubleClicked:"rowDoubleClicked",rowSelected:"rowSelected",selectionChanged:"selectionChanged",cellContextMenu:"cellContextMenu",rangeSelectionChanged:"rangeSelectionChanged",tooltipShow:"tooltipShow",tooltipHide:"tooltipHide",sortChanged:"sortChanged",columnRowGroupChangeRequest:"columnRowGroupChangeRequest",columnPivotChangeRequest:"columnPivotChangeRequest",columnValueChangeRequest:"columnValueChangeRequest",columnAggFuncChangeRequest:"columnAggFuncChangeRequest"},standalone:!0,features:[D.Jv_([io,so]),D.OA$,D.aNF],decls:0,vars:0,template:function(x,K){},encapsulation:2}),Q})(),oo=(()=>{class Q{}return Q.\u0275fac=function(x){return new(x||Q)},Q.\u0275mod=D.$C({type:Q}),Q.\u0275inj=D.G2t({imports:[ns]}),Q})()},43913:(fu,pr,rs)=>{rs.d(pr,{Cf3:()=>Up,Dvw:()=>Bp,jf3:()=>li,kNx:()=>Pr,oY$:()=>ke,pow:()=>Cd});var D=Object.defineProperty,mt=Object.defineProperties,io=Object.getOwnPropertyDescriptor,so=Object.getOwnPropertyDescriptors,Ci=Object.getOwnPropertySymbols,ns=Object.prototype.hasOwnProperty,oo=Object.prototype.propertyIsEnumerable,Q=(e,i,t)=>i in e?D(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,M=(e,i)=>{for(var t in i||(i={}))ns.call(i,t)&&Q(e,t,i[t]);if(Ci)for(var t of Ci(i))oo.call(i,t)&&Q(e,t,i[t]);return e},x=(e,i)=>mt(e,so(i)),U=(e,i)=>{for(var t in i)D(e,t,{get:i[t],enumerable:!0})},d=(e,i,t,s)=>{for(var n,o=s>1?void 0:s?io(i,t):i,r=e.length-1;r>=0;r--)(n=e[r])&&(o=(s?n(i,t,o):n(o))||o);return s&&o&&D(i,t,o),o},Se=(e,i)=>(t,s)=>i(t,s,e),Ct={};function Ze(e){return null==e||""===e?null:e}function y(e,i=!1){return null!=e&&(""!==e||i)}function _(e){return!y(e)}function Fe(e){return null==e||0===e.length}function ls(e){return null!=e&&"function"==typeof e.toString?e.toString():null}function Dt(e){if(void 0===e)return;if(null===e||""===e)return null;if("number"==typeof e)return isNaN(e)?void 0:e;const i=parseInt(e,10);return isNaN(i)?void 0:i}function ro(e){if(void 0!==e)return null!==e&&""!==e&&("boolean"==typeof e?e:/true/i.test(e))}function mu(e){if(null!=e&&""!==e)return e}function gr(e,i){return(e?JSON.stringify(e):null)===(i?JSON.stringify(i):null)}function Cu(e,i,t=!1){const s=null==e,o=null==i;if(e&&e.toNumber&&(e=e.toNumber()),i&&i.toNumber&&(i=i.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function r(n,l){return n>l?1:n<l?-1:0}if("string"!=typeof e||!t)return r(e,i);try{return e.localeCompare(i)}catch{return r(e,i)}}function Ht(e){if(e instanceof Set||e instanceof Map){const i=[];return e.forEach(t=>i.push(t)),i}return Object.values(e)}U(Ct,{attrToBoolean:()=>ro,attrToNumber:()=>Dt,attrToString:()=>mu,defaultComparator:()=>Cu,exists:()=>y,jsonEquals:()=>gr,makeNull:()=>Ze,missing:()=>_,missingOrEmpty:()=>Fe,toStringOrNull:()=>ls,values:()=>Ht});var vu=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let i=0;i<e.length;i++)this.existingKeys[e[i]]=!0}getUniqueKey(e,i){e=ls(e);let t=0;for(;;){let s;if(e?(s=e,0!==t&&(s+="_"+t)):i?(s=i,0!==t&&(s+="_"+t)):s=t,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);t++}}},al={};U(al,{SKIP_JS_BUILTINS:()=>no,cloneObject:()=>fr,deepCloneDefinition:()=>lo,getAllValuesInObject:()=>bt,getValueUsingField:()=>vi,isNonNullObject:()=>
1ao,iterateObject:()=>me,mergeDeep:()=>Pe,removeAllReferences:()=>dl});var no=new Set(["__proto__","constructor","prototype"]);function me(e,i){if(null!=e){if(Array.isArray(e)){for(let t=0;t<e.length;t++)i(t.toString(),e[t]);return}for(const[t,s]of Object.entries(e))i(t,s)}}function fr(e){const i={},t=Object.keys(e);for(let s=0;s<t.length;s++){if(no.has(t[s]))continue;const o=t[s];i[o]=e[o]}return i}function lo(e,i){if(!e)return;const t=e,s={};return Object.keys(t).forEach(o=>{if(i&&i.indexOf(o)>=0||no.has(o))return;const r=t[o];s[o]=ao(r)&&r.constructor===Object?lo(r):r}),s}function bt(e){if(!e)return[];const i=Object;if("function"==typeof i.values)return i.values(e);const t=[];for(const s in e)e.hasOwnProperty(s)&&e.propertyIsEnumerable(s)&&t.push(e[s]);return t}function Pe(e,i,t=!0,s=!1){y(i)&&me(i,(o,r)=>{if(no.has(o))return;let n=e[o];n!==r&&(s&&null==n&&null!=r&&"object"==typeof r&&r.constructor===Object&&(n={},e[o]=n),ao(r)&&ao(n)&&!Array.isArray(n)?Pe(n,r,t,s):(t||void 0!==r)&&(e[o]=r))})}function vi(e,i,t){if(!i||!e)return;if(!t)return e[i];const s=i.split(".");let o=e;for(let r=0;r<s.length;r++){if(null==o)return;o=o[s[r]]}return o}function dl(e,i=[],t){Object.keys(e).forEach(n=>{"object"==typeof e[n]&&!i.includes(n)&&(e[n]=void 0)});const s=Object.getPrototypeOf(e),o={};Object.getOwnPropertyNames(s).forEach(n=>{if("function"==typeof s[n]&&!i.includes(n)){const a=()=>{console.warn((n=>`AG Grid: Grid API function ${n}() 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: ${t}`)(n))};o[n]={value:a,writable:!0}}}),Object.defineProperties(e,o)}function ao(e){return"object"==typeof e&&null!==e}var ul={};U(ul,{compose:()=>wu,debounce:()=>Ee,doOnce:()=>wi,errorOnce:()=>Je,executeAfter:()=>pl,executeInAWhile:()=>cl,executeNextVMTurn:()=>vr,getFunctionName:()=>uo,isFunction:()=>ho,noop:()=>Su,throttle:()=>wr,waitUntil:()=>Sr,warnOnce:()=>O});var hl={};function wi(e,i){hl[i]||(e(),hl[i]=!0)}function O(e){wi(()=>console.warn("AG Grid: "+e),e)}function Je(e){wi(()=>console.error("AG Grid: "+e),e)}function uo(e){if(e.name)return e.name;const i=/function\s+([^\(]+)/.exec(e.toString());return i&&2===i.length?i[1].trim():null}function ho(e){return!!(e&&e.constructor&&e.call&&e.apply)}function cl(e){pl(e,400)}var mr=[],Cr=!1;function vr(e){mr.push(e),!Cr&&(Cr=!0,window.setTimeout(()=>{const i=mr.slice();mr.length=0,Cr=!1,i.forEach(t=>t())},0))}function pl(e,i=0){e.length>0&&window.setTimeout(()=>e.forEach(t=>t()),i)}function Ee(e,i){let t;return function(...s){const o=this;window.clearTimeout(t),t=window.setTimeout(function(){e.apply(o,s)},i)}}function wr(e,i){let t=0;return function(...s){const r=(new Date).getTime();r-t<i||(t=r,e.apply(this,s))}}function Sr(e,i,t=100,s){const o=(new Date).getTime();let r=null,n=!1;const l=()=>{const a=(new Date).getTime()-o>t;(e()||a)&&(i(),n=!0,null!=r&&(window.clearInterval(r),r=null),a&&s&&console.warn(s))};l(),n||(r=window.setInterval(l,10))}function wu(...e){return i=>e.reduce((t,s)=>s(t),i)}var Su=()=>{},gl=(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.Vie
1wportRowModelModule="@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))(gl||{}),Eu=(()=>{let e=class X{static register(t){X.__register(t,!0,void 0)}static registerModules(t){X.__registerModules(t,!0,void 0)}static __register(t,s,o){X.runVersionChecks(t),void 0!==o?(X.areGridScopedModules=!0,void 0===X.gridModulesMap[o]&&(X.gridModulesMap[o]={}),X.gridModulesMap[o][t.moduleName]=t):X.globalModulesMap[t.moduleName]=t,X.setModuleBased(s)}static __unRegisterGridModules(t){delete X.gridModulesMap[t]}static __registerModules(t,s,o){X.setModuleBased(s),t&&t.forEach(r=>X.__register(r,s,o))}static isValidModuleVersion(t){const[s,o]=t.version.split(".")||[],[r,n]=X.currentModuleVersion.split(".")||[];return s===r&&o===n}static runVersionChecks(t){if(X.currentModuleVersion||(X.currentModuleVersion=t.version),t.version?X.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 s=t.validate();s.isValid||console.error(`AG Grid: ${s.message}`)}}static setModuleBased(t){void 0===X.moduleBased?X.moduleBased=t:X.moduleBased!==t&&wi(()=>{console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community)
1- you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/modules/ for more information.")},"ModulePackageCheck")}static __setIsBundled(){X.isBundled=!0}static __assertRegistered(t,s,o){var r;if(this.__isRegistered(t,o))return!0;const n=s+t;let l;if(X.isBundled)l=`AG Grid: unable to use ${s} 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(X.moduleBased||void 0===X.moduleBased){let a=null==(r=Object.entries(gl).find(([u,h])=>h===t))?void 0:r[0];l=`AG Grid: unable to use ${s} as the ${a} is not registered${X.areGridScopedModules?` for gridId: ${o}`:""}. Check if you have registered the module:\n \n import { ModuleRegistry } from '@ag-grid-community/core';\n import { ${a} } from '${t}';\n \n ModuleRegistry.registerModules([ ${a} ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/`}else l=`AG Grid: unable to use ${s} as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:\n \n import 'ag-grid-enterprise';`;return wi(()=>{console.warn(l)},n),!1}static __isRegistered(t,s){var o;return!!X.globalModulesMap[t]||!(null==(o=X.gridModulesMap[s])||!o[t])}static __getRegisteredModules(t){return[...Ht(X.globalModulesMap),...Ht(X.gridModulesMap[t]||{})]}static __getGridRegisteredModules(t){var s;return Ht(null!=(s=X.gridModulesMap[t])?s:{})||[]}static __isPackageBased(){return!X.moduleBased}};return e.globalModulesMap={},e.gridModulesMap={},e.areGridScopedModules=!1,e})(),j=Eu,yu=class{constructor(e,i){if(this.beanWrappers={}
1,this.destroyed=!1,!e||!e.beanClasses)return;this.contextParams=e,this.logger=i,this.logger.log(">> creating ag-Application Context"),this.createBeans();const t=this.getBeanInstances();this.wireBeans(t),this.logger.log(">> ag-Application Context ready - component is alive")}getBeanInstances(){return Ht(this.beanWrappers).map(e=>e.beanInstance)}createBean(e,i){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],i),e}wireBeans(e,i){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),y(i)&&e.forEach(i),this.callLifeCycleMethods(e,"postConstructMethods")}createBeans(){this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),me(this.beanWrappers,(i,t)=>{let s;t.bean.__agBeanMetaData&&t.bean.__agBeanMetaData.autowireMethods&&t.bean.__agBeanMetaData.autowireMethods.agConstructor&&(s=t.bean.__agBeanMetaData.autowireMethods.agConstructor);const o=this.getBeansForParameters(s,t.bean.name),r=new(t.bean.bind.apply(t.bean,[null,...o]));t.beanInstance=r});const e=Object.keys(this.beanWrappers).join(", ");this.logger.log(`created beans: ${e}`)}createBeanWrapper(e){const i=e.__agBeanMetaData;if(!i){let s;return s=e.prototype.constructor?uo(e.prototype.constructor):""+e,void console.error(`Context item ${s} is not a bean`)}this.beanWrappers[i.beanName]={bean:e,beanInstance:null,beanName:i.beanName}}autoWireBeans(e){e.forEach(i=>{this.forEachMetaDataInHierarchy(i,(t,s)=>{const o=t.agClassAttributes;o&&o.forEach(r=>{const n=this.lookupBeanInstance(s,r.beanName,r.optional);i[r.attributeName]=n})})})}methodWireBeans(e){e.forEach(i=>{this.forEachMetaDataInHierarchy(i,(t,s)=>{me(t.autowireMethods,(o,r)=>{if("agConstructor"===o)return;const n=this.getBeansForParameters(r,s);i[o].apply(i,n)})})})}forEachMetaDataInHierarchy(e,i){let t=Object.getPrototypeOf(e);for(;null!=t;){const s=t.constructor;s.hasOwnProperty("__agBeanMetaData")&&i(s.__agBeanMetaData,this.getBeanName(s)),t=Object.getPrototypeOf(t)}}getBeanName(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;const i=e.toString();return i.substring(9,i.indexOf("("))}getBeansForParameters(e,i){const t=[];return e&&me(e,(s,o)=>{const r=this.lookupBeanInstance(i,o);t[Number(s)]=r}),t}lookupBeanInstance(e,i,t=!1){if(this.destroyed)return this.logger.log(`AG Grid: bean reference ${i} is used after the grid is destroyed!`),null;if("context"===i)return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(i))return this.contextParams.providedBeanInstances[i];const s=this.beanWrappers[i];return s?s.beanInstance:(t||console.error(`AG Grid: unable to find bean reference ${i} while initialising ${e}`),null)}callLifeCycleMethods(e,i){e.forEach(t=>this.callLifeCycleMethodsOnBean(t,i))}callLifeCycleMethodsOnBean(e,i,t){const s={};this.forEachMetaDataInHierarchy(e,r=>{const n=r[i];n&&n.forEach(l=>{l!=t&&(s[l]=!0)})}),Object.keys(s).forEach(r=>e[r]())}getBean(e){return this.lookupBeanInstance("getBean",e,!0)}destroy(){if(this.destroyed)return;this.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");const e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,j.__unRegisterGridModules(this.contextParams.gridId),this.logger.log(">> ag-Application Context shut down - component is dead")}destroyBean(e){e&&this.destroyBeans([e])}destroyBeans(e){return e?(e.forEach(i=>{this.callLifeCycleMethodsOnBean(i,"preDestroyMethods","destroy"),"function"==typeof i.destroy&&i.destroy()}),[]):[]}isDestroyed(){return this.destroyed}getGridId(){return this.contextParams.gridId}};function fl(e,i,t){const s=kt(e.constructor);s.preConstructMethods||(s.preConstructMethods=[]),s.preConstructMethods.push(i)}function T(e,i,t){const s=kt(e.constructor);s.postConstructMethods||(s.postConstructMethods=[]),s.postConstructMethods.push(i)}function ye(e,i,t){const s=kt(e.constructor);s.preDestroyMethods||(s.preDestroyMethods=[]),s.preDestroyMethods.push(i)}function I(e){return i=>{kt(i).beanName=e}}function p(e){return(i,t,s)=>{ml(i,e,!1,0,t,null)}}function q(e){return(i,t,s)=>{ml(i,e,!0,0,t,null)}}function ml(e,i,t,s,o,r){if(null===i)return void console.error("AG Grid: Autowired name should not be null");if("number"==typeof r)return void console.error("AG Grid: Autowired should be on an attribute");const n=kt(e.constructor);n.agClassAttributes||(n.agClassAttributes=[]),n.agClassAttributes.push({attributeName:o,beanName:i,optional:t})}function Ue(e){return(i,t,s)=>{const o="function"==typeof i?i:i.constructor;let r;if("number"==typeof s){let n;t?(r=kt(o),n=t):(r=kt(o),n="agConstructor"),r.autowireMethods||(r.autowireMethods={}),r.autowireMethods[n]||(r.autowireMethods[n]={}),r.autowireMethods[n][s]=e}}}function kt(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}var et=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}
1setBeans(e,i,t=null,s=null){if(this.frameworkOverrides=i,this.gos=e,t){const o=e.useAsyncEvents();this.addGlobalListener(t,o)}s&&this.addGlobalListener(s,!1)}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,i,t){const s=i?this.allAsyncListeners:this.allSyncListeners;let o=s.get(e);return!o&&t&&(o=new Set,s.set(e,o)),o}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(e,i,t=!1){this.getListeners(e,t,!0).add(i)}removeEventListener(e,i,t=!1){const s=this.getListeners(e,t,!1);s&&(s.delete(i),0===s.size&&(t?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,i=!1){(i?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,i=!1){(i?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){let i=e;this.gos&&this.gos.addGridCommonParams(i),this.dispatchToListeners(i,!0),this.dispatchToListeners(i,!1),this.firedEvents[i.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,i){var t;const s=e.type;if(i&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const r=null!=(t=this.getListeners(s,i,!1))?t:new Set,n=new Set(r);n.size>0&&((a,u)=>{a.forEach(h=>{if(!u.has(h))return;const c=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>h(e)):()=>h(e);i?this.dispatchAsync(c):c()})})(n,r),new Set(i?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const u=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(s,e)):()=>a(s,e);i?this.dispatchAsync(u):u()})}dispatchAsync(e){this.asyncFunctionsQueue.push(e),this.scheduled||(this.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)}),this.scheduled=!0)}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(i=>i())}};d([Se(0,Ue("gridOptionsService")),Se(1,Ue("frameworkOverrides")),Se(2,Ue("globalEventListener")),Se(3,Ue("globalSyncEventListener"))],et.prototype,"setBeans",1),et=d([I("eventService")],et);var Er=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let i=e;return this.frameworkOverrides.shouldWrapOutgoing&&(i=t=>{this.frameworkOverrides.wrapOutgoing(()=>e(t))},this.wrappedListeners.set(e,i)),i}wrapGlobal(e){let i=e;return this.frameworkOverrides.shouldWrapOutgoing&&(i=(t,s)=>{this.frameworkOverrides.wrapOutgoing(()=>e(t,s))},this.wrappedGlobalListeners.set(e,i)),i}unwrap(e){var i;return null!=(i=this.wrappedListeners.get(e))?i:e}unwrapGlobal(e){var i;return null!=(i=this.wrappedGlobalListeners.get(e))?i:e}},Ru={resizable:!0,sortable:!0},Du=0;function Cl(){return Du++}var Si=(()=>{let e=class _d{constructor(t,s,o,r){this.instanceId=Cl(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new et,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=t,this.userProvidedColDef=s,this.colId=o,this.primary=r,this.setState(t)}getInstanceId(){return this.instanceId}setState(t){void 0!==t.sort?("asc"===t.sort||"desc"===t.sort)&&(this.sort=t.sort):("asc"===t.initialSort||"desc"===t.initialSort)&&(this.sort=t.initialSort);const s=t.sortIndex,o=t.initialSortIndex;void 0!==s?null!==s&&(this.sortIndex=s):null!==o&&(this.sortIndex=o);const r=t.hide;this.visible=void 0!==r?!r:!t.initialHide,this.setPinned(void 0!==t.pinned?t.pinned:t.initialPinned);const l=t.flex,a=t.initialFlex;void 0!==l?this.flex=l:void 0!==a&&(this.flex=a)}setColDef(t,s,o){this.colDef=t,this.userProvidedColDef=s,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged",o))}getUserProvidedColDef(){return this.userProvidedColDef}setParent(t){this.parent=t}getParent(){return this.parent}setOriginalParent(t){this.originalParent=t}getOriginalParent(){return this.originalParent}initialise(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()}initDotNotation(){const t=this.gos.get("suppressFieldDotNotation");this.fieldContainsDots=y(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!t,this.tooltipFieldContainsDots=y(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!t}initMinAndMaxWidths(){var t,s;const o=this.colDef;this.minWidth=null!=(t=o.minWidth)?t:this.environment.getMinColW
1idth(),this.maxWidth=null!=(s=o.maxWidth)?s:Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=y(this.colDef.tooltipField)||y(this.colDef.tooltipValueGetter)||y(this.colDef.tooltipComponent)}resetActualWidth(t){const s=this.calculateColInitialWidth(this.colDef);this.setActualWidth(s,t,!0)}calculateColInitialWidth(t){var s,o;const r=null!=(s=t.minWidth)?s:this.environment.getMinColWidth(),n=null!=(o=t.maxWidth)?o:Number.MAX_SAFE_INTEGER;let l;const a=Dt(t.width),u=Dt(t.initialWidth);return l=null!=a?a:null!=u?u:200,Math.max(Math.min(l,n),r)}isEmptyGroup(){return!1}isRowGroupDisplayed(t){return!_(this.colDef)&&!_(this.colDef.showRowGroup)&&(!0===this.colDef.showRowGroup||this.colDef.showRowGroup===t)}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}addEventListener(t,s){var o,r;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new Er(this.frameworkOverrides));const n=null!=(r=null==(o=this.frameworkEventListenerService)?void 0:o.wrap(s))?r:s;this.eventService.addEventListener(t,n)}removeEventListener(t,s){var o,r;const n=null!=(r=null==(o=this.frameworkEventListenerService)?void 0:o.unwrap(s))?r:s;this.eventService.removeEventListener(t,n)}createColumnFunctionCallbackParams(t){return this.gos.addGridCommonParams({node:t,data:t.data,column:this,colDef:this.colDef})}isSuppressNavigable(t){if("boolean"==typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"==typeof this.colDef.suppressNavigable){const s=this.createColumnFunctionCallbackParams(t);return(0,this.colDef.suppressNavigable)(s)}return!1}isCellEditable(t){return!(t.group&&!this.gos.get("enableGroupEdit"))&&this.isColumnFunc(t,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(t){return this.isColumnFunc(t,this.colDef.rowDrag)}isDndSource(t){return this.isColumnFunc(t,this.colDef.dndSource)}isCellCheckboxSelection(t){return this.isColumnFunc(t,this.colDef.checkboxSelection)}isSuppressPaste(t){return this.isColumnFunc(t,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(t){var s;return null!=(s=this.colDef[t])?s:Ru[t]}isColumnFunc(t,s){return"boolean"==typeof s?s:"function"==typeof s&&s(this.createColumnFunctionCallbackParams(t))}setMoving(t,s){this.moving=t,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",s))}createColumnEvent(t,s){return this.gos.addGridCommonParams({type:t,column:this,columns:[this],source:s})}isMoving(){return this.moving}getSort(){return this.sort}setSort(t,s){this.sort!==t&&(this.sort=t,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",s))),this.dispatchStateUpdatedEvent("sort")}setMenuVisible(t,s){this.menuVisible!==t&&(this.menuVisible=t,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",s)))}isMenuVisible(){return this.menuVisible}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return"asc"===this.sort}isSortDescending(){return"desc"===this.sort}isSortNone(){return _(this.sort)}isSorting(){return y(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(t){this.sortIndex=t,this.dispatchStateUpdatedEvent("sortIndex")}setAggFunc(t){this.aggFunc=t,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(t,s){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",s)))}isFilterActive(){return this.filterActive}setFilterActive(t,s,o){this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",s)));const r=this.createColumnEvent("filterChanged",s);o&&Pe(r,o),this.eventService.dispatchEvent(r)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(t){this.pinned=!0===t||"left"===t?"left":"right"===t?"right":null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(t,s){this.firstRightPinned!==t&&(this.firstRightPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",s)))}setLastLeftPinned(t,s){this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",s)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return"left"===this.pinned||"right"===this.pinned}isPinnedLeft(){return"left"===this.pinned}isPinnedRight(){return"right"===this.pinned}getPinned(){return this.pinned}setVisible(t,s){const o=!0===t;this.visible!==o&&(this.visible=o,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",s))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){const t=this.getColDef();
1return!t.suppressSpanHeaderHeight&&!t.autoHeaderHeight}getColumnGroupPaddingInfo(){let t=this.getParent();if(!t||!t.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const s=t.getPaddingLevel()+1;let o=!0;for(;t;){if(!t.isPadding()){o=!1;break}t=t.getParent()}return{numberOfParents:s,isSpanningTotal:o}}getColDef(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getDefinition(){return this.colDef}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(t){const s=t!==this.autoHeaderHeight;return this.autoHeaderHeight=t,s}createBaseColDefParams(t){return this.gos.addGridCommonParams({node:t,data:t.data,colDef:this.colDef,column:this})}getColSpan(t){if(_(this.colDef.colSpan))return 1;const s=this.createBaseColDefParams(t),o=this.colDef.colSpan(s);return Math.max(o,1)}getRowSpan(t){if(_(this.colDef.rowSpan))return 1;const s=this.createBaseColDefParams(t),o=this.colDef.rowSpan(s);return Math.max(o,1)}setActualWidth(t,s,o=!1){null!=this.minWidth&&(t=Math.max(t,this.minWidth)),null!=this.maxWidth&&(t=Math.min(t,this.maxWidth)),this.actualWidth!==t&&(this.actualWidth=t,this.flex&&"flex"!==s&&"gridInitializing"!==s&&(this.flex=null),o||this.fireColumnWidthChangedEvent(s)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(t){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",t))}isGreaterThanMax(t){return null!=this.maxWidth&&t>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(t){this.flex!==t&&(this.flex=t),this.dispatchStateUpdatedEvent("flex")}setMinimum(t){y(this.minWidth)&&this.setActualWidth(this.minWidth,t)}setRowGroupActive(t,s){this.rowGroupActive!==t&&(this.rowGroupActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",s))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(t,s){this.pivotActive!==t&&(this.pivotActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",s))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(t,s){this.aggregationActive!==t&&(this.aggregationActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",s)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return!0===this.colDef.enablePivot}isAllowValue(){return!0===this.colDef.enableValue}isAllowRowGroup(){return!0===this.colDef.enableRowGroup}getMenuTabs(t){O("As of v31.1, 'getMenuTabs' is deprecated. Use 'getColDef().menuTabs ?? defaultValues' instead.");let s=this.getColDef().menuTabs;return null==s&&(s=t),s}dispatchStateUpdatedEvent(t){this.eventService.dispatchEvent({type:_d.EVENT_STATE_UPDATED,key:t})}};return e.EVENT_MOVING_CHANGED="movingChanged",e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_WIDTH_CHANGED="widthChanged",e.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",e.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",e.EVENT_VISIBLE_CHANGED="visibleChanged",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_COL_DEF_CHANGED="colDefChanged",e.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",e.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_PIVOT_CHANGED="columnPivotChanged",e.EVENT_VALUE_CHANGED="columnValueChanged",e.EVENT_STATE_UPDATED="columnStateUpdated",e})();d([p("gridOptionsService")],Si.prototype,"gos",2),d([p("environment")],Si.prototype,"environment",2),d([p("columnHoverService")],Si.prototype,"columnHoverService",2),d([p("frameworkOverrides")],Si.prototype,"frameworkOverrides",2),d([T],Si.prototype,"initialise",1);var Z=Si,vl=(()=>{let e=class Xs{constructor(t,s,o,r){this.localEventService=new et,this.expandable=!1,this.instanceId=Cl(),this.expandableListenerRemoveCallback=null,this.colGroupDef=t,this.groupId=s,this.expanded=!!t&&!!t.openByDefault,this.padding=o,this.level=r}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)}reset(t,s){this.colGroupDef=t,this.level=s,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(t){this.originalParent=t}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return!!this.children&&this.children.some(t=>t.isVisible())}isPadding(){return this.padding}setExpanded(t){this.expanded=void 0!==t&&t,this.localEventService.dispatchEvent({type:Xs.EVENT_EXPANDED_CHANGED})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(t){this.children=t}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const t=[];return this.addLeafColumns(t),t}
1addLeafColumns(t){this.children&&this.children.forEach(s=>{s instanceof Z?t.push(s):s instanceof Xs&&s.addLeafColumns(t)})}getColumnGroupShow(){const t=this.colGroupDef;if(t)return t.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const t=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(s=>s.addEventListener("visibleChanged",t)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(s=>s.removeEventListener("visibleChanged",t)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let t=!1,s=!1,o=!1;const r=this.findChildrenRemovingPadding();for(let l=0,a=r.length;l<a;l++){const u=r[l];if(!u.isVisible())continue;const h=u.getColumnGroupShow();"open"===h?(t=!0,o=!0):"closed"===h?(s=!0,o=!0):(t=!0,s=!0)}const n=t&&s&&o;this.expandable!==n&&(this.expandable=n,this.localEventService.dispatchEvent({type:Xs.EVENT_EXPANDABLE_CHANGED}))}findChildrenRemovingPadding(){const t=[],s=o=>{o.forEach(r=>{r instanceof Xs&&r.isPadding()?s(r.children):t.push(r)})};return s(this.children),t}onColumnVisibilityChanged(){this.setExpandable()}addEventListener(t,s){this.localEventService.addEventListener(t,s)}removeEventListener(t,s){this.localEventService.removeEventListener(t,s)}};return e.EVENT_EXPANDED_CHANGED="expandedChanged",e.EVENT_EXPANDABLE_CHANGED="expandableChanged",e})();d([ye],vl.prototype,"destroy",1);var le=vl,bu={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},wl={};U(wl,{addSafePassiveEventListener:()=>Pl,createEventPath:()=>Al,getCtrlForEventTarget:()=>co,getEventPath:()=>Fl,isElementInEventPath:()=>po,isEventSupported:()=>Ar,isStopPropagationForAgGrid:()=>it,stopPropagationForAgGrid:()=>tt});var Sl={};function El(e){return null!=e&&e.length>0}function $(e){if(e&&e.length)return e[e.length-1]}function lt(e,i,t){return null==e&&null==i||null!=e&&null!=i&&e.length===i.length&&e.every((s,o)=>t?t(s,i[o]):i[o]===s)}function Tu(e,i){return lt(e,i)}function yl(e){return e.sort((i,t)=>i-t)}function Au(e,i){if(e)for(let t=e.length-2;t>=0;t--)e[t]===i&&e[t+1]===i&&e.splice(t+1,1)}function yr(e,i){const t=e.indexOf(i);t>=0&&(e[t]=e[e.length-1],e.pop())}function Le(e,i){const t=e.indexOf(i);t>=0&&e.splice(t,1)}function Rl(e,i){for(let t=0;t<i.length;t++)yr(e,i[t])}function Dl(e,i){for(let t=0;t<i.length;t++)Le(e,i[t])}function as(e,i,t){e.splice(t,0,i)}function Rr(e,i,t){if(null!=e&&null!=i)for(let s=i.length-1;s>=0;s--)as(e,i[s],t)}function Dr(e,i,t){Dl(e,i),i.slice().reverse().forEach(s=>as(e,s,t))}function Ve(e,i){return e.indexOf(i)>-1}function bl(e){return[].concat.apply([],e)}function br(e,i){null==i||null==e||i.forEach(t=>e.push(t))}function Fu(e){return e.map(ls)}function Pu(e,i){if(null!=e)for(let t=e.length-1;t>=0;t--)i(e[t],t)}U(Sl,{areEqual:()=>lt,existsAndNotEmpty:()=>El,flatten:()=>bl,forEachReverse:()=>Pu,includes:()=>Ve,insertArrayIntoArray:()=>Rr,insertIntoArray:()=>as,last:()=>$,moveInArray:()=>Dr,pushAll:()=>br,removeAllFromArray:()=>Dl,removeAllFromUnorderedArray:()=>Rl,removeFromArray:()=>Le,removeFromUnorderedArray:()=>yr,removeRepeatsFromArray:()=>Au,shallowCompare:()=>Tu,sortNumerically:()=>yl,toStrings:()=>Fu});var Tl="__ag_Grid_Stop_Propagation",Lu=["touchstart","touchend","touchmove","touchcancel","scroll"],Tr={};function tt(e){e[Tl]=!0}function it(e){return!0===e[Tl]}var Ar=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return t=>{if("boolean"==typeof Tr[t])return Tr[t];const s=document.createElement(e[t]||"div");return Tr[t="on"+t]=t in s}})();function co(e,i,t){let s=i;for(;s;){const o=e.getDomData(s,t);if(o)return o;s=s.parentElement}return null}function po(e,i){return!(!i||!e)&&Fl(i).indexOf(e)>=0}function Al(e){const i=[];let t=e.target;for(;t;)i.push(t),t=t.parentElement;return i}function Fl(e){const i=e;return i.path?i.path:i.composedPath?i.composedPath():Al(i)}function Pl(e,i,t,s){const r=Ve(Lu,t)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(i,t,s,r)}var Tt=(()=>{let e=class Vd{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=0,this.isAlive=()=>!this.destroyed}getFrameworkOverrides(){return this.frameworkOverrides}getContext(){return this.context}destroy(){for(let t=0;t<this.destroyFunctions.length;t++)this.destroyFunctions[t]();this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:Vd.EVENT_DESTROYED})}addEventListener(t,s){this.localEventService||(this.localEventService=new et),this.localEventService.addEventListener(t,s)}removeEventListener(t,s){this.localEventService&&this.localEventService.removeEventListener(t,s)}dispatchEvent(t){this.localEventService&&this.localEventService.dispatchEvent(t)}addManagedListener(t,s,o){if(this.destroyed)return;t instanceof HTMLElement?Pl(this.getFrameworkOverrides(),t,s,o):t.addEventListener(s,o);const r=()=>(t.removeEventListener(s,o),null);return this.destroyFunctions.push(r),()=>(r(),this.destroyFunctions=this.destroyFunctions.filter(n=>n!==r),null)}setupGridOptionListener(t,s){this.gos.addEventListener(t,s);const o=()=>(this.gos.removeEventListener(t,s),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(r=>r!==o),null)}
1addManagedPropertyListener(t,s){return this.destroyed?()=>null:this.setupGridOptionListener(t,s)}addManagedPropertyListeners(t,s){if(this.destroyed)return;const o=t.join("-")+this.propertyListenerId++,r=n=>{if(n.changeSet){if(n.changeSet&&n.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=n.changeSet.id}s({type:"gridPropertyChanged",changeSet:n.changeSet,source:n.source})};t.forEach(n=>this.setupGridOptionListener(n,r))}addDestroyFunc(t){this.isAlive()?this.destroyFunctions.push(t):t()}createManagedBean(t,s){const o=this.createBean(t,s);return this.addDestroyFunc(this.destroyBean.bind(this,t,s)),o}createBean(t,s,o){return(s||this.getContext()).createBean(t,o)}destroyBean(t,s){return(s||this.getContext()).destroyBean(t)}destroyBeans(t,s){if(t)for(let o=0;o<t.length;o++)this.destroyBean(t[o],s);return[]}};return e.EVENT_DESTROYED="destroyed",e})();d([p("frameworkOverrides")],Tt.prototype,"frameworkOverrides",2),d([p("context")],Tt.prototype,"context",2),d([p("eventService")],Tt.prototype,"eventService",2),d([p("gridOptionsService")],Tt.prototype,"gos",2),d([p("localeService")],Tt.prototype,"localeService",2),d([p("environment")],Tt.prototype,"environment",2),d([ye],Tt.prototype,"destroy",1);var b=Tt,ds=class extends b{setBeans(e){this.logger=e.create("ColumnFactory")}createColumnTree(e,i,t,s){const o=new vu,{existingCols:r,existingGroups:n,existingColKeys:l}=this.extractExistingTreeData(t);o.addExistingKeys(l);const a=this.recursivelyCreateColumns(e,0,i,r,o,n,s),u=this.findMaxDept(a,0);this.logger.log("Number of levels for grouped columns is "+u);const h=this.balanceColumnTree(a,0,u,o);return vt(null,h,(f,m)=>{f instanceof le&&f.setupExpandable(),f.setOriginalParent(m)}),{columnTree:h,treeDept:u}}extractExistingTreeData(e){const i=[],t=[],s=[];return e&&vt(null,e,o=>{if(o instanceof le)t.push(o);else{const r=o;s.push(r.getId()),i.push(r)}}),{existingCols:i,existingGroups:t,existingColKeys:s}}createForAutoGroups(e,i){return e.map(t=>this.createAutoGroupTreeItem(i,t))}createAutoGroupTreeItem(e,i){const t=this.findDepth(e);let s=i;for(let o=t-1;o>=0;o--){const r=new le(null,`FAKE_PATH_${i.getId()}}_${o}`,!0,o);this.createBean(r),r.setChildren([s]),s.setOriginalParent(r),s=r}return 0===t&&i.setOriginalParent(null),s}findDepth(e){let i=0,t=e;for(;t&&t[0]&&t[0]instanceof le;)i++,t=t[0].getChildren();return i}balanceColumnTree(e,i,t,s){const o=[];for(let r=0;r<e.length;r++){const n=e[r];if(n instanceof le){const l=n,a=this.balanceColumnTree(l.getChildren(),i+1,t,s);l.setChildren(a),o.push(l)}else{let l,a;for(let u=t-1;u>=i;u--){const h=s.getUniqueKey(null,null),c=this.createMergedColGroupDef(null),f=new le(c,h,!0,i);this.createBean(f),a&&a.setChildren([f]),a=f,l||(l=a)}if(l&&a){if(o.push(l),e.some(h=>h instanceof le)){a.setChildren([n]);continue}a.setChildren(e);break}o.push(n)}}return o}findMaxDept(e,i){let t=i;for(let s=0;s<e.length;s++){const o=e[s];if(o instanceof le){const n=this.findMaxDept(o.getChildren(),i+1);t<n&&(t=n)}}return t}recursivelyCreateColumns(e,i,t,s,o,r,n){if(!e)return[];const l=new Array(e.length);for(let a=0;a<l.length;a++){const u=e[a];l[a]=this.isColumnGroup(u)?this.createColumnGroup(t,u,i,s,o,r,n):this.createColumn(t,u,s,o,n)}return l}createColumnGroup(e,i,t,s,o,r,n){const l=this.createMergedColGroupDef(i),a=o.getUniqueKey(l.groupId||null,null),u=new le(l,a,!1,t);this.createBean(u);const h=this.findExistingGroup(i,r);h&&r.splice(h.idx,1);let c=h?.group;c&&u.setExpanded(c.isExpanded());const f=this.recursivelyCreateColumns(l.children,t+1,e,s,o,r,n);return u.setChildren(f),u}createMergedColGroupDef(e){const i={};return Object.assign(i,this.gos.get("defaultColGroupDef")),Object.assign(i,e),i}createColumn(e,i,t,s,o){const r=this.findExistingColumn(i,t);r&&t?.splice(r.idx,1);let n=r?.column;if(n){const l=this.addColumnDefaultAndTypes(i,n.getColId());n.setColDef(l,i,o),this.applyColumnState(n,l,o)}else{const l=s.getUniqueKey(i.colId,i.field),a=this.addColumnDefaultAndTypes(i,l);n=new Z(a,i,l,e),this.context.createBean(n)}return this.dataTypeService.addColumnListeners(n),n}applyColumnState(e,i,t){const s=Dt(i.flex);if(void 0!==s&&e.setFlex(s),e.getFlex()<=0){const l=Dt(i.width);if(null!=l)e.setActualWidth(l,t);else{const a=e.getActualWidth();e.setActualWidth(a,t)}}void 0!==i.sort&&e.setSort("asc"==i.sort||"desc"==i.sort?i.sort:void 0,t);const r=Dt(i.sortIndex);void 0!==r&&e.setSortIndex(r);const n=ro(i.hide);void 0!==n&&e.setVisible(!n,t),void 0!==i.pinned&&e.setPinned(i.pinned)}findExistingColumn(e,i){if(i)for(let t=0;t<i.length;t++){const s=i[t].getUserProvidedColDef();if(s)if(null==e.colId){if(null==e.field){if(s===e)return{idx:t,column:i[t]}}else if(s.field===e.field)return{idx:t,column:i[t]}}else if(i[t].getId()===e.colId)return{idx:t,column:i[t]}}}findExistingGroup(e,i){if(null!=e.groupId)for(let s=0;s<i.length;s++){const o=i[s];if(o.getColGroupDef()&&o.getId()===e.groupId)return{idx:s,group:o}}}addColumnDefaultAndTypes(e,i){const t={};Pe(t,this.gos.get("defaultColDef"),!1,!0);const o=this.dataTypeService.updateColDefAndGetColumnType(t,e,i);o&&this.assignColumnTypes(o,t),Pe(t,e,!1,!0);const r=this.gos.get("autoGroupColumnDef"),n=this.gos.isColumnsSortingCoupledToGroup();return e.rowGroup&&r&&n&&Pe(t,{sort:r.sort,initialSort:r.initialSort},!1,!0),this.dataTypeService.validateColDef(t),t}assignColumnTypes(e,i){if(!e.length)return;const t=Object.assign({},bu);me(this.gos.get("columnTypes")||{},(o,r)=>{o in t?console.warn(`AG Grid: the column type '${o}' is a default column type and cannot be overridden.`):(r.type&&O("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),t[o]=r)}),e.forEach(o=>{const r=t[o.trim()];r?Pe(i,r,!1,!0):console.warn("AG Grid: colDef.type '"+o+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return void 0!==e.children}};function vt(e,i,t){if(i)for(let s=0;s<i.length;s++){const o=i[s];o instanceof le&&vt(o,o.getChildren(),t),t(o,e)}}d([p("dataTypeService")],ds.prototype,"dataTypeService",2),d([Se(0,Ue("loggerFactory"))],ds.prototype,"setBeans",1),ds=d([I("columnFactory")],ds);var Ll=(()=>{let e=class gt{constructor(t,s,o,r){this.displayedChildren=[],this.localEventService=new et,this.groupId=s,this.partId=o,this.providedColumnGroup=t,this.pinned=r}static createUniqueId(t,s){return t+"_"+s}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(t){this.parent=t}getUniqueId(){return gt.createUniqueId(this.groupId,this.partId)}isEmptyGroup(){return 0===this.displayedChildren.length}isMoving(){const t=this.getProvidedColumnGroup().getLeafColumns();return!(!t||0===t.length)&&t.every(s=>s.isMoving())}
1checkLeft(){if(this.displayedChildren.forEach(t=>{t instanceof gt&&t.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const s=$(this.displayedChildren).getLeft();this.setLeft(s)}else{const t=this.displayedChildren[0].getLeft();this.setLeft(t)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(t){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(gt.EVENT_LEFT_CHANGED)))}getPinned(){return this.pinned}createAgEvent(t){return{type:t}}addEventListener(t,s){this.localEventService.addEventListener(t,s)}removeEventListener(t,s){this.localEventService.removeEventListener(t,s)}getGroupId(){return this.groupId}getPartId(){return this.partId}isChildInThisGroupDeepSearch(t){let s=!1;return this.children.forEach(o=>{t===o&&(s=!0),o instanceof gt&&o.isChildInThisGroupDeepSearch(t)&&(s=!0)}),s}getActualWidth(){let t=0;return this.displayedChildren&&this.displayedChildren.forEach(s=>{t+=s.getActualWidth()}),t}isResizable(){if(!this.displayedChildren)return!1;let t=!1;return this.displayedChildren.forEach(s=>{s.isResizable()&&(t=!0)}),t}getMinWidth(){let t=0;return this.displayedChildren.forEach(s=>{t+=s.getMinWidth()||0}),t}addChild(t){this.children||(this.children=[]),this.children.push(t)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const t=[];return this.addLeafColumns(t),t}getDisplayedLeafColumns(){const t=[];return this.addDisplayedLeafColumns(t),t}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(t){this.providedColumnGroup.setExpanded(t)}addDisplayedLeafColumns(t){this.displayedChildren.forEach(s=>{s instanceof Z?t.push(s):s instanceof gt&&s.addDisplayedLeafColumns(t)})}addLeafColumns(t){this.children.forEach(s=>{s instanceof Z?t.push(s):s instanceof gt&&s.addLeafColumns(t)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const t=this.getParent();return this.isPadding()&&t&&t.isPadding()?1+t.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let t=this;for(;null!=t&&t.isPadding();)t=t.getParent();if(!t||!t.providedColumnGroup.isExpandable())return this.displayedChildren=this.children,void this.localEventService.dispatchEvent(this.createAgEvent(gt.EVENT_DISPLAYED_CHILDREN_CHANGED));this.children.forEach(o=>{if(!(o instanceof gt)||o.displayedChildren&&o.displayedChildren.length)switch(o.getColumnGroupShow()){case"open":t.providedColumnGroup.isExpanded()&&this.displayedChildren.push(o);break;case"closed":t.providedColumnGroup.isExpanded()||this.displayedChildren.push(o);break;default:this.displayedChildren.push(o)}}),this.localEventService.dispatchEvent(this.createAgEvent(gt.EVENT_DISPLAYED_CHILDREN_CHANGED))}};return e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",e})();d([p("gridOptionsService")],Ll.prototype,"gos",2);var he=Ll,g=(()=>{let e=class{};return e.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",e.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",e.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",e.EVENT_PIVOT_MAX_COLUMNS_EXCEEDED="pivotMaxColumnsExceeded",e.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",e.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",e.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",e.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",e.EVENT_COLUMN_MOVED="columnMoved",e.EVENT_COLUMN_VISIBLE="columnVisible",e.EVENT_COLUMN_PINNED="columnPinned",e.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",e.EVENT_COLUMN_RESIZED="columnResized",e.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",e.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED="suppressMovableColumns",e.EVENT_SUPPRESS_MENU_HIDE_CHANGED="suppressMenuHide",e.EVENT_SUPPRESS_FIELD_DOT_NOTATION="suppressFieldDotNotation",e.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",e.EVENT_COLUMN_HEADER_MOUSE_OVER="columnHeaderMouseOver",e.EVENT_COLUMN_HEADER_MOUSE_LEAVE="columnHeaderMouseLeave",e.EVENT_COLUMN_HEADER_CLICKED="columnHeaderClicked",e.EVENT_COLUMN_HEADER_CONTEXT_MENU="columnHeaderContextMenu",e.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",e.EVENT_ROW_GROUP_OPENED="rowGroupOpened",e.EVENT_ROW_DATA_UPDATED="rowDataUpdated",e.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",e.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",e.EVENT_CHART_CREATED="chartCreated",e.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged",e.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged",e.EVENT_CHART_DESTROYED="chartDe
1stroyed",e.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",e.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged",e.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart",e.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd",e.EVENT_MODEL_UPDATED="modelUpdated",e.EVENT_CUT_START="cutStart",e.EVENT_CUT_END="cutEnd",e.EVENT_PASTE_START="pasteStart",e.EVENT_PASTE_END="pasteEnd",e.EVENT_FILL_START="fillStart",e.EVENT_FILL_END="fillEnd",e.EVENT_RANGE_DELETE_START="rangeDeleteStart",e.EVENT_RANGE_DELETE_END="rangeDeleteEnd",e.EVENT_UNDO_STARTED="undoStarted",e.EVENT_UNDO_ENDED="undoEnded",e.EVENT_REDO_STARTED="redoStarted",e.EVENT_REDO_ENDED="redoEnded",e.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart",e.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd",e.EVENT_CELL_CLICKED="cellClicked",e.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",e.EVENT_CELL_MOUSE_DOWN="cellMouseDown",e.EVENT_CELL_CONTEXT_MENU="cellContextMenu",e.EVENT_CELL_VALUE_CHANGED="cellValueChanged",e.EVENT_CELL_EDIT_REQUEST="cellEditRequest",e.EVENT_ROW_VALUE_CHANGED="rowValueChanged",e.EVENT_CELL_FOCUSED="cellFocused",e.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared",e.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused",e.EVENT_ROW_SELECTED="rowSelected",e.EVENT_SELECTION_CHANGED="selectionChanged",e.EVENT_TOOLTIP_SHOW="tooltipShow",e.EVENT_TOOLTIP_HIDE="tooltipHide",e.EVENT_CELL_KEY_DOWN="cellKeyDown",e.EVENT_CELL_MOUSE_OVER="cellMouseOver",e.EVENT_CELL_MOUSE_OUT="cellMouseOut",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_MODIFIED="filterModified",e.EVENT_FILTER_OPENED="filterOpened",e.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED="advancedFilterBuilderVisibleChanged",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",e.EVENT_ROW_CLICKED="rowClicked",e.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",e.EVENT_GRID_READY="gridReady",e.EVENT_GRID_PRE_DESTROYED="gridPreDestroyed",e.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",e.EVENT_VIEWPORT_CHANGED="viewportChanged",e.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged",e.EVENT_FIRST_DATA_RENDERED="firstDataRendered",e.EVENT_DRAG_STARTED="dragStarted",e.EVENT_DRAG_STOPPED="dragStopped",e.EVENT_CHECKBOX_CHANGED="checkboxChanged",e.EVENT_ROW_EDITING_STARTED="rowEditingStarted",e.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",e.EVENT_CELL_EDITING_STARTED="cellEditingStarted",e.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",e.EVENT_BODY_SCROLL="bodyScroll",e.EVENT_BODY_SCROLL_END="bodyScrollEnd",e.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",e.EVENT_PAGINATION_CHANGED="paginationChanged",e.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",e.EVENT_STORE_REFRESHED="storeRefreshed",e.EVENT_STATE_UPDATED="stateUpdated",e.EVENT_COLUMN_MENU_VISIBLE_CHANGED="columnMenuVisibleChanged",e.EVENT_CONTEXT_MENU_VISIBLE_CHANGED="contextMenuVisibleChanged",e.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",e.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED="columnContainerWidthChanged",e.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",e.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",e.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",e.EVENT_FLASH_CELLS="flashCells",e.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged",e.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged",e.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged",e.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged",e.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged",e.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged",e.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged",e.EVENT_ROW_DRAG_ENTER="rowDragEnter",e.EVENT_ROW_DRAG_MOVE="rowDragMove",e.EVENT_ROW_DRAG_LEAVE="rowDragLeave",e.EVENT_ROW_DRAG_END="rowDragEnd",e.EVENT_GRID_STYLES_CHANGED="gridStylesChanged",e.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",e.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",e.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",e.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",e.EVENT_STORE_UPDATED="storeUpdated",e.EVENT_FILTER_DESTROYED="filterDestroyed",e.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted",e.EVENT_ROW_COUNT_READY="rowCountReady",e.EVENT_ADVANCED_FILTER_ENABLED_CHANGED="advancedFilterEnabledChanged",e.EVENT_DATA_TYPES_INFERRED="dataTypesInferred",e.EVENT_FIELD_VALUE_CHANGED="fieldValueChanged",e.EVENT_FIELD_PICKER_VALUE_SELECTED="fieldPickerValueSelected",e.EVENT_SIDE_BAR_UPDATED="sideBarUpdated",e})(),go=new Set([g.EVENT_GRID_PRE_DESTROYED,g.EVENT_FILL_START]),Ml=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const i=this.existingIds[e];let t;return t="number"!=typeof i?0:i+1,this.existingIds[e]=t,t}},Ei="ag-Grid-AutoColumn",us=class extends b{createAutoGroupColumns(e){const i=[],t=this.gos.get("treeData");let s=this.gos.isGroupMultiAutoColumn();return t&&s&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),s=!1),s?e.forEach((o,r)=>
1{i.push(this.createOneAutoGroupColumn(o,r))}):i.push(this.createOneAutoGroupColumn()),i}updateAutoGroupColumns(e,i){e.forEach((t,s)=>this.updateOneAutoGroupColumn(t,s,i))}createOneAutoGroupColumn(e,i){let t;t=e?`${Ei}-${e.getId()}`:Ei;const s=this.createAutoGroupColDef(t,e,i);s.colId=t;const o=new Z(s,null,t,!0);return this.context.createBean(o),o}updateOneAutoGroupColumn(e,i,t){const s=e.getColDef(),o="string"==typeof s.showRowGroup?s.showRowGroup:void 0,r=null!=o?this.columnModel.getPrimaryColumn(o):void 0,n=this.createAutoGroupColDef(e.getId(),r??void 0,i);e.setColDef(n,null,t),this.columnFactory.applyColumnState(e,n,t)}createAutoGroupColDef(e,i,t){let s=this.createBaseColDef(i);return Pe(s,this.gos.get("autoGroupColumnDef")),s=this.columnFactory.addColumnDefaultAndTypes(s,e),this.gos.get("treeData")||_(s.field)&&_(s.valueGetter)&&_(s.filterValueGetter)&&"agGroupColumnFilter"!==s.filter&&(s.filter=!1),t&&t>0&&(s.headerCheckboxSelection=!1),this.gos.isColumnsSortingCoupledToGroup()&&!(s.valueGetter||null!=s.field)&&(s.sortIndex=void 0,s.initialSort=void 0),s}createBaseColDef(e){const i=this.gos.get("autoGroupColumnDef"),s={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(i&&(i.cellRenderer||i.cellRendererSelector)||(s.cellRenderer="agGroupCellRenderer"),e){const r=e.getColDef();Object.assign(s,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:r.headerValueGetter}),r.cellRenderer&&Object.assign(s,{cellRendererParams:{innerRenderer:r.cellRenderer,innerRendererParams:r.cellRendererParams}}),s.showRowGroup=e.getColId()}else s.showRowGroup=!0;return s}};d([p("columnModel")],us.prototype,"columnModel",2),d([p("columnFactory")],us.prototype,"columnFactory",2),us=d([I("autoGroupColService")],us);var Il={};U(Il,{camelCaseToHumanText:()=>Gl,camelCaseToHyphenated:()=>Nl,capitalise:()=>Nu,escapeString:()=>ae,utf8_encode:()=>Gu});var Mu=/[&<>"']/g,Iu={"&":"&","<":"<",">":">",'"':""","'":"'"};function Gu(e){const i=String.fromCharCode;function o(c,f){return i(c>>f&63|128)}function r(c){if(c>=0&&c<=31&&10!==c)return`_x${c.toString(16).toUpperCase().padStart(4,"0")}_`;if(!(4294967168&c))return i(c);let f="";return 4294965248&c?4294901760&c?4292870144&c||(f=i(c>>18&7|240),f+=o(c,12),f+=o(c,6)):(function s(c){if(c>=55296&&c<=57343)throw Error("Lone surrogate U+"+c.toString(16).toUpperCase()+" is not a scalar value")}(c),f=i(c>>12&15|224),f+=o(c,6)):f=i(c>>6&31|192),f+=i(63&c|128),f}const n=function t(c){const f=[];if(!c)return[];const m=c.length;let w,S,C=0;for(;C<m;)w=c.charCodeAt(C++),w>=55296&&w<=56319&&C<m?(S=c.charCodeAt(C++),56320==(64512&S)?f.push(((1023&w)<<10)+(1023&S)+65536):(f.push(w),C--)):f.push(w);return f}(e),l=n.length;let u,a=-1,h="";for(;++a<l;)u=n[a],h+=r(u);return h}function Nu(e){return e[0].toUpperCase()+e.substring(1).toLowerCase()}function ae(e,i){if(null==e)return null;const t=e.toString().toString();return i?t:t.replace(Mu,s=>Iu[s])}function Gl(e){return e&&null!=e?e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map(o=>o.substring(0,1).toUpperCase()+(o.length>1?o.substring(1,o.length):"")).join(" "):null}function Nl(e){return e.replace(/[A-Z]/g,i=>`-${i.toLocaleLowerCase()}`)}var xl={};function At(e){const i=new Map;return e.forEach(t=>i.set(t[0],t[1])),i}function xu(e,i){const t=new Map;return e.forEach(s=>t.set(i(s),s)),t}function Ou(e){const i=[];return e.forEach((t,s)=>i.push(s)),i}U(xl,{convertToMap:()=>At,keys:()=>Ou,mapById:()=>xu});var pe=class extends b{constructor(){super(...arguments),this.primaryHeaderRowCount=0,this.secondaryHeaderRowCount=0,this.gridHeaderRowCount=0,this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.displayedColumnsAndGroupsMap={},this.viewportColumns=[],this.viewportColumnsHash="",this.headerViewportColumns=[],this.viewportColumnsCenter=[],this.headerViewportColumnsCenter=[],this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.autoHeightActiveAtLeastOnce=!1,this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[],this.ready=!1,this.changeEventsDispat
1ching=!1,this.autoGroupsNeedBuilding=!1,this.forceRecreateAutoGroups=!1,this.pivotMode=!1,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}init(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation");const e=this.gos.get("pivotMode");this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],i=>this.buildAutoGroupColumns(yi(i.source))),this.addManagedPropertyListener("autoGroupColumnDef",i=>this.onAutoGroupColumnDefChanged(yi(i.source))),this.addManagedPropertyListeners(["defaultColDef","columnTypes","suppressFieldDotNotation"],i=>this.onSharedColDefChanged(yi(i.source))),this.addManagedPropertyListener("pivotMode",i=>this.setPivotMode(this.gos.get("pivotMode"),yi(i.source))),this.addManagedListener(this.eventService,g.EVENT_FIRST_DATA_RENDERED,()=>this.onFirstDataRendered())}buildAutoGroupColumns(e){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns(e))}onAutoGroupColumnDefChanged(e){this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e)}onSharedColDefChanged(e){this.gridColumns&&(this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns,e),this.createColumnsFromColumnDefs(!0,e))}setColumnDefs(e,i){const t=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(t,i)}recreateColumnDefs(e){this.onSharedColDefChanged(e)}destroyOldColumns(e,i){const t={};if(!e)return;vt(null,e,o=>{t[o.getInstanceId()]=o}),i&&vt(null,i,o=>{t[o.getInstanceId()]=null});const s=Object.values(t).filter(o=>null!=o);this.destroyBeans(s)}destroyColumns(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree)}createColumnsFromColumnDefs(e,i){const t=e?this.compareColumnStatesAndDispatchEvents(i):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;const s=this.primaryColumns,r=this.columnFactory.createColumnTree(this.columnDefs,!0,this.primaryColumnTree,i);this.destroyOldColumns(this.primaryColumnTree,r.columnTree),this.primaryColumnTree=r.columnTree,this.primaryHeaderRowCount=r.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach(a=>this.primaryColumnsMap[a.getId()]=a),this.extractRowGroupColumns(i,s),this.extractPivotColumns(i,s),this.extractValueColumns(i,s),this.ready=!0,(this.gridColsArePrimary||void 0===this.gridColsArePrimary||this.autoGroupsNeedBuilding)&&(this.updateGridColumns(),e&&this.gridColsArePrimary&&!this.gos.get("maintainColumnOrder")&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(i),this.checkViewportColumns()),this.dispatchEverythingChanged(i),this.changeEventsDispatching=!0,t&&t(),this.changeEventsDispatching=!1,this.dispatchNewColumnsLoaded(i)}shouldRowModelIgnoreRefresh(){return this.changeEventsDispatching}dispatchNewColumnsLoaded(e){this.eventService.dispatchEvent({type:g.EVENT_NEW_COLUMNS_LOADED,source:e}),"gridInitializing"===e&&this.onColumnsReady()}dispatchEverythingChanged(e){this.eventService.dispatchEvent({type:g.EVENT_COLUMN_EVERYTHING_CHANGED,source:e})}orderGridColumnsLikePrimary(){const e=this.primaryColumns;if(!e)return;const i=e.filter(s=>this.gridColumns.indexOf(s)>=0),t=this.gridColumns.filter(s=>i.indexOf(s)<0);this.gridColumns=[...t,...i],this.gridColumns=this.placeLockedColumns(this.gridColumns)}getAllDisplayedAutoHeightCols(){return this.displayedAutoHeightCols}setViewport(){this.gos.get("enableRtl")?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)}checkViewportColumns(e=!1){null!=this.displayedColumnsCenter&&this.extractViewport()&&this.eventService.dispatchEvent({type:g.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:e})}setViewportPosition(e,i,t=!1){(e!==this.scrollWidth||i!==this.scrollPosition||this.bodyWidthDirty)&&
1(this.scrollWidth=e,this.scrollPosition=i,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns(t))}isPivotMode(){return this.pivotMode}isPivotSettingAllowed(e){return!e||!this.gos.get("treeData")||(O("Pivot mode not available with treeData."),!1)}setPivotMode(e,i){e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)&&(this.pivotMode=e,this.gridColumns)&&(this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(i),this.eventService.dispatchEvent({type:g.EVENT_COLUMN_PIVOT_MODE_CHANGED}))}getSecondaryPivotColumn(e,i){if(_(this.secondaryColumns))return null;const t=this.getPrimaryColumn(i);let s=null;return this.secondaryColumns.forEach(o=>{const r=o.getColDef().pivotKeys,n=o.getColDef().pivotValueColumn;lt(r,e)&&n===t&&(s=o)}),s}setBeans(e){this.logger=e.create("columnModel")}setFirstRightAndLastLeftPinned(e){let i,t;this.gos.get("enableRtl")?(i=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,t=this.displayedColumnsRight?$(this.displayedColumnsRight):null):(i=this.displayedColumnsLeft?$(this.displayedColumnsLeft):null,t=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach(s=>{s.setLastLeftPinned(s===i,e),s.setFirstRightPinned(s===t,e)})}autoSizeColumns(e){if(this.shouldQueueResizeOperations)return void this.resizeOperationQueue.push(()=>this.autoSizeColumns(e));const{columns:i,skipHeader:t,skipHeaderGroups:s,stopAtGroup:o,source:r="api"}=e;this.animationFrameService.flushAllFrames();const n=[];let l=-1;const a=t??this.gos.get("skipHeaderOnAutoSize"),u=s??a;for(;0!==l;)l=0,this.actionOnGridColumns(i,h=>{if(n.indexOf(h)>=0)return!1;const c=this.autoWidthCalculator.getPreferredWidthForColumn(h,a);if(c>0){const f=this.normaliseColumnWidth(h,c);h.setActualWidth(f,r),n.push(h),l++}return!0},r);u||this.autoSizeColumnGroupsByColumns(i,r,o),this.dispatchColumnResizedEvent(n,!0,"autosizeColumns")}dispatchColumnResizedEvent(e,i,t,s=null){e&&e.length&&this.eventService.dispatchEvent({type:g.EVENT_COLUMN_RESIZED,columns:e,column:1===e.length?e[0]:null,flexColumns:s,finished:i,source:t})}dispatchColumnChangedEvent(e,i,t){this.eventService.dispatchEvent({type:e,columns:i,column:i&&1==i.length?i[0]:null,source:t})}dispatchColumnMovedEvent(e){const{movedColumns:i,source:t,toIndex:s,finished:o}=e;this.eventService.dispatchEvent({type:g.EVENT_COLUMN_MOVED,columns:i,column:i&&1===i.length?i[0]:null,toIndex:s,finished:o,source:t})}dispatchColumnPinnedEvent(e,i){if(!e.length)return;const t=1===e.length?e[0]:null,s=this.getCommonValue(e,r=>r.getPinned());this.eventService.dispatchEvent({type:g.EVENT_COLUMN_PINNED,pinned:s??null,columns:e,column:t,source:i})}dispatchColumnVisibleEvent(e,i){if(!e.length)return;const t=1===e.length?e[0]:null,s=this.getCommonValue(e,r=>r.isVisible());this.eventService.dispatchEvent({type:g.EVENT_COLUMN_VISIBLE,visible:s,columns:e,column:t,source:i})}autoSizeColumn(e,i,t){e&&this.autoSizeColumns({columns:[e],skipHeader:t,skipHeaderGroups:!0,source:i})}autoSizeColumnGroupsByColumns(e,i,t){const s=new Set;let r;this.getGridColumns(e).forEach(l=>{let a=l.getParent();for(;a&&a!=t;)a.isPadding()||s.add(a),a=a.getParent()});for(const l of s){for(const a of this.ctrlsService.getHeaderRowContainerCtrls())if(r=a.getHeaderCtrlForColumn(l),r)break;r&&r.resizeLeafColumnsToFit(i)}return[]}autoSizeAllColumns(e,i){if(this.shouldQueueResizeOperations)return void this.resizeOperationQueue.push(()=>this.autoSizeAllColumns(e,i));const t=this.getAllDisplayedColumns();this.autoSizeColumns({columns:t,skipHeader:i,source:e})}getColumnsFromTree(e){const i=[],t=s=>{for(let o=0;o<s.length;o++){const r=s[o];r instanceof Z?i.push(r):r instanceof le&&t(r.getChildren())}};return t(e),i}getAllDisplayedTrees(){return this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre?this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight):null}getPrimaryColumnTree(){return this.primaryColumnTree}getHeaderRowCount(){return this.gridHeaderRowCount}getDisplayedTreeLeft(){return this.displayedTreeLeft}getDisplayedTreeRight(){return this.displayedTreeRight}getDisplayedTreeCentre(){return this.displayedTreeCentre}isColumnDisplayed(e){return this.getAllDisplayedColumns().indexOf(e)>=0}getAllDisplayedColumns(){return this.displayedColumns}getViewportColumns(){return this.viewportColumns}getDisplayedLeftColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft}getDisplayedRightColumnsForRow(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight}isColSpanActive(){return this.colSpanActive}getDisplayedColumnsForRow(e,i,t,s){const o=[];let r=null;for(let n=0;n<i.length;n++){const l=i[n],a=i.length-n,u=Math.min(l.getColSpan(e),a),h=[l];if(u>1){const f=u-1;for(let m=1;m<=f;m++)h.push(i[n+m]);n+=f}let c;t?(c=!1,h.forEach(f=>{t(f)&&(c=!0)})):c=!0,c&&(0===o.length&&r&&s&&s(l)&&o.push(r),o.push(l)),r=l}return o}getViewportCenterColumnsForRow(e){if(!this.colSpanActive)return this.viewportColumnsCenter;const t=this.isColumnVirtualisationSuppressed()?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,t,s=>{const o=s.getLeft();return y(o)&&o>this.viewportLeft})}isColumnAtEdge(e,i){const t=this.getAllDisplayedColumns();if(!t.length)return!1;const s="first"===i;let o;if(e instanceof he){const r=e.getDisplayedLeafColumns();if(!r.length)return!1;o=s?r[0]:$(r)}else o=e;return(s?t[0]:$(t))===o}getAriaColumnIndex(e){let i;return i=e instanceof he?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(i)+1}isColumnInHeaderViewport(e){return!!e.isAutoHeaderHeight()||this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const i=e.getLeft()||0,t=i+e.getActualWidth(),s=this.viewportLeft-200,o=this.viewportRight+200;return!(i<s&&t<s||i>o&&t>o)}getDisplayedColumnsLeftWidth(){return this.getWidthOfColsInList(this.displayedColumnsLeft)}getDisplayedColumnsRightWidth(){return this.getWidthOfColsInList(this.displayedColumnsRight)}updatePrimaryColumnList(e,i,t,s,o,r){if(!e||Fe(e))return;let n=!1;e.forEach(a=>{if(!a)return;const u=this.getPrimaryColumn(a);if(u){if(t){if(i.indexOf(u)>=0)return;i.push(u)}else{if(i.indexOf(u)<0)return;Le(i,u)}s(u),n=!0}}),n&&(this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r),this.eventService.dispatchEvent({type:o,columns:i,column:1===i.length?i[0]:null,source:r}))}setRowGroupColumns(e,i){this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,g.EVENT_COLUMN_ROW_GROUP_CHANGED,!0,this.setRowGroupActive.bind(this),i)}setRowGroupActive(e,i,t){e!==i.isRowGroupActive()&&(i.setRowGroupActive(e,t),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.setColumnsVisible([i],!1,t),!e&&!this.gos.get("suppressMakeColumnVisibleAfterUnGroup")&&this.setColumnsVisible([i],!0,t))}addRowGroupColumns(e,i){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),g.EVENT_COLUMN_ROW_GROUP_CHANGED,i)}removeRowGroupColumns(e,i){this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),g.EVENT_COLUMN_ROW_GROUP_CHANGED,i)}addPivotColumns(e,i){this.updatePrimaryColumnList(e,this.pivotColumns,!0,t=>t.setPivotActive(!0,i),g.EVENT_COLUMN_PIVOT_CHANGED,i)}setPivotColumns(e,i){this.setPrimaryColumnList(e,this.pivotColumns,g.EVENT_COLUMN_PIVOT_CHANGED,!0,(t,s)=>{s.setPivotActive(t,i)},i)}removePivotColumns(e,i){this.updatePrimaryColumnList(e,this.pivotColumns,!1,t=>t.setPivotActive(!1,i),g.EVENT_COLUMN_PIVOT_CHANGED,i)}setPrimaryColumnList(e,i,t,s,o,r){if(!this.gridColumns)return;const n=new Map;
1i.forEach((l,a)=>n.set(l,a)),i.length=0,y(e)&&e.forEach(l=>{const a=this.getPrimaryColumn(l);a&&i.push(a)}),i.forEach((l,a)=>{const u=n.get(l);void 0!==u?s&&u!==a||n.delete(l):n.set(l,0)}),(this.primaryColumns||[]).forEach(l=>{const a=i.indexOf(l)>=0;o(a,l)}),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(r),this.dispatchColumnChangedEvent(t,[...n.keys()],r)}setValueColumns(e,i){this.setPrimaryColumnList(e,this.valueColumns,g.EVENT_COLUMN_VALUE_CHANGED,!1,this.setValueActive.bind(this),i)}setValueActive(e,i,t){if(e!==i.isValueActive()&&(i.setValueActive(e,t),e&&!i.getAggFunc()&&this.aggFuncService)){const s=this.aggFuncService.getDefaultAggFunc(i);i.setAggFunc(s)}}addValueColumns(e,i){this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),g.EVENT_COLUMN_VALUE_CHANGED,i)}removeValueColumns(e,i){this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),g.EVENT_COLUMN_VALUE_CHANGED,i)}normaliseColumnWidth(e,i){const t=e.getMinWidth();y(t)&&i<t&&(i=t);const s=e.getMaxWidth();return y(s)&&e.isGreaterThanMax(i)&&(i=s),i}getPrimaryOrGridColumn(e){return this.getPrimaryColumn(e)||this.getGridColumn(e)}setColumnWidths(e,i,t,s){const o=[];e.forEach(r=>{const n=this.getPrimaryOrGridColumn(r.key);if(n&&(o.push({width:r.newWidth,ratios:[1],columns:[n]}),"shift"===this.gos.get("colResizeDefault")&&(i=!i),i)){const a=this.getDisplayedColAfter(n);if(!a)return;const u=n.getActualWidth()-r.newWidth,h=a.getActualWidth()+u;o.push({width:h,ratios:[1],columns:[a]})}}),0!==o.length&&this.resizeColumnSets({resizeSets:o,finished:t,source:s})}checkMinAndMaxWidthsForSet(e){const{columns:i,width:t}=e;let s=0,o=0,r=!0;return i.forEach(a=>{const u=a.getMinWidth();s+=u||0;const h=a.getMaxWidth();y(h)&&h>0?o+=h:r=!1}),t>=s&&(!r||t<=o)}resizeColumnSets(e){const{resizeSets:i,finished:t,source:s}=e;if(i&&!i.every(h=>this.checkMinAndMaxWidthsForSet(h)))return void(t&&this.dispatchColumnResizedEvent(i&&i.length>0?i[0].columns:null,t,s));const r=[],n=[];i.forEach(h=>{const{width:c,columns:f,ratios:m}=h,C={},w={};f.forEach(E=>n.push(E));let S=!0,R=0;for(;S;){if(R++,R>1e3){console.error("AG Grid: infinite loop in resizeColumnSets");break}S=!1;const E=[];let A=0,P=c;f.forEach((G,N)=>{w[G.getId()]?P-=C[G.getId()]:(E.push(G),A+=m[N])});const L=1/A;E.forEach((G,N)=>{let J;N===E.length-1?J=P:(J=Math.round(m[N]*c*L),P-=J);const Xe=G.getMinWidth(),_e=G.getMaxWidth();y(Xe)&&J<Xe?(J=Xe,w[G.getId()]=!0,S=!0):y(_e)&&_e>0&&J>_e&&(J=_e,w[G.getId()]=!0,S=!0),C[G.getId()]=J})}f.forEach(E=>{const A=C[E.getId()];E.getActualWidth()!==A&&(E.setActualWidth(A,s),r.push(E))})});const l=r.length>0;let a=[];l&&(a=this.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0}),this.setLeftValues(s),this.updateBodyWidths(),this.checkViewportColumns());const u=n.concat(a);(l||t)&&this.dispatchColumnResizedEvent(u,t,s,a)}setColumnAggFunc(e,i,t){if(!e)return;const s=this.getPrimaryColumn(e);s&&(s.setAggFunc(i),this.dispatchColumnChangedEvent(g.EVENT_COLUMN_VALUE_CHANGED,[s],t))}moveRowGroupColumn(e,i,t){if(this.isRowGroupEmpty())return;const s=this.rowGroupColumns[e],o=this.rowGroupColumns.slice(e,i);this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(i,0,s),this.eventService.dispatchEvent({type:g.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:o,column:1===o.length?o[0]:null,source:t})}moveColumns(e,i,t,s=!0){if(!this.gridColumns)return;if(this.columnAnimationService.start(),i>this.gridColumns.length-e.length)return console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+i),void console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");const o=this.getGridColumns(e);this.doesMovePassRules(o,i)&&(Dr(this.gridColumns,o,i),this.updateDisplayedColumns(t),this.dispatchColumnMovedEvent({movedColumns:o,source:t,toIndex:i,finished:s}),this.columnAnimationService.finish())}doesMovePassRules(e,i){const t=this.getProposedColumnOrder(e,i);return this.doesOrderPassRules(t)}doesOrderPassRules(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))}getProposedColumnOrder(e,i){const t=this.gridColumns.slice();return Dr(t,e,i),t}sortColumnsLikeGridColumns(e){!e||e.length<=1||e.filter(t=>this.gridColumns.indexOf(t)<0).length>0||e.sort((t,s)=>this.gridColumns.indexOf(t)-this.gridColumns.indexOf(s))}doesMovePassLockedPositions(e){let i=0,t=!0;return e.forEach(o=>{const r=(o=>o?!0===o||"left"===o?0:2:1)(o.getColDef().lockPosition);r<i&&(t=!1),i=r}),t}doesMovePassMarryChildren(e){let i=!0;return vt(null,this.gridBalancedTree,t=>{if(!(t instanceof le))return;const s=t,o=s.getColGroupDef();if(!o||!o.marryChildren)return;const n=[];
1s.getLeafColumns().forEach(c=>{const f=e.indexOf(c);n.push(f)}),Math.max.apply(Math,n)-Math.min.apply(Math,n)>s.getLeafColumns().length-1&&(i=!1)}),i}moveColumnByIndex(e,i,t){this.gridColumns&&this.moveColumns([this.gridColumns[e]],i,t)}getColumnDefs(){if(!this.primaryColumns)return;const e=this.primaryColumns.slice();return this.gridColsArePrimary?e.sort((i,t)=>this.gridColumns.indexOf(i)-this.gridColumns.indexOf(t)):this.lastPrimaryOrder&&e.sort((i,t)=>this.lastPrimaryOrder.indexOf(i)-this.lastPrimaryOrder.indexOf(t)),this.columnDefFactory.buildColumnDefs(e,this.rowGroupColumns,this.pivotColumns)}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}updateBodyWidths(){const e=this.getWidthOfColsInList(this.displayedColumnsCenter),i=this.getWidthOfColsInList(this.displayedColumnsLeft),t=this.getWidthOfColsInList(this.displayedColumnsRight);this.bodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==i||this.rightWidth!==t)&&(this.bodyWidth=e,this.leftWidth=i,this.rightWidth=t,this.eventService.dispatchEvent({type:g.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED}),this.eventService.dispatchEvent({type:g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED}))}getValueColumns(){return this.valueColumns?this.valueColumns:[]}getPivotColumns(){return this.pivotColumns?this.pivotColumns:[]}isPivotActive(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode}getRowGroupColumns(){return this.rowGroupColumns?this.rowGroupColumns:[]}getDisplayedCenterColumns(){return this.displayedColumnsCenter}getDisplayedLeftColumns(){return this.displayedColumnsLeft}getDisplayedRightColumns(){return this.displayedColumnsRight}getAllPrimaryColumns(){return this.primaryColumns?this.primaryColumns:null}getSecondaryColumns(){return this.secondaryColumns?this.secondaryColumns:null}getAllColumnsForQuickFilter(){return this.columnsForQuickFilter}getAllGridColumns(){var e;return null!=(e=this.gridColumns)?e:[]}isRowGroupEmpty(){return Fe(this.rowGroupColumns)}setColumnsVisible(e,i=!1,t){this.applyColumnState({state:e.map(s=>({colId:"string"==typeof s?s:s.getColId(),hide:!i}))},t)}setColumnsPinned(e,i,t){if(!this.gridColumns)return;if(this.gos.isDomLayout("print"))return void console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'");let s;this.columnAnimationService.start(),s=!0===i||"left"===i?"left":"right"===i?"right":null,this.actionOnGridColumns(e,o=>o.getPinned()!==s&&(o.setPinned(s),!0),t,()=>({type:g.EVENT_COLUMN_PINNED,pinned:s,column:null,columns:null,source:t})),this.columnAnimationService.finish()}actionOnGridColumns(e,i,t,s){if(Fe(e))return;const o=[];if(e.forEach(r=>{if(!r)return;const n=this.getGridColumn(r);n&&!1!==i(n)&&o.push(n)}),o.length&&(this.updateDisplayedColumns(t),y(s)&&s)){const r=s();r.columns=o,r.column=1===o.length?o[0]:null,this.eventService.dispatchEvent(r)}}getDisplayedColBefore(e){const i=this.getAllDisplayedColumns(),t=i.indexOf(e);return t>0?i[t-1]:null}getDisplayedColAfter(e){const i=this.getAllDisplayedColumns(),t=i.indexOf(e);return t<i.length-1?i[t+1]:null}getDisplayedGroupAtDirection(e,i){const t=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),o="After"===i?$(s):s[0],r=`getDisplayedCol${i}`;for(;;){const n=this[r](o);if(!n)return null;const l=this.getColumnGroupAtLevel(n,t);if(l!==e)return l}}getColumnGroupAtLevel(e,i){let s,o,t=e.getParent();for(;s=t.getProvidedColumnGroup().getLevel(),o=t.getPaddingLevel(),!(s+o<=i);)t=t.getParent();return t}isPinningLeft(){return this.displayedColumnsLeft.length>0}isPinningRight(){return this.displayedColumnsRight.length>0}getPrimaryAndSecondaryAndAutoColumns(){return[].concat(this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[])}createStateItemFromColumn(e){const i=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,t=e.isPivotActive()?this.pivotColumns.indexOf(e):null,s=e.isValueActive()?e.getAggFunc():null,o=null!=e.getSort()?e.getSort():null,r=null!=e.getSortIndex()?e.getSortIndex():null,n=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:o,sortIndex:r,aggFunc:s,rowGroup:e.isRowGroupActive(),rowGroupIndex:i,pivot:e.isPivotActive(),pivotIndex:t,flex:n}}getColumnState(){if(_(this.primaryColumns)||!this.isAlive())return[];const i=this.getPrimaryAndSecondaryAndAutoColumns().map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(i),i}orderColumnStateList(e){const i=At(this.gridColumns.map((t,s)=>[t.getColId(),s]));e.sort((t,s)=>(i.has(t.colId)?i.get(t.colId):-1)-(i.has(s.colId)?i.get(s.colId):-1))}resetColumnState(e){if(Fe(this.primaryColumns))return;const i=this.getColumnsFromTree(this.primaryColumnTree),t=[];let s=1e3,o=1e3,r=[];this.groupAutoColumns&&(r=r.concat(this.groupAutoColumns)),i&&(r=r.concat(i)),r.forEach(n=>{const l=this.getColumnStateFromColDef(n);_(l.rowGroupIndex)&&l.rowGroup&&(l.rowGroupIndex=s++),_(l.pivotIndex)&&l.pivot&&(l.pivotIndex=o++),t.push(l)}),this.applyColumnState({state:t,applyOrder:!0},e)}getColumnStateFromColDef(e){const i=(C,w)=>C??w??null,t=e.getColDef(),s=i(t.sort,t.initialSort),o=i(t.sortIndex,t.initialSortIndex),r=i(t.hide,t.initialHide),n=i(t.pinned,t.initialPinned),l=i(t.width,t.initialWidth),a=i(t.flex,t.initialFlex);let u=i(t.rowGroupIndex,t.initialRowGroupIndex),h=i(t.rowGroup,t.initialRowGroup);null==u&&(null==h||0==h)&&(u=null,h=null);let c=i(t.pivotIndex,t.initialPivotIndex),f=i(t.pivot,t.initialPivot);null==c&&(null==f||0==f)&&(c=null,f=null);const m=i(t.aggFunc,t.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:o,hide:r,pinned:n,width:l,flex:a,rowGroup:h,rowGroupIndex:u,pivot:f,pivotIndex:c,aggFunc:m}}applyColumnState(e,i){if(Fe(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;const t=(r,n,l)=>{const a=this.compareColumnStatesAndDispatchEvents(i);this.autoGroupsNeedBuilding=!0;const u=n.slice(),h={},c={},f=[],m=[];let C=0;const w=this.rowGroupColumns.slice(),S=this.pivotColumns.slice();r.forEach(P=>{const L=P.colId||"";if(L.startsWith(Ei))return f.push(P),void m.push(P);const N=l(L);N?(this.syncColumnWithStateItem(N,P,e.defaultState,h,c,!1,i),Le(u,N)):(m.push(P),C+=1)});const R=P=>this.syncColumnWithStateItem(P,null,e.defaultState,h,c,!1,i);u.forEach(R);const E=(P,L,G,N)=>{const ie=P[G.getId()],J=P[N.getId()],Xe=null!=ie,_e=null!=J;if(Xe&&_e)return ie-J;if(Xe)return-1;if(_e)return 1;const es=L.indexOf(G),pt=L.indexOf(N),Od=es>=0;return Od&&pt>=0?es-pt:Od?-1:1};this.rowGroupColumns.sort(E.bind(this,h,w)),this.pivotColumns.sort(E.bind(this,c,S)),this.updateGridColumns();const A=this.groupAutoColumns?this.groupAutoColumns.slice():[];return f.forEach(P=>{const L=this.getAutoColumn(P.colId);Le(A,L),this.syncColumnWithStateItem(L,P,e.defaultState,null,null,!0,i)}),A.forEach(R),this.applyOrderAfterApplyState(e),this.updateDisplayedColumns(i),this.dispatchEverythingChanged(i),a(),{unmatchedAndAutoStates:m,unmatchedCount:C}};this.columnAnimationService.start();let{unmatchedAndAutoStates:s,unmatchedCount:o}=t(e.state||[],this.primaryColumns||[],r=>this.getPrimaryColumn(r));return(s.length>0||y(e.defaultState))&&(o=t(s,this.secondaryColumns||[],r=>this.getSecondaryColumn(r)).unmatchedCount),this.columnAnimationService.finish(),0===o}applyOrderAfterApplyState(e){if(!e.applyOrder||!e.state)return;let i=[];const t={};
1e.state.forEach(o=>{if(!o.colId||t[o.colId])return;const r=this.gridColumnsMap[o.colId];r&&(i.push(r),t[o.colId]=!0)});let s=0;this.gridColumns.forEach(o=>{const r=o.getColId();null==t[r]&&(r.startsWith(Ei)?as(i,o,s++):i.push(o))}),i=this.placeLockedColumns(i),this.doesMovePassMarryChildren(i)?this.gridColumns=i:console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.")}compareColumnStatesAndDispatchEvents(e){const i={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},t=this.getColumnState(),s={};return t.forEach(o=>{s[o.colId]=o}),()=>{const o=this.getPrimaryAndSecondaryAndAutoColumns(),r=(w,S,R,E)=>{if(lt(S.map(E),R.map(E)))return;const G=new Set(S);R.forEach(J=>{G.delete(J)||G.add(J)});const N=[...G];this.eventService.dispatchEvent({type:w,columns:N,column:1===N.length?N[0]:null,source:e})},n=w=>{const S=[];return o.forEach(R=>{const E=s[R.getColId()];E&&w(E,R)&&S.push(R)}),S},l=w=>w.getColId();r(g.EVENT_COLUMN_ROW_GROUP_CHANGED,i.rowGroupColumns,this.rowGroupColumns,l),r(g.EVENT_COLUMN_PIVOT_CHANGED,i.pivotColumns,this.pivotColumns,l);const u=n((w,S)=>{const R=null!=w.aggFunc,E=R!=S.isValueActive(),A=R&&w.aggFunc!=S.getAggFunc();return E||A});u.length>0&&this.dispatchColumnChangedEvent(g.EVENT_COLUMN_VALUE_CHANGED,u,e),this.dispatchColumnResizedEvent(n((w,S)=>w.width!=S.getActualWidth()),!0,e),this.dispatchColumnPinnedEvent(n((w,S)=>w.pinned!=S.getPinned()),e),this.dispatchColumnVisibleEvent(n((w,S)=>w.hide==S.isVisible()),e);const C=n((w,S)=>w.sort!=S.getSort()||w.sortIndex!=S.getSortIndex());C.length>0&&this.sortController.dispatchSortChangedEvents(e,C),this.normaliseColumnMovedEventForColumnState(t,e)}}getCommonValue(e,i){if(!e||0==e.length)return;const t=i(e[0]);for(let s=1;s<e.length;s++)if(t!==i(e[s]))return;return t}normaliseColumnMovedEventForColumnState(e,i){const t=this.getColumnState(),s={};t.forEach(a=>s[a.colId]=a);const o={};e.forEach(a=>{s[a.colId]&&(o[a.colId]=!0)});const r=e.filter(a=>o[a.colId]),n=t.filter(a=>o[a.colId]),l=[];n.forEach((a,u)=>{const h=r&&r[u];if(h&&h.colId!==a.colId){const c=this.getGridColumn(h.colId);c&&l.push(c)}}),l.length&&this.dispatchColumnMovedEvent({movedColumns:l,source:i,finished:!0})}syncColumnWithStateItem(e,i,t,s,o,r,n){var l;if(!e)return;const a=(P,L)=>{const G={value1:void 0,value2:void 0};let N=!1;return i&&(void 0!==i[P]&&(G.value1=i[P],N=!0),y(L)&&void 0!==i[L]&&(G.value2=i[L],N=!0)),!N&&t&&(void 0!==t[P]&&(G.value1=t[P]),y(L)&&void 0!==t[L]&&(G.value2=t[L])),G},u=a("hide").value1;void 0!==u&&e.setVisible(!u,n);const h=a("pinned").value1;void 0!==h&&e.setPinned(h);const c=null!=(l=e.getColDef().minWidth)?l:this.environment.getMinColWidth(),f=a("flex").value1;if(void 0!==f&&e.setFlex(f),null==f){const P=a("width").value1;null!=P&&null!=c&&P>=c&&e.setActualWidth(P,n)}const m=a("sort").value1;void 0!==m&&e.setSort("desc"===m||"asc"===m?m:void 0,n);const C=a("sortIndex").value1;if(void 0!==C&&e.setSortIndex(C),r||!e.isPrimary())return;const w=a("aggFunc").value1;void 0!==w&&("string"==typeof w?(e.setAggFunc(w),e.isValueActive()||(e.setValueActive(!0,n),this.valueColumns.push(e))):(y(w)&&console.warn("AG Grid: stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,n),Le(this.valueColumns,e))));const{value1:S,value2:R}=a("rowGroup","rowGroupIndex");(void 0!==S||void 0!==R)&&("number"==typeof R||S?(e.isRowGroupActive()||(e.setRowGroupActive(!0,n),this.rowGroupColumns.push(e)),s&&"number"==typeof R&&(s[e.getId()]=R)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,n),Le(this.rowGroupColumns,e)));const{value1:E,value2:A}=a("pivot","pivotIndex");(void 0!==E||void 0!==A)&&("number"==typeof A||E?(e.isPivotActive()||(e.setPivotActive(!0,n),this.pivotColumns.push(e)),o&&"number"==typeof A&&(o[e.getId()]=A)):e.isPivotActive()&&(e.setPivotActive(!1,n),Le(this.pivotColumns,e)))}getGridColumns(e){return this.getColumns(e,this.getGridColumn.bind(this))}getColumns(e,i){const t=[];return e&&e.forEach(s=>{const o=i(s);o&&t.push(o)}),t}getColumnWithValidation(e){if(null==e)return null;const i=this.getGridColumn(e);return i||console.warn("AG Grid: could not find column "+e),i}getPrimaryColumn(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null}getGridColumn(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)}lookupGridColumn(e){return this.gridColumnsMap[e]}getSecondaryColumn(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null}getColumn(e,i,t){if(!e||!t)return null;if("string"==typeof e&&t[e])return t[e];for(let s=0;s<i.length;s++)if(this.columnsMatch(i[s],e))return i[s];return this.getAutoColumn(e)}getSourceColumnsForGroupColumn(e){const i=e.getColDef().showRowGroup;if(!i)return null;if(!0===i)return this.rowGroupColumns.slice(0);const t=this.getPrimaryColumn(i);return t?[t]:null}getAutoColumn(e){return this.groupAutoColumns&&y(this.groupAutoColumns)&&!_(this.groupAutoColumns)&&this.groupAutoColumns.find(i=>this.columnsMatch(i,e))||null}columnsMatch(e,i){const t=e===i,s=e.getColDef()===i,o=e.getColId()==i;return t||s||o}getDisplayNameForColumn(e,i,t=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,i);return t?this.wrapHeaderNameWithAggFunc(e,s):s}getDisplayNameForProvidedColumnGroup(e,i,t){const s=i?i.getColGroupDef():null;return s?this.getHeaderName(s,null,e,i,t):null}getDisplayNameForColumnGroup(e,i){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),i)}getHeaderName(e,i,t,s,o){const r=e.headerValueGetter;if(r){const n=this.gos.addGridCommonParams({colDef:e,column:i,columnGroup:t,providedColumnGroup:s,location:o});return"function"==typeof r?r(n):"string"==typeof r?this.expressionService.evaluate(r,n):(console.warn("AG Grid: headerValueGetter must be a function or a string"),"")}return null!=e.headerName?e.headerName:e.field?Gl(e.field):""}wrapHeaderNameWithAggFunc(e,i){if(this.gos.get("suppressAggFuncInHeader"))return i;const t=e.getColDef().pivotValueColumn;let r,o=null;if(y(t)){const n=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&1===this.valueColumns.length,l=void 0!==e.getColDef().pivotTotalColumnIds;if(n&&!l)return i;o=t?t.getAggFunc():null,r=!0}else{const n=e.isValueActive(),l=this.pivotMode||!this.isRowGroupEmpty();n&&l?(o=e.getAggFunc(),r=!0):r=!1}if(r){const n="string"==typeof o?o:"func";return`${this.localeService.getLocaleTextFunc()(n,n)}(${i})`}return i}getColumnGroup(e,i){if(!e)return null;if(e instanceof he)return e;const t=this.getAllDisplayedTrees(),s="number"==typeof i;let o=null;return Bt(t,!1,r=>{if(r instanceof he){const n=r;let l;l=s?e===n.getGroupId()&&i===n.getPartId():e===n.getGroupId(),l&&(o=n)}}),o}isReady(){return this.ready}extractValueColumns(e,i){this.valueColumns=this.extractColumns(i,this.valueColumns,(t,s)=>t.setValueActive(s,e),()=>{},()=>{},t=>{const s=t.aggFunc;return null===s||""===s?null:void 0!==s?!!s:void 0},t=>null!=t.initialAggFunc&&""!=t.initialAggFunc),this.valueColumns.forEach(t=>{const s=t.getColDef();null!=s.aggFunc&&""!=s.aggFunc?t.setAggFunc(s.aggFunc):t.getAggFunc()||t.setAggFunc(s.initialAggFunc)})}extractRowGroupColumns(e,i){this.rowGroupColumns=this.extractColumns(i,this.rowGroupColumns,(t,s)=>t.setRowGroupActive(s,e),t=>t.rowGroupIndex,t=>t.initialRowGroupIndex,t=>t.rowGroup,t=>t.initialRowGroup)}extractColumns(e=[],i=[],t,s,o,r,n){const l=[],a=[];
1(this.primaryColumns||[]).forEach(c=>{const f=e.indexOf(c)<0,m=c.getColDef(),C=ro(r(m)),w=ro(n(m)),S=Dt(s(m)),R=Dt(o(m));let E;E=void 0!==C?C:void 0!==S?null!==S&&S>=0:f?void 0!==w?w:void 0!==R&&null!=R&&R>=0:i.indexOf(c)>=0,E&&((f?null!=S||null!=R:null!=S)?l.push(c):a.push(c))});const u=c=>{const f=s(c.getColDef()),m=o(c.getColDef());return f??m};l.sort((c,f)=>{const m=u(c),C=u(f);return m===C?0:m<C?-1:1});const h=[].concat(l);return i.forEach(c=>{a.indexOf(c)>=0&&h.push(c)}),a.forEach(c=>{h.indexOf(c)<0&&h.push(c)}),i.forEach(c=>{h.indexOf(c)<0&&t(c,!1)}),h.forEach(c=>{i.indexOf(c)<0&&t(c,!0)}),h}extractPivotColumns(e,i){this.pivotColumns=this.extractColumns(i,this.pivotColumns,(t,s)=>t.setPivotActive(s,e),t=>t.pivotIndex,t=>t.initialPivotIndex,t=>t.pivot,t=>t.initialPivot)}resetColumnGroupState(e){if(!this.primaryColumnTree)return;const i=[];vt(null,this.primaryColumnTree,t=>{if(t instanceof le){const s=t.getColGroupDef(),o={groupId:t.getGroupId(),open:s?s.openByDefault:void 0};i.push(o)}}),this.setColumnGroupState(i,e)}getColumnGroupState(){const e=[];return vt(null,this.gridBalancedTree,i=>{i instanceof le&&e.push({groupId:i.getGroupId(),open:i.isExpanded()})}),e}setColumnGroupState(e,i){if(!this.gridBalancedTree)return;this.columnAnimationService.start();const t=[];e.forEach(s=>{const r=s.open,n=this.getProvidedColumnGroup(s.groupId);n&&n.isExpanded()!==r&&(this.logger.log("columnGroupOpened("+n.getGroupId()+","+r+")"),n.setExpanded(r),t.push(n))}),this.updateGroupsAndDisplayedColumns(i),this.setFirstRightAndLastLeftPinned(i),t.length&&this.eventService.dispatchEvent({type:g.EVENT_COLUMN_GROUP_OPENED,columnGroup:1===le.length?t[0]:void 0,columnGroups:t}),this.columnAnimationService.finish()}setColumnGroupOpened(e,i,t){let s;s=e instanceof le?e.getId():e||"",this.setColumnGroupState([{groupId:s,open:i}],t)}getProvidedColumnGroup(e){"string"!=typeof e&&console.error("AG Grid: group key must be a string");let i=null;return vt(null,this.gridBalancedTree,t=>{t instanceof le&&t.getId()===e&&(i=t)}),i}calculateColumnsForDisplay(){let e;return e=this.pivotMode&&_(this.secondaryColumns)?this.gridColumns.filter(i=>{const t=this.groupAutoColumns&&Ve(this.groupAutoColumns,i),s=this.valueColumns&&Ve(this.valueColumns,i);return t||s}):this.gridColumns.filter(i=>this.groupAutoColumns&&Ve(this.groupAutoColumns,i)||i.isVisible()),e}checkColSpanActiveInCols(e){let i=!1;return e.forEach(t=>{y(t.getColDef().colSpan)&&(i=!0)}),i}calculateColumnsForGroupDisplay(){this.groupDisplayColumns=[],this.groupDisplayColumnsMap={},this.gridColumns.forEach(i=>{const t=i.getColDef(),s=t.showRowGroup;t&&y(s)&&(this.groupDisplayColumns.push(i),"string"==typeof s?this.groupDisplayColumnsMap[s]=i:!0===s&&this.getRowGroupColumns().forEach(o=>{this.groupDisplayColumnsMap[o.getId()]=i}))})}getGroupDisplayColumns(){return this.groupDisplayColumns}getGroupDisplayColumnForGroup(e){return this.groupDisplayColumnsMap[e]}updateDisplayedColumns(e){const i=this.calculateColumnsForDisplay();this.buildDisplayedTrees(i),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)}isSecondaryColumnsPresent(){return y(this.secondaryColumns)}setSecondaryColumns(e,i){if(!this.gridColumns)return;const t=e;if(t||!_(this.secondaryColumns)){if(t){this.processSecondaryColumnDefinitions(e);const s=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0,i);this.destroyOldColumns(this.secondaryBalancedTree,s.columnTree),this.secondaryBalancedTree=s.columnTree,this.secondaryHeaderRowCount=s.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach(o=>this.secondaryColumnsMap[o.getId()]=o),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(i)}}processSecondaryColumnDefinitions(e){const i=this.gos.get("processPivotResultColDef"),t=this.gos.get("processPivotResultColGroupDef");if(!i&&!t)return;const s=o=>{o.forEach(r=>{if(y(r.children)){const l=r;t&&t(l),s(l.children)}else i&&i(r)})};e&&s(e)}updateGridColumns(){const e=this.gridBalancedTree;if(this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns,this.createGroupAutoColumnsIfNeeded()){const s=At(this.groupAutoColumns.map(o=>[o,!0]));this.lastPrimaryOrder&&(this.lastPrimaryOrder=this.lastPrimaryOrder.filter(o=>!s.has(o)),this.lastPrimaryOrder=[...this.groupAutoColumns,...this.lastPrimaryOrder]),this.lastSecondaryOrder&&(this.lastSecondaryOrder=this.lastSecondaryOrder.filter(o=>!s.has(o)),this.lastSecondaryOrder=[...this.groupAutoColumns,...this.lastSecondaryOrder])}let t;if(this.secondaryColumns&&this.secondaryBalancedTree){const s=this.secondaryColumns.some(o=>void 0!==this.gridColumnsMap[o.getColId()]);this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,s&&(t=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,t=this.lastPrimaryOrder);this.addAutoGroupToGridColumns(),this.orderGridColsLike(t),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach(s=>this.gridColumnsMap[s.getId()]=s),this.setAutoHeightActive(),lt(e,this.gridBalancedTree)||this.eventService.dispatchEvent({type:g.EVENT_GRID_COLUMNS_CHANGED})}setAutoHeightActive(){this.autoHeightActive=this.gridColumns.filter(e=>e.isAutoHeight()).length>0,this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,this.gos.isRowModelType("clientSide")||this.gos.isRowModelType("serverSide")||O("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}orderGridColsLike(e){if(_(e))return;const i=At(e.map((a,u)=>[a,u]));let t=!0;if(this.gridColumns.forEach(a=>{i.has(a)&&(t=!1)}),t)return;const s=At(this.gridColumns.map(a=>[a,!0])),o=e.filter(a=>s.has(a)),r=At(o.map(a=>[a,!0])),n=this.gridColumns.filter(a=>!r.has(a)),l=o.slice();
1n.forEach(a=>{let u=a.getOriginalParent();if(!u)return void l.push(a);const h=[];for(;!h.length&&u;)u.getLeafColumns().forEach(C=>{const w=l.indexOf(C)>=0,S=h.indexOf(C)<0;w&&S&&h.push(C)}),u=u.getOriginalParent();if(!h.length)return void l.push(a);const c=h.map(m=>l.indexOf(m)),f=Math.max(...c);as(l,a,f+1)}),this.gridColumns=l}isPrimaryColumnGroupsPresent(){return this.primaryHeaderRowCount>1}refreshQuickFilterColumns(){var e;let i=null!=(e=this.isPivotMode()&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")?this.secondaryColumns:this.primaryColumns)?e:[];this.groupAutoColumns&&(i=i.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gos.get("includeHiddenColumnsInQuickFilter")?i:i.filter(t=>t.isVisible()||t.isRowGroupActive())}placeLockedColumns(e){const i=[],t=[],s=[];return e.forEach(o=>{const r=o.getColDef().lockPosition;"right"===r?s.push(o):"left"===r||!0===r?i.push(o):t.push(o)}),[...i,...t,...s]}addAutoGroupToGridColumns(){if(_(this.groupAutoColumns))return this.destroyOldColumns(this.groupAutoColsBalancedTree),void(this.groupAutoColsBalancedTree=null);this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;const e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree)}clearDisplayedAndViewportColumns(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.ariaOrderColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""}updateGroupsAndDisplayedColumns(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths(),this.eventService.dispatchEvent({type:g.EVENT_DISPLAYED_COLUMNS_CHANGED})}deriveDisplayedColumns(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinColumnsAriaOrder(),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter(i=>i.isAutoHeight())}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}joinColumnsAriaOrder(){const e=this.getAllGridColumns(),i=[],t=[],s=[];for(const o of e){const r=o.getPinned();r?!0===r||"left"===r?i.push(o):s.push(o):t.push(o)}this.ariaOrderColumns=i.concat(t).concat(s)}joinDisplayedColumns(){this.displayedColumns=this.gos.get("enableRtl")?this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)}setLeftValues(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()}setLeftValuesOfColumns(e){if(!this.primaryColumns)return;const i=this.getPrimaryAndSecondaryAndAutoColumns().slice(0),t=this.gos.get("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach(s=>{if(t){let o=this.getWidthOfColsInList(s);s.forEach(r=>{o-=r.getActualWidth(),r.setLeft(o,e)})}else{let o=0;s.forEach(r=>{r.setLeft(o,e),o+=r.getActualWidth()})}Rl(i,s)}
1),i.forEach(s=>{s.setLeft(null,e)})}setLeftValuesOfGroups(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach(e=>{e.forEach(i=>{i instanceof he&&i.checkLeft()})})}derivedDisplayedColumnsFromDisplayedTree(e,i){i.length=0,Bt(e,!0,t=>{t instanceof Z&&i.push(t)})}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||0===this.viewportRight}extractViewportColumns(){this.isColumnVirtualisationSuppressed()?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)}getVirtualHeaderGroupRow(e,i){let t;switch(e){case"left":t=this.viewportRowLeft[i];break;case"right":t=this.viewportRowRight[i];break;default:t=this.viewportRowCenter[i]}return _(t)&&(t=[]),t}calculateHeaderRows(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};const e={};this.headerViewportColumns.forEach(t=>e[t.getId()]=!0);const i=(t,s,o)=>{let r=!1;for(let n=0;n<t.length;n++){const l=t[n];let a=!1;if(l instanceof Z)a=!0===e[l.getId()];else{const h=l.getDisplayedChildren();h&&(a=i(h,s,o+1))}a&&(r=!0,s[o]||(s[o]=[]),s[o].push(l))}return r};i(this.displayedTreeLeft,this.viewportRowLeft,0),i(this.displayedTreeRight,this.viewportRowRight,0),i(this.displayedTreeCentre,this.viewportRowCenter,0)}extractViewport(){this.extractViewportColumns();const i=this.viewportColumns.map(s=>`${s.getId()}-${s.getPinned()||"normal"}`).join("#"),t=this.viewportColumnsHash!==i;return t&&(this.viewportColumnsHash=i,this.calculateHeaderRows()),t}refreshFlexedColumns(e={}){var i;const t=e.source?e.source:"flex";if(null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];let s=-1;if(e.resizingCols){const f=new Set(e.resizingCols);let m=this.displayedColumnsCenter;for(let C=m.length-1;C>=0;C--)if(f.has(m[C])){s=C;break}}let o=0,r=[],n=0,l=0;for(let f=0;f<this.displayedColumnsCenter.length;f++)this.displayedColumnsCenter[f].getFlex()&&f>s?(r.push(this.displayedColumnsCenter[f]),l+=this.displayedColumnsCenter[f].getFlex(),n+=null!=(i=this.displayedColumnsCenter[f].getMinWidth())?i:0):o+=this.displayedColumnsCenter[f].getActualWidth();if(!r.length)return[];let a=[];o+n>this.flexViewportWidth&&(r.forEach(f=>{var m;return f.setActualWidth(null!=(m=f.getMinWidth())?m:0,t)}),a=r,r=[]);const u=[];let h;e:for(;;){h=this.flexViewportWidth-o;const f=h/l;for(let m=0;m<r.length;m++){const C=r[m],w=f*C.getFlex();let S=0;const R=C.getMinWidth(),E=C.getMaxWidth();if(y(R)&&w<R?S=R:y(E)&&w>E&&(S=E),S){C.setActualWidth(S,t),yr(r,C),l-=C.getFlex(),a.push(C),o+=C.getActualWidth();continue e}u[m]=Math.round(w)}break}let c=h;return r.forEach((f,m)=>{f.setActualWidth(Math.min(u[m],c),t),a.push(f),c-=u[m]}),e.skipSetLeft||this.setLeftValues(t),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(a,!0,t,r),r}sizeColumnsToFit(e,i="sizeColumnsToFit",t,s){var o,r,n,l,a;if(this.shouldQueueResizeOperations)return void this.resizeOperationQueue.push(()=>this.sizeColumnsToFit(e,i,t,s));const u={};s&&(null==(o=s?.columnLimits)||o.forEach(R=>{var E=R,{key:A}=E,P=((e,i)=>{var t={};for(var s in e)ns.call(e,s)&&i.indexOf(s)<0&&(t[s]=e[s]);if(null!=e&&Ci)for(var s of Ci(e))i.indexOf(s)<0&&oo.call(e,s)&&(t[s]=e[s]);return t})(E,["key"]);u["string"==typeof A?A:A.getColId()]=P}));const h=this.getAllDisplayedColumns(),c=e===this.getWidthOfColsInList(h);if(e<=0||!h.length||c)return;const f=[],m=[];h.forEach(R=>{!0===R.getColDef().suppressSizeToFit?m.push(R):f.push(R)});const C=f.slice(0);let w=!1;const S=R=>{Le(f,R),m.push(R)};for(f.forEach(R=>{var E,A;R.resetActualWidth(i);const P=u?.[R.getId()],L=null!=(E=P?.minWidth)?E:s?.defaultMinWidth,G=null!=(A=P?.maxWidth)?A:s?.defaultMaxWidth,N=R.getActualWidth();"number"==typeof L&&N<L?R.setActualWidth(L,i,!0):"number"==typeof G&&N>G&&R.setActualWidth(G,i,!0)});!w;){w=!0;const R=e-this.getWidthOfColsInList(m);if(R<=0)f.forEach(E=>{var A,P;const L=null!=(P=null==(A=u?.[E.getId()])?void 0:A.minWidth)?P:s?.defaultMinWidth;"number"!=typeof L?E.setMinimum(i):E.setActualWidth(L,i,!0)});else{const E=R/this.getWidthOfColsInList(f);let A=R;for(let P=f.length-1;P>=0;P--){const L=f[P],G=u?.[L.getId()],N=null!=(r=G?.minWidth)?r:s?.defaultMinWidth,ie=null!=(n=G?.maxWidth)?n:s?.defaultMaxWidth,J=null!=(l=L.getMinWidth())?l:0,Xe=null!=(a=L.getMaxWidth())?a:Number.MAX_VALUE,_e="number"==typeof N&&N>J?N:L.getMinWidth(),es="number"==typeof ie&&ie<Xe?ie:L.getMaxWidth();let pt=Math.round(L.getActualWidth()*E);y(_e)&&pt<_e?(pt=_e,S(L),w=!1):y(es)&&pt>es?(pt=es,S(L),w=!1):0===P&&(pt=A),L.setActualWidth(pt,i,!0),A-=pt}}}C.forEach(R=>{R.fireColumnWidthChangedEvent(i)}),this.setLeftValues(i),this.updateBodyWidths(),!t&&this.dispatchColumnResizedEvent(C,!0,i)}buildDisplayedTrees(e){const i=[],t=[],s=[];e.forEach(r=>{switch(r.getPinned()){case"left":i.push(r);break;case"right":t.push(r);break;default:s.push(r)}});const o=new Ml;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(i,o,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(t,o,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(s,o,null,this.displayedTreeCentre),this.updateDisplayedMap()}updateDisplayedMap(){this.displayedColumnsAndGroupsMap={};const e=i=>{this.displayedColumnsAndGroupsMap[i.getUniqueId()]=i};Bt(this.displayedTreeCentre,!1,e),Bt(this.displayedTreeLeft,!1,e),Bt(this.displayedTreeRight,!1,e)}isDisplayed(e){return this.displayedColumnsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){Bt(this.getAllDisplayedTrees(),!1,i=>{i instanceof he&&i.calculateDisplayedColumns()})}getGroupAutoColumns(){return this.groupAutoColumns}createGroupAutoColumnsIfNeeded(){const e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;const i=this.gos.isGroupUseEntireRow(this.pivotMode),t=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn();if(!(this.rowGroupColumns.length>0||this.gos.get("treeData"))||t||i)this.groupAutoColumns=null;else{const r=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);if(!this.autoColsEqual(r,this.groupAutoColumns)||e)return this.groupAutoColumns=r,!0}return!1}isGroupSuppressAutoColumn(){return"custom"===this.gos.get("groupDisplayType")||"custom"===this.gos.get("treeDataDisplayType")}
1autoColsEqual(e,i){return lt(e,i,(t,s)=>t.getColId()===s.getColId())}getWidthOfColsInList(e){return e.reduce((i,t)=>i+t.getActualWidth(),0)}getFirstDisplayedColumn(){const e=this.gos.get("enableRtl"),i=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&i.reverse();for(let t=0;t<i.length;t++){const s=this[i[t]]();if(s.length)return e?$(s):s[0]}return null}setColumnHeaderHeight(e,i){e.setAutoHeaderHeight(i)&&this.eventService.dispatchEvent({type:g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,column:e,columns:[e],source:"autosizeColumnHeaderHeight"})}getColumnGroupHeaderRowHeight(){return this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight()}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),i=this.getAllDisplayedColumns().filter(t=>t.isAutoHeaderHeight()).map(t=>t.getAutoHeaderHeight()||0);return Math.max(e,...i)}getHeaderHeight(){var e;return null!=(e=this.gos.get("headerHeight"))?e:this.environment.getFromTheme(25,"headerHeight")}getFloatingFiltersHeight(){var e;return null!=(e=this.gos.get("floatingFiltersHeight"))?e:this.getHeaderHeight()}getGroupHeaderHeight(){var e;return null!=(e=this.gos.get("groupHeaderHeight"))?e:this.getHeaderHeight()}getPivotHeaderHeight(){var e;return null!=(e=this.gos.get("pivotHeaderHeight"))?e:this.getHeaderHeight()}getPivotGroupHeaderHeight(){var e;return null!=(e=this.gos.get("pivotGroupHeaderHeight"))?e:this.getGroupHeaderHeight()}queueResizeOperations(){this.shouldQueueResizeOperations=!0}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}resetColumnDefIntoColumn(e,i){const t=e.getUserProvidedColDef();if(!t)return!1;const s=this.columnFactory.addColumnDefaultAndTypes(t,e.getColId());return e.setColDef(s,t,i),!0}isColumnGroupingLocked(e){const i=this.gos.get("groupLockGroupColumns");return!(!e.isRowGroupActive()||0===i)&&(-1===i||i>this.rowGroupColumns.findIndex(s=>s.getColId()===e.getColId()))}generateColumnStateForRowGroupAndPivotIndexes(e,i){let t={};const s=(o,r,n,l,a,u)=>{if(!r.length||!this.primaryColumns)return[];const h=Object.keys(o),c=new Set(h),f=new Set(h),m=new Set(r.map(L=>{const G=L.getColId();return f.delete(G),G}).concat(h)),C=[],w={};let S=0;for(let L=0;L<this.primaryColumns.length;L++){const G=this.primaryColumns[L].getColId();m.has(G)&&(C.push(G),w[G]=S++)}let R=1e3,E=!1,A=0;const P=L=>{const G=w[L];for(let N=A;N<G;N++){const ie=C[N];f.has(ie)&&(o[ie][a]=R++,f.delete(ie))}A=G};r.forEach(L=>{const G=L.getColId();if(c.has(G))P(G),o[G][a]=R++;else{const N=L.getColDef();(null===N[a]||void 0===N[a]&&null==N[u])&&(E||(N[n]||void 0===N[n]&&N[l]?P(G):(f.forEach(Xe=>{o[Xe][a]=R+w[Xe]}),R+=C.length,E=!0)),t[G]||(t[G]={colId:G}),t[G][a]=R++)}})};return s(e,this.rowGroupColumns,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(i,this.pivotColumns,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(t)}onColumnsReady(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:i}=e;setTimeout(()=>{if("fitGridWidth"===i){const{columnLimits:t,defaultMinWidth:s,defaultMaxWidth:o}=e,r=t?.map(({colId:n,minWidth:l,maxWidth:a})=>({key:n,minWidth:l,maxWidth:a}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:s,defaultMaxWidth:o,columnLimits:r})}else"fitProvidedWidth"===i&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if("fitCellContents"!==e?.type)return;const{colIds:i,skipHeader:t}=e;setTimeout(()=>{i?this.autoSizeColumns({columns:i,skipHeader:t,source:"autosizeColumns"}):this.autoSizeAllColumns("autosizeColumns",t)})}};function yi(e){return"gridOptionsUpdated"===e?"gridOptionsChanged":e}function Bt(e,i,t){if(e)for(let s=0;s<e.length;s++){const o=e[s];o instanceof he&&Bt(i?o.getDisplayedChildren():o.getChildren(),i,t),t(o)}}d([p("expressionService")],pe.prototype,"expressionService",2),d([p("columnFactory")],pe.prototype,"columnFactory",2),d([p("displayedGroupCreator")],pe.prototype,"displayedGroupCreator",2),d([p("ctrlsService")],pe.prototype,"ctrlsService",2),d([p("autoWidthCalculator")],pe.prototype,"autoWidthCalculator",2),d([p("columnAnimationService")],pe.prototype,"columnAnimationService",2),d([p("autoGroupColService")],pe.prototype,"autoGroupColService",2),d([p("valueCache")],pe.prototype,"valueCache",2),d([p("animationFrameService")],pe.prototype,"animationFrameService",2),d([p("sortController")],pe.prototype,"sortController",2),d([p("columnDefFactory")],pe.prototype,"columnDefFactory",2),d([q("aggFuncService")],pe.prototype,"aggFuncService",2),d([T],pe.prototype,"init",1),d([ye],pe.prototype,"destroyColumns",1),d([Se(0,Ue("loggerFactory"))],pe.prototype,"setBeans",1),pe=d([I("c
1olumnModel")],pe);var Fr=class extends b{createDisplayedGroups(e,i,t,s){const o=this.mapOldGroupsById(s),r=[];let n=e;for(;n.length;){const l=n;n=[];let a=0;const u=h=>{const c=a;a=h;const f=l[c],C=(f instanceof he?f.getProvidedColumnGroup():f).getOriginalParent();if(null==C){for(let S=c;S<h;S++)r.push(l[S]);return}const w=this.createColumnGroup(C,i,o,t);for(let S=c;S<h;S++)w.addChild(l[S]);n.push(w)};for(let h=1;h<l.length;h++){const c=l[h],m=(c instanceof he?c.getProvidedColumnGroup():c).getOriginalParent(),C=l[a];m!==(C instanceof he?C.getProvidedColumnGroup():C).getOriginalParent()&&u(h)}a<l.length&&u(l.length)}return this.setupParentsIntoColumns(r,null),r}createColumnGroup(e,i,t,s){const o=e.getGroupId(),r=i.getInstanceIdForKey(o);let l=t[he.createUniqueId(o,r)];return l&&l.getProvidedColumnGroup()!==e&&(l=null),y(l)?l.reset():(l=new he(e,o,r,s),this.context.createBean(l)),l}mapOldGroupsById(e){const i={},t=s=>{s.forEach(o=>{if(o instanceof he){const r=o;i[o.getUniqueId()]=r,t(r.getChildren())}})};return e&&t(e),i}setupParentsIntoColumns(e,i){e.forEach(t=>{if(t.setParent(i),t instanceof he){const s=t;this.setupParentsIntoColumns(s.getChildren(),s)}})}};Fr=d([I("displayedGroupCreator")],Fr);var _u={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,excludeHiddenColumnsFromQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,enableChartToolPanelsButton:!0,suppressChartToolPanelsButton:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressParentsInRowNodes:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,suppressAggAtRootLevel:!0,removePivotHeaderRowWhenSingleValueColumn:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,functionsPassive:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0},de=class{};de.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"],de.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy"],de.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],de.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],de.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressParentsInRowNodes","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","excludeHiddenColumnsFromQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterMovesDown","enterMovesDownAfterEdit","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","enableChartToolPanelsButton","suppressChartToolPanelsButton","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideFilterAllLevels","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval"],de.OTHER_PROPERTIES=["suppressStickyTotalRow"],de.FUNCTIONAL_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher"],de.CALLBACK_PROPERTIES=["getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","
1sendToClipboard","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"],de.FUNCTION_PROPERTIES=[...de.FUNCTIONAL_PROPERTIES,...de.CALLBACK_PROPERTIES],de.ALL_PROPERTIES=[...de.ARRAY_PROPERTIES,...de.OBJECT_PROPERTIES,...de.STRING_PROPERTIES,...de.NUMBER_PROPERTIES,...de.FUNCTION_PROPERTIES,...de.BOOLEAN_PROPERTIES,...de.OTHER_PROPERTIES];var hs=de,fe=class ar{static getCallbackForEvent(i){return!i||i.length<2?i:"on"+i[0].toUpperCase()+i.substring(1)}static getGridOptionKeys(){return this.ALL_PROPERTIES_AND_CALLBACKS}static combineAttributesAndGridOptions(i,t){"object"!=typeof i&&(i={});const s=M({},i);return ar.getGridOptionKeys().forEach(r=>{const n=t[r];typeof n<"u"&&n!==ar.VUE_OMITTED_PROPERTY&&(s[r]=n)}),s}static processOnChange(i,t,s){if(!i)return;const o={};let r=!1;if(Object.keys(i).filter(l=>ar.ALL_PROPERTIES_AND_CALLBACKS_SET.has(l)).forEach(l=>{o[l]=i[l],r=!0}),!r)return;t.__internalUpdateGridOptions(o,!0);const n={type:g.EVENT_COMPONENT_STATE_CHANGED};me(o,(l,a)=>{n[l]=a}),t.dispatchEvent(n)}};fe.EVENTS=Ht(g),fe.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY",fe.EXCLUDED_INTERNAL_EVENTS=[g.EVENT_SCROLLBAR_WIDTH_CHANGED,g.EVENT_CHECKBOX_CHANGED,g.EVENT_HEIGHT_SCALE_CHANGED,g.EVENT_BODY_HEIGHT_CHANGED,g.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,g.EVENT_SCROLL_VISIBILITY_CHANGED,g.EVENT_COLUMN_HOVER_CHANGED,g.EVENT_FLASH_CELLS,g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,g.EVENT_DISPLAYED_ROWS_CHANGED,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,g.EVENT_STORE_UPDATED,g.EVENT_COLUMN_PANEL_ITEM_DRAG_START,g.EVENT_COLUMN_PANEL_ITEM_DRAG_END,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,g.EVENT_FULL_WIDTH_ROW_FOCUSED,g.EVENT_HEADER_HEIGHT_CHANGED,g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,g.EVENT_CELL_FOCUS_CLEARED,g.EVENT_GRID_STYLES_CHANGED,g.EVENT_FILTER_DESTROYED,g.EVENT_ROW_DATA_UPDATE_STARTED,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,g.EVENT_DATA_TYPES_INFERRED,g.EVENT_FIELD_VALUE_CHANGED,g.EVENT_FIELD_PICKER_VALUE_SELECTED,g.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,g.EVENT_SUPPRESS_MENU_HIDE_CHANGED,g.EVENT_SUPPRESS_FIELD_DOT_NOTATION,g.EVENT_ROW_COUNT_READY,g.EVENT_SIDE_BAR_UPDATED],fe.PUBLIC_EVENTS=fe.EVENTS.filter(e=>!Ve(fe.EXCLUDED_INTERNAL_EVENTS,e)),fe.EVENT_CALLBACKS=fe.EVENTS.map(e=>fe.getCallbackForEvent(e)),fe.BOOLEAN_PROPERTIES=hs.BOOLEAN_PROPERTIES,fe.ALL_PROPERTIES=hs.ALL_PROPERTIES,fe.ALL_PROPERTIES_AND_CALLBACKS=[...fe.ALL_PROPERTIES,...fe.EVENT_CALLBACKS],fe.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(fe.ALL_PROPERTIES_AND_CALLBACKS);var Pr=fe,Lr=class extends b{constructor(){super(...arguments),this.componentsMappedByName={}}setupComponents(e){e&&e.forEach(i=>this.addComponent(i))}addComponent(e){const t=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[t]=e.componentClass}getComponentClass(e){return this.componentsMappedByName[e]}};Lr=d([I("agStackComponentsRegistry")],Lr);var Ol={};function ze(e,i,t){null==t||"string"==typeof t&&""==t?Mr(e,i):Ke(e,i,t)}function Ke(e,i,t){e.setAttribute(_l(i),t.toString())}function Mr(e,i){e.removeAttribute(_l(i))}function _l(e){return`aria-${e}`}function oe(e,i){i?e.setAttribute("role",i):e.removeAttribute("role")}function Vl(e){let i;return i="asc"===e?"ascending":"desc"===e?"descending":"mixed"===e?"other":"none",i}function Vu(e){return parseInt(e.getAttribute("aria-level"),10)}function Hl(e){return parseInt(e.getAttribute("aria-posinset"),10)}function kl(e){return e.getAttribute("aria-label")}
1function He(e,i){ze(e,"label",i)}function Ri(e,i){ze(e,"labelledby",i)}function Hu(e,i){ze(e,"describedby",i)}function Ir(e,i){ze(e,"live",i)}function Bl(e,i){ze(e,"atomic",i)}function Wl(e,i){ze(e,"relevant",i)}function Ul(e,i){ze(e,"level",i)}function Gr(e,i){ze(e,"disabled",i)}function cs(e,i){ze(e,"hidden",i)}function Nr(e,i){ze(e,"activedescendant",i)}function wt(e,i){Ke(e,"expanded",i)}function zl(e){Mr(e,"expanded")}function fo(e,i){Ke(e,"setsize",i)}function mo(e,i){Ke(e,"posinset",i)}function Kl(e,i){Ke(e,"multiselectable",i)}function $l(e,i){Ke(e,"rowcount",i)}function xr(e,i){Ke(e,"rowindex",i)}function Yl(e,i){Ke(e,"colcount",i)}function Or(e,i){Ke(e,"colindex",i)}function jl(e,i){Ke(e,"colspan",i)}function ql(e,i){Ke(e,"sort",i)}function Ql(e){Mr(e,"sort")}function Di(e,i){ze(e,"selected",i)}function ku(e,i){Ke(e,"checked",void 0===i?"mixed":i)}function _r(e,i){ze(e,"controls",i.id),Ri(i,e.id)}function Co(e,i){return void 0===i?e("ariaIndeterminate","indeterminate"):!0===i?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}U(Ol,{getAriaCheckboxStateName:()=>Co,getAriaLabel:()=>kl,getAriaLevel:()=>Vu,getAriaPosInSet:()=>Hl,getAriaSortState:()=>Vl,removeAriaExpanded:()=>zl,removeAriaSort:()=>Ql,setAriaActiveDescendant:()=>Nr,setAriaAtomic:()=>Bl,setAriaChecked:()=>ku,setAriaColCount:()=>Yl,setAriaColIndex:()=>Or,setAriaColSpan:()=>jl,setAriaControls:()=>_r,setAriaDescribedBy:()=>Hu,setAriaDisabled:()=>Gr,setAriaExpanded:()=>wt,setAriaHidden:()=>cs,setAriaLabel:()=>He,setAriaLabelledBy:()=>Ri,setAriaLevel:()=>Ul,setAriaLive:()=>Ir,setAriaMultiSelectable:()=>Kl,setAriaPosInSet:()=>mo,setAriaRelevant:()=>Wl,setAriaRole:()=>oe,setAriaRowCount:()=>$l,setAriaRowIndex:()=>xr,setAriaSelected:()=>Di,setAriaSetSize:()=>fo,setAriaSort:()=>ql});var Vr,vo,Hr,kr,Br,Wr,Ur,zr,Xl={};function at(){return void 0===Vr&&(Vr=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Vr}function Kr(){if(void 0===vo)if(at()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&(vo=null!=e[1]?parseFloat(e[1]):0)}else vo=0;return vo}function wo(){if(void 0===Hr){const e=window;Hr=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return Hr}function $r(){return void 0===kr&&(kr=/(firefox)/i.test(navigator.userAgent)),kr}function Yr(){return void 0===Br&&(Br=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Br}function St(){return void 0===Wr&&(Wr=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),Wr}function jr(){return!at()||Kr()>=15}function So(e){if(!e)return null;const i=e.tabIndex,t=e.getAttribute("tabIndex");return-1!==i||null!==t&&(""!==t||$r())?i.toString():null}function Zl(){if(!document.body)return-1;let e=1e6;const i=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,t=document.createElement("div");for(document.body.appendChild(t);;){const s=2*e;if(t.style.height=s+"px",s>i||t.clientHeight!==s)break;e=s}return document.body.removeChild(t),e}function Jl(){var e,i,t;return null!=(t=null==(e=document.body)?void 0:e.clientWidth)?t:window.innerHeight||(null==(i=document.documentElement)?void 0:i.clientWidth)||-1}function ea(){var e,i,t;return null!=(t=null==(e=document.body)?void 0:e.clientHeight)?t:window.innerHeight||(null==(i=document.documentElement)?void 0:i.clientHeight)||-1}function ta(){return null==zr&&ia(),zr}function ia(){const e=document.body,i=document.createElement("div");i.style.width=i.style.height="100px",i.style.opacity="0",i.style.overflow="scroll",i.style.msOverflowStyle="scrollbar",i.style.position="absolute",e.appendChild(i);let t=i.offsetWidth-i.clientWidth;0===t&&0===i.clientWidth&&(t=null),i.parentNode&&i.parentNode.removeChild(i),null!=t&&(zr=t,Ur=0===t)}function qr(){return null==Ur&&ia(),Ur}U(Xl,{browserSupportsPreventScroll:()=>jr,getBodyHeight:()=>ea,getBodyWidth:()=>Jl,getMaxDivHeight:()=>Zl,getSafariVersion:()=>Kr,getScrollbarWidth:()=>ta,getTabIndex:()=>So,isBrowserChrome:()=>wo,isBrowserFirefox:()=>$r,isBrowserSafari:()=>at,isIOSUserAgent:()=>St,isInvisibleScrollbar:()=>qr,isMacOsUserAgent:()=>Yr});var sa={};U(sa,{dateToFormattedString:()=>Ti,parseDateTimeFromString:()=>Me,serialiseDate:()=>$e});var oa={};function bi(e,i){return e.toString().padStart(i,"0")}function ra(e,i){const t=[];for(let s=e;s<=i;s++)t.push(s);return t}function Bu(e){return"string"==typeof e&&(e=parseInt(e,10)),"number"==typeof e?Math.floor(e):null}function Wu(e,i){let t="";for(let s=0;s<i;s++)t+=String.fromCharCode(255&e),e>>>=8;return t}function Uu(e,i,t){return"number"!=typeof e?"":Qr(Math.round(100*e)/100,i,t)}function Qr(e,i,t){return"number"!=typeof e?"":e.toString().replace(".",t).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}function zu(e){return null==e?null:e.reduce((i,t)=>i+t,0)}function $e(e,i=!0,t="-"){if(!e)return null;let s=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(o=>bi(o,2)).join(t);return i&&(s+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(o=>bi(o,2)).join(":")),s}U(oa,{cleanNumber:()=>Bu,createArrayOfNumbers:()=>ra,decToHex:()=>Wu,formatNumberCommas:()=>Qr,formatNumberTwoDecimalPlacesAndCommas:()=>Uu,padStartWidthZeros:()=>bi,sum:()=>zu});var Xr=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function Ti(e,i="YYYY-MM-DD"){const t=bi(e.getFullYear(),4),s=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"],r={YYYY:()=>t.slice(t.length-4,t.length),YY:()=>t.slice(t.length-2,t.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>s[e.getMonth()],MMM:()=>s[e.getMonth()].slice(0,3),MM:()=>bi(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Xr(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Xr(e.getDate())}`,DD:()=>bi(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>o[e.getDay()],ddd:()=>o[e.getDay()].slice(0,3),dd:()=>o[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Xr(e.getDay())}`,d:()=>`${e.getDay()}`},n=new RegExp(Object.keys(r).join("|"),"g");return i.replace(n,l=>l in r?r[l]():l)}function Me(e){if(!e)return null;const[i,t]=e.split(" ");if(!i)return null;const s=i.split("-").map(c=>parseInt(c,10));if(3!==s.filter(c=>!isNaN(c)).length)return null;const[o,r,n]=s,l=new Date(o,r-1,n);if(l.getFullYear()!==o||l.getMonth()!==r-1||l.getDate()!==n)return null;if(!t||"00:00:00"===t)return l;const[a,u,h]=t.split(":").map(c=>parseInt(c,10));return a>=0&&a<24&&l.setHours(a),u>=0&&u<60&&l.setMinutes(u),h>=0&&h<60&&l.setSeconds(h),l}var Eo,na={};function Zr(e,i,t){const s=e.parentElement;let o=s&&s.firstChild;for(;o;)i&&o.classList.toggle(i,o===e),t&&o.classList.toggle(t,o!==e),o=o.nextSibling}U(na,{FOCUSABLE_EXCLUDE:()=>Jr,FOCUSABLE_SELECTOR:()=>la,addOrRemoveAttribute:()=>dt,addStylesToElement:()=>ln,bindCellRendererToHtmlElement:()=>dn,clearElement:()=>ne,copyNodeList:()=>ca,ensureDomOrder:()=>rn,formatSize:()=>yo,getAbsoluteHeight:()=>tn,getAbsoluteWidth:()=>gs,getElementRectWithOffset:()=>sn,getElementSize:()=>Ft,getInnerHeight:()=>ps,getInnerWidth:()=>Ut,getScrollLeft:()=>ms,insertWithDomOrder:()=>da,isElementChildOfClass:()=>Wt,isFocusableFormField:()=>en,isHorizontalScrollShowing:()=>ua,isInDOM:()=>on,isNodeOrElement:()=>ws,isRtlNegativeScroll:()=>fs,isVerticalScrollShowing:()=>ha,isVisible:()=>Ie,iterateNamedNodeMap:()=>pa,loadTemplate:()=>Ge,nodeListForEach:()=>an,radioCssClass:()=>Zr,removeFromParent:()=>st,setDisabled:()=>Ai,setDisplayed:()=>z,setDomChildOrder:()=>nn,setElementHeight:()=>Ku,setElementWidth:()=>vs,setFixedHeight:()=>zt,setFixedWidth:()=>Ye,setScrollLeft:()=>Cs,setVisible:()=>aa});var la="[tabindex], input, select, button, textarea, [href]",Jr="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function en(e){const i=Element.prototype.matches||Element.prototype.msMatchesSelector,s=i.call(e,"input, select, button, textarea"),o=i.call(e,Jr),r=Ie(e);return s&&!o&&r}function z(e,i,t={}){const{skipAriaHidden:s}=t;e.classList.toggle("ag-hidden",!i),s||cs(e,!i)}function aa(e,i,t={}){const{skipAriaHidden:s}=t;e.classList.toggle("ag-invisible",!i),s||cs(e,!i)}function Ai(e,i){const t="disabled",s=i?o=>o.setAttribute(t,""):o=>o.removeAttribute(t);s(e),an(e.querySelectorAll("input"),o=>s(o))}function Wt(e,i,t){let s=0;for(;e;){if(e.classList.contains(i))return!0;if(e=e.parentElement,"number"==typeof t){if(++s>t)break}else if(e===t)break}return!1}function Ft(e){const{height:i,width:t,borderTopWidth:s,borderRightWidth:o,borderBottomWidth:r,borderLeftWidth:n,paddingTop:l,paddingRight:a,paddingBottom:u,paddingLeft:h,marginTop:c,marginRight:f,marginBottom:m,marginLeft:C,boxSizing:w}=window.getComputedStyle(e);return{height:parseFloat(i||"0"),width:parseFloat(t||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(o||"0"),borderBottomWidth:parseFloat(r||"0"),borderLeftWidth:parseFloat(n||"0"),paddingTop:parseFloat(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(u||"0"),paddingLeft:parseFloat(h||"0"),marginTop:parseFloat(c||"0"),marginRight:parseFloat(f||"0"),marginBottom:parseFloat(m||"0"),marginLeft:parseFloat(C||"0"),boxSizing:w}}function ps(e){const i=Ft(e);return"border-box"===i.boxSizing?i.height-i.paddingTop-i.paddingBottom:i.height}function Ut(e){const i=Ft(e);return"border-box"===i.boxSizing?i.width-i.paddingLeft-i.paddingRight:i.width}function tn(e){const i=Ft(e);return Math.ceil(e.offsetHeight+(i.marginBottom+i.marginTop))}function gs(e){const i=Ft(e);return Math.ceil(e.offsetWidth+(i.marginLeft+i.marginRight))}function sn(e){const i=e.getBoundingClientRect(),{borderTopWidth:t,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:r}=Ft(e);
1return{top:i.top+(t||0),left:i.left+(s||0),right:i.right+(o||0),bottom:i.bottom+(r||0)}}function fs(){if("boolean"==typeof Eo)return Eo;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML='<div style="width: 2px">\n <span style="display: inline-block; width: 1px"></span>\n <span style="display: inline-block; width: 1px"></span>\n </div>',document.body.appendChild(e),e.scrollLeft=1,Eo=0===Math.floor(e.scrollLeft),document.body.removeChild(e),Eo}function ms(e,i){let t=e.scrollLeft;return i&&(t=Math.abs(t),wo()&&!fs()&&(t=e.scrollWidth-e.clientWidth-t)),t}function Cs(e,i,t){t&&(fs()?i*=-1:(at()||wo())&&(i=e.scrollWidth-e.clientWidth-i)),e.scrollLeft=i}function ne(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function st(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function on(e){return!!e.offsetParent}function Ie(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!on(e)||"visible"!==window.getComputedStyle(e).visibility)}function Ge(e){const i=document.createElement("div");return i.innerHTML=(e||"").trim(),i.firstChild}function rn(e,i,t){t&&t.nextSibling===i||(t?t.nextSibling?e.insertBefore(i,t.nextSibling):e.appendChild(i):e.firstChild&&e.firstChild!==i&&e.insertAdjacentElement("afterbegin",i))}function nn(e,i){for(let t=0;t<i.length;t++){const s=i[t],o=e.children[t];o!==s&&e.insertBefore(s,o)}}function da(e,i,t){t?t.insertAdjacentElement("afterend",i):e.firstChild?e.insertAdjacentElement("afterbegin",i):e.appendChild(i)}function ln(e,i){if(i)for(const[t,s]of Object.entries(i)){if(!t||!t.length||null==s)continue;const o=Nl(t),r=s.toString(),n=r.replace(/\s*!important/g,"");e.style.setProperty(o,n,n.length!=r.length?"important":void 0)}}function ua(e){return e.clientWidth<e.scrollWidth}function ha(e){return e.clientHeight<e.scrollHeight}function vs(e,i){"flex"===i?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Ye(e,i)}function Ye(e,i){i=yo(i),e.style.width=i.toString(),e.style.maxWidth=i.toString(),e.style.minWidth=i.toString()}function Ku(e,i){"flex"===i?(e.style.removeProperty("height"),e.style.removeProperty("minHeight"),e.style.removeProperty("maxHeight"),e.style.flex="1 1 auto"):zt(e,i)}function zt(e,i){i=yo(i),e.style.height=i.toString(),e.style.maxHeight=i.toString(),e.style.minHeight=i.toString()}function yo(e){return"number"==typeof e?`${e}px`:e}function ws(e){return e instanceof Node||e instanceof HTMLElement}function ca(e){if(null==e)return[];const i=[];return an(e,t=>i.push(t)),i}function pa(e,i){if(e)for(let t=0;t<e.length;t++){const s=e[t];i(s.name,s.value)}}function dt(e,i,t){null==t?e.removeAttribute(i):e.setAttribute(i,t.toString())}function an(e,i){if(null!=e)for(let t=0;t<e.length;t++)i(e[t])}function dn(e,i){e.then(t=>{const s=t.getGui();null!=s&&("object"==typeof s?i.appendChild(s):i.innerHTML=s)})}var ga={};function fa(e,i,t){const s={},o=e.filter(r=>!i.some(n=>n===r));return o.length>0&&o.forEach(r=>s[r]=Ss(r,t).values),s}function Ss(e,i,t,s){let o=i.map((l,a)=>({value:l,relevance:$u(e.toLowerCase(),l.toLocaleLowerCase()),idx:a}));if(o.sort((l,a)=>a.relevance-l.relevance),t&&(o=o.filter(l=>0!==l.relevance)),o.length>0&&s&&s>0){const a=o[0].relevance*s;o=o.filter(u=>a-u.relevance<0)}const r=[],n=[];for(const l of o)r.push(l.value),n.push(l.idx);return{values:r,indices:n}}function $u(e,i){const t=e.replace(/\s/g,""),s=i.replace(/\s/g,"");let o=0,r=-1;for(let n=0;n<t.length;n++){const l=s.indexOf(t[n],r+1);-1!==l&&(r=l,o+=100-100*r/1e4*100)}return o}U(ga,{fuzzyCheckStrings:()=>fa,fuzzySuggestions:()=>Ss});var ma={};U(ma,{createIcon:()=>je,createIconNoSpan:()=>se,iconNameClassMap:()=>Ca});var Ca={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus"};function je(e,i,t){const s=se(e,i,t);if(s){const{className:r}=s;if("string"==typeof r&&r.indexOf("ag-icon")>-1||"object"==typeof r&&r["ag-icon"])return s}const o=document.createElement("span");return o.appendChild(s),o}function se(e,i,t,s){let o=null;const r=t&&t.getColDef().icons;
1if(r&&(o=r[e]),i&&!o){const n=i.get("icons");n&&(o=n[e])}if(!o){const n=document.createElement("span");let l=Ca[e];return l||(s?l=e:(console.warn(`AG Grid: Did not find icon ${e}`),l="")),n.setAttribute("class",`ag-icon ag-icon-${l}`),n.setAttribute("unselectable","on"),oe(n,"presentation"),n}{let n;if("function"==typeof o)n=o();else{if("string"!=typeof o)throw new Error("icon from grid options needs to be a string or a function");n=o}if("string"==typeof n)return Ge(n);if(ws(n))return n;console.warn("AG Grid: iconRenderer should return back a string or a dom object")}}var va={};U(va,{isDeleteKey:()=>Ea,isEventFromPrintableCharacter:()=>Ro,isUserSuppressingHeaderKeyboardEvent:()=>wa,isUserSuppressingKeyboardEvent:()=>Do,normaliseQwertyAzerty:()=>Sa});var v=(()=>{let e=class{};return e.BACKSPACE="Backspace",e.TAB="Tab",e.ENTER="Enter",e.ESCAPE="Escape",e.SPACE=" ",e.LEFT="ArrowLeft",e.UP="ArrowUp",e.RIGHT="ArrowRight",e.DOWN="ArrowDown",e.DELETE="Delete",e.F2="F2",e.PAGE_UP="PageUp",e.PAGE_DOWN="PageDown",e.PAGE_HOME="Home",e.PAGE_END="End",e.A="KeyA",e.C="KeyC",e.D="KeyD",e.V="KeyV",e.X="KeyX",e.Y="KeyY",e.Z="KeyZ",e})(),Yu=65,ju=67,qu=86,Qu=68,Xu=90,Zu=89;function Ro(e){return!(e.altKey||e.ctrlKey||e.metaKey)&&1===e.key.length}function Do(e,i,t,s,o){const r=s?s.getColDef().suppressKeyboardEvent:void 0;if(!r)return!1;const n=e.addGridCommonParams({event:i,editing:o,column:s,node:t,data:t.data,colDef:s.getColDef()});return!(!r||!r(n))}function wa(e,i,t,s){const o=s.getDefinition(),r=o&&o.suppressHeaderKeyboardEvent;return!!y(r)&&!!r(e.addGridCommonParams({colDef:o,column:s,headerRowIndex:t,event:i}))}function Sa(e){const{keyCode:i}=e;let t;switch(i){case Yu:t=v.A;break;case ju:t=v.C;break;case qu:t=v.V;break;case Qu:t=v.D;break;case Xu:t=v.Z;break;case Zu:t=v.Y;break;default:t=e.code}return t}function Ea(e,i=!1){return e===v.DELETE||!i&&e===v.BACKSPACE&&Yr()}var ya={};function un(e,i,t){if(0===t)return!1;const s=Math.abs(e.clientX-i.clientX),o=Math.abs(e.clientY-i.clientY);return Math.max(s,o)<=t}U(ya,{areEventsNear:()=>un});var Ra={};function Ju(e,i){if(!e)return!1;const t=(n,l)=>{const a=i[n.id],u=i[l.id],h=void 0!==a,c=void 0!==u;return h&&c?a-u:h||c?h?1:-1:n.__objectId-l.__objectId};let s,o,r=!1;for(let n=0;n<e.length-1;n++)if(s=e[n],o=e[n+1],t(s,o)>0){r=!0;break}return!!r&&(e.sort(t),!0)}U(Ra,{sortRowNodesByOrder:()=>Ju});var Da={};function hn(e){const i=new Set;return e.forEach(t=>i.add(t)),i}U(Da,{convertToSet:()=>hn});var k=M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M(M({},Ol),Sl),Xl),sa),na),wl),ul),ga),Ct),ma),va),xl),ya),oa),al),Ra),Da),Il),Fi=class{constructor(e=0,i=1){this.nextValue=e,this.step=i}next(){const e=this.nextValue;return this.nextValue+=this.step,e}peek(){return this.nextValue}skip(e){this.nextValue+=e}},ke=class dr{constructor(i){this.status=0,this.resolution=null,this.waiters=[],i(t=>this.onDone(t),t=>this.onReject(t))}static all(i){return new dr(t=>{let s=i.length;const o=new Array(s);i.forEach((r,n)=>{r.then(l=>{o[n]=l,s--,0===s&&t(o)})})})}static resolve(i=null){return new dr(t=>t(i))}then(i){return new dr(t=>{1===this.status?t(i(this.resolution)):this.waiters.push(s=>t(i(s)))})}resolveNow(i,t){return 1===this.status?t(this.resolution):i}onDone(i){this.status=1,this.resolution=i,this.waiters.forEach(t=>t(i))}onReject(i){console.warn("TBI")}},ih=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){const i=(e||"").split(" ");if(i.length>1)i.forEach(s=>this.addCssClass(s));else if(!0!==this.cssClassStates[e]&&e.length){const s=this.getGui();s&&s.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){const i=(e||"").split(" ");if(i.length>1)i.forEach(s=>this.removeCssClass(s));else if(!1!==this.cssClassStates[e]&&e.length){const s=this.getGui();s&&s.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){const i=this.getGui();return!!i&&i.classList.contains(e)}addOrRemoveCssClass(e,i){if(e){if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1)return void s.forEach(o=>this.addOrRemoveCssClass(o,i))}if(this.cssClassStates[e]!==i&&e.length){const s=this.getGui();s&&s.classList.toggle(e,i),this.cssClassStates[e]=i}}}},bo=(()=>{let e=class fi extends b{constructor(t,s,o,r){super(),this.parentComp=t,this.tooltipShowDelayOverride=s,this.tooltipHideDelayOverride=o,this.shouldDisplayTooltip=r,this.SHOW_QUICK_TOOLTIP_DIFF=1e3,this.FADE_OUT_TOOLTIP_TIMEOUT=1e3,this.INTERACTIVE_HIDE_DELAY=100,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const t=this.parentComp.getGui();0===this.tooltipTrigger&&(this.addManagedListener(t,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(t,"mouseleave",this.onMouseLeave.bind(this))),1===this.tooltipTrigger&&(this.addManagedListener(t,"focusin",this.onFocusIn.bind(this)),this.addManagedListener(t,"focusout",this.onFocusOut.bind(this))),this.addManagedListener(t,"mousemove",this.onMouseMove.bind(this)),this.interactionEnabled||(this.addManagedListener(t,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(t,"keydown",this.onKeyDown.bind(this)))}getGridOptionsTooltipDelay(t){const s=this.gos.get(t);return s<0&&O(`${t} should not be lower than 0`),Math.max(200,s)}getTooltipDelay(t){var s,o;return"show"===t?null!=(s=this.tooltipShowDelayOverride)?s:this.getGridOptionsTooltipDelay("tooltipShowDelay"):null!=(o=this.tooltipHideDelayOverride)?o:this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const t=this.gos.get("tooltipTrigger");return t&&"hover"!==t?1:0}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!St()&&(fi.isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(t)},this.INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(t))}onMouseMove(t){this.lastMouseEvent&&(this.lastMouseEvent=t),this.tooltipMouseTrack&&2===this.state&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(t){var s;const o=t.relatedTarget,r=this.parentComp.getGui(),n=null==(s=this.tooltipComp)?void 0:s.getGui();this.isInteractingWithTooltip||r.contains(o)||this.interactionEnabled&&n?.contains(o)||this.setToDoNothing()}onKeyDown(){this.setToDoNothing()}prepareToShowTooltip(t){if(0!=this.state||fi.isLocked)return;let s=0;t&&(s=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),s),this.state=1}isLastTooltipHiddenRecently(){return(new Date).getTime()-fi.lastTooltipHideTime<this.SHOW_QUICK_TOOLTIP_DIFF}setToDoNothing(){2===this.state&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const t=M({},this.parentComp.getTooltipParams());if(!y(t.value)||this.shouldDisplayTooltip&&!this.shouldDisplayTooltip())return void this.setToDoNothing();this.state=2,this.tooltipInstanceCount++;const s=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);
1this.userComponentFactory.getTooltipCompDetails(t).newAgStackInstance().then(s)}hideTooltip(t){if(!t&&this.isInteractingWithTooltip)return;this.tooltipComp&&(this.destroyTooltipComp(),fi.lastTooltipHideTime=(new Date).getTime());const s={type:g.EVENT_TOOLTIP_HIDE,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(s),this.state=0}newTooltipComponentCallback(t,s){if(2!==this.state||this.tooltipInstanceCount!==t)return void this.getContext().destroyBean(s);const r=s.getGui();this.tooltipComp=s,r.classList.contains("ag-tooltip")||r.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&r.classList.add("ag-tooltip-animate"),this.interactionEnabled&&r.classList.add("ag-tooltip-interactive");const n=this.localeService.getLocaleTextFunc(),l=this.popupService.addPopup({eChild:r,ariaLabel:n("ariaLabelTooltip","Tooltip")});l&&(this.tooltipPopupDestroyFunc=l.hideFunc),this.positionTooltip(),1===this.tooltipTrigger&&(this.onBodyScrollEventCallback=this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,this.setToDoNothing.bind(this)),this.onColumnMovedEventCallback=this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,this.setToDoNothing.bind(this))),this.interactionEnabled&&(0===this.tooltipTrigger?(this.tooltipMouseEnterListener=this.addManagedListener(r,"mouseenter",this.onTooltipMouseEnter.bind(this))||null,this.tooltipMouseLeaveListener=this.addManagedListener(r,"mouseleave",this.onTooltipMouseLeave.bind(this))||null):(this.tooltipFocusInListener=this.addManagedListener(r,"focusin",this.onTooltipFocusIn.bind(this))||null,this.tooltipFocusOutListener=this.addManagedListener(r,"focusout",this.onTooltipFocusOut.bind(this))||null));const a={type:g.EVENT_TOOLTIP_SHOW,tooltipGui:r,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(a),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isInteractingWithTooltip=!1,this.lockService()}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}onTooltipFocusOut(t){var s;const o=this.parentComp.getGui(),r=null==(s=this.tooltipComp)?void 0:s.getGui(),n=t.relatedTarget;r?.contains(n)||(this.isInteractingWithTooltip=!1,o.contains(n)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent(x(M({},t),{mouseEvent:this.lastMouseEvent})):this.popupService.positionPopupByComponent(x(M({},t),{eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5}))}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const t=this.tooltipPopupDestroyFunc,s=this.tooltipComp;window.setTimeout(()=>{t(),this.getContext().destroyBean(s)},0===this.tooltipTrigger?this.FADE_OUT_TOOLTIP_TIMEOUT:0),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(t=>{t&&t()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){fi.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},this.INTERACTIVE_HIDE_DELAY)}unlockService(){fi.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};return e.isLocked=!1,e})();d([p("popupService")],bo.prototype,"popupService",2),d([p("userComponentFactory")],bo.prototype,"userComponentFactory",2),d([T],bo.prototype,"postConstruct",1);var sh=bo,Et=class extends b{constructor(e,i){super(),this.ctrl=e,i&&(this.beans=i)}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){const i="title",t=this.ctrl.getGui();t&&(null!=e&&""!=e?t.setAttribute(i,e):t.removeAttribute(i))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){var e,i,t,s;null==this.tooltipManager&&(this.tooltipManager=this.createBean(new sh({getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()},null==(i=(e=this.ctrl).getTooltipShowDelayOverride)?void 0:i.call(e),null==(s=(t=this.ctrl).getTooltipHideDelayOverride)?void 0:s.call(t),this.ctrl.
1shouldDisplayTooltip),this.beans.context))}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){const e=this.ctrl,i=e.getColumn?e.getColumn():void 0,t=e.getColDef?e.getColDef():void 0,s=e.getRowNode?e.getRowNode():void 0;return{location:e.getLocation(),colDef:t,column:i,rowIndex:e.getRowIndex?e.getRowIndex():void 0,node:s,data:s?s.data:void 0,value:this.getTooltipText(),valueFormatted:e.getValueFormatted?e.getValueFormatted():void 0,hideTooltipCallback:()=>{var o;return null==(o=this.tooltipManager)?void 0:o.hideTooltip(!0)}}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}};d([p("beans")],Et.prototype,"beans",2),d([T],Et.prototype,"postConstruct",1);var oh=new Fi,To=(()=>{let e=class sl extends b{constructor(t){super(),this.displayed=!0,this.visible=!0,this.compId=oh.next(),this.cssClassManager=new ih(()=>this.eGui),t&&this.setTemplate(t)}preConstructOnComponent(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips")}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(t){const{newTooltipText:s,showDelayOverride:o,hideDelayOverride:r,location:n,shouldDisplayTooltip:l}=t||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==s&&(this.tooltipText=s),null!=s&&(this.tooltipFeature=this.createBean(new Et({getTooltipValue:()=>this.tooltipText,getGui:()=>this.getGui(),getLocation:()=>n??"UNKNOWN",getColDef:t?.getColDef,getColumn:t?.getColumn,getTooltipShowDelayOverride:null!=o?()=>o:void 0,getTooltipHideDelayOverride:null!=r?()=>r:void 0,shouldDisplayTooltip:l})))}createChildComponentsFromTags(t,s){ca(t.childNodes).forEach(r=>{if(!(r instanceof HTMLElement))return;const n=this.createComponentFromElement(r,l=>{l.getGui()&&this.copyAttributesFromNode(r,l.getGui())},s);if(n){if(n.addItems&&r.children.length){this.createChildComponentsFromTags(r,s);const l=Array.prototype.slice.call(r.children);n.addItems(l)}this.swapComponentForNode(n,t,r)}else r.childNodes&&this.createChildComponentsFromTags(r,s)})}createComponentFromElement(t,s,o){const r=t.nodeName,n=o?o[t.getAttribute("ref")]:void 0,l=this.agStackComponentsRegistry.getComponentClass(r);if(l){sl.elementGettingCreated=t;const a=new l(n);return a.setParentComponent(this),this.createBean(a,null,s),a}return null}copyAttributesFromNode(t,s){pa(t.attributes,(o,r)=>s.setAttribute(o,r))}swapComponentForNode(t,s,o){const r=t.getGui();s.replaceChild(r,o),s.insertBefore(document.createComment(o.nodeName),r),this.addDestroyFunc(this.destroyBean.bind(this,t)),this.swapInComponentForQuerySelectors(t,o)}swapInComponentForQuerySelectors(t,s){const o=this;this.iterateOverQuerySelectors(r=>{o[r.attributeName]===s&&(o[r.attributeName]=t)})}iterateOverQuerySelectors(t){let s=Object.getPrototypeOf(this);for(;null!=s;){const o=s.__agComponentMetaData,r=uo(s.constructor);o&&o[r]&&o[r].querySelectors&&o[r].querySelectors.forEach(n=>t(n)),s=Object.getPrototypeOf(s)}}activateTabIndex(t){const s=this.gos.get("tabIndex");t||(t=[]),t.length||t.push(this.getGui()),t.forEach(o=>o.setAttribute("tabindex",s.toString()))}setTemplate(t,s){const o=Ge(t);this.setTemplateFromElement(o,s)}setTemplateFromElement(t,s){this.eGui=t,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),s)}createChildComponentsPreConstruct(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())}wireQuerySelectors(){if(!this.eGui)return;const t=this;this.iterateOverQuerySelectors(s=>{const o=n=>t[s.attributeName]=n;if(s.refSelector&&this.getAttribute("ref")===s.refSelector)o(this.eGui);else{const n=this.eGui.querySelector(s.querySelector);n&&o(n.__agComponent||n)}})}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(t){this.parentComponent=t}getParentComponent(){return this.parentComponent}setGui(t){this.eGui=t}queryForHtmlElement(t){return this.eGui.querySelector(t)}queryForHtmlInputElement(t){return this.eGui.querySelector(t)}appendChild(t,s){null!=t&&(s||(s=this.eGui),ws(t)?s.appendChild(t):s.appendChild(t.getGui()))}isDisplayed(){return this.displayed}setVisible(t,s={}){if(t!==this.visible){this.visible=t;const{skipAriaHidden:o}=s;aa(this.eGui,t,{skipAriaHidden:o})}}setDisplayed(t,s={}){if(t!==this.displayed){this.displayed=t;const{skipAriaHidden:o}=s;z(this.eGui,t,{skipAriaHidden:o}),this.dispatchEvent({type:sl.EVENT_DISPLAYED_CHANGED,visible:this.displayed})}}destroy(){this.parentComponent&&(this.parentComponent=void 0),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const t=this.eGui;t&&t.__agComponent&&(t.__agComponent=void 0),super.destroy()}
1addGuiEventListener(t,s,o){this.eGui.addEventListener(t,s,o),this.addDestroyFunc(()=>this.eGui.removeEventListener(t,s))}addCssClass(t){this.cssClassManager.addCssClass(t)}removeCssClass(t){this.cssClassManager.removeCssClass(t)}containsCssClass(t){return this.cssClassManager.containsCssClass(t)}addOrRemoveCssClass(t,s){this.cssClassManager.addOrRemoveCssClass(t,s)}getAttribute(t){const{eGui:s}=this;return s?s.getAttribute(t):null}getRefElement(t){return this.queryForHtmlElement(`[ref="${t}"]`)}};return e.EVENT_DISPLAYED_CHANGED="displayedChanged",e})();d([p("agStackComponentsRegistry")],To.prototype,"agStackComponentsRegistry",2),d([fl],To.prototype,"preConstructOnComponent",1),d([fl],To.prototype,"createChildComponentsPreConstruct",1);var V=To;function F(e){return ba.bind(this,`[ref=${e}]`,e)}function ba(e,i,t,s,o){null!==e?"number"!=typeof o?function rh(e,i,t){const s=function nh(e,i){return e.__agComponentMetaData||(e.__agComponentMetaData={}),e.__agComponentMetaData[i]||(e.__agComponentMetaData[i]={}),e.__agComponentMetaData[i]}(e,uo(e.constructor));s[i]||(s[i]=[]),s[i].push(t)}(t,"querySelectors",{attributeName:s,querySelector:e,refSelector:i}):console.error("AG Grid: QuerySelector should be on an attribute"):console.error("AG Grid: QuerySelector selector should not be null")}var cn=class extends V{constructor(){super('\n <div class="ag-floating-filter-input" role="presentation">\n <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>\n </div>')}destroy(){super.destroy()}init(e){this.params=e;const i=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),t=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${i} ${t("ariaFilterInput","Filter Input")}`)}onParentModelChanged(e){null!=e?this.params.parentFilterInstance(i=>{if(i.getModelAsString){const t=i.getModelAsString(e);this.eFloatingFilterText.setValue(t)}}):this.eFloatingFilterText.setValue("")}onParamsUpdated(e){this.refresh(e)}refresh(e){this.init(e)}};d([F("eFloatingFilterText")],cn.prototype,"eFloatingFilterText",2),d([p("columnModel")],cn.prototype,"columnModel",2);var Ta=class{constructor(e,i,t,s,o){this.alive=!0,this.context=e,this.eParent=s,i.getDateCompDetails(t).newAgStackInstance().then(l=>{this.alive?(this.dateComp=l,l&&(s.appendChild(l.getGui()),l.afterGuiAttached&&l.afterGuiAttached(),this.tempValue&&l.setDate(this.tempValue),null!=this.disabled&&this.setDateCompDisabled(this.disabled),o?.(this))):e.destroyBean(l)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e}setDisabled(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e}setDisplayed(e){z(this.eParent,e)}setInputPlaceholder(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)}setInputAriaLabel(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)}afterGuiAttached(e){this.dateComp&&"function"==typeof this.dateComp.afterGuiAttached&&this.dateComp.afterGuiAttached(e)}updateParams(e){var i,t;let s=!1;null!=(i=this.dateComp)&&i.refresh&&"function"==typeof this.dateComp.refresh&&null!==this.dateComp.refresh(e)&&(s=!0),!s&&null!=(t=this.dateComp)&&t.onParamsUpdated&&"function"==typeof this.dateComp.onParamsUpdated&&null!==this.dateComp.onParamsUpdated(e)&&O("Custom date component method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")}setDateCompDisabled(e){null!=this.dateComp&&null!=this.dateComp.setDisabled&&this.dateComp.setDisabled(e)}},Aa=class{constructor(){this.customFilterOptions={}}init(e,i){this.filterOptions=e.filterOptions||i,this.mapCustomOptions(),this.selectDefaultItem(e)}getFilterOptions(){return this.filterOptions}mapCustomOptions(){this.filterOptions&&this.filterOptions.forEach(e=>{"string"!=typeof e&&([["displayKey"],["displayName"],["predicate","test"]].every(s=>!!s.some(o=>null!=e[o])||(console.warn(`AG Grid: ignoring FilterOptionDef as it doesn't contain one of '${s}'`),!1))?this.customFilterOptions[e.displayKey]=e:this.filterOptions=this.filterOptions.filter(s=>s===e)||[])})}selectDefaultItem(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){const i=this.filterOptions[0];"string"==typeof i?this.defaultOption=i:i.displayKey?this.defaultOption=i.displayKey:console.warn("AG Grid: invali
1d FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else console.warn("AG Grid: no filter options for filter")}getDefaultOption(){return this.defaultOption}getCustomOption(e){return this.customFilterOptions[e]}},Fa={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"},pn=(()=>{let e=class Hd extends b{constructor(t,s={}){super(),this.eFocusableElement=t,this.callbacks=s,this.callbacks=M({shouldStopEventPropagation:()=>!1,onTabKeyDown:o=>{if(o.defaultPrevented)return;const r=this.focusService.findNextFocusableElement(this.eFocusableElement,!1,o.shiftKey);r&&(r.focus(),o.preventDefault())}},s)}postConstruct(){this.eFocusableElement.classList.add(Hd.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)}addKeyDownListeners(t){this.addManagedListener(t,"keydown",s=>{if(!s.defaultPrevented&&!it(s)){if(this.callbacks.shouldStopEventPropagation(s))return void tt(s);s.key===v.TAB?this.callbacks.onTabKeyDown(s):this.callbacks.handleKeyDown&&this.callbacks.handleKeyDown(s)}})}};return e.FOCUS_MANAGED_CLASS="ag-focus-managed",e})();d([p("focusService")],pn.prototype,"focusService",2),d([T],pn.prototype,"postConstruct",1);var Pt=pn,Pa="ag-resizer-wrapper",lh=`<div class="${Pa}">\n <div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>\n <div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>\n <div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>\n <div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>\n <div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>\n <div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>\n <div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>\n <div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>\n </div>`,Pi=class extends b{constructor(e,i){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},i)}center(){const{clientHeight:e,clientWidth:i}=this.offsetParent,t=i/2-this.getWidth()/2,s=e/2-this.getHeight()/2;this.offsetElement(t,s)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:i,minWidth:t,width:s,minHeight:o,height:r,x:n,y:l}=this.config;this.offsetParent||this.setOffsetParent();let a=0,u=0;const h=Ie(this.element);if(h){const c=this.findBoundaryElement(),f=window.getComputedStyle(c);if(null!=f.minWidth){const m=c.offsetWidth-this.element.offsetWidth;u=parseInt(f.minWidth,10)-m}if(null!=f.minHeight){const m=c.offsetHeight-this.element.offsetHeight;a=parseInt(f.minHeight,10)-m}}if(this.minHeight=o||a,this.minWidth=t||u,s&&this.setWidth(s),r&&this.setHeight(r),(!s||!r)&&this.refreshSize(),e)this.center();else if(n||l)this.offsetElement(n,l);else if(h&&i){let c=this.boundaryEl,f=!0;if(c||(c=this.findBoundaryElement(),f=!1),c){const m=parseFloat(c.style.top),C=parseFloat(c.style.left);f?this.offsetElement(isNaN(C)?0:C,isNaN(m)?0:m):this.setPosition(C,m)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,i){if(!this.config.popup||e===this.movable)return;this.movable=e;const t=this.moveElementDragListener||{eElement:i,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(t),this.moveElementDragListener=t):(this.dragService.removeDragSource(t),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),"boolean"==typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(i=>
1{const s=!!e[i],o=this.getResizerElement(i),r={dragStartPixels:0,eElement:o,onDragStart:n=>this.onResizeStart(n,i),onDragging:this.onResize.bind(this),onDragStop:n=>this.onResizeEnd(n,i)};(s||!this.isAlive()&&!s)&&(s?(this.dragService.addDragSource(r),this.resizeListeners.push(r),o.style.pointerEvents="all"):o.style.pointerEvents="none",this.resizable[i]=s)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:i}=this.lastSize;-1!==i&&(this.element.style.width=`${i}px`),-1!==e&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:i}=this.config,t=this.element;let s=!1;if("string"==typeof e&&-1!==e.indexOf("%"))zt(t,e),e=tn(t),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const o=this.getAvailableHeight();o&&e>o&&(e=o)}this.getHeight()!==e&&(s?(t.style.maxHeight="unset",t.style.minHeight="unset"):i?zt(t,e):(t.style.height=`${e}px`,t.style.flex="0 0 auto",this.lastSize.height="number"==typeof e?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:i}=this.config;this.positioned||this.initialisePosition();const{clientHeight:t}=this.offsetParent;if(!t)return null;const s=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),r=e?this.position.y:s.top,n=e?0:o.top;let l=0;if(i){const u=this.element.parentElement;if(u){const{bottom:h}=u.getBoundingClientRect();l=h-s.bottom}}return t+n-r-l}getWidth(){return this.element.offsetWidth}setWidth(e){const i=this.element,{popup:t}=this.config;let s=!1;if("string"==typeof e&&-1!==e.indexOf("%"))Ye(i,e),e=gs(i),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:o}=this.offsetParent,r=t?this.position.x:this.element.getBoundingClientRect().left;o&&e+r>o&&(e=o-r)}this.getWidth()!==e&&(s?(i.style.maxWidth="unset",i.style.minWidth="unset"):this.config.popup?Ye(i,e):(i.style.width=`${e}px`,i.style.flex=" unset",this.lastSize.width="number"==typeof e?e:parseFloat(e)))}offsetElement(e=0,i=0){const{forcePopupParentAsOffsetParent:t}=this.config,s=t?this.boundaryEl:this.element;s&&(this.popupService.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:i})}),this.setPosition(parseFloat(s.style.left),parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){this.config.forcePopupParentAsOffsetParent&&(e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),()=>{const t=this.getAvailableHeight();this.element.style.setProperty("max-height",`${t}px`)}):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0)))}setPosition(e,i){this.position.x=e,this.position.y=i}updateDragStartPosition(e,i){this.dragStartPosition={x:e,y:i}}calculateMouseMovement(e){const{e:i,isLeft:t,isTop:s,anywhereWithin:o,topBuffer:r}=e,n=i.clientX-this.dragStartPosition.x,l=i.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(i,!!t,!!o,n)?0:n,movementY:this.shouldSkipY(i,!!s,r,l)?0:l}}shouldSkipX(e,i,t,s){const o=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:o.left;let a=l<=0&&r.left>=e.clientX||r.right<=e.clientX&&r.right<=n.right;return!!a||(a=i?s<0&&e.clientX>l+r.left||s>0&&e.clientX<l+r.left:t?s<0&&e.clientX>n.right||s>0&&e.clientX<l+r.left:s<0&&e.clientX>n.right||s>0&&e.clientX<n.right,a)}shouldSkipY(e,i,t=0,s){const o=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.y:o.top;let a=l<=0&&r.top>=e.clientY||r.bottom<=e.clientY&&r.bottom<=n.bottom;return!!a||(a=i?s<0&&e.clientY>l+r.top+t||s>0&&e.clientY<l+r.top:s<0&&e.clientY>n.bottom||s>0&&e.clientY<n.bottom,a)}createResizeMap(){const e=this.element;this.resizerMap={topLeft:{element:e.querySelector("[ref=eTopLeftResizer]")},top:{element:e.querySelector("[ref=eTopResizer]")},topRight:{element:e.querySelector("[ref=eTopRightResizer]")},right:{element:e.querySelector("[ref=eRightResizer]")},bottomRight:{element:e.querySelector("[ref=eBottomRightResizer]")},bottom:{element:e.querySelector("[ref=eBottomResizer]")},bottomLeft:{element:e.querySelector("[ref=eBottomLeftResizer]")}
1,left:{element:e.querySelector("[ref=eLeftResizer]")}}}addResizers(){if(this.resizersAdded)return;const e=this.element;if(!e)return;const t=(new DOMParser).parseFromString(lh,"text/html").body;e.appendChild(t.firstChild),this.createResizeMap(),this.resizersAdded=!0}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${Pa}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,i){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!i.match(/top/i),isRight:!!i.match(/right/i),isBottom:!!i.match(/bottom/i),isLeft:!!i.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[i].element.classList.add("ag-active");const{popup:t,forcePopupParentAsOffsetParent:s}=this.config;!t&&!s&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const i=this.element.parentElement;return i?Array.prototype.slice.call(i.children).filter(t=>!t.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let i=0,t=0;for(let s=0;s<e.length;s++){const o=e[s],r=!!o.style.flex&&"0 0 auto"!==o.style.flex;if(o===this.element)continue;let n=this.minHeight||0,l=this.minWidth||0;if(r){const a=window.getComputedStyle(o);a.minHeight&&(n=parseInt(a.minHeight,10)),a.minWidth&&(l=parseInt(a.minWidth,10))}else n=o.offsetHeight,l=o.offsetWidth;i+=n,t+=l}return{height:i,width:t}}
1applySizeToSiblings(e){let i=null;const t=this.getSiblings();if(t){for(let s=0;s<t.length;s++){const o=t[s];o!==i&&(e?o.style.height=`${o.offsetHeight}px`:o.style.width=`${o.offsetWidth}px`,o.style.flex="0 0 auto",o===this.element&&(i=t[s+1]))}i&&(i.style.removeProperty("height"),i.style.removeProperty("min-height"),i.style.removeProperty("max-height"),i.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:i,forcePopupParentAsOffsetParent:t}=this.config,{isTop:s,isRight:o,isBottom:r,isLeft:n}=this.currentResizer,l=o||n,a=r||s,{movementX:u,movementY:h}=this.calculateMouseMovement({e,isLeft:n,isTop:s}),c=this.position.x,f=this.position.y;let m=0,C=0;if(l&&u){const w=n?-1:1,S=this.getWidth(),R=S+u*w;let E=!1;n&&(m=S-R,(c+m<=0||R<=this.minWidth)&&(E=!0,m=0)),E||this.setWidth(R)}if(a&&h){const w=s?-1:1,S=this.getHeight(),R=S+h*w;let E=!1;s?(C=S-R,(f+C<=0||R<=this.minHeight)&&(E=!0,C=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&S<R&&this.getMinSizeOfSiblings().height+R>this.element.parentElement.offsetHeight&&(E=!0),E||this.setHeight(R)}this.updateDragStartPosition(e.clientX,e.clientY),((i||t)&&m||C)&&this.offsetElement(c+m,f+C)}onResizeEnd(e,i){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[i].element.classList.remove("ag-active"),this.dispatchEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:i,y:t}=this.position;let s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());const{movementX:o,movementY:r}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(i+o,t+r),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.offsetParent=this.config.forcePopupParentAsOffsetParent?this.popupService.getPopupParent():this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}};d([p("popupService")],Pi.prototype,"popupService",2),d([p("resizeObserverService")],Pi.prototype,"resizeObserverService",2),d([p("dragService")],Pi.prototype,"dragService",2);var Ao=class Zs extends V{constructor(i){super(),this.filterNameKey=i,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.buttonListeners=[]}postConstruct(){this.resetTemplate(),this.createManagedBean(new Pt(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new Pi(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(i){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(i){let t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);const s=`\n <form class="ag-filter-wrapper">\n <div class="ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper" ref="eFilterBody">\n ${this.createBodyTemplate()}\n </div>\n </form>`;this.setTemplate(s,i),t=this.getGui(),t&&t.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.providedFilterParams.readOnly}init(i){this.setParams(i),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(i){this.providedFilterParams=i,this.applyActive=Zs.isUseApplyButton(i),this.resetButtonsPanel()}updateParams(i){this.providedFilterParams=i,this.applyActive=Zs.isUseApplyButton(i),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(){const{buttons:i}=this.providedFilterParams,t=i&&i.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(ne(this.eButtonsPanel),this.buttonListeners.forEac
1h(r=>r?.()),this.buttonListeners=[]):t&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!t)return void(this.eButtonsPanel&&st(this.eButtonsPanel));const s=document.createDocumentFragment(),o=r=>{let n,l;switch(r){case"apply":n=this.translate("applyFilter"),l=h=>this.onBtApply(!1,!1,h);break;case"clear":n=this.translate("clearFilter"),l=()=>this.onBtClear();break;case"reset":n=this.translate("resetFilter"),l=()=>this.onBtReset();break;case"cancel":n=this.translate("cancelFilter"),l=h=>{this.onBtCancel(h)};break;default:return void console.warn("AG Grid: Unknown button type specified")}const u=Ge(`<button\n type="${"apply"===r?"submit":"button"}"\n ref="${r}FilterButton"\n class="ag-button ag-standard-button ag-filter-apply-panel-button"\n >${n}\n </button>`);this.buttonListeners.push(this.addManagedListener(u,"click",l)),s.append(u)};hn(i).forEach(r=>o(r)),this.eButtonsPanel.append(s),this.getGui().appendChild(this.eButtonsPanel)}getDefaultDebounceMs(){return 0}setupOnBtApplyDebounce(){const i=Zs.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),t=Ee(this.checkApplyDebounce.bind(this),i);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel?this.appliedModel:null}setModel(i){return(null!=i?this.setModelIntoUi(i):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(i){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(i)})}handleCancelEnd(i){this.providedFilterParams.closeOnApply&&this.close(i)}resetUiToActiveModel(i,t){const s=()=>{this.onUiChanged(!1,"prevent"),t?.()};null!=i?this.setModelIntoUi(i).then(s):this.resetUiToDefaults().then(s)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(i="api"){const t=this.getModelFromUi();if(!this.isModelValid(t))return!1;const s=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(s,t)}isModelValid(i){return!0}onFormSubmit(i){i.preventDefault()}onBtApply(i=!1,t=!1,s){s&&s.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.providedFilterParams.filterChangedCallback({afterFloatingFilter:i,afterDataChange:t,source:"columnFilter"});const{closeOnApply:o}=this.providedFilterParams;o&&this.applyActive&&!i&&!t&&this.close(s)}onNewRowsLoaded(){}close(i){if(!this.hidePopup)return;const s=i&&i.key;let o;("Enter"===s||"Space"===s)&&(o={keyboardEvent:i}),this.hidePopup(o),this.hidePopup=null}onUiChanged(i=!1,t){if(this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const s=this.isModelValid(this.getModelFromUi()),o=this.getRefElement("applyFilterButton");o&&Ai(o,!s)}i&&!t||"immediately"===t?this.onBtApply(i):(!this.applyActive&&!t||"debounce"===t)&&this.onBtApplyDebounce()}afterGuiAttached(i){i&&(this.hidePopup=i.hidePopup),this.refreshFilterResizer(i?.container)}refreshFilterResizer(i){if(!this.positionableFeature||"toolPanel"===i)return;const t="floatingFilter"===i||"columnFilter"===i,{positionableFeature:s,gos:o}=this;t?(s.restoreLastSize(),s.setResizable(o.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setResizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)}static getDebounceMs(i,t){return Zs.isUseApplyButton(i)?(null!=i.debounceMs&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):null!=i.debounceMs?i.debounceMs:t}static isUseApplyButton(i){return!!i.buttons&&i.buttons.indexOf("apply")>=0}refresh(i){return this.providedFilterParams=i,!0}destroy(){const i=this.getGui();i&&i.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(i){return this.localeService.getLocaleTextFunc()(i,Fa[i])}getCellValue(i){return this.providedFilterParams.getValue(i)}getPositionableElement(){return this.eFilterBody}};d([p("rowModel")],Ao.prototype,"rowModel",2),d([F("eFilterBody")],Ao.prototype,"eFilterBody",2),d([T],Ao.prototype,"postConstruct",1);var Fo=Ao,gn=class extends V{constructor(e,i){super(i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{}}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:i,labelWidth:t,labelAlignment:s,disabled:o}=this.config;null!=o&&this.setDisabled(o),null!=e&&this.setLabelSeparator(e),null!=i&&this.setLabel(i),null!=t&&this.setLabelWidth(t),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()}refreshLabel(){ne(this.eLabel),"string"==typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(z(this.eLabel,!1),oe(this.eLabel,"presentation")):(z(this.eLabel,!0),oe(this.eLabel,null))}setLabelSeparator(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this}getLabelId(){return this.eLabel.id=this.eLabel.id||`ag-${this.getCompId()}-label`,this.eLabel.id}getLabel(){return this.label}setLabel(e){return this.label===e||(this.label=e,this.refreshLabel()),this}setLabelAlignment(e){const t=this.getGui().classList;return t.toggle("ag-label-align-left","left"===e),t.toggle("ag-label-align-right","right"===e),t.toggle("ag-label-align-top","top"===e),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return null==this.label||vs(this.eLabel,e),this}setDisabled(e){e=!!e;const i=this.getGui();return Ai(i,e),i.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}};d([T],gn.prototype,"postConstruct",1);var La=class extends gn{constructor(e,i,t){super(e,i),this.className=t}
1postConstruct(){super.postConstruct();const{width:e,value:i,onValueChange:t}=this.config;null!=e&&this.setWidth(e),null!=i&&this.setValue(i),null!=t&&this.onValueChange(t),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}refreshAriaLabelledBy(){const e=this.getAriaElement(),i=this.getLabelId();null!==kl(e)?Ri(e,""):Ri(e,i??"")}setAriaLabel(e){return He(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListener(this,g.EVENT_FIELD_VALUE_CHANGED,()=>e(this.getValue())),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Ye(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,i){return this.value===e||(this.previousValue=this.value,this.value=e,i||this.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED})),this}},Kt=class extends La{constructor(e){if(super(e,e?.template||'\n <div class="ag-picker-field" role="presentation">\n <div ref="eLabel"></div>\n <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">\n <div ref="eDisplayField" class="ag-picker-field-display"></div>\n <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n </div>\n </div>',e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:i,maxPickerHeight:t,variableWidth:s,minPickerWidth:o,maxPickerWidth:r}=e;null!=i&&(this.pickerGap=i),this.variableWidth=!!s,null!=t&&this.setPickerMaxHeight(t),null!=o&&this.setPickerMinWidth(o),null!=r&&this.setPickerMaxWidth(r)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const i=this.getAriaElement();this.addManagedListener(i,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(this.eLabel,"mousedown",this.onLabelOrWrapperMouseDown.bind(this)),this.addManagedListener(this.eWrapper,"mousedown",this.onLabelOrWrapperMouseDown.bind(this));const{pickerIcon:t,inputWidth:s}=this.config;if(t){const o=se(t,this.gos);o&&this.eIcon.appendChild(o)}null!=s&&this.setInputWidth(s)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),wt(e,!1),this.ariaRole&&oe(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const i=this.getFocusableElement();if(i!==this.eWrapper&&e?.target===i)return;e.preventDefault(),this.getFocusableElement().focus()}this.skipClick?this.skipClick=!1:this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case v.UP:case v.DOWN:case v.ENTER:case v.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case v.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.gos.getDocument(),i=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||(this.destroyMouseWheelFunc=this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,()=>{this.hidePicker()}));const t=this.localeService.getLocaleTextFunc(),{pickerAriaLabelKey:s,pickerAriaLabelValue:o,modalPicker:r=!0}=this.config,n={modal:r,eChild:i,closeOnEsc:!0,closedCallback:()=>{const m=this.gos.getActiveDomElement(),C=!m||m===e.body;this.beforeHidePicker(),C&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(s,o)},l=this.popupService.addPopup(n),{maxPickerHeight:a,minPickerWidth:u,maxPickerWidth:h,variableWidth:c}=this;c?(u&&(i.style.minWidth=u),i.style.width=yo(gs(this.eWrapper)),h&&(i.style.maxWidth=h)):vs(i,h??gs(this.eWrapper));const f=a??`${ps(this.popupService.getPopupParent())}px`;return i.style.setProperty("max-height",f),i.style.position="absolute",this.alignPickerToComponent(),l.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerType:e}=this.config,{pickerGap:i}=this,t=this.gos.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:e,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:t,keepWithinBounds:!0,nudgeY:i})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){this.isAlive()&&(wt(this.getAriaElement(),e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e))}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var i;null!=(i=this.pickerComponent)&&i.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&this.hideCurrentPicker()}setInputWidth(e){return vs(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return"number"==typeof e&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}};d([p("popupService")],Kt.prototype,"popupService",2),d([F("eLabel")],Kt.prototype,"eLabel",2),d([F("eWrapper")],Kt.prototype,"eWrapper",2),d([F("eDisplayField")],Kt.prototype,"eDisplayField",2),d([F("eIcon")],Kt.prototype,"eIcon",2);var Ma=(()=>{let e=class ur extends V{constructor(t="default",s=!1){super(`<div class="ag-list ag-${t}-list" role="listbox"></div>`),this.cssIdentifier=t,this.unFocusable=s,this.options=[],this.itemEls=[]}init(){const t=this.getGui();this.addManagedListener(t,"mouseleave",()=>this.clearHighlighted()),!this.unFocusable&&this.addManagedListener(t,"keydown",this.handleKeyDown.bind(this))}handleKeyDown(t){const s=t.key;switch(s){case v.ENTER:if(this.highlightedEl){const o=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(o)}else this.setValue(this.getValue());break;case v.DOWN:case v.UP:t.preventDefault(),this.navigate(s);break;case v.PAGE_DOWN:case v.PAGE_UP:case v.PAGE_HOME:case v.PAGE_END:t.preventDefault(),this.navigateToPage(s)}}navigate(t){const s=t===v.DOWN;let o;if(this.highlightedEl){let n=this.itemEls.indexOf(this.highlightedEl)+(s?1:-1);n=Math.min(Math.max(n,0),this.itemEls.length-1),o=this.itemEls[n]}else o=this.itemEls[s?0:this.itemEls.length-1];this.highlightItem(o)}navigateToPage(t){if(!this.highlightedEl||0===this.itemEls.length)return;const s=this.itemEls.indexOf(this.highlightedEl),o=this.options.length-1,r=this.itemEls[0].clientHeight,n=Math.floor(this.getGui().clientHeight/r);let l=-1;t===v.PAGE_HOME?l=0:t===v.PAGE_END?l=o:t===v.PAGE_DOWN?l=Math.min(s+n,o):t===v.PAGE_UP&&(l=Math.max(s-n,0)),-1!==l&&this.highlightItem(this.itemEls[l])}addOptions(t){return t.forEach(s=>this.addOption(s)),this}addOption(t){const{value:s,text:o}=t,r=o||s;return this.options.push({value:s,text:r}),this.renderOption(s,r),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEac
1h(t=>{st(t)}),this.itemEls=[]}updateIndices(){const t=this.getGui().querySelectorAll(".ag-list-item");t.forEach((s,o)=>{mo(s,o+1),fo(s,t.length)})}renderOption(t,s){const o=this.gos.getDocument(),r=o.createElement("div");oe(r,"option"),r.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const n=o.createElement("span");r.appendChild(n),n.textContent=s,this.unFocusable||(r.tabIndex=-1),this.itemEls.push(r),this.addManagedListener(r,"mousemove",()=>this.highlightItem(r)),this.addManagedListener(r,"mousedown",l=>{l.preventDefault(),this.setValue(t)}),this.createManagedBean(new Et({getTooltipValue:()=>s,getGui:()=>r,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>n.scrollWidth>n.clientWidth})),this.getGui().appendChild(r)}setValue(t,s){if(this.value===t)return this.fireItemSelected(),this;if(null==t)return this.reset(s),this;const o=this.options.findIndex(r=>r.value===t);if(-1!==o){const r=this.options[o];this.value=r.value,this.displayValue=r.text,this.highlightItem(this.itemEls[o]),s||this.fireChangeEvent()}return this}setValueByIndex(t){return this.setValue(this.options[t].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const t=this.options.findIndex(s=>s.value===this.value);-1!==t&&this.highlightItem(this.itemEls[t])}reset(t){this.value=null,this.displayValue=null,this.clearHighlighted(),t||this.fireChangeEvent()}highlightItem(t){if(!Ie(t))return;this.clearHighlighted(),this.highlightedEl=t,this.highlightedEl.classList.add(ur.ACTIVE_CLASS),Di(this.highlightedEl,!0);const s=this.getGui(),{scrollTop:o,clientHeight:r}=s,{offsetTop:n,offsetHeight:l}=t;(n+l>o+r||n<o)&&this.highlightedEl.scrollIntoView({block:"nearest"}),this.unFocusable||this.highlightedEl.focus()}clearHighlighted(){!this.highlightedEl||!Ie(this.highlightedEl)||(this.highlightedEl.classList.remove(ur.ACTIVE_CLASS),Di(this.highlightedEl,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED}),this.fireItemSelected()}fireItemSelected(){this.dispatchEvent({type:ur.EVENT_ITEM_SELECTED})}};return e.EVENT_ITEM_SELECTED="selectedItem",e.ACTIVE_CLASS="ag-active-item",e})();d([T],Ma.prototype,"init",1);var Ia=Ma,dh=(()=>{let e=class kd extends Kt{constructor(t){super(M({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"combobox"},t))}postConstruct(){super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:t,value:s,placeholder:o}=this.config;null!=t&&this.addOptions(t),null!=s&&this.setValue(s,!0),o&&null==s&&(this.eDisplayField.textContent=o),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}onWrapperFocusOut(t){this.eWrapper.contains(t.relatedTarget)||this.hidePicker()}createListComponent(){this.listComponent=this.createBean(new Ia("select",!0)),this.listComponent.setParentComponent(this);const t=this.listComponent.getAriaElement(),s=`ag-select-list-${this.listComponent.getCompId()}`;t.setAttribute("id",s),_r(this.getAriaElement(),t),this.listComponent.addManagedListener(this.listComponent,Ia.EVENT_ITEM_SELECTED,()=>{this.hidePicker(),this.dispatchEvent({type:kd.EVENT_ITEM_SELECTED})}),this.listComponent.addManagedListener(this.listComponent,g.EVENT_FIELD_VALUE_CHANGED,()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())})}createPickerComponent(){return this.listComponent}onKeyDown(t){var s;const{key:o}=t;switch(o===v.TAB&&this.hidePicker(),o){case v.ENTER:case v.UP:case v.DOWN:case v.PAGE_UP:case v.PAGE_DOWN:case v.PAGE_HOME:case v.PAGE_END:t.preventDefault(),this.isPickerDisplayed?null==(s=this.listComponent)||s.handleKeyDown(t):super.onKeyDown(t);break;case v.ESCAPE:super.onKeyDown(t)}}showPicker(){this.listComponent&&(super.showPicker(),this.listComponent.refreshHighlighted())}addOptions(t){return t.forEach(s=>this.addOption(s)),this}addOption(t){return this.listComponent.addOption(t),this}clearOptions(){var t;return null==(t=this.listComponent)||t.clearOptions(),this}setValue(t,s,o){if(this.value===t||!this.listComponent)return this;if(o||this.listComponent.setValue(t,!0),this.listComponent.getValue()===this.getValue())return this;let n=this.listComponent.getDisplayValue();return null==n&&this.config.placeholder&&(n=this.config.placeholder),this.eDisplayField.textContent=n,this.setTooltip({newTooltipText:n??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth}
1),super.setValue(t,s)}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),super.destroy()}};return e.EVENT_ITEM_SELECTED="selectedItem",e})(),Po=dh,ot=class extends La{constructor(e,i,t="text",s="input"){super(e,`\n <div role="presentation">\n <div ref="eLabel" class="ag-input-field-label"></div>\n <div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">\n <${s} ref="eInput" class="ag-input-field-input"></${s}>\n </div>\n </div>`,i),this.inputType=t,this.displayFieldTag=s}postConstruct(){super.postConstruct(),this.setInputType(),this.eLabel.classList.add(`${this.className}-label`),this.eWrapper.classList.add(`${this.className}-input-wrapper`),this.eInput.classList.add(`${this.className}-input`),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||`ag-${this.getCompId()}-input`;const{inputName:e,inputWidth:i}=this.config;null!=e&&this.setInputName(e),null!=i&&this.setInputWidth(i),this.addInputListeners(),this.activateTabIndex([this.eInput])}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>this.setValue(e.target.value))}setInputType(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return vs(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){return this.eInput.maxLength=e,this}setInputPlaceholder(e){return dt(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return He(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Ai(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){return dt(this.eInput,"autocomplete",!0===e?null:"string"==typeof e?e:"off"),this}};d([F("eLabel")],ot.prototype,"eLabel",2),d([F("eWrapper")],ot.prototype,"eWrapper",2),d([F("eInput")],ot.prototype,"eInput",2);var Lo=class extends ot{constructor(e,i="ag-checkbox",t="checkbox"){super(e,i,t),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:i}=this.config;"boolean"==typeof e&&this.setReadOnly(e),"boolean"==typeof i&&this.setPassive(i)}addInputListeners(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))}getNextValue(){return void 0===this.selected||!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),i=this.getNextValue();this.passive?this.dispatchChange(i,e):this.setValue(i)}getValue(){return this.isSelected()}setValue(e,i){return this.refreshSelectedClass(e),this.setSelected(e,i),this}setName(e){return this.getInputElement().name=e,this}isSelected(){return this.selected}setSelected(e,i){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected="boolean"==typeof e?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=void 0===e,i||this.dispatchChange(this.selected,this.previousValue))}dispatchChange(e,i,t){this.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:i,event:t});const s=this.getInputElement();this.eventService.dispatchEvent({type:g.EVENT_CHECKBOX_CHANGED,id:s.id,name:s.name,selected:e,previousValue:i})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const i=this.isSelected(),t=this.selected=e.target.checked;this.refreshSelectedClass(t),this.dispatchChange(t,i,e)}refreshSelectedClass(e){this.eWrapper.classList.toggle("ag-checked",!0===e),this.eWrapper.classList.toggle("ag-indeterminate",null==e)}},Ga=class extends Lo{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}
1addInputListeners(){super.addInputListeners(),this.addManagedListener(this.eventService,g.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))}onChange(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)}},fn=class{constructor(e,i,t){this.localeService=e,this.optionsFactory=i,this.valueFormatter=t}getModelAsString(e){if(!e)return null;const i=null!=e.operator,t=this.localeService.getLocaleTextFunc();if(i){const s=e;let{conditions:o}=s;if(!o){const{condition1:l,condition2:a}=s;o=[l,a]}const r=o.map(l=>this.getModelAsString(l)),n="AND"===s.operator?"andCondition":"orCondition";return r.join(` ${t(n,Fa[n])} `)}if(e.type===re.BLANK||e.type===re.NOT_BLANK)return t(e.type,e.type);{const s=e,o=this.optionsFactory.getCustomOption(s.type),{displayKey:r,displayName:n,numberOfInputs:l}=o||{};return r&&n&&0===l?(t(r,n),n):this.conditionToString(s,o)}}updateParams(e){this.optionsFactory=e.optionsFactory}formatValue(e){var i;return this.valueFormatter?null!=(i=this.valueFormatter(e??null))?i:"":String(e)}},uh=(()=>{let e=class ts extends Fo{constructor(){super(...arguments),this.eTypes=[],this.eJoinOperatorPanels=[],this.eJoinOperatorsAnd=[],this.eJoinOperatorsOr=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}getNumberOfInputs(t){const s=this.optionsFactory.getCustomOption(t);if(s){const{numberOfInputs:r}=s;return r??1}return t&&[ts.EMPTY,ts.NOT_BLANK,ts.BLANK].indexOf(t)>=0?0:t===ts.IN_RANGE?2:1}onFloatingFilterChanged(t,s){this.setTypeFromFloatingFilter(t),this.setValueFromFloatingFilter(s),this.onUiChanged(!0)}setTypeFromFloatingFilter(t){this.eTypes.forEach((s,o)=>{s.setValue(0===o?t:this.optionsFactory.getDefaultOption(),!0)})}getModelFromUi(){const t=this.getUiCompleteConditions();return 0===t.length?null:this.maxNumConditions>1&&t.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:t[0],condition2:t[1],conditions:t}:t[0]}getConditionTypes(){return this.eTypes.map(t=>t.getValue())}getConditionType(t){return this.eTypes[t].getValue()}getJoinOperator(){return 0===this.eJoinOperatorsOr.length?this.defaultJoinOperator:!0===this.eJoinOperatorsOr[0].getValue()?"OR":"AND"}areModelsEqual(t,s){if(!t&&!s)return!0;if(!t&&s||t&&!s)return!1;const o=!t.operator,r=!s.operator;if(!o&&r||o&&!r)return!1;let l;return l=o?this.areSimpleModelsEqual(t,s):t.operator===s.operator&<(t.conditions,s.conditions,(h,c)=>this.areSimpleModelsEqual(h,c)),l}shouldRefresh(t){var s,o,r;const n=this.getModel(),l=n?null!=(s=n.conditions)?s:[n]:null,a=null!=(r=null==(o=t.filterOptions)?void 0:o.map(h=>"string"==typeof h?h:h.displayKey))?r:this.getDefaultFilterOptions();return!(l&&!l.every(h=>void 0!==a.find(c=>c===h.type))||"number"==typeof t.maxNumConditions&&l&&l.length>t.maxNumConditions)}refresh(t){return!(!this.shouldRefresh(t)||!super.refresh(t)||(this.setParams(t),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),0))}setModelIntoUi(t){if(t.operator){let o=t;o.conditions||(o.conditions=[o.condition1,o.condition2]);const r=this.validateAndUpdateConditions(o.conditions),n=this.getNumConditions();if(r<n)this.removeConditionsAndOperators(r);else if(r>n)for(let a=n;a<r;a++)this.createJoinOperatorPanel(),this.createOption();const l="OR"===o.operator;this.eJoinOperatorsAnd.forEach(a=>a.setValue(!l,!0)),this.eJoinOperatorsOr.forEach(a=>a.setValue(l,!0)),o.conditions.forEach((a,u)=>{this.eTypes[u].setValue(a.type,!0),this.setConditionIntoUi(a,u)})}else{const o=t;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(o.type,!0),this.setConditionIntoUi(o,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),ke.resolve()}validateAndUpdateConditions(t){let s=t.length;return s>this.maxNumConditions&&(t.splice(this.maxNumConditions),O('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),s=this.maxNumConditions),s}doesFilterPass(t){var s;const o=this.getModel();if(null==o)return!0;const{operator:r}=o,n=[];return r?n.push(...null!=(s=o.conditions)?s:[]):n.push(o),n[r&&"OR"===r?"some":"every"](a=>this.individualConditionPasses(t,a))}setParams(t){super.setParams(t),this.setNumConditions(t),this.defaultJoinOperator=this.getDefaultJoinOperator(t.defaultJoinOperator),this.filterPlaceholder=t.filterPlaceholder,this.optionsFactory=new Aa,this.optionsFactory.init(t,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")}setNumConditions(t){var s,o;null!=t.suppressAndOrCondition&&O('Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'),null!=t.alwaysShowBothConditions&&O('Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'),this.maxNumConditions=null!=(s=t.maxNumConditions)?s:t.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(O('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=null!=(o=t.numAlwaysVisibleConditions)?o:t.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(O('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(O('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)}createOption(){const t=this.createManagedBean(new Po);this.eTypes.push(t),t.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(t.getGui());const s=this.createValueElement();this.eConditionBodies.push(s),this.eFilterBody.appendChild(s),this.putOptionsIntoDropdown(t),this.resetType(t);
1const o=this.getNumConditions()-1;this.forEachPositionInput(o,r=>this.resetInput(r)),this.addChangedListeners(t,o)}createJoinOperatorPanel(){const t=document.createElement("div");this.eJoinOperatorPanels.push(t),t.classList.add("ag-filter-condition");const s=this.createJoinOperator(this.eJoinOperatorsAnd,t,"and"),o=this.createJoinOperator(this.eJoinOperatorsOr,t,"or");this.eFilterBody.appendChild(t);const r=this.eJoinOperatorPanels.length-1,n=this.joinOperatorId++;this.resetJoinOperatorAnd(s,r,n),this.resetJoinOperatorOr(o,r,n),this.isReadOnly()||(s.onValueChange(this.listener),o.onValueChange(this.listener))}createJoinOperator(t,s,o){const r=this.createManagedBean(new Ga);return t.push(r),r.addCssClass("ag-filter-condition-operator"),r.addCssClass(`ag-filter-condition-operator-${o}`),s.appendChild(r.getGui()),r}getDefaultJoinOperator(t){return"AND"===t||"OR"===t?t:"AND"}createFilterListOptions(){const t=this.optionsFactory.getFilterOptions();this.filterListOptions=t.map(s=>"string"==typeof s?this.createBoilerplateListOption(s):this.createCustomListOption(s))}putOptionsIntoDropdown(t){this.filterListOptions.forEach(s=>{t.addOption(s)}),t.setDisabled(this.filterListOptions.length<=1)}createBoilerplateListOption(t){return{value:t,text:this.translate(t)}}createCustomListOption(t){const{displayKey:s}=t,o=this.optionsFactory.getCustomOption(t.displayKey);return{value:s,text:o?this.localeService.getLocaleTextFunc()(o.displayKey,o.displayName):this.translate(s)}}isAllowTwoConditions(){return this.maxNumConditions>=2}createBodyTemplate(){return""}getCssIdentifier(){return"simple-filter"}updateUiVisibility(){const t=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,t)}updateNumConditions(){var t;let s=-1,o=!0;for(let r=0;r<this.getNumConditions();r++)this.isConditionUiComplete(r)?s=r:o=!1;if(this.shouldAddNewConditionAtEnd(o))this.createJoinOperatorPanel(),this.createOption();else{const r=null!=(t=this.lastUiCompletePosition)?t:this.getNumConditions()-2;if(s<r){this.removeConditionsAndOperators(r+1);const n=s+1,l=r-n;l>0&&this.removeConditionsAndOperators(n,l),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=s}updateConditionStatusesAndValues(t,s){this.eTypes.forEach((r,n)=>{const l=this.isConditionDisabled(n,t);r.setDisabled(l||this.filterListOptions.length<=1),1===n&&(Ai(this.eJoinOperatorPanels[0],l),this.eJoinOperatorsAnd[0].setDisabled(l),this.eJoinOperatorsOr[0].setDisabled(l))}),this.eConditionBodies.forEach((r,n)=>{z(r,this.isConditionBodyVisible(n))});const o="OR"===(s??this.getJoinOperator());this.eJoinOperatorsAnd.forEach((r,n)=>{r.setValue(!o,!0)}),this.eJoinOperatorsOr.forEach((r,n)=>{r.setValue(o,!0)}),this.forEachInput((r,n,l,a)=>{this.setElementDisplayed(r,n<a),this.setElementDisabled(r,this.isConditionDisabled(l,t))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(t){return t&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(t,s){if(t>=this.getNumConditions())return;this.removeComponents(this.eTypes,t,s),this.removeElements(this.eConditionBodies,t,s),this.removeValueElements(t,s);const o=Math.max(t-1,0);this.removeElements(this.eJoinOperatorPanels,o,s),this.removeComponents(this.eJoinOperatorsAnd,o,s),this.removeComponents(this.eJoinOperatorsOr,o,s)}removeElements(t,s,o){this.removeItems(t,s,o).forEach(n=>st(n))}removeComponents(t,s,o){this.removeItems(t,s,o).forEach(n=>{st(n.getGui()),this.destroyBean(n)})}removeItems(t,s,o){return null==o?t.splice(s):t.splice(s,o)}afterGuiAttached(t){if(super.afterGuiAttached(t),this.resetPlaceholder(),!t?.suppressFocus)if(this.isReadOnly())this.eFilterBody.focus();else{const s=this.getInputs(0)[0];if(!s)return;s instanceof ot&&s.getInputElement().focus()}}afterGuiDetached(){super.afterGuiDetached();const t=this.getModel();this.resetUiToActiveModel(t);let s=-1,o=-1,r=!1;const n=this.getJoinOperator();for(let a=this.getNumConditions()-1;a>=0;a--)if(this.isConditionUiComplete(a))-1===s&&(s=a,o=a);else{const h=a<s;(a>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(a-1)||h)&&(this.removeConditionsAndOperators(a,1),r=!0,h&&o--)}let l=!1;
1this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),l=!0),this.shouldAddNewConditionAtEnd(o===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),l=!0),l&&this.updateConditionStatusesAndValues(o,n),r&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=o}getPlaceholderText(t,s){let o=this.translate(t);if(ho(this.filterPlaceholder)){const r=this.filterPlaceholder,n=this.eTypes[s].getValue();o=r({filterOptionKey:n,filterOption:this.translate(n),placeholder:o})}else"string"==typeof this.filterPlaceholder&&(o=this.filterPlaceholder);return o}resetPlaceholder(){const t=this.localeService.getLocaleTextFunc();this.forEachInput((s,o,r,n)=>{if(!(s instanceof ot))return;const l=0===o&&n>1?"inRangeStart":0===o?"filterOoo":"inRangeEnd",a=0===o&&n>1?t("ariaFilterFromValue","Filter from value"):0===o?t("ariaFilterValue","Filter Value"):t("ariaFilterToValue","Filter to Value");s.setInputPlaceholder(this.getPlaceholderText(l,r)),s.setInputAriaLabel(a)})}setElementValue(t,s,o){t instanceof ot&&t.setValue(null!=s?String(s):null,!0)}setElementDisplayed(t,s){t instanceof V&&z(t.getGui(),s)}setElementDisabled(t,s){t instanceof V&&Ai(t.getGui(),s)}attachElementOnChange(t,s){t instanceof ot&&t.onValueChange(s)}forEachInput(t){this.getConditionTypes().forEach((s,o)=>{this.forEachPositionTypeInput(o,s,t)})}forEachPositionInput(t,s){const o=this.getConditionType(t);this.forEachPositionTypeInput(t,o,s)}forEachPositionTypeInput(t,s,o){const r=this.getNumberOfInputs(s),n=this.getInputs(t);for(let l=0;l<n.length;l++){const a=n[l];null!=a&&o(a,l,t,r)}}isConditionDisabled(t,s){return!!this.isReadOnly()||0!==t&&t>s+1}isConditionBodyVisible(t){const s=this.getConditionType(t);return this.getNumberOfInputs(s)>0}isConditionUiComplete(t){return!(t>=this.getNumConditions()||this.getConditionType(t)===ts.EMPTY||this.getValues(t).some(o=>null==o))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const t=[];for(let s=0;s<this.getNumConditions();s++)this.isConditionUiComplete(s)&&t.push(this.createCondition(s));return t}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let t=this.getNumConditions();t<this.numAlwaysVisibleConditions;t++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(t){return this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(s=>this.resetType(s)),this.eJoinOperatorsAnd.forEach((s,o)=>this.resetJoinOperatorAnd(s,o,this.joinOperatorId+o)),this.eJoinOperatorsOr.forEach((s,o)=>this.resetJoinOperatorOr(s,o,this.joinOperatorId+o)),this.joinOperatorId++,this.forEachInput(s=>this.resetInput(s)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,t||this.onUiChanged(),ke.resolve()}resetType(t){const o=this.localeService.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");t.setValue(this.optionsFactory.getDefaultOption(),!0).setAriaLabel(o).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(t,s,o){this.resetJoinOperator(t,s,this.isDefaultOperator("AND"),this.translate("andCondition"),o)}resetJoinOperatorOr(t,s,o){this.resetJoinOperator(t,s,this.isDefaultOperator("OR"),this.translate("orCondition"),o)}resetJoinOperator(t,s,o,r,n){this.updateJoinOperatorDisabled(t.setValue(o,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${n}`).setLabel(r),s)}updateJoinOperatorsDisabled(){this.eJoinOperatorsAnd.forEach((t,s)=>this.updateJoinOperatorDisabled(t,s)),this.eJoinOperatorsOr.forEach((t,s)=>this.updateJoinOperatorDisabled(t,s))}updateJoinOperatorDisabled(t,s){t.setDisabled(this.isReadOnly()||s>0)}resetInput(t){this.setElementValue(t,null),this.setElementDisabled(t,this.isReadOnly())}setConditionIntoUi(t,s){const o=this.mapValuesFromModel(t);this.forEachInput((r,n,l,a)=>{l===s&&this.setElementValue(r,null!=o[n]?o[n]:null)})}setValueFromFloatingFilter(t){this.forEachInput((s,o,r,n)=>{this.setElementValue(s,0===o&&0===r?t:null,!0)})}isDefaultOperator(t){return t===this.defaultJoinOperator}addChangedListeners(t,s){this.isReadOnly()||(t.onValueChange(this.listener),this.forEachPositionInput(s,o=>{this.attachElementOnChange(o,this.listener)}))}individualConditionPasses(t,s){const o=this.getCellValue(t.node),r=this.mapValuesFromModel(s),n=this.optionsFactory.getCustomOption(s.type);return this.evaluateCustomFilter(n,r,o)??(null==o?this.evaluateNullV
1alue(s.type):this.evaluateNonNullValue(r,o,s,t))}evaluateCustomFilter(t,s,o){if(null==t)return;const{predicate:r}=t;return null==r||s.some(n=>null==n)?void 0:r(s,o)}isBlank(t){return null==t||"string"==typeof t&&0===t.trim().length}hasInvalidInputs(){return!1}};return e.EMPTY="empty",e.BLANK="blank",e.NOT_BLANK="notBlank",e.EQUALS="equals",e.NOT_EQUAL="notEqual",e.LESS_THAN="lessThan",e.LESS_THAN_OR_EQUAL="lessThanOrEqual",e.GREATER_THAN="greaterThan",e.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",e.IN_RANGE="inRange",e.CONTAINS="contains",e.NOT_CONTAINS="notContains",e.STARTS_WITH="startsWith",e.ENDS_WITH="endsWith",e})(),re=uh,ue=class ce extends re{setParams(i){super.setParams(i),this.scalarFilterParams=i}evaluateNullValue(i){switch(i){case ce.EQUALS:case ce.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case ce.GREATER_THAN:case ce.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case ce.LESS_THAN:case ce.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case ce.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case ce.BLANK:return!0;case ce.NOT_BLANK:return!1}return!1}evaluateNonNullValue(i,t,s){const o=this.comparator(),r=null!=i[0]?o(i[0],t):0;switch(s.type){case ce.EQUALS:return 0===r;case ce.NOT_EQUAL:return 0!==r;case ce.GREATER_THAN:return r>0;case ce.GREATER_THAN_OR_EQUAL:return r>=0;case ce.LESS_THAN:return r<0;case ce.LESS_THAN_OR_EQUAL:return r<=0;case ce.IN_RANGE:{const n=o(i[1],t);return this.scalarFilterParams.inRangeInclusive?r>=0&&n<=0:r>0&&n<0}case ce.BLANK:return this.isBlank(t);case ce.NOT_BLANK:return!this.isBlank(t);default:return console.warn('AG Grid: Unexpected type of filter "'+s.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}}},xa=1/0,Oa=class extends fn{constructor(e,i,t){super(i,t),this.dateFilterParams=e}conditionToString(e,i){const{type:t}=e,{numberOfInputs:s}=i||{},o=t==re.IN_RANGE||2===s,r=Me(e.dateFrom),n=Me(e.dateTo),l=this.dateFilterParams.inRangeFloatingFilterDateFormat;return o?`${null!==r?Ti(r,l):"null"}-${null!==n?Ti(n,l):"null"}`:null!=r?Ti(r,l):`${t}`}updateParams(e){super.updateParams(e),this.dateFilterParams=e.dateFilterParams}},mn=class Bd extends ue{constructor(){super("dateFilter"),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=1e3,this.maxValidYear=xa,this.minValidDate=null,this.maxValidDate=null}afterGuiAttached(i){super.afterGuiAttached(i),this.dateConditionFromComps[0].afterGuiAttached(i)}mapValuesFromModel(i){const{dateFrom:t,dateTo:s,type:o}=i||{};return[t&&Me(t)||null,s&&Me(s)||null].slice(0,this.getNumberOfInputs(o))}comparator(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)}defaultComparator(i,t){return null==t||t<i?-1:t>i?1:0}setParams(i){this.dateFilterParams=i,super.setParams(i);const t=(s,o)=>
1{if(null!=i[s]){if(!isNaN(i[s]))return null==i[s]?o:Number(i[s]);console.warn(`AG Grid: DateFilter ${s} is not a number`)}return o};this.minValidYear=t("minValidYear",1e3),this.maxValidYear=t("maxValidYear",xa),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),this.minValidDate=i.minValidDate?i.minValidDate instanceof Date?i.minValidDate:Me(i.minValidDate):null,this.maxValidDate=i.maxValidDate?i.maxValidDate instanceof Date?i.maxValidDate:Me(i.maxValidDate):null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new Oa(this.dateFilterParams,this.localeService,this.optionsFactory)}createDateCompWrapper(i){const t=new Ta(this.getContext(),this.userComponentFactory,{onDateChanged:()=>this.onUiChanged(),filterParams:this.dateFilterParams},i);return this.addDestroyFunc(()=>t.destroy()),t}setElementValue(i,t){i.setDate(t)}setElementDisplayed(i,t){i.setDisplayed(t)}setElementDisabled(i,t){i.setDisabled(t)}getDefaultFilterOptions(){return Bd.DEFAULT_FILTER_OPTIONS}createValueElement(){const t=this.gos.getDocument().createElement("div");return t.classList.add("ag-filter-body"),this.createFromToElement(t,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(t,this.eConditionPanelsTo,this.dateConditionToComps,"to"),t}createFromToElement(i,t,s,o){const n=this.gos.getDocument().createElement("div");n.classList.add(`ag-filter-${o}`),n.classList.add(`ag-filter-date-${o}`),t.push(n),i.appendChild(n),s.push(this.createDateCompWrapper(n))}removeValueElements(i,t){this.removeDateComps(this.dateConditionFromComps,i,t),this.removeDateComps(this.dateConditionToComps,i,t),this.removeItems(this.eConditionPanelsFrom,i,t),this.removeItems(this.eConditionPanelsTo,i,t)}removeDateComps(i,t,s){this.removeItems(i,t,s).forEach(r=>r.destroy())}isValidDateValue(i){if(null===i)return!1;if(this.minValidDate){if(i<this.minValidDate)return!1}else if(i.getUTCFullYear()<this.minValidYear)return!1;if(this.maxValidDate){if(i>this.maxValidDate)return!1}else if(i.getUTCFullYear()>this.maxValidYear)return!1;return!0}isConditionUiComplete(i){if(!super.isConditionUiComplete(i))return!1;let t=!0;return this.forEachInput((s,o,r,n)=>{r!==i||!t||o>=n||(t=t&&this.isValidDateValue(s.getDate()))}),t}areSimpleModelsEqual(i,t){return i.dateFrom===t.dateFrom&&i.dateTo===t.dateTo&&i.type===t.type}getFilterType(){return"date"}createCondition(i){const t=this.getConditionType(i),s={},o=this.getValues(i);return o.length>0&&(s.dateFrom=$e(o[0])),o.length>1&&(s.dateTo=$e(o[1])),M({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t},s)}resetPlaceholder(){const i=this.localeService.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),s=i("ariaFilterValue","Filter Value");this.forEachInput(o=>{o.setInputPlaceholder(t),o.setInputAriaLabel(s)})}getInputs(i){return i>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[i],this.dateConditionToComps[i]]}getValues(i){const t=[];return this.forEachPositionInput(i,(s,o,r,n)=>{o<n&&t.push(s.getDate())}),t}translate(i){return super.translate(i===ue.LESS_THAN?"before":i===ue.GREATER_THAN?"after":i)}getModelAsString(i){var t;return null!=(t=this.filterModelFormatter.getModelAsString(i))?t:""}};mn.DEFAULT_FILTER_OPTIONS=[ue.EQUALS,ue.NOT_EQUAL,ue.LESS_THAN,ue.GREATER_THAN,ue.IN_RANGE,ue.BLANK,ue.NOT_BLANK],d([p("userComponentFactory")],mn.prototype,"userComponentFactory",2);var _a=mn,Cn=class extends V{getDefaultDebounceMs(){return 0}destroy(){super.destroy()}isEventFromFloatingFilter(e){return e&&e.afterFloatingFilter}isEventFromDataChange(e){return e?.afterDataChange}getLastType(){return this.lastType}isReadOnly(){return this.readOnly}setLastTypeFromModel(e){if(!e)return void(this.lastType=this.optionsFactory.getDefaultOption());let t;t=e.operator?e.conditions[0]:e,this.lastType=t.type}canWeEditAfterModelFromParentFilter(e){return e?!e.operator&&this.isTypeEditable(e.type):this.isTypeEditable(this.lastType)}
1init(e){this.setSimpleParams(e,!1)}setSimpleParams(e,i=!0){this.optionsFactory=new Aa,this.optionsFactory.init(e.filterParams,this.getDefaultFilterOptions()),i||(this.lastType=this.optionsFactory.getDefaultOption()),this.readOnly=!!e.filterParams.readOnly;const t=this.isTypeEditable(this.optionsFactory.getDefaultOption());this.setEditable(t)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.setSimpleParams(e)}doesFilterHaveSingleInput(e){const i=this.optionsFactory.getCustomOption(e),{numberOfInputs:t}=i||{};return null==t||1==t}isTypeEditable(e){const i=[re.IN_RANGE,re.EMPTY,re.BLANK,re.NOT_BLANK];return!!e&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(e)&&i.indexOf(e)<0}getAriaLabel(e){return`${this.columnModel.getDisplayNameForColumn(e.column,"header",!0)} ${this.localeService.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}};d([p("columnModel")],Cn.prototype,"columnModel",2);var Mo=class extends Cn{constructor(){super('\n <div class="ag-floating-filter-input" role="presentation">\n <ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>\n <div ref="eDateWrapper" style="display: flex;"></div>\n </div>')}getDefaultFilterOptions(){return _a.DEFAULT_FILTER_OPTIONS}init(e){super.init(e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new Oa(this.filterParams,this.localeService,this.optionsFactory);const i=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(i("ariaDateFilterInput","Date Filter Input"))}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.params=e,this.filterParams=e.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const i=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);this.setEditable(i),i?(this.dateComp.setDate(e?Me(e.dateFrom):null),this.eReadOnlyText.setValue("")):(this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null))}setEditable(e){z(this.eDateWrapper,e),z(this.eReadOnlyText.getGui(),!e)}onParentModelChanged(e,i){this.isEventFromFloatingFilter(i)||this.isEventFromDataChange(i)||(super.setLastTypeFromModel(e),this.updateCompOnModelChange(e))}onDateChanged(){const i=$e(this.dateComp.getDate());this.params.parentFilterInstance(t=>{if(t){const s=Me(i);t.onFloatingFilterChanged(this.getLastType()||null,s)}})}getDateComponentParams(){const e=Fo.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:Ee(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}}createDateComponent(){this.dateComp=new Ta(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper,e=>{e.setInputAriaLabel(this.getAriaLabel(this.params))}),this.addDestroyFunc(()=>this.dateComp.destroy())}updateDateComponent(){const e=this.gos.addGridCommonParams(this.getDateComponentParams());this.dateComp.updateParams(e)}getFilterModelFormatter(){return this.filterModelFormatter}};d([p("userComponentFactory")],Mo.prototype,"userComponentFactory",2),d([F("eReadOnlyText")],Mo.prototype,"eReadOnlyText",2),d([F("eDateWrapper")],Mo.prototype,"eDateWrapper",2);var Va=class extends V{constructor(){super('\n <div class="ag-filter-filter">\n <ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>\n </div>')}destroy(){super.destroy()}init(e){this.params=e,this.setParams(e);const i=this.eDateInput.getInputElement();this.addManagedListener(i,"mousedown",()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||i.focus()}),this.addManagedListener(i,"input",t=>{t.target===this.gos.getActiveDomElement()&&(this.eDateInput.isDisabled()||this.params.onDateChanged())})}setParams(e){const i=this.eDateInput.getInputElement(),t=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=t&&at(),i.type=t?"date":"text";const{minValidYear:s,maxValidYear:o,minValidDate:r,maxValidDate:n}=e.filterParams||{};if(r&&s&&O("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),n&&o&&O("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),r&&n){const[l,a]=[r,n].map(u=>u instanceof Date?u:Me(u));l&&a&&l.getTime()>a.getTime()&&O("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}r?i.min=r instanceof Date?Ti(r):r:s&&(i.min=`${s}-01-01`),n?i.max=n instanceof Date?Ti(n):n:o&&(i.max=`${o}-12-31`)}onParamsUpdated(e){this.refresh(e)}refresh(e){this.params=e,this.setParams(e)}getDate(){return Me(this.eDateInput.getValue())}setDate(e){this.eDateInput.setValue($e(e,!1))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){(!e||!e.suppressFocus)&&this.eDateInput.getInputElement().focus()}
1shouldUseBrowserDatePicker(e){return e.filterParams&&null!=e.filterParams.browserDatePicker?e.filterParams.browserDatePicker:wo()||$r()||at()&&Kr()>=14.1}};d([F("eDateInput")],Va.prototype,"eDateInput",2);var $t=class extends ot{constructor(e,i="ag-text-field",t="text"){super(e,i,t)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,i){return this.eInput.value!==e&&(this.eInput.value=y(e)?e:""),super.setValue(e,i)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListener(this.eInput,"keydown",t=>{Ro(t)&&t.key&&!e.test(t.key)&&t.preventDefault()}),this.addManagedListener(this.eInput,"paste",t=>{var s;const o=null==(s=t.clipboardData)?void 0:s.getData("text");o&&o.split("").some(r=>!e.test(r))&&t.preventDefault()})}},vn=class extends $t{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"blur",()=>{const o=parseFloat(this.eInput.value),r=isNaN(o)?"":this.normalizeValue(o.toString());this.value!==r&&this.setValue(r)}),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any";const{precision:e,min:i,max:t,step:s}=this.config;"number"==typeof e&&this.setPrecision(e),"number"==typeof i&&this.setMin(i),"number"==typeof t&&this.setMax(t),"number"==typeof s&&this.setStep(s)}onWheel(e){this.gos.getActiveDomElement()===this.eInput&&e.preventDefault()}normalizeValue(e){if(""===e)return"";null!=this.precision&&(e=this.adjustPrecision(e));const i=parseFloat(e);return null!=this.min&&i<this.min?e=this.min.toString():null!=this.max&&i>this.max&&(e=this.max.toString()),e}adjustPrecision(e,i){if(null==this.precision)return e;if(i){const s=parseFloat(e).toFixed(this.precision);return parseFloat(s).toString()}const t=String(e).split(".");if(t.length>1){if(t[1].length<=this.precision)return e;if(this.precision>0)return`${t[0]}.${t[1].slice(0,this.precision)}`}return t[0]}setMin(e){return this.min===e||(this.min=e,dt(this.eInput,"min",e)),this}setMax(e){return this.max===e||(this.max=e,dt(this.eInput,"max",e)),this}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e||(this.step=e,dt(this.eInput,"step",e)),this}setValue(e,i){return this.setValueOrInputValue(t=>super.setValue(t,i),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(i=>super.setValue(i,!0),i=>{this.eInput.value=i},e)}setValueOrInputValue(e,i,t){if(y(t)){let s=this.isScientificNotation(t);if(s&&this.eInput.validity.valid)return e(t);if(s||(s=(t=this.adjustPrecision(t))!=this.normalizeValue(t)),s)return i(t)}return e(t)}getValue(){if(!this.eInput.validity.valid)return;const e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):super.getValue()}isScientificNotation(e){return"string"==typeof e&&e.includes("e")}},Ha=class extends fn{conditionToString(e,i){const{numberOfInputs:t}=i||{};return e.type==re.IN_RANGE||2===t?`${this.formatValue(e.filter)}-${this.formatValue(e.filterTo)}
1`:null!=e.filter?this.formatValue(e.filter):`${e.type}`}};function wn(e){const{allowedCharPattern:i}=e??{};return i??null}var ka=class Wd extends ue{constructor(){super("numberFilter"),this.eValuesFrom=[],this.eValuesTo=[]}refresh(i){return this.numberFilterParams.allowedCharPattern===i.allowedCharPattern&&super.refresh(i)}mapValuesFromModel(i){const{filter:t,filterTo:s,type:o}=i||{};return[this.processValue(t),this.processValue(s)].slice(0,this.getNumberOfInputs(o))}getDefaultDebounceMs(){return 500}comparator(){return(i,t)=>i===t?0:i<t?1:-1}setParams(i){this.numberFilterParams=i,super.setParams(i),this.filterModelFormatter=new Ha(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)}getDefaultFilterOptions(){return Wd.DEFAULT_FILTER_OPTIONS}setElementValue(i,t,s){const o=!s&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(t??null):t;super.setElementValue(i,o)}createValueElement(){const i=wn(this.numberFilterParams),t=document.createElement("div");return t.classList.add("ag-filter-body"),oe(t,"presentation"),this.createFromToElement(t,this.eValuesFrom,"from",i),this.createFromToElement(t,this.eValuesTo,"to",i),t}createFromToElement(i,t,s,o){const r=this.createManagedBean(o?new $t({allowedCharPattern:o}):new vn);r.addCssClass(`ag-filter-${s}`),r.addCssClass("ag-filter-filter"),t.push(r),i.appendChild(r.getGui())}removeValueElements(i,t){this.removeComponents(this.eValuesFrom,i,t),this.removeComponents(this.eValuesTo,i,t)}getValues(i){const t=[];return this.forEachPositionInput(i,(s,o,r,n)=>{o<n&&t.push(this.processValue(this.stringToFloat(s.getValue())))}),t}areSimpleModelsEqual(i,t){return i.filter===t.filter&&i.filterTo===t.filterTo&&i.type===t.type}getFilterType(){return"number"}processValue(i){return null==i||isNaN(i)?null:i}stringToFloat(i){if("number"==typeof i)return i;let t=Ze(i);return null!=t&&""===t.trim()&&(t=null),this.numberFilterParams.numberParser?this.numberFilterParams.numberParser(t):null==t||"-"===t.trim()?null:parseFloat(t)}createCondition(i){const t=this.getConditionType(i),s={filterType:this.getFilterType(),type:t},o=this.getValues(i);return o.length>0&&(s.filter=o[0]),o.length>1&&(s.filterTo=o[1]),s}getInputs(i){return i>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[i],this.eValuesTo[i]]}getModelAsString(i){var t;return null!=(t=this.filterModelFormatter.getModelAsString(i))?t:""}hasInvalidInputs(){let i=!1;return this.forEachInput(t=>{t.getInputElement().validity.valid||(i=!0)}),i}};ka.DEFAULT_FILTER_OPTIONS=[ue.EQUALS,ue.NOT_EQUAL,ue.GREATER_THAN,ue.GREATER_THAN_OR_EQUAL,ue.LESS_THAN,ue.LESS_THAN_OR_EQUAL,ue.IN_RANGE,ue.BLANK,ue.NOT_BLANK];var Ba=ka,Wa=class extends fn{conditionToString(e,i){const{numberOfInputs:t}=i||{};return e.type==re.IN_RANGE||2===t?`${e.filter}-${e.filterTo}
1`:null!=e.filter?`${e.filter}`:`${e.type}`}},rt=class is extends re{constructor(){super("textFilter"),this.eValuesFrom=[],this.eValuesTo=[]}static trimInput(i){const t=i&&i.trim();return""===t?i:t}getDefaultDebounceMs(){return 500}setParams(i){this.textFilterParams=i,super.setParams(i),this.matcher=this.getTextMatcher(),this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?is.DEFAULT_FORMATTER:is.DEFAULT_LOWERCASE_FORMATTER),this.filterModelFormatter=new Wa(this.localeService,this.optionsFactory)}getTextMatcher(){const i=this.textFilterParams.textCustomComparator;return i?(k.warnOnce("textCustomComparator is deprecated, use textMatcher instead."),({filterOption:t,value:s,filterText:o})=>i(t,s,o)):this.textFilterParams.textMatcher||is.DEFAULT_MATCHER}createCondition(i){const t=this.getConditionType(i),s={filterType:this.getFilterType(),type:t},o=this.getValuesWithSideEffects(i,!0);return o.length>0&&(s.filter=o[0]),o.length>1&&(s.filterTo=o[1]),s}getFilterType(){return"text"}areSimpleModelsEqual(i,t){return i.filter===t.filter&&i.filterTo===t.filterTo&&i.type===t.type}getInputs(i){return i>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[i],this.eValuesTo[i]]}getValues(i){return this.getValuesWithSideEffects(i,!1)}getValuesWithSideEffects(i,t){const s=[];return this.forEachPositionInput(i,(o,r,n,l)=>{var a;if(r<l){let u=Ze(o.getValue());t&&this.textFilterParams.trimInput&&(u=null!=(a=is.trimInput(u))?a:null,o.setValue(u,!0)),s.push(u)}}),s}getDefaultFilterOptions(){return is.DEFAULT_FILTER_OPTIONS}createValueElement(){const i=document.createElement("div");return i.classList.add("ag-filter-body"),oe(i,"presentation"),this.createFromToElement(i,this.eValuesFrom,"from"),this.createFromToElement(i,this.eValuesTo,"to"),i}createFromToElement(i,t,s){const o=this.createManagedBean(new $t);o.addCssClass(`ag-filter-${s}`),o.addCssClass("ag-filter-filter"),t.push(o),i.appendChild(o.getGui())}removeValueElements(i,t){this.removeComponents(this.eValuesFrom,i,t),this.removeComponents(this.eValuesTo,i,t)}mapValuesFromModel(i){const{filter:t,filterTo:s,type:o}=i||{};return[t||null,s||null].slice(0,this.getNumberOfInputs(o))}evaluateNullValue(i){return!!i&&[re.NOT_EQUAL,re.NOT_CONTAINS,re.BLANK].indexOf(i)>=0}evaluateNonNullValue(i,t,s,o){const r=i.map(C=>this.formatter(C))||[],n=this.formatter(t),{api:l,colDef:a,column:u,columnApi:h,context:c,textFormatter:f}=this.textFilterParams;if(s.type===re.BLANK)return this.isBlank(t);if(s.type===re.NOT_BLANK)return!this.isBlank(t);const m={api:l,colDef:a,column:u,columnApi:h,context:c,node:o.node,data:o.data,filterOption:s.type,value:n,textFormatter:f};return r.some(C=>this.matcher(x(M({},m),{filterText:C})))}getModelAsString(i){var t;return null!=(t=this.filterModelFormatter.getModelAsString(i))?t:""}};rt.DEFAULT_FILTER_OPTIONS=[re.CONTAINS,re.NOT_CONTAINS,re.EQUALS,re.NOT_EQUAL,re.STARTS_WITH,re.ENDS_WITH,re.BLANK,re.NOT_BLANK],rt.DEFAULT_FORMATTER=e=>e,rt.DEFAULT_LOWERCASE_FORMATTER=e=>null==e?null:e.toString().toLowerCase(),rt.DEFAULT_MATCHER=({filterOption:e,value:i,filterText:t})=>{if(null==t)return!1;switch(e){case rt.CONTAINS:return i.indexOf(t)>=0;case rt.NOT_CONTAINS:return i.indexOf(t)<0;case rt.EQUALS:return i===t;case rt.NOT_EQUAL:return i!=t;case rt.STARTS_WITH:return 0===i.indexOf(t);case rt.ENDS_WITH:const s=i.lastIndexOf(t);return s>=0&&s===i.length-t.length;default:return!1}};var Sn=rt,Ua=class extends b{constructor(e){super(),this.params=e,this.valueChangedListener=()=>{}}setupGui(e){var i;this.eFloatingFilterTextInput=this.createManagedBean(new $t(null==(i=this.params)?void 0:i.config));const t=this.eFloatingFilterTextInput.getGui();e.appendChild(t),this.addManagedListener(t,"input",s=>this.valueChangedListener(s)),this.addManagedListener(t,"keydown",s=>this.valueChangedListener(s))}setEditable(e){this.eFloatingFilterTextInput.setDisabled(!e)}setAutoComplete(e){this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.eFloatingFilterTextInput.getValue()}setValue(e,i){this.eFloatingFilterTextInput.setValue(e,i)}setValueChangedListener(e){this.valueChangedListener=e}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)}},Io=class extends Cn{postConstruct(){this.setTemplate('\n <div class="ag-floating-filter-input" role="presentation" ref="eFloatingFilterInputContainer"></div>\n ')}getDefaultDebounceMs(){return 500}onParentModelChanged(e,i){this.isEventFromFloatingFilter(i)||this.isEventFromDataChange(i)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))}init(e){this.setupFloatingFilterInputService(e),super.init(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){var i;this.params=e;const t=null!=(i=e.browserAutoComplete)&&i;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:t}),this.applyActive=Fo.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){const s=Fo.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),o=Ee(this.syncUpWithParentFilter.bind(this),s);this.floatingFilterInputService.setValueChangedListener(o)}}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const i=this.floatingFilterInputService.getValue();ne(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(i,!0)}syncUpWithParentFilter(e){if(this.applyActive&&e.key!==v.ENTER)return;let t=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(t=Sn.trimInput(t),this.floatingFilterInputService.setValue(t,!0)),this.params.parentFilterInstance(s=>{s&&s.onFloatingFilterChanged(this.getLastType()||null,t||null)})}setEditable(e){this.floatingFilterInputService.setEditable(e)}};d([F("eFloatingFilterInputContainer")],Io.prototype,"eFloatingFilterInputContainer",2),d([T],Io.prototype,"postConstruct",1);var hh=class extends b{constructor(){super(...arguments),this.valueChangedListener=()=>{},this.numberInputActive=!0}setupGui(e){this.eFloatingFilterNumberInput=this.createManagedBean(new vn),this.eFloatingFilterTextInput=this.createManagedBean(new $t),this.eFloatingFilterTextInput.setDisabled(!0);const i=this.eFloatingFilterNumberInput.getGui(),t=this.eFloatingFilterTextInput.getGui();e.appendChild(i),e.appendChild(t),this.setupListeners(i,s=>this.valueChangedListener(s)),this.setupListeners(t,s=>this.valueChangedListener(s))}setEditable(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,i){this.getActiveInputElement().setValue(e,i)}getActiveInputElement(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput}setValueChangedListener(e){this.valueChangedListener=e}setupListeners(e,i){this.addManagedListener(e,"input",i),this.addManagedListener(e,"keydown",i)}setParams(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)}setAriaLabel(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)}},ch=class extends Io{init(e){var i;super.init(e),this.filterModelFormatter=new Ha(this.localeService,this.optionsFactory,null==(i=e.filterParams)?void 0:i.numberFormatter)}onParamsUpdated(e){this.refresh(e)}refresh(e){wn(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return Ba.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(e){return this.allowedCharPattern=wn(e.filterParams),this.createManagedBean(this.allowedCharPattern?new Ua({config:{allowedCharPattern:this.allowedCharPattern}}):new hh)}},ph=class extends Io{init(e){super.init(e),this.filterModelFormatter=new Wa(this.localeService,this.optionsFactory)}onParamsUpdated(e){this.refresh(e)}refresh(e){super.refresh(e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})}getDefaultFilterOptions(){return Sn.DEFAULT_FILTER_OPTIONS}getFilterModelFormatter(){return this.filterModelFormatter}createFloatingFilterInputService(){return this.createManagedBean(new Ua)}},gh=(()=>{let e=class Js{constructor(t,s=!1){this.destroyFuncs=[],this.touching=!1,this.eventService=new et,this.eElement=t,this.preventMouseClick=s;const o=this.onTouchStart.bind(this),r=this.onTouchMove.bind(this),n=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",o,{passive:!0}),this.eElement.addEventListener("touchmove",r,{passive:!0}),this.eElement.addEventListener("touchend",n,{passive:!1}),this.destroyFuncs.push(()=>{this.eElement.removeEventListener("touchstart",o,{passive:!0}),this.eElement.removeEventListener("touchmove",r,{passive:!0}),this.eElement.removeEventListener("touchend",n,{passive:!1})})}getActiveTouch(t){for(let s=0;s<t.length;s++)if(t[s].identifier===this.touchStart.identifier)return t[s];return null}addEventListener(t,s){this.eventService.addEventListener(t,s)}removeEventListener(t,s){this.eventService.removeEventListener(t,s)}onTouchStart(t){if(this.touching)return;this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;const s=this.touchStart;window.setTimeout(()=>{this.touching&&this.touchStart===s&&!this.moved&&(this.moved=!0,this.eventService.dispatchEvent({type:Js.EVENT_LONG_TAP,touchStart:this.touchStart,touchEvent:t}))},500)}onTouchMove(t){if(!this.touching)return;const s=this.getActiveTouch(t.touches);s&&!un(s,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(t){this.touching&&(this.moved||(this.eventService.dispatchEvent({type:Js.EVENT_TAP,touchStart:this.touchStart}),this.checkForDoubleTap()),this.preventMouseClick&&t.cancelable&&t.preventDefault(),this.touching=!1)}checkForDoubleTap(){const t=(new Date).getTime();this.lastTapTime&&this.lastTapTime>0&&t-this.lastTapTime>Js.DOUBLE_TAP_MILLIS?(this.eventService.dispatchEvent({type:Js.EVENT_DOUBLE_TAP,touchStart:this.touchStart}),this.lastTapTime=null):this.lastTapTime=t}destroy(){this.destroyFuncs.forEach(t=>t())}};return e.EVENT_TAP="tap",e.EVENT_DOUBLE_TAP="doubleTap",e.EVENT_LONG_TAP="longTap",e.DOUBLE_TAP_MILLIS=500,e})(),ge=gh,Lt=(()=>{let e=class Ud extends V{constructor(t){super(),t||this.setTemplate(Ud.TEMPLATE)}attachCustomElements(t,s,o,r,n){this.eSortOrder=t,this.eSortAsc=s,this.eSortDe
1sc=o,this.eSortMixed=r,this.eSortNone=n}setupSort(t,s=!1){this.column=t,this.suppressOrder=s,this.setupMultiSortIndicator(),(this.column.isSortable()||this.column.getColDef().showRowGroup)&&(this.addInIcon("sortAscending",this.eSortAsc,t),this.addInIcon("sortDescending",this.eSortDesc,t),this.addInIcon("sortUnSort",this.eSortNone,t),this.addManagedPropertyListener("unSortIcon",()=>this.updateIcons()),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.updateIcons()),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,()=>this.onSortChanged()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.onSortChanged()),this.onSortChanged())}addInIcon(t,s,o){if(null==s)return;const r=se(t,this.gos,o);r&&s.appendChild(r)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const t=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc&&z(this.eSortAsc,"asc"===t,{skipAriaHidden:!0}),this.eSortDesc&&z(this.eSortDesc,"desc"===t,{skipAriaHidden:!0}),this.eSortNone){const s=!this.column.getColDef().unSortIcon&&!this.gos.get("unSortIcon");z(this.eSortNone,!s&&null==t,{skipAriaHidden:!0})}}setupMultiSortIndicator(){this.addInIcon("sortUnSort",this.eSortMixed,this.column);const t=this.column.getColDef().showRowGroup;this.gos.isColumnsSortingCoupledToGroup()&&t&&(this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,()=>this.updateMultiSortIndicator()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateMultiSortIndicator()),this.updateMultiSortIndicator())}updateMultiSortIndicator(){if(this.eSortMixed){const t="mixed"===this.sortController.getDisplaySortForColumn(this.column);z(this.eSortMixed,t,{skipAriaHidden:!0})}}updateSortOrder(){var t;if(!this.eSortOrder)return;const s=this.sortController.getColumnsWithSortingOrdered(),o=null!=(t=this.sortController.getDisplaySortIndexForColumn(this.column))?t:-1,r=s.some(l=>{var a;return null!=(a=this.sortController.getDisplaySortIndexForColumn(l))&&a});z(this.eSortOrder,o>=0&&r,{skipAriaHidden:!0}),o>=0?this.eSortOrder.textContent=(o+1).toString():ne(this.eSortOrder)}};return e.TEMPLATE='<span class="ag-sort-indicator-container">\n <span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>\n <span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>\n <span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>\n <span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>\n <span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>\n </span>',e})();d([F("eSortOrder")],Lt.prototype,"eSortOrder",2),d([F("eSortAsc")],Lt.prototype,"eSortAsc",2),d([F("eSortDesc")],Lt.prototype,"eSortDesc",2),d([F("eSortMixed")],Lt.prototype,"eSortMixed",2),d([F("eSortNone")],Lt.prototype,"eSortNone",2),d([p("columnModel")],Lt.prototype,"columnModel",2),d([p("sortController")],Lt.prototype,"sortController",2);var En=Lt,Re=(()=>{let e=class zd extends V{constructor(){super(...arguments),this.lastMovingChanged=0}destroy(){super.destroy()}refresh(t){const s=this.params;return this.params=t,this.workOutTemplate()==this.currentTemplate&&this.workOutShowMenu()==this.currentShowMenu&&this.workOutSort()==this.currentSort&&this.shouldSuppressMenuHide()==this.currentSuppressMenuHide&&s.enableFilterButton==t.enableFilterButton&&s.enableFilterIcon==t.enableFilterIcon&&(this.setDisplayName(t),!0)}workOutTemplate(){var t;let s=null!=(t=this.params.template)?t:zd.TEMPLATE;return s=s&&s.trim?s.trim():s,s}init(t){this.params=t,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setupFilterButton(),this.setDisplayName(t)}setDisplayName(t){if(this.currentDisplayName!=t.displayName){this.currentDisplayName=t.displayName;const s=ae(this.currentDisplayName,!0);this.eText&&(this.eText.textContent=s)}}
1addInIcon(t,s,o){if(null==s)return;const r=se(t,this.gos,o);r&&s.appendChild(r)}setupTap(){const{gos:t}=this;if(t.get("suppressTouch"))return;const s=new ge(this.getGui(),!0),o=this.shouldSuppressMenuHide(),r=o&&y(this.eMenu),n=r?new ge(this.eMenu,!0):s;if(this.params.enableMenu&&this.addManagedListener(n,ge[r?"EVENT_TAP":"EVENT_LONG_TAP"],u=>this.params.showColumnMenuAfterMouseClick(u.touchStart)),this.params.enableSorting&&this.addManagedListener(s,ge.EVENT_TAP,a=>{var u,h;const c=a.touchStart.target;o&&(null!=(u=this.eMenu)&&u.contains(c)||null!=(h=this.eFilterButton)&&h.contains(c))||this.sortController.progressSort(this.params.column,!1,"uiColumnSorted")}),this.params.enableFilterButton){const l=new ge(this.eFilterButton,!0);this.addManagedListener(l,"tap",()=>this.params.showFilter(this.eFilterButton)),this.addDestroyFunc(()=>l.destroy())}this.addDestroyFunc(()=>s.destroy()),r&&this.addDestroyFunc(()=>n.destroy())}workOutShowMenu(){return this.params.enableMenu&&this.menuService.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return this.menuService.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu)return st(this.eMenu),void(this.eMenu=void 0);const t=this.menuService.isLegacyMenuEnabled();this.addInIcon(t?"menu":"menuAlt",this.eMenu,this.params.column),this.eMenu.classList.toggle("ag-header-menu-icon",!t),this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedListener(this.eMenu,"click",()=>this.params.showColumnMenu(this.eMenu)),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)}onMenuKeyboardShortcut(t){var s,o,r,n;const{column:l}=this.params,a=this.menuService.isLegacyMenuEnabled();if(t&&!a){if(this.menuService.isFilterMenuInHeaderEnabled(l))return this.params.showFilter(null!=(o=null!=(s=this.eFilterButton)?s:this.eMenu)?o:this.getGui()),!0}else if(this.params.enableMenu)return this.params.showColumnMenu(null!=(n=null!=(r=this.eMenu)?r:this.eFilterButton)?n:this.getGui()),!0;return!1}workOutSort(){return this.params.enableSorting}setupSort(){if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new En(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!this.currentSort)return;this.addManagedListener(this.params.column,Z.EVENT_MOVING_CHANGED,()=>{this.lastMovingChanged=(new Date).getTime()}),this.eLabel&&this.addManagedListener(this.eLabel,"click",s=>{const o=this.params.column.isMoving(),n=(new Date).getTime()-this.lastMovingChanged<50;if(!o&&!n){const u="ctrl"===this.gos.get("multiSortKey")?s.ctrlKey||s.metaKey:s.shiftKey;this.params.progressSort(u)}});const t=()=>{if(this.addOrRemoveCssClass("ag-header-cell-sorted-asc",this.params.column.isSortAscending()),this.addOrRemoveCssClass("ag-header-cell-sorted-desc",this.params.column.isSortDescending()),this.addOrRemoveCssClass("ag-header-cell-sorted-none",this.params.column.isSortNone()),this.params.column.getColDef().showRowGroup){const s=this.columnModel.getSourceColumnsForGroupColumn(this.params.column),r=!s?.every(n=>this.params.column.getSort()==n.getSort());this.addOrRemoveCssClass("ag-header-cell-sorted-mixed",r)}};this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,t),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}setupFilterIcon(){this.eFilter&&this.configureFilter(this.params.enableFilterIcon,this.eFilter,this.onFilterChangedIcon.bind(this))}setupFilterButton(){this.eFilterButton&&(this.configureFilter(this.params.enableFilterButton,this.eFilterButton,this.onFilterChangedButton.bind(this))?this.addManagedListener(this.eFilterButton,"click",()=>this.params.showFilter(this.eFilterButton)):this.eFilterButton=void 0)}configureFilter(t,s,o){if(!t)return st(s),!1;const{column:r}=this.params;return this.addInIcon("filter",s,r),this.addManagedListener(r,Z.EVENT_FILTER_CHANGED,o),o(),!0}onFilterChangedIcon(){const t=this.params.column.isFilterActive();z(this.eFilter,t,{skipAriaHidden:!0})}onFilterChangedButton(){const t=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",t)}getAnchorElementForMenu(t){var s,o,r,n;return t?null!=(o=null!=(s=this.eFilterButton)?s:this.eMenu)?o:this.getGui():null!=(n=null!=(r=this.eMenu)?r:this.eFilterButton)?n:this.getGui()}};return e.TEMPLATE='<div class="ag-cell-label-container" role="presentation">
1\n <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>\n <span ref="eFilterButton" class="ag-header-icon ag-header-cell-filter-button" aria-hidden="true"></span>\n <div ref="eLabel" class="ag-header-cell-label" role="presentation">\n <span ref="eText" class="ag-header-cell-text"></span>\n <span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>\n <ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>\n </div>\n </div>',e})();d([p("sortController")],Re.prototype,"sortController",2),d([p("menuService")],Re.prototype,"menuService",2),d([p("columnModel")],Re.prototype,"columnModel",2),d([F("eFilter")],Re.prototype,"eFilter",2),d([F("eFilterButton")],Re.prototype,"eFilterButton",2),d([F("eSortIndicator")],Re.prototype,"eSortIndicator",2),d([F("eMenu")],Re.prototype,"eMenu",2),d([F("eLabel")],Re.prototype,"eLabel",2),d([F("eText")],Re.prototype,"eText",2),d([F("eSortOrder")],Re.prototype,"eSortOrder",2),d([F("eSortAsc")],Re.prototype,"eSortAsc",2),d([F("eSortDesc")],Re.prototype,"eSortDesc",2),d([F("eSortMixed")],Re.prototype,"eSortMixed",2),d([F("eSortNone")],Re.prototype,"eSortNone",2);var yn=Re,Go=(()=>{let e=class Kd extends V{constructor(){super(Kd.TEMPLATE)}destroy(){super.destroy()}init(t){this.params=t,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()}checkWarnings(){this.params.template&&O("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")}setupExpandIcons(){this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");const t=r=>{if(it(r))return;const n=!this.params.columnGroup.isExpanded();this.columnModel.setColumnGroupOpened(this.params.columnGroup.getProvidedColumnGroup(),n,"uiColumnExpanded")};this.addTouchAndClickListeners(this.eCloseIcon,t),this.addTouchAndClickListeners(this.eOpenIcon,t);const s=r=>{tt(r)};this.addManagedListener(this.eCloseIcon,"dblclick",s),this.addManagedListener(this.eOpenIcon,"dblclick",s),this.addManagedListener(this.getGui(),"dblclick",t),this.updateIconVisibility();const o=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(o,le.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(o,le.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))}addTouchAndClickListeners(t,s){const o=new ge(t,!0);this.addManagedListener(o,ge.EVENT_TAP,s),this.addDestroyFunc(()=>o.destroy()),this.addManagedListener(t,"click",s)}updateIconVisibility(){if(this.params.columnGroup.isExpandable()){const s=this.params.columnGroup.isExpanded();z(this.eOpenIcon,s),z(this.eCloseIcon,!s)}else z(this.eOpenIcon,!1),z(this.eCloseIcon,!1)}addInIcon(t,s){const o=se(t,this.gos,null);o&&this.getRefElement(s).appendChild(o)}addGroupExpandIcon(){if(!this.params.columnGroup.isExpandable())return z(this.eOpenIcon,!1),void z(this.eCloseIcon,!1)}setupLabel(){var t;const{displayName:s,columnGroup:o}=this.params;if(y(s)){const r=ae(s,!0);this.getRefElement("agLabel").textContent=r}this.addOrRemoveCssClass("ag-sticky-label",!(null!=(t=o.getColGroupDef())&&t.suppressStickyLabel))}};return e.TEMPLATE='<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">\n <span ref="agLabel" class="ag-header-group-text" role="presentation"></span>\n <span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>\n <span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>\n </div>',e})();d([p("columnModel")],Go.prototype,"columnModel",2),d([F("agOpened")],Go.prototype,"eOpenIcon",2),d([F("agClosed")],Go.prototype,"eCloseIcon",2);var fh=Go,Yt=class extends V{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},za=(()=>{let e=class $d extends Yt{constructor(){super($d.TEMPLATE)}init(t){this.params=t,this.focusAfterAttached=t.cellStartedEdit,this.eTextArea.setMaxLength(t.maxLength||200).setCols(t.cols||60).setRows(t.rows||10),y(t.value,!0)&&this.eTextArea.setValue(t.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}onKeyDown(t){const s=t.key;(s===v.LEFT||s===v.UP||s===v.RIGHT||s===v.DOWN||t.shiftKey&&s===v.ENTER)&&t.stopPropagation()}afterGuiAttached(){const t=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(t("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()}getValue(){const t=this.eTextArea.getValue();return y(t)||y(this.params.value)?this.params.parseValue(t):this.params.value}};return e.TEMPLATE='<div class="ag-large-text">\n <ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>\n </div>',e})();d([F("eTextArea")],za.prototype,"eTextArea",2);var mh=za,Rn=class extends Yt{constructor(){super('<div class="ag-cell-edit-wrapper">\n <ag-select class="ag-cell-editor" ref="eSelect"></ag-select>\n </div>'),this.startedByEnter=!1}init(e){this.focusAfterAttached=e.cellStartedEdit;const{eSelect:i,valueService:t,gos:s}
1=this,{values:o,value:r,eventKey:n}=e;if(_(o))return void console.warn("AG Grid: no values found for select cellEditor");this.startedByEnter=null!=n&&n===v.ENTER;let l=!1;o.forEach(c=>{const f={value:c},m=t.formatValue(e.column,null,c);f.text=null!=m?m:c,i.addOption(f),l=l||r===c}),l?i.setValue(e.value,!0):e.values.length&&i.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:u,valueListMaxHeight:h}=e;null!=a&&i.setPickerGap(a),null!=h&&i.setPickerMaxHeight(h),null!=u&&i.setPickerMaxWidth(u),"fullRow"!==s.get("editType")&&this.addManagedListener(this.eSelect,Po.EVENT_ITEM_SELECTED,()=>e.stopEditing())}afterGuiAttached(){this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eSelect.showPicker()})}focusIn(){this.eSelect.getFocusableElement().focus()}getValue(){return this.eSelect.getValue()}isPopup(){return!1}};d([p("valueService")],Rn.prototype,"valueService",2),d([F("eSelect")],Rn.prototype,"eSelect",2);var Es=class extends Yt{constructor(e){super(`\n <div class="ag-cell-edit-wrapper">\n ${e.getTemplate()}\n </div>`),this.cellEditorInput=e}init(e){this.params=e;const i=this.eInput;let t;if(this.cellEditorInput.init(i,e),e.cellStartedEdit){this.focusAfterAttached=!0;const s=e.eventKey;s===v.BACKSPACE||e.eventKey===v.DELETE?t="":s&&1===s.length?t=s:(t=this.cellEditorInput.getStartValue(),s!==v.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,t=this.cellEditorInput.getStartValue();null!=t&&i.setStartValue(t),this.addManagedListener(i.getGui(),"keydown",s=>{const{key:o}=s;(o===v.PAGE_UP||o===v.PAGE_DOWN)&&s.preventDefault()})}afterGuiAttached(){var e,i;const t=this.localeService.getLocaleTextFunc(),s=this.eInput;if(s.setInputAriaLabel(t("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;at()||s.getFocusableElement().focus();const o=s.getInputElement();this.highlightAllOnFocus?o.select():null==(i=(e=this.cellEditorInput).setCaret)||i.call(e)}focusIn(){const e=this.eInput,i=e.getFocusableElement(),t=e.getInputElement();i.focus(),t.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}};d([F("eInput")],Es.prototype,"eInput",2);var Ch=class{getTemplate(){return'<ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field>'}init(e,i){this.eInput=e,this.params=i,null!=i.maxLength&&e.setMaxLength(i.maxLength)}getValue(){const e=this.eInput.getValue();return y(e)||y(this.params.value)?this.params.parseValue(e):this.params.value}getStartValue(){return this.params.useFormatter||this.params.column.getColDef().refData?this.params.formatValue(this.params.value):this.params.value}setCaret(){const e=this.eInput.getValue(),i=y(e)&&e.length||0;i&&this.eInput.getInputElement().setSelectionRange(i,i)}},Ka=class extends Es{constructor(){super(new Ch)}},$a=class extends V{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),i=document.createElement("span");i.setAttribute("class","ag-value-change-delta");const t=document.createElement("span");t.setAttribute("class","ag-value-change-value"),e.appendChild(i),e.appendChild(t),this.setTemplateFromElement(e)}init(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e,!0)}showDelta(e,i){const t=Math.abs(i),s=e.formatValue(t),o=y(s)?s:t,r=i>=0;this.eDelta.textContent=r?"\u2191"+o:"\u2193"+o,this.eDelta.classList.toggle("ag-value-change-delta-up",r),this.eDelta.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),ne(this.eDelta)}refresh(e,i=!1){const t=e.value;return t!==this.lastValue&&(y(e.valueFormatted)?this.eValue.textContent=e.valueFormatted:y(e.value)?this.eValue.textContent=t:ne(this.eValue),!this.filterManager.isSuppressFlashingCellsBecauseFiltering())&&
1("number"==typeof t&&"number"==typeof this.lastValue&&this.showDelta(e,t-this.lastValue),this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),i||this.setTimerToRemoveDelta(),this.lastValue=t,!0)}};d([p("filterManager")],$a.prototype,"filterManager",2);var Ya=class extends V{constructor(){super(),this.refreshCount=0;const e=document.createElement("span"),i=document.createElement("span");i.setAttribute("class","ag-value-slide-current"),e.appendChild(i),this.setTemplateFromElement(e),this.eCurrent=this.queryForHtmlElement(".ag-value-slide-current")}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious);const i=document.createElement("span");i.setAttribute("class","ag-value-slide-previous ag-value-slide-out"),this.ePrevious=i,this.ePrevious.textContent=this.eCurrent.textContent,this.getGui().insertBefore(this.ePrevious,this.eCurrent),this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.getGui().removeChild(this.ePrevious),this.ePrevious=null)},3e3)})}refresh(e,i=!1){let t=e.value;return _(t)&&(t=""),t!==this.lastValue&&!this.filterManager.isSuppressFlashingCellsBecauseFiltering()&&(i||this.addSlideAnimation(),this.lastValue=t,y(e.valueFormatted)?this.eCurrent.textContent=e.valueFormatted:y(e.value)?this.eCurrent.textContent=t:ne(this.eCurrent),!0)}};d([p("filterManager")],Ya.prototype,"filterManager",2);var Sh=(()=>{let e=class te{constructor(t){this.rowIndex=null,this.key=null,this.childrenMapped={},this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=te.OBJECT_ID_SEQUENCE++,this.__autoHeights={},this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.selected=!1,this.beans=t}setData(t){this.setDataCommon(t,!1)}updateData(t){this.setDataCommon(t,!0)}setDataCommon(t,s){const o=this.data;this.data=t,this.beans.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable(),this.resetQuickFilterAggregateText();const r=this.createDataChangedEvent(t,o,s);this.dispatchLocalEvent(r)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(t,s,o){return{type:te.EVENT_DATA_CHANGED,node:this,oldData:s,newData:t,update:o}}createLocalRowEvent(t){return{type:t,node:this}}getRowIndexString(){return"top"===this.rowPinned?"t-"+this.rowIndex:"bottom"===this.rowPinned?"b-"+this.rowIndex:this.rowIndex.toString()}createDaemonNode(){const t=new te(this.beans);return t.id=this.id,t.data=this.data,t.__daemon=!0,t.selected=this.selected,t.level=this.level,t}setDataAndId(t,s){const o=y(this.id)?this.createDaemonNode():null,r=this.data;this.data=t,this.updateDataOnDetailNode(),this.setId(s),this.checkRowSelectable(),this.beans.selectionService.syncInRowNode(this,o);const n=this.createDataChangedEvent(t,r,!1);this.dispatchLocalEvent(n)}checkRowSelectable(){const t=this.beans.gos.get("isRowSelectable");this.setRowSelectable(!t||t(this))}setRowSelectable(t,s){if(this.selectable!==t){if(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_SELECTABLE_CHANGED)),s)return;if(this.beans.gos.get("groupSelectsChildren")){const r=this.calculateSelectedFromChildren();return void this.setSelectedParams({newValue:r??!1,source:"selectableChanged"})}this.isSelected()&&!this.selectable&&this.setSelectedParams({newValue:!1,source:"selectableChanged"})}}setId(t){const s=this.beans.gos.getCallback("getRowId");if(s)if(this.data){const o=this.getGroupKeys(!0);this.id=s({data:this.data,parentKeys:o.length>0?o:void 0,level:this.level}),null!==this.id&&"string"==typeof this.id&&this.id.startsWith(te.ID_PREFIX_ROW_GROUP)&&console.error(`AG Grid: Row IDs cannot start with ${te.ID_PREFIX_ROW_GROUP}, this is a reserved prefix for AG Grid's row grouping feature.`),null!==this.id&&"string"!=typeof this.id&&(this.id=""+this.id)}else this.id=void 0;else this.id=t}getGroupKeys(t=!1){const s=[];let o=this;for(t&&(o=o.parent);o&&o.level>=0;)s.push(o.key),o=o.parent;return s.reverse(),s}isPixelInRange(t){return!(!y(this.rowTop)||!y(this.rowHeight))&&t>=this.rowTop&&t<this.rowTop+this.rowHeight}setFirstChild(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_FIRST_CHILD_CHANGED)))}setLastChild(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_LAST_CHILD_CHANGED)))}setChildIndex(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_CHILD_INDEX_CHANGED)))}setRowTop(t){this.oldRowTop=this.rowTop,this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_TOP_CHANGED)),this.setDisplayed(null!==t))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setDisplayed(t){this.displayed!==t&&(this.displayed=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_DISPLAYED_CHANGED)))}setDragging(t){this.dragging!==t&&(this.dragging=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_DRAGGING_CHANGED)))}setHighlighted(t){t!==this.highlighted&&(this.highlighted=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_HIGHLIGHT_CHANGED)))}setHovered(t){this.hovered!==t&&(this.hovered=t)}isHovered(){return this.hovered}setAllChildrenCount(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_ALL_CHILDREN_COUNT_CHANGED)))}setMaster(t){this.master!==t&&(this.master&&!t&&(this.expanded=!1),this.master=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_MASTER_CHANGED)))}setGroup(t){this.group!==t&&(this.group&&!t&&(this.expanded=!1),this.group=t,this.updateHasChildren(),this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_GROUP_CHANGED)))}setRowHeight(t,s=!1){this.rowHeight=t,this.rowHeightEstimated=s,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_HEIGHT_CHANGED))}setRowAutoHeight(t,s){this.__autoHeights||(this.__autoHeights={}),this.__autoHeights[s.getId()]=t,null!=t&&(null==this.checkAutoHeightsDebounced&&(this.checkAutoHeightsDebounced=Ee(this.checkAutoHeights.bind(this),1)),this.checkAutoHeightsDebounced())}checkAutoHeights(){let t=!1,s=!0,o=0;const r=this.__autoHeights;if(null==r||(this.beans.columnModel.getAllDisplayedAutoHeightCols().forEac
1h(a=>{let u=r[a.getId()];if(null==u){if(!this.beans.columnModel.isColSpanActive())return void(t=!0);{let h=[];switch(a.getPinned()){case"left":h=this.beans.columnModel.getDisplayedLeftColumnsForRow(this);break;case"right":h=this.beans.columnModel.getDisplayedRightColumnsForRow(this);break;case null:h=this.beans.columnModel.getViewportCenterColumnsForRow(this)}if(h.includes(a))return void(t=!0);u=-1}}else s=!1;u>o&&(o=u)}),t)||((s||o<10)&&(o=this.beans.gos.getRowHeightForNode(this).height),o==this.rowHeight))return;this.setRowHeight(o);const l=this.beans.rowModel;l.onRowHeightChangedDebounced&&l.onRowHeightChangedDebounced()}setRowIndex(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_ROW_INDEX_CHANGED)))}setUiLevel(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_UI_LEVEL_CHANGED)))}setExpanded(t,s,o){if(this.expanded===t)return;this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_EXPANDED_CHANGED));const r=Object.assign({},this.createGlobalRowEvent(g.EVENT_ROW_GROUP_OPENED),{expanded:t,event:s||null});this.beans.rowNodeEventThrottle.dispatchExpanded(r,o),this.beans.rowRenderer.refreshCells({rowNodes:[this]})}createGlobalRowEvent(t){return this.beans.gos.addGridCommonParams({type:t,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned})}dispatchLocalEvent(t){this.eventService&&this.eventService.dispatchEvent(t)}setDataValue(t,s,o){const n=(()=>{var u;return"string"!=typeof t?t:null!=(u=this.beans.columnModel.getGridColumn(t))?u:this.beans.columnModel.getPrimaryColumn(t)})(),l=this.getValueFromValueService(n);if(this.beans.gos.get("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(n,l,s,o),!1;const a=this.beans.valueService.setValue(this,n,s,o);return this.dispatchCellChangedEvent(n,s,l),this.checkRowSelectable(),a}getValueFromValueService(t){var s,o;const r=this.leafGroup&&this.beans.columnModel.isPivotMode(),n=this.group&&this.expanded&&!this.footer&&!r;let l=!1;const a=null!=(s=this.beans.gos.get("groupTotalRow"))?s:this.beans.gos.get("groupIncludeFooter");l="function"!=typeof a?!!a:!!(null!=(o=this.beans.gos.getCallback("groupTotalRow"))?o:this.beans.gos.getCallback("groupIncludeFooter"))({node:this});const u=this.beans.gos.get("groupSuppressBlankHeader");return this.beans.valueService.getValue(t,this,!1,n&&l&&!u)}dispatchEventForSaveValueReadOnly(t,s,o,r){const n=this.beans.gos.addGridCommonParams({type:g.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:t,colDef:t.getColDef(),data:this.data,node:this,oldValue:s,newValue:o,value:o,source:r});this.beans.eventService.dispatchEvent(n)}setGroupValue(t,s){const o=this.beans.columnModel.getGridColumn(t);_(this.groupData)&&(this.groupData={});const r=o.getColId(),n=this.groupData[r];n!==s&&(this.groupData[r]=s,this.dispatchCellChangedEvent(o,s,n))}setAggData(t){const s=this.aggData;if(this.aggData=t,this.eventService){const o=r=>{const n=this.aggData?this.aggData[r]:void 0,l=s?s[r]:void 0;if(n===l)return;const a=this.beans.columnModel.lookupGridColumn(r);a&&this.dispatchCellChangedEvent(a,n,l)};for(const r in this.aggData)o(r);for(const r in t)r in this.aggData||o(r)}}updateHasChildren(){let t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(this.beans.gos.isRowModelType("serverSide")){const o=this.beans.gos.get("treeData"),r=this.beans.gos.get("isServerSideGroup");t=!this.stub&&!this.footer&&(o?!!r&&r(this.data):!!this.group)}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(te.EVENT_HAS_CHILDREN_CHANGED)))}hasChildren(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren}isEmptyRowGroupNode(){return this.group&&Fe(this.childrenAfterGroup)}dispatchCellChangedEvent(t,s,o){this.dispatchLocalEvent({type:te.EVENT_CELL_CHANGED,node:this,column:t,newValue:s,oldValue:o})}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return!this.footer&&(this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||
1!!this.master)}isSelected(){return this.footer?this.sibling.isSelected():this.selected}depthFirstSearch(t){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(s=>s.depthFirstSearch(t)),t(this)}calculateSelectedFromChildren(){var t;let s=!1,o=!1,r=!1;if(null==(t=this.childrenAfterGroup)||!t.length)return this.selectable?this.selected:null;for(let n=0;n<this.childrenAfterGroup.length;n++){const l=this.childrenAfterGroup[n];let a=l.isSelected();if(!l.selectable){const u=l.calculateSelectedFromChildren();if(null===u)continue;a=u}switch(a){case!0:s=!0;break;case!1:o=!0;break;default:r=!0}}return r||s&&o?void 0:!!s||!o&&(this.selectable?this.selected:null)}setSelectedInitialValue(t){this.selected=t}selectThisNode(t,s,o="api"){if(!this.selectable&&t||this.selected===t)return!1;this.selected=t,this.eventService&&this.dispatchLocalEvent(this.createLocalRowEvent(te.EVENT_ROW_SELECTED));const l=this.sibling;l&&l.footer&&l.eventService&&l.dispatchLocalEvent(l.createLocalRowEvent(te.EVENT_ROW_SELECTED));const a=x(M({},this.createGlobalRowEvent(g.EVENT_ROW_SELECTED)),{event:s||null,source:o});return this.beans.eventService.dispatchEvent(a),!0}setSelected(t,s=!1,o="api"){"boolean"!=typeof o?this.setSelectedParams({newValue:t,clearSelection:s,rangeSelect:!1,source:o}):console.warn("AG Grid: since version v30, rowNode.setSelected() property `suppressFinishActions` has been removed, please use `gridApi.setNodesSelected()` for bulk actions, and the event `source` property for ignoring events instead.")}setSelectedParams(t){return this.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),0):void 0===this.id?(console.warn("AG Grid: cannot select node until id for node is known"),0):this.beans.selectionService.setNodesSelected(x(M({},t),{nodes:[this.footer?this.sibling:this]}))}isRowPinned(){return"top"===this.rowPinned||"bottom"===this.rowPinned}isParentOfNode(t){let s=this.parent;for(;s;){if(s===t)return!0;s=s.parent}return!1}addEventListener(t,s){var o,r;this.eventService||(this.eventService=new et),this.beans.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.beans.frameworkOverrides),this.frameworkEventListenerService=new Er(this.beans.frameworkOverrides));const n=null!=(r=null==(o=this.frameworkEventListenerService)?void 0:o.wrap(s))?r:s;this.eventService.addEventListener(t,n)}removeEventListener(t,s){var o,r;if(!this.eventService)return;const n=null!=(r=null==(o=this.frameworkEventListenerService)?void 0:o.unwrap(s))?r:s;this.eventService.removeEventListener(t,n),this.eventService.noRegisteredListenersExist()&&(this.eventService=null)}onMouseEnter(){this.dispatchLocalEvent(this.createLocalRowEvent(te.EVENT_MOUSE_ENTER))}onMouseLeave(){this.dispatchLocalEvent(this.createLocalRowEvent(te.EVENT_MOUSE_LEAVE))}getFirstChildOfFirstChild(t){let s=this,o=!0,r=!1,n=null;for(;o&&!r;){const l=s.parent;y(l)&&s.firstChild?l.rowGroupColumn===t&&(r=!0,n=l):o=!1,s=l}return r?n:null}isFullWidthCell(){if(this.detail)return!0;const t=this.beans.gos.getCallback("isFullWidthRow");return!!t&&t({rowNode:this})}getRoute(){if(null==this.key)return;const t=[];let s=this;for(;null!=s.key;)t.push(s.key),s=s.parent;return t.reverse()}createFooter(){if(this.sibling)return;const t=new Set(["eventService","__objectId","sticky"]),s=new te(this.beans);Object.keys(this).forEach(o=>{t.has(o)||(s[o]=this[o])}),s.footer=!0,s.setRowTop(null),s.setRowIndex(null),s.oldRowTop=null,s.id="rowGroupFooter_"+this.id,s.sibling=this,this.sibling=s}destroyFooter(){this.sibling&&(this.sibling.setRowTop(null),this.sibling.setRowIndex(null),this.sibling=void 0)}};return e.ID_PREFIX_ROW_GROUP="row-group-",e.ID_PREFIX_TOP_PINNED="t-",e.ID_PREFIX_BOTTOM_PINNED="b-",e.OBJECT_ID_SEQUENCE=0,e.EVENT_ROW_SELECTED="rowSelected",e.EVENT_DATA_CHANGED="dataChanged",e.EVENT_CELL_CHANGED="cellChanged",e.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged",e.EVENT_MASTER_CHANGED="masterChanged",e.EVENT_GROUP_CHANGED="groupChanged",e.EVENT_MOUSE_ENTER="mouseEnter",e.EVENT_MOUSE_LEAVE="mouseLeave",e.EVENT_HEIGHT_CHANGED="heightChanged",e.EVENT_TOP_CHANGED="topChanged",e.EVENT_DISPLAYED_CHANGED="displayedChanged",e.EVENT_FIRST_CHILD_CHANGED="firstChildCh
1anged",e.EVENT_LAST_CHILD_CHANGED="lastChildChanged",e.EVENT_CHILD_INDEX_CHANGED="childIndexChanged",e.EVENT_ROW_INDEX_CHANGED="rowIndexChanged",e.EVENT_EXPANDED_CHANGED="expandedChanged",e.EVENT_HAS_CHILDREN_CHANGED="hasChildrenChanged",e.EVENT_SELECTABLE_CHANGED="selectableChanged",e.EVENT_UI_LEVEL_CHANGED="uiLevelChanged",e.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged",e.EVENT_DRAGGING_CHANGED="draggingChanged",e})(),B=Sh,No=class extends V{constructor(){super('\n <div class="ag-selection-checkbox" role="presentation">\n <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n </div>')}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.localeService.getLocaleTextFunc(),i=this.rowNode.isSelected(),t=Co(e,i),[s,o]=this.rowNode.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],r=e(s,o);this.eCheckbox.setValue(i,!0),this.eCheckbox.setInputAriaLabel(`${r} (${t})`)}onClicked(e,i,t){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:t.shiftKey,groupSelectsFiltered:i,event:t,source:"checkboxSelected"})}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",s=>{tt(s)}),this.addManagedListener(this.eCheckbox.getInputElement(),"click",s=>{tt(s);const o=this.gos.get("groupSelectsFiltered"),r=this.eCheckbox.getValue();this.shouldHandleIndeterminateState(r,o)?0===this.onClicked(!0,o,s||{})&&this.onClicked(!1,o,s):r?this.onClicked(!1,o,s):this.onClicked(!0,o,s||{})}),this.addManagedListener(this.rowNode,B.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.gos.get("isRowSelectable")||"function"==typeof this.getIsVisible()){const s=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,s),this.addManagedListener(this.rowNode,B.EVENT_DATA_CHANGED,s),this.addManagedListener(this.rowNode,B.EVENT_CELL_CHANGED,s),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}shouldHandleIndeterminateState(e,i){return i&&(void 0===this.eCheckbox.getPreviousValue()||void 0===e)&&this.gos.isRowModelType("clientSide")}showOrHideSelect(){var e,i,t;let s=this.rowNode.selectable;const o=this.getIsVisible();if(s)if("function"==typeof o){const n=null==(e=this.overrides)?void 0:e.callbackParams;if(this.column){const l=this.column.createColumnFunctionCallbackParams(this.rowNode);s=o(M(M({},n),l))}else s=o(x(M({},n),{node:this.rowNode,data:this.rowNode.data}))}else s=o??!1;if(null==(i=this.column)?void 0:i.getColDef().showDisabledCheckboxes)return this.eCheckbox.setDisabled(!s),this.setVisible(!0),void this.setDisplayed(!0);null!=(t=this.overrides)&&t.removeHidden?this.setDisplayed(s):this.setVisible(s)}getIsVisible(){var e,i;return this.overrides?this.overrides.isVisible:null==(i=null==(e=this.column)?void 0:e.getColDef())?void 0:i.checkboxSelection}};d([F("eCheckbox")],No.prototype,"eCheckbox",2),d([T],No.prototype,"postConstruct",1);var ja=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(ja||{}),ee=(()=>{let e=class extends b{constructor(){super(...arguments),this.dragSourceAndParamsList=[],this.dropTargets=[]}init(){this.ePinnedIcon=je("columnMovePin",this.gos,null),this.eHideIcon=je("columnMoveHide",this.gos,null),this.eMoveIcon=je("columnMoveMove",this.gos,null),this.eLeftIcon=je("columnMoveLeft",this.gos,null),this.eRightIcon=je("columnMoveRight",this.gos,null),this.eGroupIcon=je("columnMoveGroup",this.gos,null),this.eAggregateIcon=je("columnMoveValue",this.gos,null),this.ePivotIcon=je("columnMovePivot",this.gos,null),this.eDropNotAllowedIcon=je("dropNotAllowed",this.gos,null)}addDragSource(i,t=!1){const s={eElement:i.eElement,dragStartPixels:i.dragStartPixels,onDragStart:this.onDragStart.bind(this,i),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:s,dragSource:i}),this.dragService.addDragSource(s)}removeDragSource(i){const t=this.dragSourceAndParamsList.find(s=>
1s.dragSource===i);t&&(this.dragService.removeDragSource(t.params),Le(this.dragSourceAndParamsList,t))}clearDragSourceParamsList(){this.dragSourceAndParamsList.forEach(i=>this.dragService.removeDragSource(i.params)),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(i,t){this.dragging=!0,this.dragSource=i,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=void 0,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()}onDragStop(i){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){const t=this.createDropTargetEvent(this.lastDropTarget,i,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()}onDragging(i,t){var s,o,r,n;const l=this.getHorizontalDirection(i),a=this.getVerticalDirection(i);this.eventLastTime=i,this.positionGhost(i);const u=this.dropTargets.filter(c=>this.isMouseOnDropTarget(i,c)),h=this.findCurrentDropTarget(i,u);if(h!==this.lastDropTarget)this.leaveLastTargetIfExists(i,l,a,t),null!==this.lastDropTarget&&null===h&&(null==(o=(s=this.dragSource).onGridExit)||o.call(s,this.dragItem)),null===this.lastDropTarget&&null!==h&&(null==(n=(r=this.dragSource).onGridEnter)||n.call(r,this.dragItem)),this.enterDragTargetIfExists(h,i,l,a,t),this.lastDropTarget=h;else if(h&&h.onDragging){const c=this.createDropTargetEvent(h,i,l,a,t);h.onDragging(c)}}getAllContainersFromDropTarget(i){const t=i.getSecondaryContainers?i.getSecondaryContainers():null,s=[[i.getContainer()]];return t?s.concat(t):s}allContainersIntersect(i,t){for(const s of t){const o=s.getBoundingClientRect();if(0===o.width||0===o.height)return!1;if(!(i.clientX>=o.left&&i.clientX<o.right&&i.clientY>=o.top&&i.clientY<o.bottom))return!1}return!0}isMouseOnDropTarget(i,t){const s=this.getAllContainersFromDropTarget(t);let o=!1;for(const r of s)if(this.allContainersIntersect(i,r)){o=!0;break}return!(t.targetContainsSource&&!t.getContainer().contains(this.dragSource.eElement))&&o&&t.isInterestedIn(this.dragSource.type,this.dragSource.eElement)}findCurrentDropTarget(i,t){const s=t.length;if(0===s)return null;if(1===s)return t[0];const r=this.gos.getRootNode().elementsFromPoint(i.clientX,i.clientY);for(const n of r)for(const l of t)if(-1!==bl(this.getAllContainersFromDropTarget(l)).indexOf(n))return l;return null}enterDragTargetIfExists(i,t,s,o,r){if(i){if(i.onDragEnter){const n=this.createDropTargetEvent(i,t,s,o,r);i.onDragEnter(n)}this.setGhostIcon(i.getIconName?i.getIconName():null)}}leaveLastTargetIfExists(i,t,s,o){if(this.lastDropTarget){if(this.lastDropTarget.onDragLeave){const r=this.createDropTargetEvent(this.lastDropTarget,i,t,s,o);this.lastDropTarget.onDragLeave(r)}this.setGhostIcon(null)}}addDropTarget(i){this.dropTargets.push(i)}removeDropTarget(i){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==i.getContainer())}hasExternalDropZones(){return this.dropTargets.some(i=>i.external)}findExternalZone(i){return this.dropTargets.filter(s=>s.external).find(s=>s.getContainer()===i.getContainer())||null}getHorizontalDirection(i){const t=this.eventLastTime&&this.eventLastTime.clientX,s=i.clientX;return t===s?null:t>s?0:1}getVerticalDirection(i){const t=this.eventLastTime&&this.eventLastTime.clientY,s=i.clientY;return t===s?null:t>s?0:1}createDropTargetEvent(i,t,s,o,r){const n=i.getContainer(),l=n.getBoundingClientRect(),{gridApi:a,columnApi:u,dragItem:h,dragSource:c}=this;return{event:t,x:t.clientX-l.left,y:t.clientY-l.top,vDirection:o,hDirection:s,dragSource:c,fromNudge:r,dragItem:h,api:a,columnApi:u,dropZoneTarget:n}}positionGhost(i){const t=this.eGhost;if(!t)return;const o=t.getBoundingClientRect().height,r=Jl()-2,n=ea()-2,l=sn(t.offsetParent),{clientY:a,clientX:u}=i;let h=a-l.top-o/2,c=u-l.left-10;const f=this.gos.getDocument(),m=f.defaultView||window,C=m.pageYOffset||f.documentElement.scrollTop,w=m.pageXOffset||f.documentElement.scrollLeft;r>0&&c+t.clientWidth>r+w&&(c=r+w-t.clientWidth),c<0&&(c=0),n>0&&h+t.clientHeight>n+C&&(h=n+C-t.clientHeight),h<0&&(h=0),t.style.left=`${c}px`,t.style.top=`${h}px`}removeGhost(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null}createGhost(){this.eGhost=Ge(e.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);const{theme:i}=this.environment.getTheme();i&&this.eGhost.classList.add(i),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);const t=this.eGhost.querySelector(".ag-dnd-ghost-label");let s=this.dragSource.dragItemName;ho(s)&&(s=s()),t.innerHTML=ae(s)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";const o=this.gos.getDocument();let r=null,n=null;try{r=o.fullscreenElement}catch{}finally{r||(r=this.gos.getRootNode());n=r.querySelector("body")||(r instanceof ShadowRoot?r:r instanceof Document?r?.documentElement:r)}this.eGhostParent=n,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")}setGhostIcon(i,t=!1){ne(this.eGhostIcon);let s=null;switch(i||(i=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():e.ICON_NOT_ALLOWED),i){case e.ICON_PINNED:s=this.ePinnedIcon;break;case e.ICON_MOVE:s=this.eMoveIcon;break;case e.ICON_LEFT:s=this.eLeftIcon;break;case e.ICON_RIGHT:s=this.eRightIcon;break;case e.ICON_GROUP:s=this.eGroupIcon;break;case e.ICON_AGGREGATE:s=this.eAggregateIcon;break;case e.ICON_PIVOT:s=this.ePivotIcon;break;case e.ICON_NOT_ALLOWED:s=this.eDropNotAllowedIcon;break;case e.ICON_HIDE:s=this.eHideIcon}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",t),(s!==this.eHideIcon||!this.gos.get("suppressDragLeaveHidesColumns"))&&s&&this.eGhostIcon.appendChild(s)}};return e.ICON_PINNED="pinned",e.ICON_MOVE="move",e.ICON_LEFT="left",e.ICON_RIGHT="right",e.ICON_GROUP="group",e.ICON_AGGREGATE="aggregate",e.ICON_PIVOT="pivot",e.ICON_NOT_ALLOWED="notAllowed",e.ICON_HIDE="hide",e.GHOST_TEMPLATE='<div class="ag-dnd-ghost ag-unselectable">
1\n <span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>\n <div class="ag-dnd-ghost-label"></div>\n </div>',e})();d([p("dragService")],ee.prototype,"dragService",2),d([p("mouseEventService")],ee.prototype,"mouseEventService",2),d([p("columnApi")],ee.prototype,"columnApi",2),d([p("gridApi")],ee.prototype,"gridApi",2),d([T],ee.prototype,"init",1),d([ye],ee.prototype,"clearDragSourceParamsList",1),ee=d([I("dragAndDropService")],ee);var jt=class extends V{constructor(e,i,t,s,o,r){super(),this.cellValueFn=e,this.rowNode=i,this.column=t,this.customGui=s,this.dragStartPixels=o,this.suppressVisibilityChange=r,this.dragSource=null}isCustomGui(){return null!=this.customGui}postConstruct(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>'),this.getGui().appendChild(se("rowDrag",this.gos,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){const e=this.gos.get("rowDragManaged")?new Xa(this,this.beans,this.rowNode,this.column):new Qa(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}}setDragElement(e,i){this.setTemplateFromElement(e),this.addDragSource(i)}getSelectedNodes(){if(!this.gos.get("rowDragMultiRow"))return[this.rowNode];const i=this.beans.selectionService.getSelectedNodes();return-1!==i.indexOf(this.rowNode)?i:[this.rowNode]}checkCompatibility(){const e=this.gos.get("rowDragManaged");this.gos.get("treeData")&&e&&O("If using row drag with tree data, you cannot have rowDragManaged=true")}getDragItem(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(e){if(e){const i=e.getColDef();if(i.rowDragText)return i.rowDragText}return this.gos.get("rowDragText")}addDragSource(e=4){this.dragSource&&this.removeDragSource();const i=this.localeService.getLocaleTextFunc();this.dragSource={type:2,eElement:this.getGui(),dragItemName:()=>{var t;const s=this.getDragItem(),o=(null==(t=s.rowNodes)?void 0:t.length)||1,r=this.getRowDragText(this.column);return r?r(s,o):1===o?this.cellValueFn():`${o} ${i("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)}removeDragSource(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null}};d([p("beans")],jt.prototype,"beans",2),d([T],jt.prototype,"postConstruct",1),d([ye],jt.prototype,"removeDragSource",1);var qa=class extends b{constructor(e,i,t){super(),this.parent=e,this.rowNode=i,this.column=t}setDisplayedOrVisible(e){const i={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,i);else{let t=!0,s=!1;this.column&&(t=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),s=ho(this.column.getColDef().rowDrag)),s?(this.parent.setDisplayed(!0,i),this.parent.setVisible(t,i)):(this.parent.setDisplayed(t,i),this.parent.setVisible(!0,i))}}},Qa=class extends qa{constructor(e,i,t,s){super(e,t,s),this.beans=i}postConstruct(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const e=this.gos.get("suppressRowDrag");this.setDisplayedOrVisible(e)}};d([T],Qa.prototype,"postConstruct",1);var Xa=class extends qa{constructor(e,i,t,s){super(e,t,s),this.beans=i}postConstruct(){this.addManagedListener(this.beans.eventService,g.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()}onSuppressRowDrag(){this.workOutVisibility()}workOutVisibility(){const i=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature
1(),t=i&&i.shouldPreventRowMove(),s=this.gos.get("suppressRowDrag"),o=this.beans.dragAndDropService.hasExternalDropZones();this.setDisplayedOrVisible(t&&!o||s)}};d([T],Xa.prototype,"postConstruct",1);var Li=class extends b{init(e,i,t,s,o,r,n){var l,a,u,h;this.params=n,this.eGui=i,this.eCheckbox=t,this.eExpanded=s,this.eContracted=o,this.comp=e,this.compClass=r;const{node:c,colDef:m}=n,C=this.isTopLevelFooter();if(!C){if(this.isEmbeddedRowMismatch())return;if(c.footer&&this.gos.get("groupHideOpenParents")&&(m&&m.showRowGroup)!==(c.rowGroupColumn&&c.rowGroupColumn.getColId()))return}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!C){const w=n.node.footer&&n.node.rowGroupIndex===this.columnModel.getRowGroupColumns().findIndex(G=>{var N;return G.getColId()===(null==(N=n.colDef)?void 0:N.showRowGroup)}),R="multipleColumns"!=this.gos.get("groupDisplayType")||this.gos.get("treeData")||this.gos.get("showOpenedGroup")&&!n.node.footer&&(!n.node.group||null!=n.node.rowGroupIndex&&n.node.rowGroupIndex>this.columnModel.getRowGroupColumns().findIndex(G=>{var N;return G.getColId()===(null==(N=n.colDef)?void 0:N.showRowGroup)})),E=!c.group&&((null==(l=this.params.colDef)?void 0:l.field)||(null==(a=this.params.colDef)?void 0:a.valueGetter)),A=this.isExpandable(),P=this.columnModel.isPivotMode()&&c.leafGroup&&(null==(u=c.rowGroupColumn)?void 0:u.getColId())===(null==(h=n.column)?void 0:h.getColDef().showRowGroup);if(!(this.showingValueForOpenedParent||A||E||R||w||P))return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()}getCellAriaRole(){var e,i;const t=null==(e=this.params.colDef)?void 0:e.cellAriaRole,s=null==(i=this.params.column)?void 0:i.getColDef().cellAriaRole;return t||s||"gridcell"}destroy(){super.destroy(),this.expandListener=null}refreshAriaExpanded(){const{node:e,eGridCell:i}=this.params;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable())return void zl(i);const t=()=>{wt(i,!!e.expanded)};this.expandListener=this.addManagedListener(e,B.EVENT_EXPANDED_CHANGED,t)||null,t()}isTopLevelFooter(){if(!this.gos.getGrandTotalRow()||null!=this.params.value||-1!=this.params.node.level)return!1;const i=this.params.colDef;if(null==i||!0===i.showRowGroup)return!0;const s=this.columnModel.getRowGroupColumns();return!s||0===s.length||s[0].getId()===i.showRowGroup}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;
1const e="left"===this.params.pinned,i="right"===this.params.pinned,t=!e&&!i;return this.gos.get("enableRtl")?this.columnModel.isPinningLeft()?!i:!t:this.columnModel.isPinningLeft()?!e:!t}findDisplayedGroupNode(){const e=this.params.column,i=this.params.node;if(this.showingValueForOpenedParent){let t=i.parent;for(;null!=t;){if(t.rowGroupColumn&&e.isRowGroupDisplayed(t.rowGroupColumn.getId())){this.displayedGroupNode=t;break}t=t.parent}}_(this.displayedGroupNode)&&(this.displayedGroupNode=i)}setupShowingValueForOpenedParent(){const e=this.params.node,i=this.params.column;if(!this.gos.get("groupHideOpenParents"))return void(this.showingValueForOpenedParent=!1);if(!e.groupData)return void(this.showingValueForOpenedParent=!1);if(null!=e.rowGroupColumn){const o=e.rowGroupColumn.getId();if(i.isRowGroupDisplayed(o))return void(this.showingValueForOpenedParent=!1)}const s=null!=e.groupData[i.getId()];this.showingValueForOpenedParent=s}addValueElement(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())}addGroupValue(){var e;const i=this.adjustParamsWithDetailsFromRelatedColumn(),t=this.getInnerCompDetails(i),{valueFormatted:s,value:o}=i;let r=s;if(null==r){const n=this.displayedGroupNode.rowGroupColumn&&(null==(e=this.params.column)?void 0:e.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId()));r=""===this.displayedGroupNode.key&&this.displayedGroupNode.group&&n?this.localeService.getLocaleTextFunc()("blanks","(Blanks)"):o??null}this.comp.setInnerRenderer(t,r)}adjustParamsWithDetailsFromRelatedColumn(){const e=this.displayedGroupNode.rowGroupColumn,i=this.params.column;if(!e)return this.params;if(null!=i&&!i.isRowGroupDisplayed(e.getId()))return this.params;const s=this.params,{value:o,node:r}=this.params,n=this.valueService.formatValue(e,r,o);return x(M({},s),{valueFormatted:n})}addFooterValue(){let e=this.params.totalValueGetter;if(!e){const s=this.params.footerValueGetter;s&&(e=s,O("As of v31.3, footerValueGetter is deprecated. Use `totalValueGetter` instead."))}let i="";if(e){const s=fr(this.params);s.value=this.params.value,"function"==typeof e?i=e(s):"string"==typeof e?i=this.expressionService.evaluate(e,s):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else i=this.localeService.getLocaleTextFunc()("footerTotal","Total")+" "+(null!=this.params.value?this.params.value:"");const t=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(t,i)}getInnerCompDetails(e){if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gos.get("groupRowRendererParams"),e);const i=this.userComponentFactory.getInnerRendererDetails(e,e),t=n=>n&&n.componentClass==this.compClass;if(i&&!t(i))return i;const s=this.displayedGroupNode.rowGroupColumn,o=s?s.getColDef():void 0;if(!o)return;const r=this.userComponentFactory.getCellRendererDetails(o,e);return r&&!t(r)?r:t(r)&&o.cellRendererParams&&o.cellRendererParams.innerRenderer?this.userComponentFactory.getInnerRendererDetails(o.cellRendererParams,e):void 0}addChildCount(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,B.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())}updateChildCount(){const e=this.displayedGroupNode.allChildrenCount,s=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?`(${e})`:"";this.comp.setChildCount(s)}isShowRowGroupForThisRow(){if(this.gos.get("treeData"))return!0;const e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;const i=this.params.column;return null==i||i.isRowGroupDisplayed(e.getId())}addExpandAndContract(){var e;const i=this.params,t=se("groupExpanded",this.gos,null),s=se("groupContracted",this.gos,null);t&&this.eExpanded.appendChild(t),s&&this.eContracted.appendChild(s);const o=i.eGridCell;!((null==(e=this.params.column)?void 0:e.isCellEditable(i.node))&&this.gos.get("enableGroupEdit"))&&this.isExpandable()&&!i.suppressDoubleClickExpand&&this.addManagedListener(o,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(o,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(i.node,B.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();const n=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,B.EVENT_ALL_CHILDREN_COUNT_CHANGED,n),this.addManagedListener(this.displayedGroupNode,B.EVENT_MASTER_CHANGED,n),this.addManagedListener(this.displayedGroupNode,B.EVENT_GROUP_CHANGED,n),this.addManagedListener(this.displayedGroupNode,B.EVENT_HAS_CHILDREN_CHANGED,n)}onExpandClicked(e){it(e)||(tt(e),this.onExpandOrContract(e))}onExpandOrContract(e){const i=this.displayedGroupNode,t=!i.expanded;!t&&i.sticky&&this.scrollToStickyNode(i),i.setExpanded(t,e)}scrollToStickyNode(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature
1().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)}isExpandable(){if(this.showingValueForOpenedParent)return!0;const e=this.displayedGroupNode,i=this.columnModel.isPivotMode()&&e.leafGroup;if(!e.isExpandable()||e.footer||i)return!1;const s=this.params.column;return null==s||"string"!=typeof s.getColDef().showRowGroup||this.isShowRowGroupForThisRow()}showExpandAndContractIcons(){const{params:e,displayedGroupNode:i,columnModel:t}=this,{node:s}=e,o=this.isExpandable();if(o){const u=!!this.showingValueForOpenedParent||s.expanded;this.comp.setExpandedDisplayed(u),this.comp.setContractedDisplayed(!u)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);const r=t.isPivotMode(),n=r&&i.leafGroup,l=o&&!n,a=s.footer&&-1===s.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",l),this.comp.addOrRemoveCssClass("ag-row-group",l),r?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",n):a||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!l)}onRowNodeIsExpandableChanged(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()}setupIndent(){this.params.suppressPadding||(this.addManagedListener(this.params.node,B.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())}setIndent(){if(this.gos.get("groupHideOpenParents"))return;const e=this.params,i=e.node,t=!!e.colDef,s=this.gos.get("treeData"),r=!t||s||!0===e.colDef.showRowGroup?i.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+r,this.comp.addOrRemoveCssClass(this.indentClass,!0)}addFullWidthRowDraggerIfNeeded(){if(!this.params.fullWidth||!this.params.rowDrag)return;const e=new jt(()=>this.params.value,this.params.node);this.createManagedBean(e,this.context),this.eGui.insertAdjacentElement("afterbegin",e.getGui())}isUserWantsSelected(){const e=this.params.checkbox;return"function"==typeof e||!0===e}addCheckboxIfNeeded(){const e=this.displayedGroupNode,i=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(i){const t=new No;this.getContext().createBean(t),t.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(t.getGui()),this.addDestroyFunc(()=>this.getContext().destroyBean(t))}this.comp.setCheckboxVisible(i)}onKeyDown(e){e.key!==v.ENTER||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){it(e)||po(this.eExpanded,e)||po(this.eContracted,e)||this.onExpandOrContract(e)}};d([p("expressionService")],Li.prototype,"expressionService",2),d([p("valueService")],Li.prototype,"valueService",2),d([p("columnModel")],Li.prototype,"columnModel",2),d([p("userComponentFactory")],Li.prototype,"userComponentFactory",2),d([p("ctrlsService")],Li.prototype,"ctrlsService",2);var Mi=(()=>{let e=class Yd extends V{constructor(){super(Yd.TEMPLATE)}init(t){const s={setInnerRenderer:(l,a)=>this.setRenderDetails(l,a),setChildCount:l=>this.eChildCount.textContent=l,addOrRemoveCssClass:(l,a)=>this.addOrRemoveCssClass(l,a),setContractedDisplayed:l=>z(this.eContracted,l),setExpandedDisplayed:l=>z(this.eExpanded,l),setCheckboxVisible:l=>this.eCheckbox.classList.toggle("ag-invisible",!l)},o=this.createManagedBean(new Li),r=!t.colDef,n=this.getGui();o.init(s,n,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,t),r&&oe(n,o.getCellAriaRole())}setRenderDetails(t,s){if(t){const o=t.newAgStackInstance();if(!o)return;o.then(r=>{if(!r)return;const n=()=>this.context.destroyBean(r);this.isAlive()?(this.eValue.appendChild(r.getGui()),this.addDestroyFunc(n)):n()})}else this.eValue.innerText=s}destroy(){this.getContext().destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}};return e.TEMPLATE='<span class="ag-cell-wrapper">\n <span class="ag-group-expanded" ref="eExpanded"></span>\n <span class="ag-group-contracted" ref="eContracted"></span>\n <span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>
1\n <span class="ag-group-value" ref="eValue"></span>\n <span class="ag-group-child-count" ref="eChildCount"></span>\n </span>',e})();d([F("eExpanded")],Mi.prototype,"eExpanded",2),d([F("eContracted")],Mi.prototype,"eContracted",2),d([F("eCheckbox")],Mi.prototype,"eCheckbox",2),d([F("eValue")],Mi.prototype,"eValue",2),d([F("eChildCount")],Mi.prototype,"eChildCount",2);var Za=Mi,Dn=(()=>{let e=class jd extends V{constructor(){super(jd.TEMPLATE)}init(t){t.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingError","ERR")}setupLoading(){const t=se("groupLoading",this.gos,null);t&&this.eLoadingIcon.appendChild(t);const s=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=s("loadingOoo","Loading")}refresh(t){return!1}destroy(){super.destroy()}};return e.TEMPLATE='<div class="ag-loading">\n <span class="ag-loading-icon" ref="eLoadingIcon"></span>\n <span class="ag-loading-text" ref="eLoadingText"></span>\n </div>',e})();d([F("eLoadingIcon")],Dn.prototype,"eLoadingIcon",2),d([F("eLoadingText")],Dn.prototype,"eLoadingText",2);var Rh=Dn,Dh=(()=>{let e=class qd extends V{constructor(){super(qd.TEMPLATE)}init(t){const s=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",s),this.addDestroyFunc(()=>Ri(t.eParentOfValue)),Ri(t.eParentOfValue,s),t.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const t=this.localeService.getLocaleTextFunc();this.getGui().innerText=t("loadingError","ERR");const s=t("ariaSkeletonCellLoadingFailed","Row failed to load");He(this.getGui(),s)}setupLoading(){const s=this.gos.getDocument().createElement("div");s.classList.add("ag-skeleton-effect"),this.getGui().appendChild(s);const r=this.localeService.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");He(this.getGui(),r)}refresh(t){return!1}destroy(){super.destroy()}};return e.TEMPLATE='<div class="ag-skeleton-container"></div>',e})(),bh=Dh,Th=(()=>{let e=class Qd extends V{constructor(){super()}destroy(){super.destroy()}init(t){const s=this.gos.get("overlayLoadingTemplate");if(this.setTemplate(s??Qd.DEFAULT_LOADING_OVERLAY_TEMPLATE),!s){const o=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=o("loadingOoo","Loading...")})}}};return e.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span aria-live="polite" aria-atomic="true" class="ag-overlay-loading-center"></span>',e})(),Ah=Th,Fh=(()=>{let e=class Xd extends V{constructor(){super()}destroy(){super.destroy()}init(t){const s=this.gos.get("overlayNoRowsTemplate");if(this.setTemplate(s??Xd.DEFAULT_NO_ROWS_TEMPLATE),!s){const o=this.localeService.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=o("noRowsToShow","No Rows To Show")})}}};return e.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center"></span>',e})(),Ph=Fh,Lh=class extends Yt{constructor(){super('<div class="ag-tooltip"></div>')}init(e){const{value:i}=e;this.getGui().textContent=ae(i,!0)}},Mh=class{getTemplate(){return'<ag-input-number-field class="ag-cell-editor" ref="eInput"></ag-input-number-field>'}init(e,i){this.eInput=e,this.params=i,null!=i.max&&e.setMax(i.max),null!=i.min&&e.setMin(i.min),null!=i.precision&&e.setPrecision(i.precision),null!=i.step&&e.setStep(i.step);const t=e.getInputElement();i.preventStepping?e.addManagedListener(t,"keydown",this.preventStepping):i.showStepperButtons&&t.classList.add("ag-number-field-input-stepper")}preventStepping(e){(e.key===v.UP||e.key===v.DOWN)&&e.preventDefault()}getValue(){const e=this.eInput.getValue();if(!y(e)&&!y(this.params.value))return this.params.value;let i=this.params.parseValue(e);if(null==i)return i;if("string"==typeof i){if(""===i)return null;i=Number(i)}return isNaN(i)?null:i}getStartValue(){return this.params.value}},Ih=class extends Es{constructor(){super(new Mh)}},Gh=class{getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}init(e,i){this.eInput=e,this.params=i,null!=i.min&&e.setMin(i.min),null!=i.max&&e.setMax(i.max),null!=i.step&&e.setStep(i.step)}getValue(){const e=this.eInput.getDate();return y(e)||y(this.params.value)?e??null:this.params.value}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return $e(e,!1)}}
1,Nh=class extends Es{constructor(){super(new Gh)}},xh=class{constructor(e){this.getDataTypeService=e}getTemplate(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'}init(e,i){this.eInput=e,this.params=i,null!=i.min&&e.setMin(i.min),null!=i.max&&e.setMax(i.max),null!=i.step&&e.setStep(i.step)}getValue(){const e=this.formatDate(this.eInput.getDate());return y(e)||y(this.params.value)?this.params.parseValue(e??""):this.params.value}getStartValue(){var e,i;return $e(null!=(i=this.parseDate(null!=(e=this.params.value)?e:void 0))?i:null,!1)}parseDate(e){return this.getDataTypeService().getDateParserFunction(this.params.column)(e)}formatDate(e){return this.getDataTypeService().getDateFormatterFunction(this.params.column)(e)}},Ja=class extends Es{constructor(){super(new xh(()=>this.dataTypeService))}};d([p("dataTypeService")],Ja.prototype,"dataTypeService",2);var ed=(()=>{let e=class Zd extends V{constructor(){super(Zd.TEMPLATE)}init(t){this.params=t,this.updateCheckbox(t);const s=this.eCheckbox.getInputElement();s.setAttribute("tabindex","-1"),Ir(s,"polite"),this.addManagedListener(s,"click",o=>{if(tt(o),this.eCheckbox.isDisabled())return;const r=this.eCheckbox.getValue();this.onCheckboxChanged(r)}),this.addManagedListener(s,"dblclick",o=>{tt(o)}),this.addManagedListener(this.params.eGridCell,"keydown",o=>{if(o.key===v.SPACE&&!this.eCheckbox.isDisabled()){this.params.eGridCell===this.gos.getActiveDomElement()&&this.eCheckbox.toggle();const r=this.eCheckbox.getValue();this.onCheckboxChanged(r),o.preventDefault()}})}refresh(t){return this.params=t,this.updateCheckbox(t),!0}updateCheckbox(t){var s,o,r;let n,l=!0;if(t.node.group&&t.column){const f=t.column.getColId();f.startsWith(Ei)?n=null==t.value||""===t.value?void 0:"true"===t.value:t.node.aggData&&void 0!==t.node.aggData[f]?n=null!=(s=t.value)?s:void 0:l=!1}else n=null!=(o=t.value)?o:void 0;if(!l)return void this.eCheckbox.setDisplayed(!1);this.eCheckbox.setValue(n);const a=null!=t.disabled?t.disabled:!(null!=(r=t.column)&&r.isCellEditable(t.node));this.eCheckbox.setDisabled(a);const u=this.localeService.getLocaleTextFunc(),h=Co(u,n),c=a?h:`${u("ariaToggleCellValue","Press SPACE to toggle cell value")} (${h})`;this.eCheckbox.setInputAriaLabel(c)}onCheckboxChanged(t){const{column:s,node:o,rowIndex:r,value:n}=this.params,l={type:g.EVENT_CELL_EDITING_STARTED,column:s,colDef:s?.getColDef(),data:o.data,node:o,rowIndex:r,rowPinned:o.rowPinned,value:n};this.eventService.dispatchEvent(l);const a=this.params.node.setDataValue(this.params.column,t,"edit"),u={type:g.EVENT_CELL_EDITING_STOPPED,column:s,colDef:s?.getColDef(),data:o.data,node:o,rowIndex:r,rowPinned:o.rowPinned,value:n,oldValue:n,newValue:t,valueChanged:a};this.eventService.dispatchEvent(u)}};return e.TEMPLATE='\n <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">\n <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n </div>',e})();d([F("eCheckbox")],ed.prototype,"eCheckbox",2);var Oh=ed,td=class extends Yt{constructor(){super('\n <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">\n <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n </div>')}init(e){var i;this.params=e;const t=null!=(i=e.value)?i:void 0;this.eCheckbox.setValue(t),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListener(this.eCheckbox,g.EVENT_FIELD_VALUE_CHANGED,o=>this.setAriaLabel(o.selected))}getValue(){return this.eCheckbox.getValue()}focusIn(){this.eCheckbox.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const i=this.localeService.getLocaleTextFunc(),t=Co(i,e),s=i("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(`${s} (${t})`)}};d([F("eCheckbox")],td.prototype,"eCheckbox",2);var _h=class extends V{constructor(){super(),this.setTemplate("<div></div>")}init(e){var i;this.params=e,this.cssClassPrefix=null!=(i=this.params.cssClassPrefix)?i:"ag-menu-option",this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addIcon(){if(this.params.isCompact)return;const e=Ge(`<span ref="eIcon" class="${this.getClassName("part")} ${this.getClassName("icon")}" role="presentation"></span>`);this.params.checked?e.appendChild(se("check",this.gos)):this.params.icon&&(ws(this.params.icon)?e.appendChild(this.params.icon):"string"==typeof this.params.icon?e.innerHTML=this.params.icon:console.warn("AG Grid: menu item icon must be DOM node or string")),this.getGui().appendChild(e)}addName(){const e=Ge(`<span ref="eName" class="${this.getClassName("part")} ${this.getClassName("text")}">${this.params.name||""}</span>`);this.getGui().appendChild(e)}addShortcut(){if(this.params.isCompact)return;const e=Ge(`<span ref="eShortcut" class="${this.getClassName("part")} ${this.getClassName("shortcut")}">${this.params.shortcut||""}</span>`);this.getGui().appendChild(e)}addSubMenu(){const e=Ge(`<span ref="ePopupPointer" class="${this.getClassName("part")} ${this.getClassName("popup-pointer")}"></span>`),i=this.getGui();if(this.params.subMenu){const t=this.gos.get("enableRtl")?"smallLeft":"smallRight";wt(i,!1),e.appendChild(se(t,this.gos))}i.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}destroy(){super.destroy()}},xo=class extends b{constructor(){super(...arguments),this.agGridDefaults={agDateInput:Va,agColumnHeader:yn,agColumnGroupHeader:fh,agSortIndicator:En,agTextColumnFloatingFilter:ph,agNumberColumnFloatingFilter:ch,agDateColumnFloatingFilter:Mo,agReadOnlyFloatingFilter:cn,agAnimateShowChangeCellRenderer:$a,agAnimateSlideCellRenderer:Ya,agGroupCellRenderer:Za,agGroupRowRenderer:Za,agLoadingCellRenderer:Rh,agSkeletonCellRenderer:bh,agCheckboxCellRenderer:Oh,agCellEditor:Ka,agTextCellEditor:Ka,agNumberCellEditor:Ih,agDateCellEditor:Nh,agDateStringCellEditor:Ja,agSelectCellEditor:Rn,agLargeTextCellEditor:mh,agCheckboxCellEditor:td,agTextColumnFilter:Sn,agNumberColumnFilter:Ba,agDateColumnFilter:_a,agLo
1adingOverlay:Ah,agNoRowsOverlay:Ph,agTooltipComponent:Lh,agMenuItem:_h},this.enterpriseAgDefaultCompsModule={agSetColumnFilter:"@ag-grid-enterprise/set-filter",agSetColumnFloatingFilter:"@ag-grid-enterprise/set-filter",agMultiColumnFilter:"@ag-grid-enterprise/multi-filter",agMultiColumnFloatingFilter:"@ag-grid-enterprise/multi-filter",agGroupColumnFilter:"@ag-grid-enterprise/row-grouping",agGroupColumnFloatingFilter:"@ag-grid-enterprise/row-grouping",agRichSelect:"@ag-grid-enterprise/rich-select",agRichSelectCellEditor:"@ag-grid-enterprise/rich-select",agDetailCellRenderer:"@ag-grid-enterprise/master-detail",agSparklineCellRenderer:"@ag-grid-enterprise/sparklines"},this.jsComps={}}init(){const e=this.gos.get("components");null!=e&&me(e,(i,t)=>this.registerJsComponent(i,t))}registerDefaultComponent(e,i){this.agGridDefaults[e]?console.error("Trying to overwrite a default component. You should call registerComponent"):this.agGridDefaults[e]=i}registerJsComponent(e,i){this.jsComps[e]=i}retrieve(e,i){const t=(l,a)=>({componentFromFramework:a,component:l}),s=this.getFrameworkOverrides().frameworkComponent(i,this.gos.get("components"));if(null!=s)return t(s,!0);const o=this.jsComps[i];if(o)return t(o,this.getFrameworkOverrides().isFrameworkComponent(o));const r=this.agGridDefaults[i];if(r)return t(r,!1);const n=this.enterpriseAgDefaultCompsModule[i];return n?j.__assertRegistered(n,`AG Grid '${e}' component: ${i}`,this.context.getGridId()):wi(()=>{this.warnAboutMissingComponent(e,i)},"MissingComp"+i),null}warnAboutMissingComponent(e,i){const s=Ss(i,[...Object.keys(this.agGridDefaults).filter(o=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(o)),...Object.keys(this.jsComps)],!0,.8).values;console.warn(`AG Grid: Could not find '${i}' component. It was configured as "${e}: '${i}'" but it wasn't found in the list of registered components.`),s.length>0&&console.warn(` Did you mean: [${s.slice(0,3)}]?`),console.warn(`If using a custom component check it has been registered as described in: ${this.getFrameworkOverrides().getDocLink("components/")}`)}};d([T],xo.prototype,"init",1),xo=d([I("userComponentRegistry")],xo);var Vh={propertyName:"dateComponent",cellRenderer:!1},Hh={propertyName:"headerComponent",cellRenderer:!1},kh={propertyName:"headerGroupComponent",cellRenderer:!1},id={propertyName:"cellRenderer",cellRenderer:!0},Bh={propertyName:"loadingCellRenderer",cellRenderer:!0},Wh={propertyName:"cellEditor",cellRenderer:!1},sd={propertyName:"innerRenderer",cellRenderer:!0},Uh={propertyName:"loadingOverlayComponent",cellRenderer:!1},zh={propertyName:"noRowsOverlayComponent",cellRenderer:!1},Kh={propertyName:"tooltipComponent",cellRenderer:!1},bn={propertyName:"filter",cellRenderer:!1},$h={propertyName:"floatingFilterComponent",cellRenderer:!1},Yh={propertyName:"toolPanel",cellRenderer:!1},jh={propertyName:"statusPanel",cellRenderer:!1},qh={propertyName:"fullWidthCellRenderer",cellRenderer:!0},Qh={propertyName:"loadingCellRenderer",cellRenderer:!0},Xh={propertyName:"groupRowRenderer",cellRenderer:!0},Zh={propertyName:"detailCellRenderer",cellRenderer:!0},Jh={propertyName:"menuItem",cellRenderer:!1},ec=(()=>{let e=class{static getFloatingFilterType(i){return this.filterToFloatingFilterMapping[i]}};return e.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"},e})(),Mt=class extends b{getHeaderCompDetails(e,i){return this.getCompDetails(e,Hh,"agColumnHeader",i)}getHeaderGroupCompDetails(e){const i=e.columnGroup.getColGroupDef();return this.getCompDetails(i,kh,"agColumnGroupHeader",e)}
1getFullWidthCellRendererDetails(e){return this.getCompDetails(this.gridOptions,qh,null,e,!0)}getFullWidthLoadingCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Qh,"agLoadingCellRenderer",e,!0)}getFullWidthGroupCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Xh,"agGroupRowRenderer",e,!0)}getFullWidthDetailCellRendererDetails(e){return this.getCompDetails(this.gridOptions,Zh,"agDetailCellRenderer",e,!0)}getInnerRendererDetails(e,i){return this.getCompDetails(e,sd,null,i)}getFullWidthGroupRowInnerCellRenderer(e,i){return this.getCompDetails(e,sd,null,i)}getCellRendererDetails(e,i){return this.getCompDetails(e,id,null,i)}getLoadingCellRendererDetails(e,i){return this.getCompDetails(e,Bh,"agSkeletonCellRenderer",i,!0)}getCellEditorDetails(e,i){return this.getCompDetails(e,Wh,"agCellEditor",i,!0)}getFilterDetails(e,i,t){return this.getCompDetails(e,bn,t,i,!0)}getDateCompDetails(e){return this.getCompDetails(this.gridOptions,Vh,"agDateInput",e,!0)}getLoadingOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,Uh,"agLoadingOverlay",e,!0)}getNoRowsOverlayCompDetails(e){return this.getCompDetails(this.gridOptions,zh,"agNoRowsOverlay",e,!0)}getTooltipCompDetails(e){return this.getCompDetails(e.colDef,Kh,"agTooltipComponent",e,!0)}getSetFilterCellRendererDetails(e,i){return this.getCompDetails(e,id,null,i)}getFloatingFilterCompDetails(e,i,t){return this.getCompDetails(e,$h,t,i)}getToolPanelCompDetails(e,i){return this.getCompDetails(e,Yh,null,i,!0)}getStatusPanelCompDetails(e,i){return this.getCompDetails(e,jh,null,i,!0)}getMenuItemCompDetails(e,i){return this.getCompDetails(e,Jh,"agMenuItem",i,!0)}getCompDetails(e,i,t,s,o=!1){const{propertyName:r,cellRenderer:n}=i;let{compName:l,jsComp:a,fwComp:u,paramsFromSelector:h,popupFromSelector:c,popupPositionFromSelector:f}=this.getCompKeys(e,i,s);const m=R=>{const E=this.userComponentRegistry.retrieve(r,R);E&&(a=E.componentFromFramework?void 0:E.component,u=E.componentFromFramework?E.component:void 0)};if(null!=l&&m(l),null==a&&null==u&&null!=t&&m(t),a&&n&&!this.agComponentUtils.doesImplementIComponent(a)&&(a=this.agComponentUtils.adaptFunction(r,a)),!a&&!u)return void(o&&console.error(`AG Grid: Could not find component ${l}, did you forget to configure this component?`));
1const C=this.mergeParamsWithApplicationProvidedParams(e,i,s,h),w=null==a,S=a||u;return{componentFromFramework:w,componentClass:S,params:C,type:i,popupFromSelector:c,popupPositionFromSelector:f,newAgStackInstance:()=>this.newAgStackInstance(S,w,C,i)}}getCompKeys(e,i,t){const{propertyName:s}=i;let o,r,n,l,a,u;if(e){const h=e,c=h[s+"Selector"],f=c?c(t):null,m=C=>{"string"==typeof C?o=C:null!=C&&!0!==C&&(this.getFrameworkOverrides().isFrameworkComponent(C)?n=C:r=C)};f?(m(f.component),l=f.params,a=f.popup,u=f.popupPosition):m(h[s])}return{compName:o,jsComp:r,fwComp:n,paramsFromSelector:l,popupFromSelector:a,popupPositionFromSelector:u}}newAgStackInstance(e,i,t,s){let n;if(i){const a=this.componentMetadataProvider.retrieve(s.propertyName);n=this.frameworkComponentWrapper.wrap(e,a.mandatoryMethodList,a.optionalMethodList,s)}else n=new e;const l=this.initComponent(n,t);return null==l?ke.resolve(n):l.then(()=>n)}mergeParamsWithApplicationProvidedParams(e,i,t,s=null){const o=this.gos.getGridCommonParams();Pe(o,t);const n=e&&e[i.propertyName+"Params"];return"function"==typeof n?Pe(o,n(t)):"object"==typeof n&&Pe(o,n),Pe(o,s),o}initComponent(e,i){if(this.context.createBean(e),null!=e.init)return e.init(i)}getDefaultFloatingFilterType(e,i){if(null==e)return null;let t=null,{compName:s,jsComp:o,fwComp:r}=this.getCompKeys(e,bn);return s?t=ec.getFloatingFilterType(s):null==o&&null==r&&!0===e.filter&&(t=i()),t}};d([p("gridOptions")],Mt.prototype,"gridOptions",2),d([p("agComponentUtils")],Mt.prototype,"agComponentUtils",2),d([p("componentMetadataProvider")],Mt.prototype,"componentMetadataProvider",2),d([p("userComponentRegistry")],Mt.prototype,"userComponentRegistry",2),d([q("frameworkComponentWrapper")],Mt.prototype,"frameworkComponentWrapper",2),Mt=d([I("userComponentFactory")],Mt);var od=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=-1!==e.scrollAxis.indexOf("x"),this.scrollVertically=-1!==e.scrollAxis.indexOf("y"),this.scrollByTick=null!=e.scrollByTick?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,i=!1){const t=i||this.shouldSkipVerticalScroll();if(t&&this.shouldSkipHorizontalScroll())return;const s=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=e.clientX<s.left+o,this.tickRight=e.clientX>s.right-o,this.tickUp=e.clientY<s.top+o&&!t,this.tickDown=e.clientY>s.bottom-o&&!t,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){let e;if(this.tickCount++,e=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){const i=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(i-e),this.tickDown&&this.setVerticalPosition(i+e)}if(this.scrollHorizontally){const i=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(i-e),this.tickRight&&this.setHorizontalPosition(i+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},Be=class extends b{constructor(e){super(),this.eContainer=e}postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.ctrlsService.whenReady(e=>{const i=e.gridBodyCtrl;this.autoScrollService=new od({scrollContainer:i.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:()=>i.getScrollFeature().getVScrollPosition().top,setVerticalPosition:t=>i.getScrollFeature().setVerticalScrollPosition(t),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return 2===e}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?ee.ICON_NOT_ALLOWED:ee.ICON_MOVE}shouldPreventRowMove(){return!!(this.columnModel.getRowGroupColumns().length||this.filterManager.isAnyFilterPresent()||this.sortController.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const i=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const s=[...this.selectionService.getSelectedNodes()].sort((o,r)=>null==o.rowIndex||null==r.rowIndex?0:this.getRowIndexNumber(o)-this.getRowIndexNumber(r));if(-1!==s.indexOf(i))return s}return[i]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent(g.EVENT_ROW_DRAG_ENTER,e),this.getRowNodes(e).forEach(i=>
1{i.setDragging(!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){const{dragSourceDomDataKey:i}=e.dragSource;return i===this.gos.getDomDataKey()}isDropZoneWithinThisGrid(e){const t=this.ctrlsService.getGridBodyCtrl().getGui(),{dropZoneTarget:s}=e;return!t.contains(s)}onEnterOrDragging(e){this.dispatchGridEvent(g.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;const i=this.mouseEventService.getNormalisedPosition(e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,i),this.autoScrollService.check(e.event)}doManagedDrag(e,i){const t=this.isFromThisGrid(e),s=this.gos.get("rowDragManaged"),o=e.dragItem.rowNodes;s&&this.shouldPreventRowMove()||(this.gos.get("suppressMoveWhenRowDragging")||!t?this.isDropZoneWithinThisGrid(e)||this.clientSideRowModel.highlightRowAtPixel(o[0],i):this.moveRows(o,i))}getRowIndexNumber(e){return parseInt($(e.getRowIndexString().split("-")),10)}moveRowAndClearHighlight(e){const i=this.clientSideRowModel.getLastHighlightedRowNode(),t=i&&1===i.highlighted,s=this.mouseEventService.getNormalisedPosition(e).y,o=e.dragItem.rowNodes;let r=t?1:0;if(this.isFromThisGrid(e))o.forEach(n=>{n.rowTop<s&&(r-=1)}),this.moveRows(o,s,r);else{const n=this.gos.getCallback("getRowId");let l=this.clientSideRowModel.getRowIndexAtPixel(s)+1;0===this.clientSideRowModel.getHighlightPosition(s)&&l--,this.clientSideRowModel.updateRowData({add:o.map(a=>a.data).filter(a=>!this.clientSideRowModel.getRowNode(n?n({data:a,level:0}):a.id)),addIndex:l})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,i,t=0){var s;this.clientSideRowModel.ensureRowsAtPixel(e,i,t)&&(this.focusService.clearFocusedCell(),null==(s=this.rangeService)||s.removeAllCellRanges())}addRowDropZone(e){if(!e.getContainer())return void O("addRowDropZone - A container target needs to be provided");if(this.dragAndDropService.findExternalZone(e))return void console.warn("AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");let i={getContainer:e.getContainer};e.fromGrid?i=e:(e.onDragEnter&&(i.onDragEnter=t=>{e.onDragEnter(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_ENTER,t))}),e.onDragLeave&&(i.onDragLeave=t=>{e.onDragLeave(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_LEAVE,t))}),e.onDragging&&(i.onDragging=t=>{e.onDragging(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_MOVE,t))}),e.onDragStop&&(i.onDragStop=t=>{e.onDragStop(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_END,t))})),this.dragAndDropService.addDropTarget(M({isInterestedIn:t=>2===t,getIconName:()=>ee.ICON_MOVE,external:!0},i))}getRowDropZone(e){const i=this.getContainer.bind(this),t=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),o=this.onDragging.bind(this),r=this.onDragStop.bind(this);return e?{getContainer:i,onDragEnter:e.onDragEnter?n=>{t(n),e.onDragEnter(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_ENTER,n))}:t,onDragLeave:e.onDragLeave?n=>{s(n),e.onDragLeave(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_LEAVE,n))}:s,onDragging:e.onDragging?n=>{o(n),e.onDragging(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_MOVE,n))}:o,onDragStop:e.onDragStop?n=>{r(n),e.onDragStop(this.draggingToRowDragEvent(g.EVENT_ROW_DRAG_END,n))}:r,fromGrid:!0}:{getContainer:i,onDragEnter:t,onDragLeave:s,onDragging:o,onDragStop:r,fromGrid:!0}}draggingToRowDragEvent(e,i){const t=this.mouseEventService.getNormalisedPosition(i).y;let r,n,o=-1;switch(t>this.paginationProxy.getCurrentPageHeight()||(o=this.rowModel.getRowIndexAtPixel(t),r=this.rowModel.getRow(o)),i.vDirection){case 1:n="down";break;case 0:n="up";break;default:n=null}return this.gos.addGridCommonParams({type:e,event:i.event,node:i.dragItem.rowNode,nodes:i.dragItem.rowNodes,overIndex:o,overNode:r,y:t,vDirection:n})}dispatchGridEvent(e,i){const t=this.draggingToRowDragEvent(e,i);this.eventService.dispatchEvent(t)}onDragLeave(e){this.dispatchGridEvent(g.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent(g.EVENT_ROW_DRAG_END,e),this.stopDragging(e),this.gos.get("rowDragManaged")&&(this.gos.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&!this.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(i=>
1{i.setDragging(!1)})}};d([p("dragAndDropService")],Be.prototype,"dragAndDropService",2),d([p("rowModel")],Be.prototype,"rowModel",2),d([p("paginationProxy")],Be.prototype,"paginationProxy",2),d([p("columnModel")],Be.prototype,"columnModel",2),d([p("focusService")],Be.prototype,"focusService",2),d([p("sortController")],Be.prototype,"sortController",2),d([p("filterManager")],Be.prototype,"filterManager",2),d([p("selectionService")],Be.prototype,"selectionService",2),d([p("mouseEventService")],Be.prototype,"mouseEventService",2),d([p("ctrlsService")],Be.prototype,"ctrlsService",2),d([q("rangeService")],Be.prototype,"rangeService",2),d([T],Be.prototype,"postConstruct",1);var ys=class extends b{constructor(){super(...arguments),this.dragEndFunctions=[],this.dragSources=[]}removeAllListeners(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0}removeListener(e){const i=e.dragSource.eElement;i.removeEventListener("mousedown",e.mouseDownListener),e.touchEnabled&&i.removeEventListener("touchstart",e.touchStartListener,{passive:!0})}removeDragSource(e){const i=this.dragSources.find(t=>t.dragSource===e);i&&(this.removeListener(i),Le(this.dragSources,i))}isDragging(){return this.dragging}addDragSource(e){const i=this.onMouseDown.bind(this,e),{eElement:t,includeTouch:s,stopPropagationForTouch:o}=e;t.addEventListener("mousedown",i);let r=null;const n=this.gos.get("suppressTouch");s&&!n&&(r=l=>{en(l.target)||(l.cancelable&&(l.preventDefault(),o&&l.stopPropagation()),this.onTouchStart(e,l))},t.addEventListener("touchstart",r,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:i,touchStartListener:r,touchEnabled:!!s})}getStartTarget(){return this.startTarget}onTouchStart(e,i){this.currentDragParams=e,this.dragging=!1;const t=i.touches[0];this.touchLastTime=t,this.touchStart=t;const o=a=>this.onTouchUp(a,e.eElement),n=i.target,l=[{target:this.gos.getRootNode(),type:"touchmove",listener:a=>{a.cancelable&&a.preventDefault()},options:{passive:!1}},{target:n,type:"touchmove",listener:a=>this.onTouchMove(a,e.eElement),options:{passive:!0}},{target:n,type:"touchend",listener:o,options:{passive:!0}},{target:n,type:"touchcancel",listener:o,options:{passive:!0}}];this.addTemporaryEvents(l),0===e.dragStartPixels&&this.onCommonMove(t,this.touchStart,e.eElement)}onMouseDown(e,i){const t=i;if(e.skipMouseEvent&&e.skipMouseEvent(i)||t._alreadyProcessedByDragService||(t._alreadyProcessedByDragService=!0,0!==i.button))return;this.shouldPreventMouseEvent(i)&&i.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=i,this.startTarget=i.target;const n=this.gos.getRootNode();this.addTemporaryEvents([{target:n,type:"mousemove",listener:a=>this.onMouseMove(a,e.eElement)},{target:n,type:"mouseup",listener:a=>this.onMouseUp(a,e.eElement)},{target:n,type:"contextmenu",listener:a=>a.preventDefault()}]),0===e.dragStartPixels&&this.onMouseMove(i,e.eElement)}addTemporaryEvents(e){e.forEach(i=>{const{target:t,type:s,listener:o,options:r}=i;t.addEventListener(s,o,r)}),this.dragEndFunctions.push(()=>{e.forEach(i=>{const{target:t,type:s,listener:o,options:r}=i;t.removeEventListener(s,o,r)})})}isEventNearStartEvent(e,i){const{dragStartPixels:t}=this.currentDragParams;return un(e,i,y(t)?t:4)}getFirstActiveTouch(e){for(let i=0;i<e.length;i++)if(e[i].identifier===this.touchStart.identifier)return e[i];return null}onCommonMove(e,i,t){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,i))return;this.dragging=!0,this.eventService.dispatchEvent({type:g.EVENT_DRAG_STARTED,target:t}),this.currentDragParams.onDragStart(i),this.currentDragParams.onDragging(i)}this.currentDragParams.onDragging(e)}onTouchMove(e,i){const t=this.getFirstActiveTouch(e.touches);t&&this.onCommonMove(t,this.touchStart,i)}onMouseMove(e,i){var t;at()&&(null==(t=this.gos.getDocument().getSelection())||t.removeAllRanges()),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,i)}shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&"mousemove"===e.type&&e.cancelable&&this.mouseEventService.isEventFromThisGrid(e)&&!this.isOverFormFieldElement(e)}isOverFormFieldElement(e){const i=e.target,t=i?.tagName.toLocaleLowerCase();return!!t?.match("^a$|textarea|input|select|button")}onTouchUp(e,i){let t=this.getFirstActiveTouch(e.changedTouches);t||(t=this.touchLastTime),this.onUpCommon(t,i)}onMouseUp(e,i){this.onUpCommon(e,i)}onUpCommon(e,i){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventService.dispatchEvent({type:g.EVENT_DRAG_STOPPED,target:i})),this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach(t=>t()),this.dragEndFunctions.length=0}};d([p("mouseEventService")],ys.prototype,"mouseEventService",2),d([ye],ys.prototype,"removeAllListeners",1),ys=d([I("dragService")],ys);var Tn="ag-list-item-hovered",rd=class extends b{constructor(e,i,t){super(),this.comp=e,this.virtualList=i,this.params=t,this.currentDragValue=null,this.lastHoveredListItem=null}postConstruct(){this.addManagedListener(this.params.eventSource,this.params.listItemDragStartEvent,this.listItemDragStart.bind(this)),this.addManagedListener(this.params.eventSource,this.params.listItemDragEndEvent,this.listItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){this.dragAndDropService.addDropTarget({isInterestedIn:i=>i===this.params.dragSourceType,getIconName:()=>this.moveBlocked?ee.ICON_PINNED:ee.ICON_MOVE,getContainer:()=>this.comp.getGui(),onDragging:i=>this.onDragging(i),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave()})}createAutoScrollService(){const e=this.virtualList.getGui();
1this.autoScrollService=new od({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:i=>e.scrollTop=i})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;const i=this.getListDragItem(e),t=this.virtualList.getComponentAt(i.rowIndex);if(!t)return;const s=t.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===i.rowIndex&&this.lastHoveredListItem.position===i.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=i,Zr(s,Tn),Zr(s,`ag-item-highlight-${i.position}`))}getListDragItem(e){const i=this.virtualList.getGui(),t=parseFloat(window.getComputedStyle(i).paddingTop),s=this.virtualList.getRowHeight(),o=this.virtualList.getScrollTop(),r=Math.max(0,(e.y-t+o)/s),n=this.params.getNumRows(this.comp)-1,l=0|Math.min(n,r);return{rowIndex:l,position:Math.round(r)>r||r>n?"bottom":"top",component:this.virtualList.getComponentAt(l)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared())}onDragLeave(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${Tn}`).forEach(i=>{[Tn,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(t=>{i.classList.remove(t)})}),this.lastHoveredListItem=null}};function qt(e){return null!=e&&null!=e.getFrameworkComponentInstance?e.getFrameworkComponentInstance():e}d([p("dragAndDropService")],rd.prototype,"dragAndDropService",2),d([T],rd.prototype,"postConstruct",1);var W=class{constructor(){this.detailGridInfoMap={},this.destroyCalled=!1}init(){switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel}this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl})}__getAlignedGridService(){return this.alignedGridsService}getGridId(){return this.context.getGridId()}addDetailGridInfo(e,i){this.detailGridInfoMap[e]=i}removeDetailGridInfo(e){delete this.detailGridInfoMap[e]}getDetailGridInfo(e){return this.detailGridInfoMap[e]}forEachDetailGridInfo(e){let i=0;me(this.detailGridInfoMap,(t,s)=>{y(s)&&(e(s,i),i++)})}getDataAsCsv(e){if(j.__assertRegistered("@ag-grid-community/csv-export","api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(e)}exportDataAsCsv(e){j.__assertRegistered("@ag-grid-community/csv-export","api.exportDataAsCsv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(e)}assertNotExcelMultiSheet(e,i){return!(!j.__assertRegistered("@ag-grid-enterprise/excel-export","api."+e,this.context.getGridId())||1===this.excelCreator.getFactoryMode()&&(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),1))}getDataAsExcel(e){if(this.assertNotExcelMultiSheet("getDataAsExcel",e))return this.excelCreator.getDataAsExcel(e)}exportDataAsExcel(e){this.assertNotExcelMultiSheet("exportDataAsExcel",e)&&this.excelCreator.exportDataAsExcel(e)}getSheetDataForExcel(e){if(j.__assertRegistered("@ag-grid-enterprise/excel-export","api.getSheetDataForExcel",this.context.getGridId()))return this.excelCreator.setFactoryMode(1),this.excelCreator.getSheetDataForExcel(e)}getMultipleSheetsAsExcel(e){if(j.__assertRegistered("@ag-grid-enterprise/excel-export","api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(e)}exportMultipleSheetsAsExcel(e){j.__assertRegistered("@ag-grid-enterprise/excel-export","api.exportMultipleSheetsAsExcel",this.context.getGridId())&&this.excelCreator.exportMultipleSheetsAsExcel(e)}setGridAriaProperty(e,i){if(!e)return;const t=this.ctrlsService.getGridBodyCtrl().getGui(),s=`aria-${e}`;null===i?t.removeAttribute(s):t.setAttribute(s,i)}logMissingRowModel(e,...i){console.error(`AG Grid: api.${e} can only be called when gridOptions.rowModelType is ${i.join(" or ")}`)}logDeprecation(e,i,t,s){O(`Since ${e} api.${i} is deprecated. Please use ${t} instead. ${s??""}`)}getPinnedTopRowCount(){return this.pinnedRowModel.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.pinnedRowModel.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.pinnedRowModel.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.pinnedRowModel.getPinnedBottomRow(e)}
1expireValueCache(){this.valueCache.expire()}getVerticalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getVScrollPosition()}getHorizontalPixelRange(){return this.gridBodyCtrl.getScrollFeature().getHScrollPosition()}refreshCells(e={}){this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.refreshCells(e))}flashCells(e={}){const i=t=>O(`Since v31.1 api.flashCells parameter '${t}Delay' is deprecated. Please use '${t}Duration' instead.`);y(e.fadeDelay)&&i("fade"),y(e.flashDelay)&&i("flash"),this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.flashCells(e))}redrawRows(e={}){const i=e?e.rowNodes:void 0;this.frameworkOverrides.wrapIncoming(()=>this.rowRenderer.redrawRows(i))}refreshHeader(){this.frameworkOverrides.wrapIncoming(()=>this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}isAnyFilterPresent(){return this.filterManager.isAnyFilterPresent()}isColumnFilterPresent(){return this.filterManager.isColumnFilterPresent()||this.filterManager.isAggregateFilterPresent()}isQuickFilterPresent(){return this.filterManager.isQuickFilterPresent()}getModel(){return O("Since v31.1 getModel() is deprecated. Please use the appropriate grid API methods instead."),this.rowModel}setRowNodeExpanded(e,i,t,s){this.expansionService.setRowNodeExpanded(e,i,t,s)}onGroupExpandedOrCollapsed(){_(this.clientSideRowModel)?this.logMissingRowModel("onGroupExpandedOrCollapsed","clientSide"):this.expansionService.onGroupExpandedOrCollapsed()}refreshClientSideRowModel(e){_(this.clientSideRowModel)?this.logMissingRowModel("refreshClientSideRowModel","clientSide"):this.clientSideRowModel.refreshModel(e)}isAnimationFrameQueueEmpty(){return this.animationFrameService.isQueueEmpty()}flushAllAnimationFrames(){this.animationFrameService.flushAllFrames()}getRowNode(e){return this.rowModel.getRowNode(e)}getSizesForCurrentTheme(){return{rowHeight:this.gos.getRowHeightAsNumber(),headerHeight:this.columnModel.getHeaderHeight()}}expandAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!0):this.logMissingRowModel("expandAll","clientSide","serverSide")}collapseAll(){this.clientSideRowModel||this.serverSideRowModel?this.expansionService.expandAll(!1):this.logMissingRowModel("collapseAll","clientSide","serverSide")}addRenderedRowListener(e,i,t){this.rowRenderer.addRenderedRowListener(e,i,t)}getQuickFilter(){return this.gos.get("quickFilterText")}getAdvancedFilterModel(){return j.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.getAdvancedFilterModel",this.context.getGridId())?this.filterManager.getAdvancedFilterModel():null}setAdvancedFilterModel(e){this.filterManager.setAdvancedFilterModel(e)}showAdvancedFilterBuilder(){j.__assertRegistered("@ag-grid-enterprise/advanced-filter","api.setAdvancedFilterModel",this.context.getGridId())&&this.filterManager.showAdvancedFilterBuilder("api")}setNodesSelected(e){if(!e.nodes.every(n=>n.rowPinned?(console.warn("AG Grid: cannot select pinned rows"),!1):void 0!==n.id||(console.warn("AG Grid: cannot select node until id for node is known"),!1)))return;const{nodes:t,source:s,newValue:o}=e;this.selectionService.setNodesSelected({nodes:t,source:s??"api",newValue:o})}selectAll(e="apiSelectAll"){this.selectionService.selectAllRowNodes({source:e})}deselectAll(e="apiSelectAll"){this.selectionService.deselectAllRowNodes({source:e})}selectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.selectAllRowNodes({source:e,justFiltered:!0})}deselectAllFiltered(e="apiSelectAllFiltered"){this.selectionService.deselectAllRowNodes({source:e,justFiltered:!0})}getServerSideSelectionState(){return _(this.serverSideRowModel)?(this.logMissingRowModel("getServerSideSelectionState","serverSide"),null):this.selectionService.getSelectionState()}setServerSideSelectionState(e){_(this.serverSideRowModel)?this.logMissingRowModel("setServerSideSelectionState","serverSide"):this.selectionService.setSelectionState(e,"api")}selectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.selectAllRowNodes({source:e,justCurrentPage:!0})}deselectAllOnCurrentPage(e="apiSelectAllCurrentPage"){this.selectionService.deselectAllRowNodes({source:e,justCurrentPage:!0})}showLoadingOverlay(){this.overlayService.showLoadingOverlay()}showNoRowsOverlay(){this.overlayService.showNoRowsOverlay()}hideOverlay(){this.overlayService.hideOverlay()}getSelectedNodes(){return this.selectionService.getSelectedNodes()}getSelectedRows(){return this.selectionService.getSelectedRows()}getBestCostNodeSelection(){if(!_(this.clientSideRowModel))return this.selectionService.getBe
1stCostNodeSelection();this.logMissingRowModel("getBestCostNodeSelection","clientSide")}getRenderedNodes(){return this.rowRenderer.getRenderedNodes()}ensureColumnVisible(e,i="auto"){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(e,i),"ensureVisible")}ensureIndexVisible(e,i){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(e,i),"ensureVisible")}ensureNodeVisible(e,i=null){this.frameworkOverrides.wrapIncoming(()=>this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(e,i),"ensureVisible")}forEachLeafNode(e){_(this.clientSideRowModel)?this.logMissingRowModel("forEachLeafNode","clientSide"):this.clientSideRowModel.forEachLeafNode(e)}forEachNode(e,i){this.rowModel.forEachNode(e,i)}forEachNodeAfterFilter(e){_(this.clientSideRowModel)?this.logMissingRowModel("forEachNodeAfterFilter","clientSide"):this.clientSideRowModel.forEachNodeAfterFilter(e)}forEachNodeAfterFilterAndSort(e){_(this.clientSideRowModel)?this.logMissingRowModel("forEachNodeAfterFilterAndSort","clientSide"):this.clientSideRowModel.forEachNodeAfterFilterAndSort(e)}getFilterInstance(e,i){return O("'getFilterInstance' is deprecated. To get/set individual filter models, use 'getColumnFilterModel' or 'setColumnFilterModel' instead. To get hold of the filter instance, use 'getColumnFilterInstance' which returns the instance asynchronously."),this.filterManager.getFilterInstance(e,i)}getColumnFilterInstance(e){return this.filterManager.getColumnFilterInstance(e)}destroyFilter(e){const i=this.columnModel.getPrimaryColumn(e);if(i)return this.filterManager.destroyFilter(i,"api")}getStatusPanel(e){if(j.__assertRegistered("@ag-grid-enterprise/status-bar","api.getStatusPanel",this.context.getGridId()))return qt(this.statusBarService.getStatusPanel(e))}getColumnDef(e){const i=this.columnModel.getPrimaryColumn(e);return i?i.getColDef():null}getColumnDefs(){return this.columnModel.getColumnDefs()}onFilterChanged(e="api"){this.filterManager.onFilterChanged({source:e})}onSortChanged(){this.sortController.onSortChanged("api")}setFilterModel(e){this.frameworkOverrides.wrapIncoming(()=>this.filterManager.setFilterModel(e))}getFilterModel(){return this.filterManager.getFilterModel()}getColumnFilterModel(e){return this.filterManager.getColumnFilterModel(e)}setColumnFilterModel(e,i){return this.filterManager.setColumnFilterModel(e,i)}getFocusedCell(){return this.focusService.getFocusedCell()}clearFocusedCell(){return this.focusService.clearFocusedCell()}setFocusedCell(e,i,t){this.focusService.setFocusedCell({rowIndex:e,column:i,rowPinned:t,forceBrowserFocus:!0})}addRowDropZone(e){this.gridBodyCtrl.getRowDragFeature().addRowDropZone(e)}removeRowDropZone(e){const i=this.dragAndDropService.findExternalZone(e);i&&this.dragAndDropService.removeDropTarget(i)}getRowDropZoneParams(e){return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(e)}assertSideBarLoaded(e){return j.__assertRegistered("@ag-grid-enterprise/side-bar","api."+e,this.context.getGridId())}isSideBarVisible(){return this.assertSideBarLoaded("isSideBarVisible")&&this.sideBarService.getSideBarComp().isDisplayed()}setSideBarVisible(e){this.assertSideBarLoaded("setSideBarVisible")&&this.sideBarService.getSideBarComp().setDisplayed(e)}setSideBarPosition(e){this.assertSideBarLoaded("setSideBarPosition")&&this.sideBarService.getSideBarComp().setSideBarPosition(e)}openToolPanel(e){this.assertSideBarLoaded("openToolPanel")&&this.sideBarService.getSideBarComp().openToolPanel(e,"api")}closeToolPanel(){this.assertSideBarLoaded("closeToolPanel")&&this.sideBarService.getSideBarComp().close("api")}getOpenedToolPanel(){return this.assertSideBarLoaded("getOpenedToolPanel")?this.sideBarService.getSideBarComp().openedItem():null}refreshToolPanel(){this.assertSideBarLoaded("refreshToolPanel")&&this.sideBarService.getSideBarComp().refresh()}isToolPanelShowing(){return this.assertSideBarLoaded("isToolPanelShowing")&&this.sideBarService.getSideBarComp().isToolPanelShowing()}getToolPanelInstance(e){if(this.assertSideBarLoaded("getToolPanelInstance"))return qt(this.sideBarService.getSideBarComp().getToolPanelInstance(e))}getSideBar(){if(this.assertSideBarLoaded("getSideBar"))return this.sideBarService.getSideBarComp().getDef()}resetRowHeights(){if(y(this.clientSideRowModel)){if(this.columnModel.isAutoRowHeightActive())return void console.warn("AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");this.clientSideRowModel.resetRowHeights()}}setRowCount(e,i){if(this.serverSideRowModel)return this.columnModel.isRowGroupEmpty()?void this.serverSideRowModel.setRowCount(e,i):void console.error("AG Grid: setRowCount cannot be used while using row grouping.");this.infiniteRowModel?this.infiniteRowModel.setRowCount(e,i):this.logMissingRowModel("setRowCount","
1infinite","serverSide")}onRowHeightChanged(){this.clientSideRowModel?this.clientSideRowModel.onRowHeightChanged():this.serverSideRowModel&&this.serverSideRowModel.onRowHeightChanged()}getValue(e,i){return this.logDeprecation("31.3","getValue","getCellValue"),this.getCellValue({colKey:e,rowNode:i})}getCellValue(e){var i;const{colKey:t,rowNode:s,useFormatter:o}=e;let r=null!=(i=this.columnModel.getPrimaryColumn(t))?i:this.columnModel.getGridColumn(t);if(_(r))return null;const n=this.valueService.getValue(r,s);return o?this.valueService.formatValue(r,s,n)??ae(n,!0):n}addEventListener(e,i){this.apiEventService.addEventListener(e,i)}addGlobalListener(e){this.apiEventService.addGlobalListener(e)}removeEventListener(e,i){this.apiEventService.removeEventListener(e,i)}removeGlobalListener(e){this.apiEventService.removeGlobalListener(e)}dispatchEvent(e){this.eventService.dispatchEvent(e)}destroy(){var e;const i=`See ${this.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}`;if(this.destroyCalled)return;const t={type:g.EVENT_GRID_PRE_DESTROYED,state:this.getState()};this.dispatchEvent(t),this.destroyCalled=!0,null==(e=this.ctrlsService.get("gridCtrl"))||e.destroyGridUi(),this.context.destroy(),this.detailGridInfoMap={},dl(this,["isDestroyed"],i)}isDestroyed(){return this.destroyCalled}resetQuickFilter(){this.filterManager.resetQuickFilterCache()}getCellRanges(){return this.rangeService?this.rangeService.getCellRanges():(j.__assertRegistered("@ag-grid-enterprise/range-selection","api.getCellRanges",this.context.getGridId()),null)}addCellRange(e){this.rangeService?this.rangeService.addCellRange(e):j.__assertRegistered("@ag-grid-enterprise/range-selection","api.addCellRange",this.context.getGridId())}clearRangeSelection(){this.rangeService&&this.rangeService.removeAllCellRanges(),j.__assertRegistered("@ag-grid-enterprise/range-selection","gridApi.clearRangeSelection",this.context.getGridId())}undoCellEditing(){this.undoRedoService.undo("api")}redoCellEditing(){this.undoRedoService.redo("api")}getCurrentUndoSize(){return this.undoRedoService.getCurrentUndoStackSize()}getCurrentRedoSize(){return this.undoRedoService.getCurrentRedoStackSize()}assertChart(e,i){if(j.__assertRegistered("@ag-grid-enterprise/charts","api."+e,this.context.getGridId()))return this.frameworkOverrides.wrapIncoming(()=>i())}getChartModels(){return this.assertChart("getChartModels",()=>this.chartService.getChartModels())}getChartRef(e){return this.assertChart("getChartRef",()=>this.chartService.getChartRef(e))}getChartImageDataURL(e){return this.assertChart("getChartImageDataURL",()=>this.chartService.getChartImageDataURL(e))}downloadChart(e){return this.assertChart("downloadChart",()=>this.chartService.downloadChart(e))}openChartToolPanel(e){return this.assertChart("openChartToolPanel",()=>this.chartService.openChartToolPanel(e))}closeChartToolPanel(e){return this.assertChart("closeChartToolPanel",()=>this.chartService.closeChartToolPanel(e.chartId))}createRangeChart(e){return this.assertChart("createRangeChart",()=>this.chartService.createRangeChart(e))}createPivotChart(e){return this.assertChart("createPivotChart",()=>this.chartService.createPivotChart(e))}createCrossFilterChart(e){return this.assertChart("createCrossFilterChart",()=>this.chartService.createCrossFilterChart(e))}updateChart(e){return this.assertChart("updateChart",()=>this.chartService.updateChart(e))}restoreChart(e,i){return this.assertChart("restoreChart",()=>this.chartService.restoreChart(e,i))}assertClipboard(e,i){j.__assertRegistered("@ag-grid-enterprise/clipboard","api"+e,this.context.getGridId())&&i()}copyToClipboard(e){this.assertClipboard("copyToClipboard",()=>this.clipboardService.copyToClipboard(e))}cutToClipboard(e){this.assertClipboard("cutToClipboard",()=>this.clipboardService.cutToClipboard(e))}copySelectedRowsToClipboard(e){this.assertClipboard("copySelectedRowsToClipboard",()=>this.clipboardService.copySelectedRowsToClipboard(e))}copySelectedRangeToClipboard(e){this.assertClipboard("copySelectedRangeToClipboard",()=>this.clipboardService.copySelectedRangeToClipboard(e))}copySelectedRangeDown(){this.assertClipboard("copySelectedRangeDown",()=>this.clipboardService.copyRangeDown())}pasteFromClipboard(){this.assertClipboard("pasteFromClipboard",()=>this.clipboardService.pasteFromClipboard())}showColumnMenuAfterButtonClick(e,i){O("'showColumnMenuAfterButtonClick' is deprecated. Use 'IHeaderParams.showColumnMenu' within a header component, or 'api.showColumnMenu' elsewhere.");const t=this.columnModel.getGridColumn(e);this.menuService.showColumnMenu({column:t,buttonElement:i,positionBy:"button"})}showColumnMenuAfterMouseClick(e,i){O("'showColumnMenuAfterMouseClick' is deprecated. Use 'IHeaderParams.showColumnMenuAfterMouseClick' within a header component, or 'api.showColumnMenu' elsewhere.");let t=this.columnModel.getGridColumn(e);t||(t=this.columnModel.getPrimaryColumn(e)),t?this.menuService.showColumnMenu({column:t,mouseEvent:i,positionBy:"mouse"}):console.error(`AG Grid: column '${e}' not found`)}showContextMenu(e){const{rowNode:i,column:t,value:s,x:o,y:r}=e||{};let{x:n,y:l}=this.menuService.getContextMenuPosition(i,t);null!=o&&(n=o),null!=r&&(l=r),this.menuService.showContextMenu({mouseEvent:ne
1w MouseEvent("mousedown",{clientX:n,clientY:l}),rowNode:i,column:t,value:s})}showColumnChooser(e){this.menuService.showColumnChooser({chooserParams:e})}showColumnFilter(e){const i=this.columnModel.getGridColumn(e);i?this.menuService.showFilterMenu({column:i,containerType:"columnFilter",positionBy:"auto"}):console.error(`AG Grid: column '${e}' not found`)}showColumnMenu(e){const i=this.columnModel.getGridColumn(e);i?this.menuService.showColumnMenu({column:i,positionBy:"auto"}):console.error(`AG Grid: column '${e}' not found`)}hidePopupMenu(){this.menuService.hidePopupMenu()}hideColumnChooser(){this.menuService.hideColumnChooser()}tabToNextCell(e){return this.navigationService.tabToNextCell(!1,e)}tabToPreviousCell(e){return this.navigationService.tabToNextCell(!0,e)}getCellRendererInstances(e={}){return this.rowRenderer.getCellRendererInstances(e).map(qt)}getCellEditorInstances(e={}){return this.rowRenderer.getCellEditorInstances(e).map(qt)}getEditingCells(){return this.rowRenderer.getEditingCells()}stopEditing(e=!1){this.rowRenderer.stopEditing(e)}startEditingCell(e){const i=this.columnModel.getGridColumn(e.colKey);if(!i)return void console.warn(`AG Grid: no column found for ${e.colKey}`);const t={rowIndex:e.rowIndex,rowPinned:e.rowPinned||null,column:i};null==e.rowPinned&&this.ensureIndexVisible(e.rowIndex),this.ensureColumnVisible(e.colKey);const o=this.navigationService.getCellByPosition(t);o&&(this.focusService.isCellFocused(t)||this.focusService.setFocusedCell(t),o.startRowOrCellEdit(e.key))}addAggFunc(e,i){this.logDeprecation("v31.1","addAggFunc(key, func)","addAggFuncs({ key: func })"),this.aggFuncService&&this.aggFuncService.addAggFuncs({key:i})}addAggFuncs(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e)}clearAggFuncs(){this.aggFuncService&&this.aggFuncService.clear()}applyServerSideTransaction(e){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransaction(e);this.logMissingRowModel("applyServerSideTransaction","serverSide")}applyServerSideTransactionAsync(e,i){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.applyTransactionAsync(e,i);this.logMissingRowModel("applyServerSideTransactionAsync","serverSide")}applyServerSideRowData(e){var i,t;const s=null!=(i=e.startRow)?i:0,o=null!=(t=e.route)?t:[];s<0?console.warn(`AG Grid: invalid value ${e.startRow} for startRow, the value should be >= 0`):this.serverSideRowModel?this.serverSideRowModel.applyRowData(e.successParams,s,o):this.logMissingRowModel("setServerSideDatasource","serverSide")}retryServerSideLoads(){this.serverSideRowModel?this.serverSideRowModel.retryLoads():this.logMissingRowModel("retryServerSideLoads","serverSide")}flushServerSideAsyncTransactions(){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.flushAsyncTransactions();this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide")}applyTransaction(e){if(this.clientSideRowModel)return this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.updateRowData(e));this.logMissingRowModel("applyTransaction","clientSide")}applyTransactionAsync(e,i){this.clientSideRowModel?this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.batchUpdateRowData(e,i)):this.logMissingRowModel("applyTransactionAsync","clientSide")}flushAsyncTransactions(){this.clientSideRowModel?this.frameworkOverrides.wrapIncoming(()=>this.clientSideRowModel.flushAsyncTransactions()):this.logMissingRowModel("flushAsyncTransactions","clientSide")}refreshInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():this.logMissingRowModel("refreshInfiniteCache","infinite")}purgeInfiniteCache(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():this.logMissingRowModel("purgeInfiniteCache","infinite")}refreshServerSide(e){this.serverSideRowModel?this.serverSideRowModel.refreshStore(e):this.logMissingRowModel("refreshServerSide","serverSide")}getServerSideGroupLevelState(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(this.logMissingRowModel("getServerSideGroupLevelState","serverSide"),[])}getInfiniteRowCount(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();
1this.logMissingRowModel("getInfiniteRowCount","infinite")}isLastRowIndexKnown(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();this.logMissingRowModel("isLastRowIndexKnown","infinite")}getCacheBlockState(){return this.rowNodeBlockLoader.getBlockState()}getFirstDisplayedRow(){return this.logDeprecation("v31.1","getFirstDisplayedRow","getFirstDisplayedRowIndex"),this.getFirstDisplayedRowIndex()}getFirstDisplayedRowIndex(){return this.rowRenderer.getFirstVirtualRenderedRow()}getLastDisplayedRow(){return this.logDeprecation("v31.1","getLastDisplayedRow","getLastDisplayedRowIndex"),this.getLastDisplayedRowIndex()}getLastDisplayedRowIndex(){return this.rowRenderer.getLastVirtualRenderedRow()}getDisplayedRowAtIndex(e){return this.rowModel.getRow(e)}getDisplayedRowCount(){return this.rowModel.getRowCount()}paginationIsLastPageFound(){return this.paginationProxy.isLastPageFound()}paginationGetPageSize(){return this.paginationProxy.getPageSize()}paginationGetCurrentPage(){return this.paginationProxy.getCurrentPage()}paginationGetTotalPages(){return this.paginationProxy.getTotalPages()}paginationGetRowCount(){return this.paginationProxy.getMasterRowCount()}paginationGoToNextPage(){this.paginationProxy.goToNextPage()}paginationGoToPreviousPage(){this.paginationProxy.goToPreviousPage()}paginationGoToFirstPage(){this.paginationProxy.goToFirstPage()}paginationGoToLastPage(){this.paginationProxy.goToLastPage()}paginationGoToPage(e){this.paginationProxy.goToPage(e)}sizeColumnsToFit(e){"number"==typeof e?this.columnModel.sizeColumnsToFit(e,"api"):this.gridBodyCtrl.sizeColumnsToFit(e)}setColumnGroupOpened(e,i){this.columnModel.setColumnGroupOpened(e,i,"api")}getColumnGroup(e,i){return this.columnModel.getColumnGroup(e,i)}getProvidedColumnGroup(e){return this.columnModel.getProvidedColumnGroup(e)}getDisplayNameForColumn(e,i){return this.columnModel.getDisplayNameForColumn(e,i)||""}getDisplayNameForColumnGroup(e,i){return this.columnModel.getDisplayNameForColumnGroup(e,i)||""}getColumn(e){return this.columnModel.getPrimaryColumn(e)}getColumns(){return this.columnModel.getAllPrimaryColumns()}applyColumnState(e){return this.columnModel.applyColumnState(e,"api")}getColumnState(){return this.columnModel.getColumnState()}resetColumnState(){this.columnModel.resetColumnState("api")}getColumnGroupState(){return this.columnModel.getColumnGroupState()}setColumnGroupState(e){this.columnModel.setColumnGroupState(e,"api")}resetColumnGroupState(){this.columnModel.resetColumnGroupState("api")}isPinning(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()}isPinningLeft(){return this.columnModel.isPinningLeft()}isPinningRight(){return this.columnModel.isPinningRight()}getDisplayedColAfter(e){return this.columnModel.getDisplayedColAfter(e)}getDisplayedColBefore(e){return this.columnModel.getDisplayedColBefore(e)}setColumnVisible(e,i){this.logDeprecation("v31.1","setColumnVisible(key,visible)","setColumnsVisible([key],visible)"),this.columnModel.setColumnsVisible([e],i,"api")}setColumnsVisible(e,i){this.columnModel.setColumnsVisible(e,i,"api")}setColumnPinned(e,i){this.logDeprecation("v31.1","setColumnPinned(key,pinned)","setColumnsPinned([key],pinned)"),this.columnModel.setColumnsPinned([e],i,"api")}setColumnsPinned(e,i){this.columnModel.setColumnsPinned(e,i,"api")}getAllGridColumns(){return this.columnModel.getAllGridColumns()}getDisplayedLeftColumns(){return this.columnModel.getDisplayedLeftColumns()}getDisplayedCenterColumns(){return this.columnModel.getDisplayedCenterColumns()}getDisplayedRightColumns(){return this.columnModel.getDisplayedRightColumns()}getAllDisplayedColumns(){return this.columnModel.getAllDisplayedColumns()}getAllDisplayedVirtualColumns(){return this.columnModel.getViewportColumns()}moveColumn(e,i){this.logDeprecation("v31.1","moveColumn(key, toIndex)","moveColumns([key], toIndex)"),this.columnModel.moveColumns([e],i,"api")}moveColumnByIndex(e,i){this.columnModel.moveColumnByIndex(e,i,"api")}moveColumns(e,i){this.columnModel.moveColumns(e,i,"api")}moveRowGroupColumn(e,i){this.columnModel.moveRowGroupColumn(e,i,"api")}
1setColumnAggFunc(e,i){this.columnModel.setColumnAggFunc(e,i,"api")}setColumnWidth(e,i,t=!0,s="api"){this.logDeprecation("v31.1","setColumnWidth(col, width)","setColumnWidths([{key: col, newWidth: width}])"),this.columnModel.setColumnWidths([{key:e,newWidth:i}],!1,t,s)}setColumnWidths(e,i=!0,t="api"){this.columnModel.setColumnWidths(e,!1,i,t)}isPivotMode(){return this.columnModel.isPivotMode()}getPivotResultColumn(e,i){return this.columnModel.getSecondaryPivotColumn(e,i)}setValueColumns(e){this.columnModel.setValueColumns(e,"api")}getValueColumns(){return this.columnModel.getValueColumns()}removeValueColumn(e){this.logDeprecation("v31.1","removeValueColumn(colKey)","removeValueColumns([colKey])"),this.columnModel.removeValueColumns([e],"api")}removeValueColumns(e){this.columnModel.removeValueColumns(e,"api")}addValueColumn(e){this.logDeprecation("v31.1","addValueColumn(colKey)","addValueColumns([colKey])"),this.columnModel.addValueColumns([e],"api")}addValueColumns(e){this.columnModel.addValueColumns(e,"api")}setRowGroupColumns(e){this.columnModel.setRowGroupColumns(e,"api")}removeRowGroupColumn(e){this.logDeprecation("v31.1","removeRowGroupColumn(colKey)","removeRowGroupColumns([colKey])"),this.columnModel.removeRowGroupColumns([e],"api")}removeRowGroupColumns(e){this.columnModel.removeRowGroupColumns(e,"api")}addRowGroupColumn(e){this.logDeprecation("v31.1","addRowGroupColumn(colKey)","addRowGroupColumns([colKey])"),this.columnModel.addRowGroupColumns([e],"api")}addRowGroupColumns(e){this.columnModel.addRowGroupColumns(e,"api")}getRowGroupColumns(){return this.columnModel.getRowGroupColumns()}setPivotColumns(e){this.columnModel.setPivotColumns(e,"api")}removePivotColumn(e){this.logDeprecation("v31.1","removePivotColumn(colKey)","removePivotColumns([colKey])"),this.columnModel.removePivotColumns([e],"api")}removePivotColumns(e){this.columnModel.removePivotColumns(e,"api")}addPivotColumn(e){this.logDeprecation("v31.1","addPivotColumn(colKey)","addPivotColumns([colKey])"),this.columnModel.addPivotColumns([e],"api")}addPivotColumns(e){this.columnModel.addPivotColumns(e,"api")}getPivotColumns(){return this.columnModel.getPivotColumns()}getLeftDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeLeft()}getCenterDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeCentre()}getRightDisplayedColumnGroups(){return this.columnModel.getDisplayedTreeRight()}getAllDisplayedColumnGroups(){return this.columnModel.getAllDisplayedTrees()}autoSizeColumn(e,i){return this.logDeprecation("v31.1","autoSizeColumn(key, skipHeader)","autoSizeColumns([key], skipHeader)"),this.columnModel.autoSizeColumns({columns:[e],skipHeader:i,source:"api"})}autoSizeColumns(e,i){this.columnModel.autoSizeColumns({columns:e,skipHeader:i,source:"api"})}autoSizeAllColumns(e){this.columnModel.autoSizeAllColumns("api",e)}setPivotResultColumns(e){this.columnModel.setSecondaryColumns(e,"api")}getPivotResultColumns(){return this.columnModel.getSecondaryColumns()}getState(){return this.stateService.getState()}getGridOption(e){return this.gos.get(e)}setGridOption(e,i){this.updateGridOptions({[e]:i})}updateGridOptions(e){this.gos.updateGridOptions({options:e})}__internalUpdateGridOptions(e,i){this.gos.updateGridOptions({options:e,force:i,source:"gridOptionsUpdated"})}deprecatedUpdateGridOption(e,i){O(`set${e.charAt(0).toUpperCase()}${e.slice(1,e.length)} is deprecated. Please use 'api.setGridOption('${e}', newValue)' or 'api.updateGridOptions({ ${e}: newValue })' instead.`),this.setGridOption(e,i)}setPivotMode(e){this.deprecatedUpdateGridOption("pivotMode",e)}setPinnedTopRowData(e){this.deprecatedUpdateGridOption("pinnedTopRowData",e)}setPinnedBottomRowData(e){this.deprecatedUpdateGridOption("pinnedBottomRowData",e)}setPopupParent(e){this.deprecatedUpdateGridOption("popupParent",e)}setSuppressModelUpdateAfterUpdateTransaction(e){this.deprecatedUpdateGridOption("suppressModelUpdateAfterUpdateTransaction",e)}setDataTypeDefinitions(e){this.deprecatedUpdateGridOption("dataTypeDefinitions",e)}setPagination(e){this.deprecatedUpdateGridOption("pagination",e)}paginationSetPageSize(e){this.deprecatedUpdateGridOption("paginationPageSize",e)}setSideBar(e){this.deprecatedUpdateGridOption("sideBar",e)}setSuppressClipboardPaste(e){this.deprecatedUpdateGridOption("suppressClipboardPaste",e)}setGroupRemoveSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveSingleChildren",e)}setGroupRemoveLowestSingleChildren(e){this.deprecatedUpdateGridOption("groupRemoveLowestSingleChildren",e)}setGroupDisplayType(e){this.deprecatedUpdateGridOption("groupDisplayType",e)}setGroupIncludeFooter(e){this.deprecatedUpdateGridOption("groupIncludeFooter",e)}setGroupIncludeTotalFooter(e){this.deprecatedUpdateGridOption("groupIncludeTotalFooter",e)}setRowClass(e){this.deprecatedUpdateGridOption("rowClass",e)}setDeltaSort(e){this.deprecatedUpdateGridOption("deltaSort",e)}setSuppressRowDrag(e){this.deprecatedUpdateGridOption("suppressRowDrag",e)}setSuppressMoveWhenRowDragging(e){this.deprecatedUpdateGridOption("suppressMoveWhenRowDragging",e)}setSuppressRowClickSelection(e){this.deprecatedUpdateGridOption("suppressRowClickSelection",e)}setEnableAdvancedFilter(e){this.deprecatedUpdateGridOption("enableAdvancedFilter",e)}setIncludeHiddenColumnsInAdvancedFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInAdvancedFilter",e)}setAdvancedFilterParent(e){this.deprecatedUpdateGridOption("advancedFilterParent",e)}setAdvancedFilterBuilderParams(e){this.deprecatedUpdateGridOption("advancedFilterBuilderParams",e)}setQuickFilter(e){O("setQuickFilter is deprecated. Please use 'api.setGridOption('quickFilterText', newValue)' or 'api.updateGridOptions({ quickFilterText: newValue })' instead."),this.gos.updateGridOptions({options:{quickFilterText:e}})}setExcludeHiddenColumnsFromQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",!e)}setIncludeHiddenColumnsInQuickFilter(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",e)}setQuickFilterParser(e){this.deprecatedUpdateGridOption("quickFilterParser",e)}setQuickFilterMatcher(e){this.deprecatedUpdateGridOption("quickFilterMatcher",e)}setAlwaysShowHorizontalScroll(e){this.deprecatedUpdateGridOption("alwaysShowHorizontalScroll",e)}setAlwaysShowVerticalScroll(e){this.deprecatedUpdateGridOption("alwaysShowVerticalScroll",e)}setFunctionsReadOnly(e){this.deprecatedUpdateGridOption("functionsReadOnly",e)}setColumnDefs(e,i="api"){O("setColumnDefs is deprecated. Please use 'api.setGridOption('columnDefs', newValue)' or 'api.updateGridOptions({ columnDefs: newValue })' instead."),this.gos.updateGridOptions({options:{columnDefs:e},source:i})}setAutoGroupColumnDef(e,i="api"){O("setAutoGroupColumnDef is deprecated. Please use 'api.setGridOption('autoGroupColumnDef', newValue)' or 'api.updateGridOptions({ autoGroupColumnDef: newValue })' instead."),this.gos.updateGridOptions({options:{autoGroupColumnDef:e},source:i})}setDefaultColDef(e,i="api"){O("setDefaultColDef is deprecated. Please use 'api.setGridOption('defaultColDef', newValue)' or 'api.updateGridOptions({ defaultColDef: newValue })' instead."),this.gos.updateGridOptions({options:{defaultColDef:e},source:i})}setColumnTypes(e,i="api"){O("setColumnTypes is deprecated. Please use 'api.setGridOption('columnTypes', newValue)' or 'api.updateGridOptions({ columnTypes: newValue })' instead."),this.gos.updateGridOptions({options:{columnTypes:e},source:i})}setTreeData(e){this.deprecatedUpdateGridOption("treeData",e)}setServerSideDatasource(e){this.deprecatedUpdateGridOption("serverSideDatasource",e)}setCacheBlockSize(e){this.deprecatedUpdateGridOption("cacheBlockSize",e)}setDatasource(e){this.deprecatedUpdateGridOption("datasource",e)}setViewportDatasource(e){this.deprecatedUpdateGridOption("viewportDatasource",e)}setRowData(e){this.deprecatedUpdateGridOption("rowData",e)}setEnableCellTextSelection(e){this.deprecatedUpdateGridOption("enableCellTextSelection",e)}setHeaderHeight(e){this.deprecatedUpdateGridOption("headerHeight",e)}setDomLayout(e){this.deprecatedUpdateGridOption("domLayout",e)}setFillHandleDirection(e){this.deprecatedUpdateGridOption("fillHandleDirection",e)}setGroupHeaderHeight(e){this.deprecatedUpdateGridOption("groupHeaderHeight",e)}setFloatingFiltersHeight(e){this.deprecatedUpdateGridOption("floatingFiltersHeight",e)}setPivotHeaderHeight(e){this.deprecatedUpdateGridOption("pivotHeaderHeight",e)}setPivotGroupHeaderHeight(e){this.deprecatedUpdateGridOption("pivotGroupHeaderHeight",e)}setAnimateRows(e){this.deprecatedUpdateGridOption("animateRows",e)}setIsExternalFilterPresent(e){this.deprecatedUpdateGridOption("isExternalFilterPresent",e)}setDoesExternalFilterPass(e){this.deprecatedUpdateGridOption("doesExternalFilterPass",e)}setNavigateToNextCell(e){this.deprecatedUpdateGridOption("navigateToNextCell",e)}setTabToNextCell(e){this.deprecatedUpdateGridOption("tabToNextCell",e)}setTabToNextHeader(e){this.deprecatedUpdateGridOption("tabToNextHeader",e)}setNavigateToNextHeader(e){this.deprecatedUpdateGridOption("navigateToNextHeader",e)}setRowGroupPanelShow(e){this.deprecatedUpdateGridOption("rowGroupPanelShow",e)}setGetGroupRowAgg(e){this.deprecatedUpdateGridOption("getGroupRowAgg",e)}setGetBusinessKeyForNode(e){this.deprecatedUpdateGridOption("getBusinessKeyForNode",e)}setGetChildCount(e){this.deprecatedUpdateGridOption("getChildCount",e)}setProcessRowPostCreate(e){this.deprecatedUpdateGridOption("processRowPostCreate",e)}setGetRowId(e){O("getRowId is a static property and can no longer be updated.")}setGetRowClass(e){this.deprecatedUpdateGridOption("getRowClass",e)}setIsFullWidthRow(e){this.deprecatedUpdateGridOption("isFullWidthRow",e)}setIsRowSelectable(e){this.deprecatedUpdateGridOption("isRowSelectable",e)}setIsRowMaster(e){this.deprecatedUpdateGridOption("isRowMaster",e)}setPostSortRows(e){this.deprecatedUpdateGridOption("postSortRows",e)}setGetDocument(e){this.deprecatedUpdateGridOption("getDocument",e)}setGetContextMenuItems(e){this.deprecatedUpdateGridOption("getContextMenuItems",e)}setGetMainMenuItems(e){this.deprecatedUpdateGridOption("getMainMenuItems",e)}setProcessCellForClipboard(e){this.deprecatedUpdateGridOption("processCellForClipboard",e)}setSendToClipboard(e){this.deprecatedUpdateGridOption("sendToClipboard",e)}setProcessCellFromClipboard(e){this.deprecatedUpdateGridOption("processCellFromClipboard",e)}setProcessPivotResultColDef(e){this.deprecatedUpdateGridOption("processPivotResultColDef",e)}setProcessPivotResultColGroupDef(e){this.deprecatedUpdateGridOption("processPivotResultColGroupDef",e)}setPostProcessPopup(e){this.deprecatedUpdateGridOption("postProcessPopup",e)}setInitialGroupOrderComparator(e){this.deprecatedUpdateGridOption("initialGroupOrderComparator",e)}
1setGetChartToolbarItems(e){this.deprecatedUpdateGridOption("getChartToolbarItems",e)}setPaginationNumberFormatter(e){this.deprecatedUpdateGridOption("paginationNumberFormatter",e)}setGetServerSideGroupLevelParams(e){this.deprecatedUpdateGridOption("getServerSideGroupLevelParams",e)}setIsServerSideGroupOpenByDefault(e){this.deprecatedUpdateGridOption("isServerSideGroupOpenByDefault",e)}setIsApplyServerSideTransaction(e){this.deprecatedUpdateGridOption("isApplyServerSideTransaction",e)}setIsServerSideGroup(e){this.deprecatedUpdateGridOption("isServerSideGroup",e)}setGetServerSideGroupKey(e){this.deprecatedUpdateGridOption("getServerSideGroupKey",e)}setGetRowStyle(e){this.deprecatedUpdateGridOption("getRowStyle",e)}setGetRowHeight(e){this.deprecatedUpdateGridOption("getRowHeight",e)}};d([p("rowRenderer")],W.prototype,"rowRenderer",2),d([p("navigationService")],W.prototype,"navigationService",2),d([p("filterManager")],W.prototype,"filterManager",2),d([p("columnModel")],W.prototype,"columnModel",2),d([p("selectionService")],W.prototype,"selectionService",2),d([p("gridOptionsService")],W.prototype,"gos",2),d([p("valueService")],W.prototype,"valueService",2),d([p("alignedGridsService")],W.prototype,"alignedGridsService",2),d([p("eventService")],W.prototype,"eventService",2),d([p("pinnedRowModel")],W.prototype,"pinnedRowModel",2),d([p("context")],W.prototype,"context",2),d([p("rowModel")],W.prototype,"rowModel",2),d([p("sortController")],W.prototype,"sortController",2),d([p("paginationProxy")],W.prototype,"paginationProxy",2),d([p("focusService")],W.prototype,"focusService",2),d([p("dragAndDropService")],W.prototype,"dragAndDropService",2),d([p("menuService")],W.prototype,"menuService",2),d([p("valueCache")],W.prototype,"valueCache",2),d([p("animationFrameService")],W.prototype,"animationFrameService",2),d([p("ctrlsService")],W.prototype,"ctrlsService",2),d([p("overlayService")],W.prototype,"overlayService",2),d([p("stateService")],W.prototype,"stateService",2),d([p("expansionService")],W.prototype,"expansionService",2),d([p("apiEventService")],W.prototype,"apiEventService",2),d([p("frameworkOverrides")],W.prototype,"frameworkOverrides",2),d([p("undoRedoService")],W.prototype,"undoRedoService",2),d([p("rowNodeBlockLoader")],W.prototype,"rowNodeBlockLoader",2),d([q("csvCreator")],W.prototype,"csvCreator",2),d([q("excelCreator")],W.prototype,"excelCreator",2),d([q("rangeService")],W.prototype,"rangeService",2),d([q("clipboardService")],W.prototype,"clipboardService",2),d([q("aggFuncService")],W.prototype,"aggFuncService",2),d([q("statusBarService")],W.prototype,"statusBarService",2),d([q("chartService")],W.prototype,"chartService",2),d([q("ssrmTransactionManager")],W.prototype,"serverSideTransactionManager",2),d([q("sideBarService")],W.prototype,"sideBarService",2),d([T],W.prototype,"init",1),W=d([I("gridApi")],W);var It=(()=>{let e=class extends b{constructor(){super(...arguments),this.quickFilter=null,this.quickFilterParts=null}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.resetQuickFilterCache()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,()=>{this.gos.get("includeHiddenColumnsInQuickFilter")||this.resetQuickFilterCache()}),this.addManagedPropertyListener("quickFilterText",i=>this.setQuickFilter(i.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onQuickFilterColumnConfigChanged()),this.quickFilter=this.parseQuickFilter(this.gos.get("quickFilterText")),this.parser=this.gos.get("quickFilterParser"),this.matcher=this.gos.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setQuickFilterParserAndMatcher())}isQuickFilterPresent(){return null!==this.quickFilter}doesRowPassQuickFilter(i){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(t,i):this.quickFilterParts.every(s=>t?this.doesRowPassQuickFilterCache(i,s):this.doesRowPassQuickFilterNoCache(i,s))}resetQuickFilterCache(){this.rowModel.forEachNode(i=>i.quickFilterAggregateText=null)}setQuickFilterParts(){const{quickFilter:i,parser:t}=this;this.quickFilterParts=i?t?t(i):i.split(" "):null}parseQuickFilter(i){return y(i)?this.gos.isRowModelType("clientSide")?i.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null}setQuickFilter(i){if(null!=i&&"string"!=typeof i)return void console.warn("AG Grid - Grid option quickFilterText only supports string inputs, received: "+typeof i);const t=this.parseQuickFilter(i);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.dispatchEvent({type:e.EVENT_QUICK_FILTER_CHANGED}))}setQuickFilterParserAndMatcher(){const i=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),s=i!==this.parser||t!==this.matcher;this.parser=i,this.matcher=t,s&&(this.setQuickFilterParts(),this.dispatchEvent({type:e.EVENT_QUICK_FILTER_CHANGED}))}onQuickFilterColumnConfigChanged(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchEvent({type:e.EVENT_QUICK_FILTER_CHANGED})}doesRowPassQuickFilterNoCache(i,t){return this.columnModel.getAllColumnsForQuickFilter().some(o=>{const r=this.getQuickFilterTextForColumn(o,i);return y(r)&&r.indexOf(t)>=0})}doesRowPassQuickFilterCache(i,t){return this.checkGenerateQuickFilterAggregateText(i),i.quickFilterAggregateText.indexOf(t)>=0}doesRowPassQuickFilterMatcher(i,t){let s;i?(this.checkGenerateQuickFilterAggregateText(t),s=t.quickFilterAggregateText):s=this.getQuickFilterAggregateText(t);const{quickFilterParts:o,matcher:r}=this;return r(o,s)}checkGenerateQuickFilterAggregateText(i){i.quickFilterAggregateText||(i.quickFilterAggregateText=this.getQuickFilterAggregateText(i))}getQuickFilterTextForColumn(i,t){let s=this.valueService.getValue(i,t,!0);const o=i.getColDef();if(o.getQuickFilterText){const r=this.gos.addGridCommonParams({value:s,node:t,data:t.data,column:i,colDef:o});s=o.getQuickFilterText(r)}return y(s)?s.toString().toUpperCase():null}getQuickFilterAggregateText(i){const t=[];
1return this.columnModel.getAllColumnsForQuickFilter().forEach(o=>{const r=this.getQuickFilterTextForColumn(o,i);y(r)&&t.push(r)}),t.join(e.QUICK_FILTER_SEPARATOR)}};return e.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged",e.QUICK_FILTER_SEPARATOR="\n",e})();d([p("valueService")],It.prototype,"valueService",2),d([p("columnModel")],It.prototype,"columnModel",2),d([p("rowModel")],It.prototype,"rowModel",2),d([T],It.prototype,"postConstruct",1),It=d([I("quickFilterService")],It);var qe=class extends b{constructor(){super(...arguments),this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue=[]}init(){var e,i,t;this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,()=>this.onColumnsChanged()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.refreshFiltersForAggregations()),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,()=>this.updateAdvancedFilterColumns()),this.addManagedListener(this.eventService,g.EVENT_ROW_DATA_UPDATED,()=>this.onNewRowsLoaded("rowDataUpdated")),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.addManagedPropertyListener("advancedFilterModel",s=>this.setAdvancedFilterModel(s.currentValue)),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,({enabled:s})=>this.onAdvancedFilterEnabledChanged(s)),this.addManagedListener(this.eventService,g.EVENT_DATA_TYPES_INFERRED,()=>this.processFilterModelUpdateQueue()),this.addManagedListener(this.quickFilterService,It.EVENT_QUICK_FILTER_CHANGED,(
1)=>this.onFilterChanged({source:"quickFilter"})),this.initialFilterModel=M({},null!=(t=null==(i=null==(e=this.gos.get("initialState"))?void 0:e.filter)?void 0:i.filterModel)?t:{})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return"function"==typeof e&&e({})}doesExternalFilterPass(e){const i=this.gos.get("doesExternalFilterPass");return"function"==typeof i&&i(e)}setFilterModel(e,i="api"){if(this.isAdvancedFilterEnabled())return void this.warnAdvancedFilters();if(this.dataTypeService.isPendingInference())return void this.filterModelUpdateQueue.push({model:e,source:i});const t=[],s=this.getFilterModel();if(e){const o=hn(Object.keys(e));this.allColumnFilters.forEach((r,n)=>{t.push(this.setModelOnFilterWrapper(r.filterPromise,e[n])),o.delete(n)}),o.forEach(r=>{const n=this.columnModel.getPrimaryColumn(r)||this.columnModel.getGridColumn(r);if(!n)return void console.warn("AG Grid: setFilterModel() - no column found for colId: "+r);if(!n.isFilterAllowed())return void console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+r);const l=this.getOrCreateFilterWrapper(n,"NO_UI");l?t.push(this.setModelOnFilterWrapper(l.filterPromise,e[r])):console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+r)})}else this.allColumnFilters.forEach(o=>{t.push(this.setModelOnFilterWrapper(o.filterPromise,null))});ke.all(t).then(()=>{const o=this.getFilterModel(),r=[];this.allColumnFilters.forEach((n,l)=>{k.jsonEquals(s?s[l]:null,o?o[l]:null)||r.push(n.column)}),r.length>0&&this.onFilterChanged({columns:r,source:i})})}setModelOnFilterWrapper(e,i){return new ke(t=>{e.then(s=>{"function"!=typeof s.setModel&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),t()),(s.setModel(i)||ke.resolve()).then(()=>t())})})}getFilterModel(){const e={};return this.allColumnFilters.forEach((i,t)=>{const s=this.getModelFromFilterWrapper(i);y(s)&&(e[t]=s)}),e}getModelFromFilterWrapper(e){var i;const s=e.filterPromise.resolveNow(null,o=>o);return null==s?null!=(i=this.initialFilterModel[e.column.getColId()])?i:null:"function"!=typeof s.getModel?(console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel"),null):s.getModel()}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}isExternalFilterPresent(){return this.externalFilterPresent}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}isAdvancedFilterPresent(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()}onAdvancedFilterEnabledChanged(e){var i;e?this.allColumnFilters.size&&(this.allColumnFilters.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),this.onFilterChanged({source:"advancedFilter"})):null!=(i=this.advancedFilterService)&&i.isFilterPresent()&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvancedFilterEnabled(){var e;return!(null==(e=this.advancedFilterService)||!e.isEnabled())}isAdvancedFilterHeaderActive(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()}doAggregateFiltersPass(e,i){return this.doColumnFiltersPass(e,i,!0)}updateActiveFilters(){this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;const e=s=>!!s&&(s.isFilterActive?s.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1)),i=!!this.gos.getGroupAggFiltering(),t=s=>{if(!s.isPrimary())return!0;const r=!this.columnModel.isPivotActive();return!(!s.isValueActive()||!r)&&(!!this.columnModel.isPivotMode()||i)};this.allColumnFilters.forEach(s=>{if(s.filterPromise.resolveNow(!1,e)){const o=s.filterPromise.resolveNow(null,r=>r);t(s.column)?this.activeAggregateFilters.push(o):this.activeColumnFilters.push(o)}})}updateFilterFlagInColumns(e,i){this.allColumnFilters.forEach(t=>{const s=t.filterPromise.resolveNow(!1,o=>o.isFilterActive());t.column.setFilterActive(s,e,i)})}isAnyFilterPresent(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()}doColumnFiltersPass(e,i,t){const{data:s,aggData:o}=e,r=t?this.activeAggregateFilters:this.activeColumnFilters,n=t?o:s;for(let l=0;l<r.length;l++){const a=r[l];if(null!=a&&a!==i){if("function"!=typeof a.doesFilterPass)throw new Error("Filter is missing method doesFilterPass");if(!a.doesFilterPass({node:e,data:n}))return!1}}return!0}resetQuickFilterCache(){this.quickFilterService.resetQuickFilterCache()}refreshFiltersForAggregations(){this.gos.getGroupAggFiltering()&&this.onFilterChanged()}callOnFilterChangedOutsideRenderCycle(e){const i=()=>this.onFilterChanged(e);this.rowRenderer.isRefreshInProgress()?setTimeout(i,0):i()}onFilterChanged(e={}){const{source:i,filterInstance:t,additionalEventAttributes:s,columns:o}=e;this.updateDependantFilters(),this.updateActiveFilters(),this.updateFilterFlagInColumns("filterChanged",s),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.allColumnFilters.forEac
1h(n=>{n.filterPromise&&n.filterPromise.then(l=>{l&&l!==t&&l.onAnyFilterChanged&&l.onAnyFilterChanged()})});const r={source:i,type:g.EVENT_FILTER_CHANGED,columns:o||[]};s&&Pe(r,s),this.processingFilterChange=!0,this.eventService.dispatchEvent(r),this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){var e;return!(null!=(e=this.gos.get("allowShowChangeAfterFilter"))&&e)&&this.processingFilterChange}isQuickFilterPresent(){return this.quickFilterService.isQuickFilterPresent()}updateAggFiltering(){this.aggFiltering=!!this.gos.getGroupAggFiltering()}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.columnModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,i){return this.doesRowPassFilter({rowNode:i,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){return!(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(e.rowNode,e.filterInstanceToSkip))}doesRowPassFilter(e){return!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(e.rowNode)||this.isExternalFilterPresent()&&!this.doesExternalFilterPass(e.rowNode)||this.isColumnFilterPresent()&&!this.doColumnFiltersPass(e.rowNode,e.filterInstanceToSkip)||this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(e.rowNode))}onNewRowsLoaded(e){this.allColumnFilters.forEach(i=>{i.filterPromise.then(t=>{t.onNewRowsLoaded&&t.onNewRowsLoaded()})}),this.updateFilterFlagInColumns(e,{afterDataChange:!0}),this.updateActiveFilters()}createValueGetter(e){return({node:i})=>this.valueService.getValue(e,i,!0)}createGetValue(e){return(i,t)=>{const s=t?this.columnModel.getGridColumn(t):e;return s?this.valueService.getValue(s,i,!0):void 0}}getFilterComponent(e,i,t=!0){var s;if(t)return(null==(s=this.getOrCreateFilterWrapper(e,i))?void 0:s.filterPromise)||null;const o=this.cachedFilter(e);return o?o.filterPromise:null}isFilterActive(e){const i=this.cachedFilter(e);return!!i&&i.filterPromise.resolveNow(!1,t=>t.isFilterActive())}getOrCreateFilterWrapper(e,i){if(!e.isFilterAllowed())return null;let t=this.cachedFilter(e);return t||(t=this.createFilterWrapper(e,i),this.setColumnFilterWrapper(e,t)),t}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let i;if(j.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))i="agSetColumnFilter";else{const t=this.dataTypeService.getBaseDataType(e);i="number"===t?"agNumberColumnFilter":"date"===t||"dateString"===t?"agDateColumnFilter":"agTextColumnFilter"}return i}getDefaultFloatingFilter(e){let i;if(j.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()))i="agSetColumnFloatingFilter";else{const t=this.dataTypeService.getBaseDataType(e);i="number"===t?"agNumberColumnFloatingFilter":"date"===t||"dateString"===t?"agDateColumnFloatingFilter":"agTextColumnFloatingFilter"}return i}createFilterInstance(e){const i=this.getDefaultFilter(e),t=e.getColDef();let s;const o=x(M({},this.createFilterParams(e,t)),{filterModifiedCallback:()=>this.filterModifiedCallbackFactory(s,e)(),filterChangedCallback:n=>this.filterChangedCallbackFactory(s,e)(n),doesRowPassOtherFilter:n=>this.doesRowPassOtherFilters(s,n)}),r=this.userComponentFactory.getFilterDetails(t,o,i);return r?{filterPromise:()=>{const n=r.newAgStackInstance();return n&&n.then(l=>s=l),n},compDetails:r}:{filterPromise:null,compDetails:null}}createFilterParams(e,i){return this.gos.addGridCommonParams({column:e,colDef:fr(i),rowModel:this.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},valueGetter:this.createValueGetter(e),getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e,i){var t;const s={column:e,filterPromise:null,compiledElement:null,compDetails:null}
1,{filterPromise:o,compDetails:r}=this.createFilterInstance(e);return s.filterPromise=null!=(t=o?.())?t:null,s.compDetails=r,s}onColumnsChanged(){const e=[];this.allColumnFilters.forEach((i,t)=>{let s;s=i.column.isPrimary()?this.columnModel.getPrimaryColumn(t):this.columnModel.getGridColumn(t),(!s||s!==i.column)&&(e.push(i.column),this.disposeFilterWrapper(i,"columnChanged"),this.disposeColumnListener(t))}),e.length>0?this.onFilterChanged({columns:e,source:"api"}):this.updateDependantFilters()}updateDependantFilters(){const e=this.columnModel.getGroupAutoColumns();e?.forEach(i=>{"agGroupColumnFilter"===i.getColDef().filter&&this.getOrCreateFilterWrapper(i,"NO_UI")})}isFilterAllowed(e){var i,t;if(this.isAdvancedFilterEnabled()||!e.isFilterAllowed())return!1;const o=this.allColumnFilters.get(e.getColId());return null==(t=null==(i=o?.filterPromise)?void 0:i.resolveNow(!0,r=>"function"!=typeof r?.isFilterAllowed||r?.isFilterAllowed()))||t}getFloatingFilterCompDetails(e,i){const t=a=>{const u=this.getFilterComponent(e,"NO_UI");u?.then(h=>{a(qt(h))})},s=e.getColDef(),o=x(M({},this.createFilterParams(e,s)),{filterChangedCallback:()=>t(a=>this.filterChangedCallbackFactory(a,e)())}),r=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(s,bn,o);let n=this.userComponentFactory.getDefaultFloatingFilterType(s,()=>this.getDefaultFloatingFilter(e));return null==n&&(n="agReadOnlyFloatingFilter"),this.userComponentFactory.getFloatingFilterCompDetails(s,{column:e,filterParams:r,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:t,showParentFilter:i,suppressFilterButton:!1},n)}getCurrentFloatingFilterParentModel(e){const i=this.getFilterComponent(e,"NO_UI",!1);return i?i.resolveNow(null,t=>t&&t.getModel()):null}destroyFilter(e,i="api"){const t=e.getColId(),s=this.allColumnFilters.get(t);this.disposeColumnListener(t),delete this.initialFilterModel[t],s&&(this.disposeFilterWrapper(s,i),this.onFilterChanged({columns:[e],source:"api"}))}disposeColumnListener(e){const i=this.allColumnListeners.get(e);i&&(this.allColumnListeners.delete(e),i())}disposeFilterWrapper(e,i){e.filterPromise.then(t=>{this.getContext().destroyBean(t),e.column.setFilterActive(!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId()),this.eventService.dispatchEvent({type:g.EVENT_FILTER_DESTROYED,source:i,column:e.column})})}filterModifiedCallbackFactory(e,i){return()=>{this.eventService.dispatchEvent({type:g.EVENT_FILTER_MODIFIED,column:i,filterInstance:e})}}filterChangedCallbackFactory(e,i){return t=>{var s;const o=null!=(s=t?.source)?s:"api";this.callOnFilterChangedOutsideRenderCycle({filter:e,additionalEventAttributes:t,columns:[i],source:o})}}checkDestroyFilter(e){const i=this.allColumnFilters.get(e);if(!i)return;const t=i.column,{compDetails:s}=t.isFilterAllowed()?this.createFilterInstance(t):{compDetails:null};if(this.areFilterCompsDifferent(i.compDetails,s))return void this.destroyFilter(t,"paramsUpdated");const o=t.getColDef().filterParams;i.filterPromise?i.filterPromise.then(r=>{!1===(!r?.refresh||r.refresh(M(x(M({},this.createFilterParams(t,t.getColDef())),{filterModifiedCallback:this.filterModifiedCallbackFactory(r,t),filterChangedCallback:this.filterChangedCallbackFactory(r,t),doesRowPassOtherFilter:l=>this.doesRowPassOtherFilters(r,l)}),o)))&&this.destroyFilter(t,"paramsUpdated")}):this.destroyFilter(t,"paramsUpdated")}setColumnFilterWrapper(e,i){const t=e.getColId();this.allColumnFilters.set(t,i),this.allColumnListeners.set(t,this.addManagedListener(e,Z.EVENT_COL_DEF_CHANGED,(
1)=>this.checkDestroyFilter(t)))}areFilterCompsDifferent(e,i){if(!i||!e)return!0;const{componentClass:t}=e,{componentClass:s}=i;return!(t===s||t?.render&&s?.render&&t.render===s.render)}getAdvancedFilterModel(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null}setAdvancedFilterModel(e){if(this.isAdvancedFilterEnabled()){if(this.dataTypeService.isPendingInference())return void this.advancedFilterModelUpdateQueue.push(e);this.advancedFilterService.setModel(e??null),this.onFilterChanged({source:"advancedFilter"})}}showAdvancedFilterBuilder(e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder(e,!0)}updateAdvancedFilterColumns(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return!this.isAdvancedFilterEnabled()&&this.columnModel.getAllGridColumns().some(i=>i.getColDef().floatingFilter)}getFilterInstance(e,i){if(this.isAdvancedFilterEnabled())return void this.warnAdvancedFilters();const t=this.getFilterInstanceImpl(e,o=>{if(!i)return;const r=qt(o);i(r)});return qt(t)}getColumnFilterInstance(e){return new Promise(i=>{this.getFilterInstance(e,t=>{i(t)})})}getFilterInstanceImpl(e,i){const t=this.columnModel.getPrimaryColumn(e);if(!t)return;const s=this.getFilterComponent(t,"NO_UI"),o=s&&s.resolveNow(null,r=>r);return o?setTimeout(i,0,o):s&&s.then(r=>{i(r)}),o}warnAdvancedFilters(){O("Column Filter API methods have been disabled as Advanced Filters are enabled.")}setupAdvancedFilterHeaderComp(e){var i;null==(i=this.advancedFilterService)||i.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvancedFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:i})=>this.setFilterModel(e,i)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:i,resolve:t})=>{this.setColumnFilterModel(e,i).then(()=>t())}),this.columnFilterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue.forEach(e=>this.setAdvancedFilterModel(e)),this.advancedFilterModelUpdateQueue=[]}getColumnFilterModel(e){const i=this.getFilterWrapper(e);return i?this.getModelFromFilterWrapper(i):null}setColumnFilterModel(e,i){if(this.isAdvancedFilterEnabled())return this.warnAdvancedFilters(),Promise.resolve();if(this.dataTypeService.isPendingInference()){let r=()=>{};const n=new Promise(l=>{r=l});return this.columnFilterModelUpdateQueue.push({key:e,model:i,resolve:r}),n}const t=this.columnModel.getPrimaryColumn(e),s=t?this.getOrCreateFilterWrapper(t,"NO_UI"):null;return s?(r=this.setModelOnFilterWrapper(s.filterPromise,i),new Promise(n=>{r.then(l=>n(l))})):Promise.resolve();var r}getFilterWrapper(e){var i;const t=this.columnModel.getPrimaryColumn(e);return t&&null!=(i=this.cachedFilter(t))?i:null}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};d([p("valueService")],qe.prototype,"valueService",2),d([p("columnModel")],qe.prototype,"columnModel",2),d([p("rowModel")],qe.prototype,"rowModel",2),d([p("userComponentFactory")],qe.prototype,"userComponentFactory",2),d([p("rowRenderer")],qe.prototype,"rowRenderer",2),d([p("dataTypeService")],qe.prototype,"dataTypeService",2),d([p("quickFilterService")],qe.prototype,"quickFilterService",2),d([q("advancedFilterService")],qe.prototype,"advancedFilterService",2),d([T],qe.prototype,"init",1),qe=d([I("filterManager")],qe);var Oo=class extends V{constructor(e,i){super('<div class="ag-filter"></div>'),this.column=e,this.source=i,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedListener(this.eventService,g.EVENT_FILTER_DESTROYED,this.onFilterDestroyed.bind(this))}hasFilter(){return!!this.filterWrapper}getFilter(){var e,i;return null!=(i=null==(e=this.filterWrapper)?void 0:e.filterPromise)?i:null}afterInit(){var e,i,t;return null!=(t=null==(i=null==(e=this.filterWrapper)?void 0:e.filterPromise)?void 0:i.then(()=>{}))?t:ke.resolve()}afterGuiAttached(e){var i,t;null==(t=null==(i=this.filterWrapper)?void 0:i.filterPromise)||t.then(s=>{var o;null==(o=s?.afterGuiAttached)||o.call(s,e)})}afterGuiDetached(){var e,i;null==(i=null==(e=this.filterWrapper)?void 0:e.filterPromise)||i.then(t=>{var s;null==(s=t?.afterGuiDetached)||s.call(t)})}createFilter(e){var i;const{column:t,source:s}=this;this.filterWrapper=this.filterManager.getOrCreateFilterWrapper(t,s),null!=(i=this.filterWrapper)&&i.filterPromise&&this.filterWrapper.filterPromise.then(o=>{let r=o.getGui();if(y(r)||console.warn(`AG Grid: getGui method from filter returned ${r}, it should be a DOM element or an HTML template string.`),"string"==typeof r&&(r=Ge(r)),this.appendChild(r),e){const n={type:g.EVENT_FILTER_OPENED,column:t,source:s,eGui:this.getGui()};this.eventService.dispatchEvent(n)}})}onFilterDestroyed(e){("api"===e.source||"paramsUpdated"===e.source)&&e.column.getId()===this.column.getId()&&this.columnModel.getPrimaryColumn(this.column)&&(ne(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}};d([p("filterManager")],Oo.prototype,"filterManager",2),d([p("columnModel")],Oo.prototype,"columnModel",2),d([T],Oo.prototype,"postConstruct",1);var An=class extends V{constructor(e,i){super(e),this.ctrl=i}getCtrl(){return this.ctrl}},Ii=(()=>{let e=class Jd extends An{constructor(t){super(Jd.TEMPLATE,t)}postConstruct(){const t=this.getGui();
1this.ctrl.setComp({addOrRemoveCssClass:(o,r)=>this.addOrRemoveCssClass(o,r),addOrRemoveBodyCssClass:(o,r)=>this.eFloatingFilterBody.classList.toggle(o,r),setButtonWrapperDisplayed:o=>z(this.eButtonWrapper,o),setCompDetails:o=>this.setCompDetails(o),getFloatingFilterComp:()=>this.compPromise,setWidth:o=>t.style.width=o,setMenuIcon:o=>this.eButtonShowMainFilter.appendChild(o)},t,this.eButtonShowMainFilter,this.eFloatingFilterBody)}setCompDetails(t){if(!t)return this.destroyFloatingFilterComp(),void(this.compPromise=null);this.compPromise=t.newAgStackInstance(),this.compPromise.then(s=>this.afterCompCreated(s))}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(t){if(t){if(!this.isAlive())return void this.destroyBean(t);this.destroyFloatingFilterComp(),this.floatingFilterComp=t,this.eFloatingFilterBody.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached()}}};return e.TEMPLATE='<div class="ag-header-cell ag-floating-filter" role="gridcell">\n <div ref="eFloatingFilterBody" role="presentation"></div>\n <div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">\n <button type="button" class="ag-button ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>\n </div>\n </div>',e})();d([F("eFloatingFilterBody")],Ii.prototype,"eFloatingFilterBody",2),d([F("eButtonWrapper")],Ii.prototype,"eButtonWrapper",2),d([F("eButtonShowMainFilter")],Ii.prototype,"eButtonShowMainFilter",2),d([T],Ii.prototype,"postConstruct",1),d([ye],Ii.prototype,"destroyFloatingFilterComp",1);var sc=Ii,_o=class extends b{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.getDomLayout(),i={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e};this.view.updateLayoutClasses(i.autoHeight?"ag-layout-auto-height":i.print?"ag-layout-print":"ag-layout-normal",i)}getDomLayout(){var e;const i=null!=(e=this.gos.get("domLayout"))?e:"normal";return-1===["normal","print","autoHeight"].indexOf(i)?(O(`${i} is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.`),"normal"):i}};d([T],_o.prototype,"postConstruct",1);var yt=class extends b{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.eBodyViewport=e,this.resetLastHScrollDebounced=Ee(()=>this.lastScrollSource[1]=null,500),this.resetLastVScrollDebounced=Ee(()=>this.lastScrollSource[0]=null,500)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}addScrollListener(){const{fakeHScrollComp:e,fakeVScrollComp:i}=this.ctrlsService.getParams();this.addManagedListener(this.centerRowsCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));const t=this.gos.get("debounceVerticalScrollbar"),s=t?Ee(this.onVScroll.bind(this),100):this.onVScroll.bind(this),o=t?Ee(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",s),i.onScrollCallback(o)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){if(null==this.centerRowsCtrl)return;void 0===e&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft());const t=this.enableRtl?e:-e,{topCenter:s,stickyTopCenter:o,stickyBottomCenter:r,centerHeader:n,bottomCenter:l,fakeHScrollComp:a}=this.ctrlsService.getParams();n.setHorizontalScroll(-t),l.setContainerTranslateX(t),s.setContainerTranslateX(t),o.setContainerTranslateX(t),r.setContainerTranslateX(t);const u=this.centerRowsCtrl.getViewportElement(),h=0===this.lastScrollSource[1];e=Math.abs(e),h?a.setScrollPosition(e):Cs(u,e,this.enableRtl)}isControllingScroll(e,i){return null==this.lastScrollSource[i]?(this.lastScrollSource[i]=e,!0):this.lastScrollSource[i]===e}onFakeHScroll(){this.isControllingScroll(1,1)&&this.onHScrollCommon(1)}onHScroll(){this.isControllingScroll(0,1)&&this.onHScrollCommon(0)}onHScrollCommon(e){const i=this.centerRowsCtrl.getViewportElement(),{scrollLeft:t}=i;if(this.shouldBlockScrollUpdate(1,t,!0))return;let s;s=0===e?ms(i,this.enableRtl):this.ctrlsService.get("fakeHScrollComp").getScrollPosition(),this.doHorizontalScroll(Math.round(s)),this.resetLastHScrollDebounced()}onFakeVScroll(){this.isControllingScroll(1,0)&&this.onVScrollCommon(1)}onVScroll(){this.isControllingScroll(0,0)&&this.onVScrollCommon(0)}onVScrollCommon(e){let i;i=0===e?this.eBodyViewport.scrollTop:this.ctrlsService.get("fakeVScrollComp").getScrollPosition(),!this.shouldBlockScrollUpdate(0,i,!0)&&(this.animationFrameService.setScrollTop(i),this.nextScrollTop=i,0===e?this.ctrlsService.get("fakeVScrollComp").setScrollPosition(i):this.eBodyViewport.scrollTop=i,this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())}doHorizontalScroll(e){const i=this.ctrlsService.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===i||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloating
1Center(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const i={type:g.EVENT_BODY_SCROLL,direction:1===e?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(i),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(()=>{const t=x(M({},i),{type:g.EVENT_BODY_SCROLL_END});this.eventService.dispatchEvent(t)},100)}shouldBlockScrollUpdate(e,i,t=!1){return!(t&&!St())&&(0===e?this.shouldBlockVerticalScroll(i):this.shouldBlockHorizontalScroll(i))}shouldBlockVerticalScroll(e){const i=ps(this.eBodyViewport),{scrollHeight:t}=this.eBodyViewport;return e<0||e+i>t}shouldBlockHorizontalScroll(e){const i=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:t}=this.centerRowsCtrl.getViewportElement();if(this.enableRtl&&fs()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+i>t}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(0)}scrollGridIfNeeded(){const e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e}setHorizontalScrollPosition(e,i=!1){const s=this.centerRowsCtrl.getViewportElement().scrollWidth-this.centerRowsCtrl.getCenterWidth();!i&&this.shouldBlockScrollUpdate(1,e)&&(e=this.enableRtl&&fs()?e>0?0:s:Math.min(Math.max(e,0),s)),Cs(this.centerRowsCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.eBodyViewport.scrollTop=e}getVScrollPosition(){return this.lastScrollTop=this.eBodyViewport.scrollTop,this.lastOffsetHeight=this.eBodyViewport.offsetHeight,{top:this.lastScrollTop,bottom:this.lastScrollTop+this.lastOffsetHeight}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowsCtrl.isHorizontalScrollShowing()}scrollHorizontally(e){const i=this.centerRowsCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(i+e),this.centerRowsCtrl.getViewportElement().scrollLeft-i}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,i=null){const t=this.rowModel.getRowCount();let s=-1;for(let o=0;o<t;o++){const r=this.rowModel.getRow(o);if("function"==typeof e){if(r&&e(r)){s=o;break}}else if(e===r||e===r.data){s=o;break}}s>=0&&this.ensureIndexVisible(s,i)}ensureIndexVisible(e,i){if(this.gos.isDomLayout("print"))return;const t=this.paginationProxy.getRowCount();if("number"!=typeof e||e<0||e>=t)return void console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);const o=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.getFrameworkOverrides().wrapIncoming(()=>{o||this.paginationProxy.goToPageWithIndex(e);const r=this.ctrlsService.getGridBodyCtrl(),n=r.getStickyTopHeight(),l=r.getStickyBottomHeight(),a=this.paginationProxy.getRow(e);let u;do{const h=a.rowTop,c=a.rowHeight,f=this.paginationProxy.getPixelOffset(),m=a.rowTop-f,C=m+a.rowHeight,w=this.getVScrollPosition(),S=this.heightScaler.getDivStretchOffset(),R=w.top+S,E=w.bottom+S,A=E-R,P=this.heightScaler.getScrollPositionForPixel(m),L=this.heightScaler.getScrollPositionForPixel(C-A),G=Math.min((P+L)/2,m);let J=null;"top"===i?J=P:"bottom"===i?J=L:"middle"===i?J=G:R+n>m?J=P-n:E-l<C&&(J=L+l),null!==J&&(this.setVerticalScrollPosition(J),this.rowRenderer.redraw({afterScroll:!0})),u=h!==a.rowTop||c!==a.rowHeight}while(u);this.animationFrameService.flushAllFrames()})}ensureColumnVisible(e,i="auto"){const t=this.columnModel.getGridColumn(e);if(!t||t.isPinned()||!this.columnModel.isColumnDisplayed(t))return;const s=this.getPositionedHorizontalScroll(t,i);this.getFrameworkOverrides().wrapIncoming(()=>{null!==s&&this.centerRowsCtrl.setCenterViewportScrollLeft(s),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()})}setScrollPosition(e,i){this.getFrameworkOverrides().wrapIncoming(()=>{this.centerRowsCtrl.setCenterViewportScrollLeft(i),this.setVerticalScrollPosition(e),this.rowRenderer.redraw({afterScroll:!0}),this.animationFrameService.flushAllFrames()})}getPositionedHorizontalScroll(e,i){const{columnBeforeStart:t,columnAfterEnd:s}=this.isColumnOutsideViewport(e),o=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),r=this.centerRowsCtrl.getCenterWidth(),n=this.enableRtl;let l=(n?t:s)||o,a=n?s:t;"auto"!==i&&(l="start"===i,a="end"===i);const u="middle"===i;if(l||a||u){const{colLeft:h,colMiddle:c,colRight:f}=this.getColumnBounds(e);return u?c-r/2:l?n?f:h:n?h-r:f-r}return null}isColumnOutsideViewport(e){const{start:i,end:t}=this.getViewportBounds(),{colLeft:s,colRight:o}=this.getColumnBounds(e),r=this.enableRtl;return{columnBeforeStart:r?i>o:t<o,columnAfterEnd:r?t<s:i>s}}getColumnBounds(e){const i=this.enableRtl,t=this.columnModel.getBodyContainerWidth(),s=e.getActualWidth(),o=e.getLeft(),r=i?-1:1,n=i?t-o:o;return{colLeft:n,colMiddle:n+s/2*r,colRight:n+s*r}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),i=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:i,end:e+i,width:e}}};d([p("ctrlsService")],yt.prototype,"ctrlsService",2),d([p("animationFrameService")],yt.prototype,"animationFrameService",2),d([p("paginationProxy")],yt.prototype,"paginationProxy",2),d([p("rowModel")],yt.prototype,"rowModel",2),d([p("rowContainerHeightService")],yt.prototype,"heightScaler",2),d([p("rowRenderer")],yt.prototype,"rowRenderer",2),d([p("columnModel")],yt.prototype,"columnModel",2),d([T],yt.prototype,"postConstruct",1);var nd="ag-force-vertical-scroll",De=class extends b{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}
1getScrollFeature(){return this.bodyScrollFeature}getBodyViewportElement(){return this.eBodyViewport}setComp(e,i,t,s,o,r,n){this.comp=e,this.eGridBody=i,this.eBodyViewport=t,this.eTop=s,this.eBottom=o,this.eStickyTop=r,this.eStickyBottom=n,this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",l=>this.setCellTextSelection(l.currentValue)),this.createManagedBean(new _o(this.comp)),this.bodyScrollFeature=this.createManagedBean(new yt(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,t,o,r,n]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager.setupAdvancedFilterHeaderComp(s),this.ctrlsService.register("gridBodyCtrl",this)}getComp(){return this.comp}addEventListeners(){this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}addFocusListeners(e){e.forEach(i=>{this.addManagedListener(i,"focusin",t=>{const{target:s}=t,o=Wt(s,"ag-root",i);i.classList.toggle("ag-has-focus",!o)}),this.addManagedListener(i,"focusout",t=>{const{target:s,relatedTarget:o}=t,r=i.contains(o),n=Wt(o,"ag-root",i);Wt(s,"ag-root",i)||(!r||n)&&i.classList.remove("ag-has-focus")})})}setColumnMovingCss(e){this.comp.setColumnMovingCss("ag-column-moving",e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss("ag-selectable",e)}onScrollVisibilityChanged(){const e=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(e),this.setStickyWidth(e),this.setStickyBottomOffsetBottom();const s=`calc(100% + ${(e&&this.gos.getScrollbarWidth()||0)+(qr()?16:0)}px)`;this.animationFrameService.requestAnimationFrame(()=>this.comp.setBodyViewportWidth(s))}onGridColumnsChanged(){const e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e.length)}disableBrowserDragging(){this.addManagedListener(this.eGridBody,"dragstart",e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1})}addStopEditingWhenGridLosesFocus(){if(!this.gos.get("stopEditingWhenCellsLoseFocus"))return;const e=t=>{const s=t.relatedTarget;if(null===So(s))return void this.rowRenderer.stopEditing();let o=i.some(r=>r.contains(s))&&this.mouseEventService.isElementInThisGrid(s);if(!o){const r=this.popupService;o=r.getActivePopups().some(n=>n.contains(s))||r.isElementWithinCustomPopup(s)}o||this.rowRenderer.stopEditing()},i=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom];i.forEach(t=>this.addManagedListener(t,"focusout",e))}updateRowCount(){const e=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount(),i=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1;this.comp.setRowCount(-1===i?-1:e+i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){this.comp.setPinnedTopBottomOverflowY(e?"scroll":"hidden")}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),i=e?nd:null,t=this.gos.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(i,e),e||t&&ha(this.eBodyViewport)}setupRowAnimationCssClass(){const e=()=>{const i=this.gos.isAnimateRows()&&!this.rowContainerHeightService.isStretching();this.comp.setRowAnimationCssOnBodyViewport(i?"ag-row-animation":"ag-row-no-animation",i)};e(),this.addManagedListener(this.eventService,g.EVENT_HEIGHT_SCALE_CHANGED,e),this.addManagedPropertyListener("animateRows",e)}getGridBodyElement(){return this.eGridBody}addBodyViewportListener(){const e=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",e),this.mockContextMenuForIPad(e),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyWheel.bind(this)),this.addManagedListener(this.eStickyBottom,"wheel",this.onStickyWheel.bind(this)),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){const e=this.eBodyViewport.querySelector(".ag-full-width-container"),i=this.eBodyViewport.querySelector(".ag-center-cols-viewport");e&&i&&this.addManagedListener(e,"wheel",t=>this.onFullWidthContainerWheel(t,i))}onFullWidthContainerWheel(e,i){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),i.scrollBy({left:e.deltaX}))}onBodyViewportContextMenu(e,i,t){if(!e&&!t)return;this.gos.get("preventDefaultOnContextMenu")&&(e||t).preventDefault();const{target:s}=e||i;
1(s===this.eBodyViewport||s===this.ctrlsService.get("center").getViewportElement())&&this.menuService.showContextMenu({mouseEvent:e,touchEvent:t,value:null,anchorToElement:this.eGridBody})}mockContextMenuForIPad(e){if(!St())return;const i=new ge(this.eBodyViewport);this.addManagedListener(i,ge.EVENT_LONG_TAP,s=>{e(void 0,s.touchStart,s.touchEvent)}),this.addDestroyFunc(()=>i.destroy())}onBodyViewportWheel(e){this.gos.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()}onStickyWheel(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)}getGui(){return this.eGridBody}scrollVertically(e){const i=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(i+e),this.eBodyViewport.scrollTop-i}addRowDragListener(){this.rowDragFeature=this.createManagedBean(new Be(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)}getRowDragFeature(){return this.rowDragFeature}onPinnedRowDataChanged(){this.setFloatingHeights()}setFloatingHeights(){const{pinnedRowModel:e}=this;let i=e.getPinnedTopTotalHeight(),t=e.getPinnedBottomTotalHeight();this.comp.setTopHeight(i),this.comp.setBottomHeight(t),this.comp.setTopDisplay(i?"inherit":"none"),this.comp.setBottomDisplay(t?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}getStickyTopHeight(){return this.stickyTopHeight}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}getStickyBottomHeight(){return this.stickyBottomHeight}setStickyWidth(e){if(e){const i=this.gos.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${i}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${i}px)`)}else this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%")}onHeaderHeightChanged(){this.setStickyTopOffsetTop()}setStickyTopOffsetTop(){const i=this.ctrlsService.get("gridHeaderCtrl").getHeaderHeight()+this.filterManager.getHeaderHeight(),t=this.pinnedRowModel.getPinnedTopTotalHeight();let s=0;i>0&&(s+=i),t>0&&(s+=t),s>0&&(s+=1),this.comp.setStickyTopTop(`${s}px`)}setStickyBottomOffsetBottom(){const e=this.pinnedRowModel.getPinnedBottomTotalHeight(),t=this.scrollVisibleService.isHorizontalScrollShowing()&&this.gos.getScrollbarWidth()||0;this.comp.setStickyBottomBottom(`${e+t}px`)}sizeColumnsToFit(e,i){const s=this.isVerticalScrollShowing()?this.gos.getScrollbarWidth():0,r=Ut(this.eGridBody)-s;r>0?this.columnModel.sizeColumnsToFit(r,"sizeColumnsToFit",!1,e):void 0===i?window.setTimeout(()=>{this.sizeColumnsToFit(e,100)},0):100===i?window.setTimeout(()=>{this.sizeColumnsToFit(e,500)},100):500===i?window.setTimeout(()=>{this.sizeColumnsToFit(e,-1)},500):console.warn("AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")}addScrollEventListener(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})}removeScrollEventListener(e){this.eBodyViewport.removeEventListener("scroll",e)}};d([p("animationFrameService")],De.prototype,"animationFrameService",2),d([p("rowContainerHeightService")],De.prototype,"rowContainerHeightService",2),d([p("ctrlsService")],De.prototype,"ctrlsService",2),d([p("columnModel")],De.prototype,"columnModel",2),d([p("scrollVisibleService")],De.prototype,"scrollVisibleService",2),d([p("menuService")],De.prototype,"menuService",2),d([p("headerNavigationService")],De.prototype,"headerNavigationService",2),d([p("dragAndDropService")],De.prototype,"dragAndDropService",2),d([p("pinnedRowModel")],De.prototype,"pinnedRowModel",2),d([p("rowRenderer")],De.prototype,"rowRenderer",2),d([p("popupService")],De.prototype,"popupService",2),d([p("mouseEventService")],De.prototype,"mouseEventService",2),d([p("rowModel")],De.prototype,"rowModel",2),d([p("filterManager")],De.prototype,"filterManager",2);var Rs="ag-cell-range-selected",vc=class{constructor(e,i){this.beans=e,this.rangeService=e.rangeService,this.selectionHandleFactory=e.selectionHandleFactory,this.cellCtrl=i}setComp(e,i){this.cellComp=e,this.eGui=i,this.onRangeSelectionChanged()}onRangeSelectionChanged(){this.cellComp&&(this.rangeCount=this.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(Rs,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass(`${Rs}-1`,1===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${Rs}-2`,2===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${Rs}-3`,3===this.rangeCount),this.cellComp.addOrRemoveCssClass(`${Rs}-4`,this.rangeCount>=4),this.cellComp.addOrRemoveCssClass("ag-cell-range-chart",this.hasChartRange),Di(this.eGui,this.rangeCount>0||void 0),this.cellComp.addOrRemoveCssClass("ag-cell-range-single-cell",this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())}updateRangeBorders(){const e=this.getRangeBorders(),i=this.isSingleCell(),s=!i&&e.right,o=!i&&e.bottom,r=!i&&e.left;
1this.cellComp.addOrRemoveCssClass("ag-cell-range-top",!i&&e.top),this.cellComp.addOrRemoveCssClass("ag-cell-range-right",s),this.cellComp.addOrRemoveCssClass("ag-cell-range-bottom",o),this.cellComp.addOrRemoveCssClass("ag-cell-range-left",r)}isSingleCell(){const{rangeService:e}=this.beans;return 1===this.rangeCount&&!!e&&!e.isMoreThanOneCell()}getHasChartRange(){const{rangeService:e}=this.beans;if(!this.rangeCount||!e)return!1;const i=e.getCellRanges();return i.length>0&&i.every(t=>Ve([1,0],t.type))}updateRangeBordersIfRangeCount(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())}getRangeBorders(){const e=this.beans.gos.get("enableRtl");let i=!1,t=!1,s=!1,o=!1;const r=this.cellCtrl.getCellPosition().column,n=this.beans.columnModel;let l,a;e?(l=n.getDisplayedColAfter(r),a=n.getDisplayedColBefore(r)):(l=n.getDisplayedColBefore(r),a=n.getDisplayedColAfter(r));const u=this.rangeService.getCellRanges().filter(h=>this.rangeService.isCellInSpecificRange(this.cellCtrl.getCellPosition(),h));l||(o=!0),a||(t=!0);for(let h=0;h<u.length&&!(i&&t&&s&&o);h++){const c=u[h],f=this.rangeService.getRangeStartRow(c),m=this.rangeService.getRangeEndRow(c);!i&&this.beans.rowPositionUtils.sameRow(f,this.cellCtrl.getCellPosition())&&(i=!0),!s&&this.beans.rowPositionUtils.sameRow(m,this.cellCtrl.getCellPosition())&&(s=!0),!o&&l&&c.columns.indexOf(l)<0&&(o=!0),!t&&a&&c.columns.indexOf(a)<0&&(t=!0)}return{top:i,right:t,bottom:s,left:o}}refreshHandle(){if(this.beans.context.isDestroyed())return;const e=this.shouldHaveSelectionHandle();this.selectionHandle&&!e&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),e&&this.addSelectionHandle(),this.cellComp.addOrRemoveCssClass("ag-cell-range-handle",!!this.selectionHandle)}shouldHaveSelectionHandle(){const e=this.beans.gos,i=this.rangeService.getCellRanges(),t=i.length;if(this.rangeCount<1||t<1)return!1;const s=$(i),o=this.cellCtrl.getCellPosition(),r=e.get("enableFillHandle")&&!this.cellCtrl.isSuppressFillHandle(),n=e.get("enableRangeHandle");let l=1===t&&!this.cellCtrl.isEditing()&&(r||n);if(this.hasChartRange){const u=1===i[0].type&&this.rangeService.isCellInSpecificRange(o,i[0]);this.cellComp.addOrRemoveCssClass("ag-cell-range-chart-category",u),l=0===s.type}return l&&null!=s.endRow&&this.rangeService.isContiguousRange(s)&&this.rangeService.isBottomRightCell(s,o)}addSelectionHandle(){const e=this.beans.gos,i=$(this.rangeService.getCellRanges()).type,s=e.get("enableFillHandle")&&_(i)?0:1;this.selectionHandle&&this.selectionHandle.getType()!==s&&(this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)),this.selectionHandle||(this.selectionHandle=this.selectionHandleFactory.createSelectionHandle(s)),this.selectionHandle.refresh(this.cellCtrl)}destroy(){this.beans.context.destroyBean(this.selectionHandle)}},wc=class extends b{constructor(e,i){super(),this.cellCtrl=e,this.beans=i,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListener(this.beans.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.onNewColumnsLoaded())}setComp(e){this.eGui=e,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();lt(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListener(this.beans.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)))}onWidthChanged(){if(!this.eGui)return;const e=this.getCellWidth();this.eGui.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,i)=>e+i.getActualWidth(),0):this.column.getActualWidth()}
1getColSpanningList(){const e=this.column.getColSpan(this.rowNode),i=[];if(1===e)i.push(this.column);else{let t=this.column;const s=this.column.getPinned();for(let o=0;t&&o<e&&(i.push(t),t=this.beans.columnModel.getDisplayedColAfter(t),t&&!_(t)&&s===t.getPinned());o++);}return i}onLeftChanged(){if(!this.eGui)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=e+"px"}getCellLeft(){let e;return e=this.beans.gos.get("enableRtl")&&this.colsSpanning?$(this.colsSpanning):this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.isPrintLayout()||"left"===this.column.getPinned())return e;const i=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===this.column.getPinned()?i+this.beans.columnModel.getBodyContainerWidth()+(e||0):i+(e||0)}applyRowSpan(e){if(1===this.rowSpan&&!e)return;const t=this.beans.gos.getRowHeightAsNumber()*this.rowSpan;this.eGui.style.height=`${t}px`,this.eGui.style.zIndex="1"}destroy(){super.destroy()}},Sc=class extends b{constructor(e,i){super(),this.staticClasses=[],this.cellCtrl=e,this.beans=i,this.column=e.getColumn(),this.rowNode=e.getRowNode()}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const e=this.column.getColDef(),{cellClassRules:i}=e,t=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,rowIndex:this.rowNode.rowIndex});this.beans.stylingService.processClassRules(i===this.cellClassRules?void 0:this.cellClassRules,i,t,s=>this.cellComp.addOrRemoveCssClass(s,!0),s=>this.cellComp.addOrRemoveCssClass(s,!1)),this.cellClassRules=i}applyUserStyles(){const e=this.column.getColDef();if(!e.cellStyle)return;let i;if("function"==typeof e.cellStyle){const t=this.beans.gos.addGridCommonParams({column:this.column,value:this.cellCtrl.getValue(),colDef:e,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex});i=(0,e.cellStyle)(t)}else i=e.cellStyle;i&&this.cellComp.setUserStyles(i)}applyClassesFromColDef(){const e=this.column.getColDef(),i=this.beans.gos.addGridCommonParams({value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:e,rowIndex:this.rowNode.rowIndex});this.staticClasses.length&&this.staticClasses.forEach(t=>this.cellComp.addOrRemoveCssClass(t,!1)),this.staticClasses=this.beans.stylingService.getStaticCellClasses(e,i),this.staticClasses.length&&this.staticClasses.forEach(t=>this.cellComp.addOrRemoveCssClass(t,!0))}destroy(){super.destroy()}},H=class{postConstruct(){this.gos.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gos.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)}};d([p("resizeObserverService")],H.prototype,"resizeObserverService",2),d([p("paginationProxy")],H.prototype,"paginationProxy",2),d([p("context")],H.prototype,"context",2),d([p("gridOptionsService")],H.prototype,"gos",2),d([p("environment")],H.prototype,"environment",2),d([p("rowRenderer")],H.prototype,"rowRenderer",2),d([p("valueService")],H.prototype,"valueService",2),d([p("eventService")],H.prototype,"eventService",2),d([p("columnModel")],H.prototype,"columnModel",2),d([p("headerNavigationService")],H.prototype,"headerNavigationService",2),d([p("navigationService")],H.prototype,"navigationService",2),d([p("columnAnimationService")],H.prototype,"columnAnimationService",2),d([p("focusService")],H.prototype,"focusService",2),d([p("popupService")],H.prototype,"popupService",2),d([p("stylingService")],H.prototype,"stylingService",2),d([p("columnHoverService")],H.prototype,"columnHoverService",2),d([p("userComponentFactory")],H.prototype,"userComponentFactory",2),d([p("userComponentRegistry")],H.prototype,"userComponentRegistry",2),d([p("animationFrameService")],H.prototype,"animationFrameService",2),d([p("dragService")],H.prototype,"dragService",2),d([p("dragAndDropService")],H.prototype,"dragAndDropService",2),d([p("sortController")],H.prototype,"sortController",2),d([p("filterManager")],H.prototype,"filterManager",2),d([p("rowContainerHeightService")],H.prototype,"rowContainerHeightService",2),d([p("frameworkOverrides")],H.prototype,"frameworkOverrides",2),d([p("cellPositionUtils")],H.prototype,"cellPositionUtils",2),d([p("rowPositionUtils")],H.prototype,"rowPositionUtils",2),d([p("selectionService")],H.prototype,"selectionService",2),d([p("rowCssClassCalculator")],H.prototype,"rowCssClassCalculator",2),d([p("rowModel")],H.prototype,"rowModel",2),d([p("ctrlsService")],H.prototype,"ctrlsService",2),d([p("ctrlsFactory")],H.prototype,"ctrlsFactory",2),d([p("agStackComponentsRegistry")],H.prototype,"agStackComponentsRegistry",2),d([p("valueCache")],H.prototype,"valueCache",2),d([p("rowNodeEventThrottle")],H.prototype,"rowNodeEventThrottle",2),d([p("localeService")],H.prototype,"localeService",2),d([p("syncService")],H.prototype,"syncService",2),d([p("ariaAnnouncementService")],H.prototype,"ariaAnnouncementService",2),d([q("rangeService")],H.prototype,"rangeService",2),d([q("selectionHandleFactory")],H.prototype,"selectionHandleFactory",2),d([T],H.prototype,"postConstruct",1),H=d([I("beans")],H);var Ec=class extends H{constructor(e,i,t){super(),this.cellCtrl=e,this.beans=i,this.column=t}onMouseEvent(e,i){if(!it(i))switch(e){case"click":this.onCellClicked(i);break;case"mousedown":case"touchstart":this.onMouseDown(i);break;case"dblclick":this.onCellDoubleClicked(i);break;case"mouseout":this.onMouseOut(i);break;case"mouseover":this.onMouseOver(i)}}onCellClicked(e){if(this.isDoubleClickOnIPad())return this.onCellDoubleClicked(e),void e.preventDefault();const{eventService:i,rangeService:t,gos:s}=this.beans;t&&(e.ctrlKey||e.metaKey)&&t.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&t.intersectLastRange(!0);const r=this.cellCtrl.createEvent(e,g.EVENT_CELL_CLICKED);i.dispatchEvent(r);const n=this.column.getColDef();n.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{n.onCellClicked(r)})},0),(s.get("singleClickEdit")||n.singleClickEdit)&&!s.get("suppressClickEdit")&&(!e.shiftKey||0==t?.getCellRanges().length)&&this.cellCtrl.
1startRowOrCellEdit()}isDoubleClickOnIPad(){if(!St()||Ar("dblclick"))return!1;const e=(new Date).getTime(),i=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,i}onCellDoubleClicked(e){const i=this.column.getColDef(),t=this.cellCtrl.createEvent(e,g.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(t),"function"==typeof i.onCellDoubleClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{i.onCellDoubleClicked(t)})},0),!this.beans.gos.get("singleClickEdit")&&!this.beans.gos.get("suppressClickEdit")&&this.cellCtrl.startRowOrCellEdit(null,e)}onMouseDown(e){const{ctrlKey:i,metaKey:t,shiftKey:s}=e,o=e.target,{cellCtrl:r,beans:n}=this,{eventService:l,rangeService:a,focusService:u}=n;if(this.isRightClickInExistingRange(e))return;const h=a&&0!=a.getCellRanges().length;if(!s||!h){const c=at()&&!r.isEditing()&&!en(o);r.focusCell(c)}if(s&&h&&!u.isCellFocused(r.getCellPosition())){e.preventDefault();const c=u.getFocusedCell();if(c){const{column:f,rowIndex:m,rowPinned:C}=c,w=n.rowRenderer.getRowByPosition({rowIndex:m,rowPinned:C}),S=w?.getCellCtrl(f);S?.isEditing()&&S.stopEditing(),u.setFocusedCell({column:f,rowIndex:m,rowPinned:C,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(o)){if(a){const c=this.cellCtrl.getCellPosition();s?a.extendLatestRangeToCell(c):a.setRangeToCell(c,i||t)}
1l.dispatchEvent(this.cellCtrl.createEvent(e,g.EVENT_CELL_MOUSE_DOWN))}}isRightClickInExistingRange(e){const{rangeService:i}=this.beans;if(i){const t=i.isCellInAnyRange(this.cellCtrl.getCellPosition()),s=2===e.button||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(t&&s)return!0}return!1}containsWidget(e){return Wt(e,"ag-selection-checkbox",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const i=this.cellCtrl.createEvent(e,g.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(i),this.beans.columnHoverService.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const i=this.cellCtrl.createEvent(e,g.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(i),this.beans.columnHoverService.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const i=this.cellCtrl.getGui(),t=i.contains(e.target),s=i.contains(e.relatedTarget);return t&&s}destroy(){}},yc=class extends b{constructor(e,i,t,s,o){super(),this.cellCtrl=e,this.beans=i,this.rowNode=s,this.rowCtrl=o}setComp(e){this.eGui=e}onKeyDown(e){const i=e.key;switch(i){case v.ENTER:this.onEnterKeyDown(e);break;case v.F2:this.onF2KeyDown(e);break;case v.ESCAPE:this.onEscapeKeyDown(e);break;case v.TAB:this.onTabKeyDown(e);break;case v.BACKSPACE:case v.DELETE:this.onBackspaceOrDeleteKeyDown(i,e);break;case v.DOWN:case v.UP:case v.RIGHT:case v.LEFT:this.onNavigationKeyDown(e,i)}}onNavigationKeyDown(e,i){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,i,this.cellCtrl.getCellPosition(),!0),e.preventDefault())}onShiftRangeSelect(e){if(!this.beans.rangeService)return;const i=this.beans.rangeService.extendLatestRangeInDirection(e);i&&this.beans.navigationService.ensureCellVisible(i)}onTabKeyDown(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,i){var t;const{cellCtrl:s,beans:o,rowNode:r}=this,{gos:n,rangeService:l,eventService:a}=o;if(!s.isEditing()){if(a.dispatchEvent({type:g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),Ea(e,n.get("enableCellEditingOnBackspace"))){if(l&&n.get("enableRangeSelection"))l.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(s.isCellEditable()){const u=s.getColumn(),h=null!=(t=this.beans.valueService.parseValue(u,r,"",r.getValueFromValueService(u)))?t:null;r.setDataValue(u,h,"cellClear")}}else s.startRowOrCellEdit(e,i);a.dispatchEvent({type:g.EVENT_KEY_SHORTCUT_CHANGED_CELL_END})}}onEnterKeyDown(e){this.cellCtrl.isEditing()||this.rowCtrl.isEditing()?this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey):this.beans.gos.get("enterNavigatesVertically")?this.beans.navigationService.navigateToNextCell(null,e.shiftKey?v.UP:v.DOWN,this.cellCtrl.getCellPosition(),!1):(this.cellCtrl.startRowOrCellEdit(v.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault())}onF2KeyDown(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(v.F2,e)}onEscapeKeyDown(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.isEditing())return;const s=e.key;" "===s?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(s,e),e.preventDefault())}onSpaceKeyDown(e){const{gos:i}=this.beans;if(!this.cellCtrl.isEditing()&&i.isRowSelection()){const t=this.rowNode.isSelected(),s=!t;if(s||!i.get("suppressRowDeselection")){const o=this.beans.gos.get("groupSelectsFiltered"),r=this.rowNode.setSelectedParams({newValue:s,rangeSelect:e.shiftKey,groupSelectsFiltered:o,event:e,source:"spaceKey"});void 0===t&&0===r&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:o,event:e,source:"spaceKey"})}}e.preventDefault()}destroy(){super.destroy()}},ld=class extends V{constructor(e,i,t){super('<div class="ag-drag-handle ag-row-drag" draggable="true"></div>'),this.rowNode=e,this.column=i,this.eCell=t}postConstruct(){this.getGui().appendChild(se("rowDrag",this.gos,null)),this.addGuiEventListener("mousedown",i=>{i.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const i=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0),i?i(this.gos.addGridCommonParams({rowNode:this.rowNode,dragEvent:e})):(()=>{try{const s=JSON.stringify(this.rowNode.data);e.dataTransfer.setData("application/json",s),e.dataTransfer.setData("text/plain",s)}catch{}})()}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};d([T],ld.prototype,"postConstruct",1);var Vo=class{static getHeaderClassesFromColDef(e,i,t,s){return _(e)?[]:this.getColumnClassesFromCollDef(e.headerClass,e,i,t,s)}static getToolPanelClassesFromColDef(e,i,t,s){return _(e)?[]:this.getColumnClassesFromCollDef(e.toolPanelClass,e,i,t,s)}static refreshFirstAndLastStyles(e,i,t){e.addOrRemoveCssClass("ag-column-first",t.isColumnAtEdge(i,"first")),e.addOrRemoveCssClass("ag-column-last",t.isColumnAtEdge(i,"last"))}static getClassParams(e,i,t,s){return i.addGridCommonParams({colDef:e,column:t,columnGroup:s})}static getColumnClassesFromCollDef(e,i,t,s,o){if(_(e))return[];let r;return r="function"==typeof e?e(this.getClassParams(i,t,s,o)):e,"string"==typeof r?[r]:Array.isArray(r)?[...r]:[]}},Nc=0,xc=(()=>{let e=class ol extends b{constructor(t,s,o,r){super(),this.cellRangeFeature=null,this.cellPositionFeature=null,this.cellCustomStyleFeature=null,this.tooltipFeature=null,this.cellMouseListenerFeature=null,this.cellKeyboardListenerFeature=null,this.suppressRefreshCell=!1,this.onCellCompAttachedFuncs=[],this.column=t,this.rowNode=s,this.beans=o,this.rowCtrl=r,this.instanceId=t.getId()+"-"+Nc++,this.colIdSanitised=ae(this.column.getId()),o.gos.get("suppressCellFocus")||(this.tabIndex=-1),this.createCellPosition(),this.addFeatures(),this.updateAndFormatValue(!1)}shouldRestoreFocus(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)}addFeatures(){this.cellPositionFeature=new wc(this,this.beans),this.addDestroyFunc(()=>{var s;null==(s=this.cellPositionFeature)||s.destroy(),this.cellPositionFeature=null}),this.cellCustomStyleFeature=new Sc(this,this.beans),this.addDestroyFunc(()=>{var s;null==(s=this.cellCustomStyleFeature)||s.destroy(),this.cellCustomStyleFeature=null}),this.cellMouseListenerFeature=new Ec(this,this.beans,this.column),this.addDestroyFunc(()=>{var s;null==(s=this.cellMouseListenerFeature)||s.destroy(),this.cellMouseListenerFeature=null}),this.cellKeyboardListenerFeature=new yc(this,this.beans,this.column,this.rowNode,this.rowCtrl),this.addDestroyFunc(()=>{var s;null==(s=this.cellKeyboardListenerFeature)||s.destroy(),this.cellKeyboardListenerFeature=null}),this.column.isTooltipEnabled()&&(this.enableTooltipFeature(),this.addDestroyFunc(()=>{this.disableTooltipFeature()})),this.beans.rangeService&&this.beans.gos.get("enableRangeSelection")&&(this.cellRangeFeature=new vc(this.beans,this),this.addDestroyFunc(()=>{var s;null==(s=this.cellRangeFeature)||s.destroy(),this.cellRangeFeature=null}))}enableTooltipFeature(t,s){const r="whenTruncated"===this.beans.gos.get("tooltipShowMode");!s&&r&&!this.isCellRenderer()&&(s=()=>{const l=this.getGui(),a=0===l.children.length?l:l.querySelector(".ag-cell-value");return!a||a.scrollWidth>a.clientWidth}
1),this.tooltipFeature=new Et({getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getRowIndex:()=>this.cellPosition.rowIndex,getRowNode:()=>this.rowNode,getGui:()=>this.getGui(),getLocation:()=>"cell",getTooltipValue:null!=t?()=>t:()=>{const l=this.column.getColDef(),a=this.rowNode.data;if(l.tooltipField&&y(a))return vi(a,l.tooltipField,this.column.isTooltipFieldContainsDots());const u=l.tooltipValueGetter;return u?u(this.beans.gos.addGridCommonParams({location:"cell",colDef:this.column.getColDef(),column:this.column,rowIndex:this.cellPosition.rowIndex,node:this.rowNode,data:this.rowNode.data,value:this.value,valueFormatted:this.valueFormatted})):null},getValueFormatted:()=>this.valueFormatted,shouldDisplayTooltip:s},this.beans)}disableTooltipFeature(){this.tooltipFeature&&(this.tooltipFeature.destroy(),this.tooltipFeature=null)}setComp(t,s,o,r,n){var l,a,u,h;this.cellComp=t,this.eGui=s,this.printLayout=r,this.addDomData(),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(o),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),null==(l=this.cellPositionFeature)||l.setComp(s),null==(a=this.cellCustomStyleFeature)||a.setComp(t),null==(u=this.tooltipFeature)||u.refreshToolTip(),null==(h=this.cellKeyboardListenerFeature)||h.setComp(this.eGui),this.cellRangeFeature&&this.cellRangeFeature.setComp(t,s),n&&this.isCellEditable()?this.startEditing():this.showValue(),this.onCellCompAttachedFuncs.length&&(this.onCellCompAttachedFuncs.forEach(c=>c()),this.onCellCompAttachedFuncs=[])}setupAutoHeight(t){if(this.isAutoHeight=this.column.isAutoHeight(),!this.isAutoHeight||!t)return;const s=t.parentElement,o=this.beans.gos.getRowHeightForNode(this.rowNode).height,r=a=>{if(this.editing||!this.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:c,borderTopWidth:f}=Ft(s),w=t.offsetHeight+(u+h+c+f);if(a<5){const R=this.beans.gos.getDocument();if(!R||!R.contains(t)||0==w)return void window.setTimeout(()=>r(a+1),0)}const S=Math.max(w,o);this.rowNode.setRowAutoHeight(S,this.column)},n=()=>r(0);n();const l=this.beans.resizeObserverService.observeResize(t,n);this.addDestroyFunc(()=>{l(),this.rowNode.setRowAutoHeight(void 0,this.column)})}getCellAriaRole(){var t;return null!=(t=this.column.getColDef().cellAriaRole)?t:"gridcell"}getInstanceId(){return this.instanceId}getColumnIdSanitised(){return this.colIdSanitised}getTabIndex(){return this.tabIndex}isCellRenderer(){const t=this.column.getColDef();return null!=t.cellRenderer||null!=t.cellRendererSelector}getValueToDisplay(){var t;return null!=(t=this.valueFormatted)?t:this.value}showValue(t=!1){var s;const o=this.getValueToDisplay();let r;if(this.rowNode.stub){const n=this.createCellRendererParams();r=this.beans.userComponentFactory.getLoadingCellRendererDetails(this.column.getColDef(),n)}else if(this.isCellRenderer()){const n=this.createCellRendererParams();r=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),n)}this.cellComp.setRenderDetails(r,o,t),null==(s=this.cellRangeFeature)||s.refreshHandle()}setupControlComps(){const t=this.column.getColDef();this.includeSelection=this.isIncludeControl(t.checkboxSelection),this.includeRowDrag=this.isIncludeControl(t.rowDrag),this.includeDndSource=this.isIncludeControl(t.dndSource),this.cellComp.setIncludeSelection(this.includeSelection),this.cellComp.setIncludeDndSource(this.includeDndSource),this.cellComp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(t){return null==this.rowNode.rowPinned&&("function"==typeof t||!0===t)}refreshShouldDestroy(){const t=this.column.getColDef(),s=this.includeSelection!=this.isIncludeControl(t.checkboxSelection),o=this.includeRowDrag!=this.isIncludeControl(t.rowDrag),r=this.includeDndSource!=this.isIncludeControl(t.dndSource),n=this.isAutoHeight!=this.column.isAutoHeight();return s||o||r||n}startEditing(t=null,s=!1,o=null){if(!this.isCellEditable()||this.editing)return;if(!this.cellComp)return void this.onCellCompAttachedFuncs.push(()=>{this.startEditing(t,s,o)});const r=this.createCellEditorParams(t,s),n=this.column.getColDef(),l=this.beans.userComponentFactory.getCellEditorDetails(n,r);
1this.editCompDetails=l;const a=null!=l?.popupFromSelector?l.popupFromSelector:!!n.cellEditorPopup,u=null!=l?.popupPositionFromSelector?l.popupPositionFromSelector:n.cellEditorPopupPosition;this.setEditing(!0),this.cellComp.setEditDetails(l,a,u,this.beans.gos.get("reactiveCustomComponents"));const h=this.createEvent(o,g.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(h)}setEditing(t){var s;this.editing!==t&&(this.editing=t,null==(s=this.cellRangeFeature)||s.refreshHandle())}stopRowOrCellEdit(t=!1){"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.stopEditing(t):this.stopEditing(t)}onPopupEditorClosed(){this.isEditing()&&this.stopEditingAndFocus()}takeValueFromCellEditor(t){const s={newValueExists:!1};if(t)return s;const o=this.cellComp.getCellEditor();return!o||o.isCancelAfterEnd&&o.isCancelAfterEnd()?s:{newValue:o.getValue(),newValueExists:!0}}saveNewValue(t,s){if(s===t)return!1;this.suppressRefreshCell=!0;const o=this.rowNode.setDataValue(this.column,s,"edit");return this.suppressRefreshCell=!1,o}stopEditing(t=!1){if(!this.editing)return!1;const{newValue:s,newValueExists:o}=this.takeValueFromCellEditor(t),r=this.rowNode.getValueFromValueService(this.column);let n=!1;return o&&(n=this.saveNewValue(r,s)),this.setEditing(!1),this.cellComp.setEditDetails(),this.editCompDetails=void 0,this.updateAndFormatValue(!1),this.refreshCell({forceRefresh:!0,suppressFlash:!0}),this.dispatchEditingStoppedEvent(r,s,!t&&!!n),n}dispatchEditingStoppedEvent(t,s,o){const r=x(M({},this.createEvent(null,g.EVENT_CELL_EDITING_STOPPED)),{oldValue:t,newValue:s,valueChanged:o});this.beans.eventService.dispatchEvent(r)}createCellEditorParams(t,s){return this.beans.gos.addGridCommonParams({value:this.rowNode.getValueFromValueService(this.column),eventKey:t,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().rowIndex,node:this.rowNode,data:this.rowNode.data,cellStartedEdit:s,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)})}createCellRendererParams(){return this.beans.gos.addGridCommonParams({value:this.value,valueFormatted:this.valueFormatted,getValue:()=>this.rowNode.getValueFromValueService(this.column),setValue:s=>this.beans.valueService.setValue(this.rowNode,this.column,s),formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,rowIndex:this.getCellPosition().rowIndex,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:(s,o,r,n)=>this.registerRowDragger(s,o,n),setTooltip:(s,o)=>{var r;this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(s,o),null==(r=this.tooltipFeature)||r.refreshToolTip()}})}parseValue(t){return this.beans.valueService.parseValue(this.column,this.rowNode,t,this.getValue())}setFocusOutOnEditor(){if(!this.editing)return;const t=this.cellComp.getCellEditor();t&&t.focusOut&&t.focusOut()}setFocusInOnEditor(){if(!this.editing)return;const t=this.cellComp.getCellEditor();t&&t.focusIn?t.focusIn():this.focusCell(!0)}onCellChanged(t){t.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(t){var s;this.refreshShouldDestroy()?null==(s=this.rowCtrl)||s.recreateCell(this):this.refreshCell(t)}refreshCell(t){var s,o,r,n;if(this.suppressRefreshCell||this.editing)return;const l=this.column.getColDef(),a=null!=t&&!!t.newData,u=null!=t&&!!t.suppressFlash||!!l.suppressCellFlash,c=t&&t.forceRefresh||null==l.field&&null==l.valueGetter&&null==l.showRowGroup||a,f=!!this.cellComp,m=this.updateAndFormatValue(f);if(f){if(c||m){this.showValue(a);const w=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();!u&&!w&&(this.beans.gos.get("enableCellChangeFlash")||l.enableCellChangeFlash)&&this.flashCell(),null==(s=this.cellCustomStyleFeature)||s.applyUserStyles(),null==(o=this.cellCustomStyleFeature)||o.applyClassesFromColDef()}null==(r=this.tooltipFeature)||r.refreshToolTip(),null==(n=this.cellCustomStyleFeature)||n.applyCellClassRules()}}stopEditingAndFocus(t=!1,s=!1){this.stopRowOrCellEdit(),this.focusCell(!0),t||this.navigateAfterEdit(s)}navigateAfterEdit(t){this.beans.gos.get("enterNavigatesVerticallyAfterEdit")&&this.beans.navigationService.navigateToNextCell(null,t?v.UP:v.DOWN,this.getCellPosition(),!1)}flashCell(t){var s,o;const r=null!=(s=t?.flashDuration)?s:t?.flashDelay,n=null!=(o=t?.fadeDuration)?o:t?.fadeDelay;this.animateCell("data-changed",r,n)}animateCell(t,s,o){if(!this.cellComp)return;const r=`ag-cell-${t}`,n=`ag-cell-${t}-animation`,{gos:l}=this.beans;
1s||(s=l.get("cellFlashDuration")),y(o)||(o=l.get("cellFadeDuration")),this.cellComp.addOrRemoveCssClass(r,!0),this.cellComp.addOrRemoveCssClass(n,!1),this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(r,!1),this.cellComp.addOrRemoveCssClass(n,!0),this.eGui.style.transition=`background-color ${o}ms`,window.setTimeout(()=>{this.isAlive()&&(this.cellComp.addOrRemoveCssClass(n,!1),this.eGui.style.transition="")},o))},s)})}onFlashCells(t){if(!this.cellComp)return;const s=this.beans.cellPositionUtils.createId(this.getCellPosition());t.cells[s]&&this.animateCell("highlight")}isCellEditable(){return this.column.isCellEditable(this.rowNode)}isSuppressFillHandle(){return this.column.isSuppressFillHandle()}formatValue(t){var s;return null!=(s=this.callValueFormatter(t))?s:t}callValueFormatter(t){return this.beans.valueService.formatValue(this.column,this.rowNode,t)}updateAndFormatValue(t){const s=this.value,o=this.valueFormatted;return this.value=this.rowNode.getValueFromValueService(this.column),this.valueFormatted=this.callValueFormatter(this.value),!t||!this.valuesAreEqual(s,this.value)||this.valueFormatted!=o}valuesAreEqual(t,s){const o=this.column.getColDef();return o.equals?o.equals(t,s):t===s}getComp(){return this.cellComp}getValue(){return this.value}addDomData(){const t=this.getGui();this.beans.gos.setDomData(t,ol.DOM_DATA_KEY_CELL_CTRL,this),this.addDestroyFunc(()=>this.beans.gos.setDomData(t,ol.DOM_DATA_KEY_CELL_CTRL,null))}createEvent(t,s){return this.beans.gos.addGridCommonParams({type:s,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),rowPinned:this.rowNode.rowPinned,event:t,rowIndex:this.rowNode.rowIndex})}processCharacter(t){var s;null==(s=this.cellKeyboardListenerFeature)||s.processCharacter(t)}onKeyDown(t){var s;null==(s=this.cellKeyboardListenerFeature)||s.onKeyDown(t)}onMouseEvent(t,s){var o;null==(o=this.cellMouseListenerFeature)||o.onMouseEvent(t,s)}getGui(){return this.eGui}getColSpanningList(){return this.cellPositionFeature.getColSpanningList()}onLeftChanged(){var t;this.cellComp&&(null==(t=this.cellPositionFeature)||t.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{cellComp:t,column:s,beans:o}=this;Vo.refreshFirstAndLastStyles(t,s,o.columnModel)}refreshAriaColIndex(){const t=this.beans.columnModel.getAriaColumnIndex(this.column);Or(this.getGui(),t)}isSuppressNavigable(){return this.column.isSuppressNavigable(this.rowNode)}onWidthChanged(){var t;return null==(t=this.cellPositionFeature)?void 0:t.onWidthChanged()}getColumn(){return this.column}getRowNode(){return this.rowNode}isPrintLayout(){return this.printLayout}getCellPosition(){return this.cellPosition}isEditing(){return this.editing}startRowOrCellEdit(t,s=null){this.cellComp?"fullRow"===this.beans.gos.get("editType")?this.rowCtrl.startRowEditing(t,this):this.startEditing(t,!0,s):this.onCellCompAttachedFuncs.push(()=>{this.startRowOrCellEdit(t,s)})}getRowCtrl(){return this.rowCtrl}getRowPosition(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}}updateRangeBordersIfRangeCount(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.updateRangeBordersIfRangeCount()}onRangeSelectionChanged(){this.cellComp&&this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}isRangeSelectionEnabled(){return null!=this.cellRangeFeature}focusCell(t=!1){this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:t})}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.cellRangeFeature&&this.cellRangeFeature.onRangeSelectionChanged()}onFirstRightPinnedChanged(){if(!this.cellComp)return;const t=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass("ag-cell-first-right-pinned",t)}onLastLeftPinnedChanged(){if(!this.cellComp)return;const t=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass("ag-cell-last-left-pinned",t)}onCellFocused(t){if(this.beans.gos.get("suppressCellFocus"))return;const s=this.beans.focusService.isCellFocused(this.cellPosition);
1if(!this.cellComp)return void(s&&t?.forceBrowserFocus&&(this.focusEventToRestore=t));this.focusEventToRestore=void 0,this.cellComp.addOrRemoveCssClass("ag-cell-focus",s),s&&t&&t.forceBrowserFocus&&this.cellComp.getFocusableElement().focus({preventScroll:!!t.preventScrollOnBrowserFocus});const o="fullRow"===this.beans.gos.get("editType");!s&&!o&&this.editing&&this.stopRowOrCellEdit(),s&&this.rowCtrl.announceDescription()}createCellPosition(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:Ze(this.rowNode.rowPinned),column:this.column}}applyStaticCssClasses(){this.cellComp.addOrRemoveCssClass("ag-cell",!0),this.cellComp.addOrRemoveCssClass("ag-cell-not-inline-editing",!0);const t=1==this.column.isAutoHeight();this.cellComp.addOrRemoveCssClass("ag-cell-auto-height",t),this.cellComp.addOrRemoveCssClass("ag-cell-normal-height",!t)}onColumnHover(){if(!this.cellComp||!this.beans.gos.get("columnHoverHighlight"))return;const t=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass("ag-column-hover",t)}onColDefChanged(){if(this.cellComp)if(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing){const s=this.getCellEditor();if(s?.refresh){const{eventKey:o,cellStartedEdit:r}=this.editCompDetails.params,n=this.createCellEditorParams(o,r),l=this.column.getColDef(),a=this.beans.userComponentFactory.getCellEditorDetails(l,n);s.refresh(a.params)}}else this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0})}setWrapText(){const t=1==this.column.getColDef().wrapText;this.cellComp.addOrRemoveCssClass("ag-cell-wrap-text",t)}dispatchCellContextMenuEvent(t){const s=this.column.getColDef(),o=this.createEvent(t,g.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(o),s.onCellContextMenu&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{s.onCellContextMenu(o)})},0)}getCellRenderer(){return this.cellComp?this.cellComp.getCellRenderer():null}getCellEditor(){return this.cellComp?this.cellComp.getCellEditor():null}destroy(){this.onCellCompAttachedFuncs=[],super.destroy()}createSelectionCheckbox(){const t=new No;return this.beans.context.createBean(t),t.init({rowNode:this.rowNode,column:this.column}),t}createDndSource(){const t=new ld(this.rowNode,this.column,this.eGui);return this.beans.context.createBean(t),t}registerRowDragger(t,s,o){if(this.customRowDragComp)return void this.customRowDragComp.setDragElement(t,s);const r=this.createRowDragComp(t,s,o);r&&(this.customRowDragComp=r,this.addDestroyFunc(()=>{this.beans.context.destroyBean(r),this.customRowDragComp=null}))}createRowDragComp(t,s,o){const r=this.beans.gos.get("pagination"),n=this.beans.gos.get("rowDragManaged"),l=this.beans.gos.isRowModelType("clientSide");if(n){if(!l)return void O("managed row dragging is only allowed in the Client Side Row Model");if(r)return void O("managed row dragging is not possible when doing pagination")}const a=new jt(()=>this.value,this.rowNode,this.column,t,s,o);return this.beans.context.createBean(a),a}};return e.DOM_DATA_KEY_CELL_CTRL="cellCtrl",e})(),Qt=xc,Oc=0,_c=(()=>{let e=class rl extends b{constructor(t,s,o,r,n){super(),this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKeySanitised=null,this.beans=s,this.gos=s.gos,this.rowNode=t,this.paginationPage=s.paginationProxy.getCurrentPage(),this.useAnimationFrameForCreate=r,this.printLayout=n,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=t.id+"-"+Oc++,this.rowId=ae(t.id),this.initRowBusinessKey(),this.rowFocused=s.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=s.rowCssClassCalculator.calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(o),this.rowStyles=this.processStylesFromGridOptions(),this.isFullWidth()&&!this.gos.get("suppressCellFocus")&&(this.tabIndex=-1),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if("function"!=typeof this.businessKeyForNodeFunc)return;const t=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=ae(t)}getRowId(){return this.rowId}getRowStyles(){return this.rowStyles}getTabIndex(){return this.tabIndex}isSticky(){return this.rowNode.sticky}getInstanceId(){return this.instanceId}setComp(t,s,o){const r={rowComp:t,element:s,containerType:o};this.allRowGuis.push(r),"left"===o?this.leftGui=r:"right"===o?this.rightGui=r:"fullWidth"===o?this.fullWidthGui=r:this.centerGui=r,this.initialiseRowComp(r),"FullWidthLoading"!==this.rowType&&!this.rowNode.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(t){switch(this.allRowGuis=this.allRowGuis.filter(s=>s.containerType!==t),t){case"left":this.leftGui=void 0;break;case"right":this.rightGui=void 0;break;case"fullWidth":this.fullWidthGui=void 0;break;case"center":this.centerGui=void 0}}isCacheable(){return"FullWidthDetail"===this.rowType&&this.gos.get("keepDetailRows")}
1setCached(t){const s=t?"none":"";this.allRowGuis.forEach(o=>o.element.style.display=s)}initialiseRowComp(t){const s=this.gos;this.listenOnDomOrder(t),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights(),this.onRowHeightChanged(t),this.updateRowIndexes(t),this.setFocusedClasses(t),this.setStylesFromGridOptions(!1,t),s.isRowSelection()&&this.rowNode.selectable&&this.onRowSelected(t),this.updateColumnLists(!this.useAnimationFrameForCreate);const o=t.rowComp;this.getInitialRowClasses(t.containerType).forEach(n=>o.addOrRemoveCssClass(n,!0)),this.executeSlideAndFadeAnimations(t),this.rowNode.group&&wt(t.element,1==this.rowNode.expanded),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),s.setDomData(t.element,rl.DOM_DATA_KEY_ROW_CTRL,this),this.addDestroyFunc(()=>s.setDomData(t.element,rl.DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,t.element),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(t.element),this.isFullWidth()&&this.setupFullWidth(t),s.get("rowDragEntireRow")&&this.addRowDraggerToRow(t),this.useAnimationFrameForCreate&&this.beans.animationFrameService.addDestroyTask(()=>{this.isAlive()&&t.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(t){null!=this.businessKeySanitised&&t.setRowBusinessKey(this.businessKeySanitised)}getBusinessKey(){return this.businessKeySanitised}setRowCompRowId(t){this.rowId=ae(this.rowNode.id),null!=this.rowId&&t.setRowId(this.rowId)}executeSlideAndFadeAnimations(t){const{containerType:s}=t;this.slideInAnimation[s]&&(vr(()=>{this.onTopChanged()}),this.slideInAnimation[s]=!1),this.fadeInAnimation[s]&&(vr(()=>{t.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[s]=!1)}addRowDraggerToRow(t){if(this.gos.get("enableRangeSelection"))return void O("Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`");const s=this.beans.localeService.getLocaleTextFunc(),o=new jt(()=>`1 ${s("rowDragRow","row")}`,this.rowNode,void 0,t.element,void 0,!0),r=this.createBean(o,this.beans.context);this.rowDragComps.push(r)}setupFullWidth(t){const s=this.getPinnedForContainer(t.containerType);if("FullWidthDetail"==this.rowType&&!j.__assertRegistered("@ag-grid-enterprise/master-detail","cell renderer 'agDetailCellRenderer' (for master detail)",this.beans.context.getGridId()))return;const o=this.createFullWidthCompDetails(t.element,s);t.rowComp.showFullWidth(o)}isPrintLayout(){return this.printLayout}getFullWidthCellRenderers(){var t,s;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(o=>{var r;return null==(r=o?.rowComp)?void 0:r.getFullWidthCellRenderer()}):[null==(s=null==(t=this.fullWidthGui)?void 0:t.rowComp)?void 0:s.getFullWidthCellRenderer()]}getCellElement(t){const s=this.getCellCtrl(t);return s?s.getGui():null}executeProcessRowPostCreateFunc(){const t=this.gos.getCallback("processRowPostCreate");t&&this.areAllContainersReady()&&t({eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)})}areAllContainersReady(){const t=!!this.leftGui||!this.beans.columnModel.isPinningLeft(),s=!!this.centerGui,o=!!this.rightGui||!this.beans.columnModel.isPinningRight();return t&&s&&o}setRowType(){const t=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow"),s=this.rowNode.isFullWidthCell(),o=this.gos.get("masterDetail")&&this.rowNode.detail,r=this.beans.columnModel.isPivotMode(),l=!!this.rowNode.group&&!this.rowNode.footer&&this.gos.isGroupUseEntireRow(r);this.rowType=t?"FullWidthLoading":o?"FullWidthDetail":s?"FullWidth":l?"FullWidthGroup":"Normal"}updateColumnLists(t=!1,s=!1){this.isFullWidth()||(t||this.gos.get("suppressAnimationFrame")||this.printLayout?this.updateColumnListsImpl(s):this.updateColumnListsPending||(this.beans.animationFrameService.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0))}createCellCtrls(t,s,o=null){const r={list:[],map:{}},n=(l,a)=>{r.list.push(a),r.map[l]=a};
1return s.forEach(l=>{const a=l.getInstanceId();let u=t.map[a];u||(u=new Qt(l,this.rowNode,this.beans,this)),n(a,u)}),t.list.forEach(l=>{null==r.map[l.getColumn().getInstanceId()]&&(this.isCellEligibleToBeRemoved(l,o)?l.destroy():n(l.getColumn().getInstanceId(),l))}),r}updateColumnListsImpl(t){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(t)}setCellCtrls(t){this.allRowGuis.forEach(s=>{const o=this.getCellCtrlsForContainer(s.containerType);s.rowComp.setCellCtrls(o,t)})}getCellCtrlsForContainer(t){switch(t){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list;default:throw new Error(`Unhandled case: ${t}`)}}createAllCellCtrls(){const t=this.beans.columnModel;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.getAllDisplayedColumns()),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const s=t.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,s);const o=t.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,o,"left");const r=t.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,r,"right")}}isCellEligibleToBeRemoved(t,s){if(t.getColumn().getPinned()!=s)return!0;const l=t.isEditing(),a=this.beans.focusService.isCellFocused(t.getCellPosition());if(l||a){const h=t.getColumn();return!(this.beans.columnModel.getAllDisplayedColumns().indexOf(h)>=0)}return!0}getDomOrder(){return this.gos.get("ensureDomOrder")||this.gos.isDomLayout("print")}listenOnDomOrder(t){const s=()=>{t.rowComp.setDomOrder(this.getDomOrder())};this.addManagedPropertyListener("domLayout",s),this.addManagedPropertyListener("ensureDomOrder",s)}setAnimateFlags(t){if(this.isSticky()||!t)return;const s=y(this.rowNode.oldRowTop),o=this.beans.columnModel.isPinningLeft(),r=this.beans.columnModel.isPinningRight();if(s){if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(this.slideInAnimation.fullWidth=!0);this.slideInAnimation.center=!0,this.slideInAnimation.left=o,this.slideInAnimation.right=r}else{if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(this.fadeInAnimation.fullWidth=!0);this.fadeInAnimation.center=!0,this.fadeInAnimation.left=o,this.fadeInAnimation.right=r}}isEditing(){return this.editingRow}isFullWidth(){return"Normal"!==this.rowType}refreshFullWidth(){const t=(a,u)=>!a||a.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(a.element,u).params),s=t(this.fullWidthGui,null),o=t(this.centerGui,null),r=t(this.leftGui,"left"),n=t(this.rightGui,"right");return s&&o&&r&&n}addListeners(){this.addManagedListener(this.rowNode,B.EVENT_HEIGHT_CHANGED,()=>this.onRowHeightChanged()),this.addManagedListener(this.rowNode,B.EVENT_ROW_SELECTED,()=>this.onRowSelected()),this.addManagedListener(this.rowNode,B.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.rowNode.detail&&this.addManagedListener(this.rowNode.parent,B.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_CELL_CHANGED,this.postProcessCss.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_DRAGGING_CHANGED,this.postProcessRowDragging.bind(this)),this.addManagedListener(this.rowNode,B.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));const t=this.beans.eventService;this.addManagedListener(t,g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(t,g.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(t,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(t,g.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(t,g.EVENT_CELL_FOCUSED,this.onCellFocusChanged.bind(this)),this.addManagedListener(t,g.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusChanged.bind(this)),this.addManagedListener(t,g.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(t,g.EVENT_MODEL_UPDATED,this.refreshFirstAndLastRowStyles.bind(this)),this.addManagedListener(t,g.EVENT_COLUMN_MOVED,this.updateColumnLists.bind(this)),this.addDestroyFunc(()=>{this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context))}),this.addManagedPropertyListeners(["rowDragEntireRow"],()=>{this.gos.get("rowDragEntireRow")?this.allRowGuis.forEach(o=>{this.addRowDraggerToRow(o)}):(this.destroyBeans(this.rowDragComps,this.beans.context),this.rowDragComps=[])}),this.addListenersForCellComps()}
1addListenersForCellComps(){this.addManagedListener(this.rowNode,B.EVENT_ROW_INDEX_CHANGED,()=>{this.getAllCellCtrls().forEach(t=>t.onRowIndexChanged())}),this.addManagedListener(this.rowNode,B.EVENT_CELL_CHANGED,t=>{this.getAllCellCtrls().forEach(s=>s.onCellChanged(t))})}onRowNodeDataChanged(t){this.isFullWidth()===!!this.rowNode.isFullWidthCell()?this.isFullWidth()?this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode):(this.getAllCellCtrls().forEach(o=>o.refreshCell({suppressFlash:!t.update,newData:!t.update})),this.allRowGuis.forEach(o=>{this.setRowCompRowId(o.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(o.rowComp)}),this.onRowSelected(),this.postProcessCss()):this.beans.rowRenderer.redrawRow(this.rowNode)}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const t=this.rowNode.highlighted;this.allRowGuis.forEach(s=>{const r=1===t;s.rowComp.addOrRemoveCssClass("ag-row-highlight-above",0===t),s.rowComp.addOrRemoveCssClass("ag-row-highlight-below",r)})}postProcessRowDragging(){const t=this.rowNode.dragging;this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-row-dragging",t))}updateExpandedCss(){const t=this.rowNode.isExpandable(),s=1==this.rowNode.expanded;this.allRowGuis.forEach(o=>{o.rowComp.addOrRemoveCssClass("ag-row-group",t),o.rowComp.addOrRemoveCssClass("ag-row-group-expanded",t&&s),o.rowComp.addOrRemoveCssClass("ag-row-group-contracted",t&&!s),wt(o.element,t&&s)})}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Ze(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(t){const s=this.allRowGuis.find(u=>u.element.contains(t.target));if((s?s.element:null)!==t.target)return;const n=this.rowNode,l=this.beans.focusService.getFocusedCell();this.beans.navigationService.navigateToNextCell(t,t.key,{rowIndex:n.rowIndex,rowPinned:n.rowPinned,column:l&&l.column},!0),t.preventDefault()}onTabKeyDown(t){if(t.defaultPrevented||it(t))return;const s=this.allRowGuis.find(l=>l.element.contains(t.target)),o=s?s.element:null,r=o===t.target;let n=null;r||(n=this.beans.focusService.findNextFocusableElement(o,!1,t.shiftKey)),(this.isFullWidth()&&r||!n)&&this.beans.navigationService.onTabKeyDown(this,t)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var t;const s=null==(t=this.allRowGuis.find(o=>Ie(o.element)))?void 0:t.element;return s?s.getBoundingClientRect().top:0}onFullWidthRowFocused(t){var s;const o=this.rowNode,r=!!t&&this.isFullWidth()&&t.rowIndex===o.rowIndex&&t.rowPinned==o.rowPinned,n=this.fullWidthGui?this.fullWidthGui.element:null==(s=this.centerGui)?void 0:s.element;n&&(n.classList.toggle("ag-full-width-focus",r),r&&n.focus({preventScroll:!0}))}recreateCell(t){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,t),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,t),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,t),t.destroy(),this.updateColumnLists()}removeCellCtrl(t,s){const o={list:[],map:{}};return t.list.forEach(r=>{r!==s&&(o.list.push(r),o.map[r.getColumn().getInstanceId()]=r)}),o}onMouseEvent(t,s){switch(t){case"dblclick":this.onRowDblClick(s);break;case"click":this.onRowClick(s);break;case"touchstart":case"mousedown":this.onRowMouseDown(s)}}createRowEvent(t,s){return this.gos.addGridCommonParams({type:t,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,event:s})}createRowEventWithSource(t,s){const o=this.createRowEvent(t,s);return o.source=this,o}onRowDblClick(t){if(it(t))return;const s=this.createRowEventWithSource(g.EVENT_ROW_DOUBLE_CLICKED,t);this.beans.eventService.dispatchEvent(s)}onRowMouseDown(t){if(this.lastMouseDownOnDragger=Wt(t.target,"ag-row-drag",3),!this.isFullWidth())return;const s=this.rowNode,o=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:s.rowIndex,column:o.getAllDisplayedColumns()[0],rowPinned:s.rowPinned,forceBrowserFocus:!0})}onRowClick(t){if(it(t)||this.lastMouseDownOnDragger)return;const o=this.createRowEventWithSource(g.EVENT_ROW_CLICKED,t);this.beans.eventService.dispatchEvent(o);const r=t.ctrlKey||t.metaKey,n=t.shiftKey;if(this.gos.get("groupSelectsChildren")&&this.rowNode.group||this.isRowSelectionBlocked()||this.gos.get("suppressRowClickSelection"))return;const a=this.gos.get("rowMultiSelectWithClick"),u=!this.gos.get("suppressRowDeselection"),h="rowClicked";this.rowNode.isSelected()?a?this.rowNode.setSelectedParams({newValue:!1,event:t,source:h}):r?u&&this.rowNode.setSelectedParams({newValue:!1,event:t,source:h}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!n,rangeSelect:n,event:t,source:h}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!a&&!r,rangeSelect:n,event:t,source:h})}isRowSelectionBlocked(){return!this.rowNode.selectable||!!this.rowNode.rowPinned||!this.gos.isRowSelection()}setupDetailRowAutoHeight(t){if("FullWidthDetail"!==this.rowType||!this.gos.get("detailRowAutoHeight"))return;const s=()=>{const r=t.clientHeight;null!=r&&r>0&&window.setTimeout(()=>{this.rowNode.setRowHeight(r),this.beans.clientSideRowModel?this.beans.clientSideRowModel.onRowHeightChanged():this.beans.serverSideRowModel&&this.beans.serverSideRowModel.onRowHeightChanged()},0)},o=this.beans.resizeObserverService.observeResize(t,s);this.addDestroyFunc(o),s()}
1createFullWidthCompDetails(t,s){const o=this.gos.addGridCommonParams({fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,eGridCell:t,eParentOfValue:t,pinned:s,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,n,l,a)=>this.addFullWidthRowDragging(r,n,l,a),setTooltip:(r,n)=>this.refreshRowTooltip(r,n)});switch(this.rowType){case"FullWidthDetail":return this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(o);case"FullWidthGroup":return this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(o);case"FullWidthLoading":return this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(o);default:return this.beans.userComponentFactory.getFullWidthCellRendererDetails(o)}}refreshRowTooltip(t,s){if(!this.fullWidthGui)return;const o={getGui:()=>this.fullWidthGui.element,getTooltipValue:()=>t,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:s};this.tooltipFeature&&this.destroyBean(this.tooltipFeature,this.beans.context),this.tooltipFeature=this.createBean(new Et(o,this.beans))}addFullWidthRowDragging(t,s,o="",r){if(!this.isFullWidth())return;const n=new jt(()=>o,this.rowNode,void 0,t,s,r);this.createBean(n,this.beans.context),this.addDestroyFunc(()=>{this.destroyBean(n,this.beans.context)})}onUiLevelChanged(){const t=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=t){const s="ag-row-level-"+t,o="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(r=>{r.rowComp.addOrRemoveCssClass(s,!0),r.rowComp.addOrRemoveCssClass(o,!1)})}this.rowLevel=t}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()}refreshFirstAndLastRowStyles(){const t=this.isFirstRowOnPage(),s=this.isLastRowOnPage();this.firstRowOnPage!==t&&(this.firstRowOnPage=t,this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass("ag-row-first",t))),this.lastRowOnPage!==s&&(this.lastRowOnPage=s,this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass("ag-row-last",s)))}stopEditing(t=!1){if(this.stoppingRowEdit)return;const s=this.getAllCellCtrls(),o=this.editingRow;this.stoppingRowEdit=!0;let r=!1;for(const n of s){const l=n.stopEditing(t);o&&!t&&!r&&l&&(r=!0)}if(r){const n=this.createRowEvent(g.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(n)}o&&this.setEditingRow(!1),this.stoppingRowEdit=!1}setInlineEditingCss(t){this.allRowGuis.forEach(s=>{s.rowComp.addOrRemoveCssClass("ag-row-inline-editing",t),s.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!t)})}setEditingRow(t){this.editingRow=t,this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass("ag-row-editing",t));const s=this.createRowEvent(t?g.EVENT_ROW_EDITING_STARTED:g.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(s)}startRowEditing(t=null,s=null,o=null){this.editingRow||this.getAllCellCtrls().reduce((n,l)=>{const a=l===s;return l.startEditing(a?t:null,a,o),!!n||l.isEditing()},!1)&&this.setEditingRow(!0)}getAllCellCtrls(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const t=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);!t||!t.length||t.forEach(s=>{this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass(s,!0))})}postProcessRowClassRules(){this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,t=>{this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass(t,!0))},t=>{this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass(t,!1))})}setStylesFromGridOptions(t,s){t&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(s,o=>o.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(t){return"left"===t?"left":"right"===t?"right":null}getInitialRowClasses(t){const s=this.getPinnedForContainer(t),o={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[t],rowIsEven:this.rowNode.rowIndex%2==0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:s};return this.beans.rowCssClassCalculator.getInitialRowClasses(o)}processStylesFromGridOptions(){const t=this.gos.get("rowStyle");if(t&&"function"==typeof t)return void console.warn("AG Grid: rowStyle should be an object of
1key/value styles, not be a function, use getRowStyle() instead");const s=this.gos.getCallback("getRowStyle");let o;return s&&(o=s({data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex})),o||t?Object.assign({},t,o):this.emptyStyle}onRowSelected(t){const s=!!this.rowNode.isSelected();this.forEachGui(t,o=>{o.rowComp.addOrRemoveCssClass("ag-row-selected",s),Di(o.element,s),o.element.contains(this.beans.gos.getActiveDomElement())&&(o===this.centerGui||o===this.fullWidthGui)&&this.announceDescription()})}announceDescription(){if(this.isRowSelectionBlocked())return;const t=this.rowNode.isSelected();if(t&&this.beans.gos.get("suppressRowDeselection"))return;const o=this.beans.localeService.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row.`);this.beans.ariaAnnouncementService.announceValue(o)}addHoverFunctionality(t){this.active&&(this.addManagedListener(t,"mouseenter",()=>this.rowNode.onMouseEnter()),this.addManagedListener(t,"mouseleave",()=>this.rowNode.onMouseLeave()),this.addManagedListener(this.rowNode,B.EVENT_MOUSE_ENTER,()=>{!this.beans.dragService.isDragging()&&!this.gos.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),this.rowNode.setHovered(!0))}),this.addManagedListener(this.rowNode,B.EVENT_MOUSE_LEAVE,()=>{t.classList.remove("ag-row-hover"),this.rowNode.setHovered(!1)}))}roundRowTopToBounds(t){const s=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getApproximateVScollPosition(),o=this.applyPaginationOffset(s.top,!0)-100,r=this.applyPaginationOffset(s.bottom,!0)+100;return Math.min(Math.max(o,t),r)}getFrameworkOverrides(){return this.beans.frameworkOverrides}forEachGui(t,s){t?s(t):this.allRowGuis.forEach(s)}onRowHeightChanged(t){if(null==this.rowNode.rowHeight)return;const s=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),n=this.gos.isGetRowHeightFunction()?this.gos.getRowHeightForNode(this.rowNode).height:void 0,l=n?Math.min(o,n)-2+"px":void 0;this.forEachGui(t,a=>{a.element.style.height=`${s}px`,l&&a.element.style.setProperty("--ag-line-height",l)})}addEventListener(t,s){super.addEventListener(t,s)}removeEventListener(t,s){super.removeEventListener(t,s)}destroyFirstPass(t=!1){if(this.active=!1,!t&&this.gos.isAnimateRows()&&!this.isSticky())if(null!=this.rowNode.rowTop){const r=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(r)}else this.allRowGuis.forEach(r=>r.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.rowNode.setHovered(!1);const s=this.createRowEvent(g.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(s),this.beans.eventService.dispatchEvent(s),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.stopEditing();const t=s=>(s.list.forEach(o=>o.destroy()),{list:[],map:{}});this.centerCellCtrls=t(this.centerCellCtrls),this.leftCellCtrls=t(this.leftCellCtrls),this.rightCellCtrls=t(this.rightCellCtrls)}setFocusedClasses(t){this.forEachGui(t,s=>{s.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),s.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const t=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses()),!t&&this.editingRow&&this.stopEditing(!1)}onPaginationChanged(){const t=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==t&&(this.paginationPage=t,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(t,s=!1){return this.rowNode.isRowPinned()||this.rowNode.sticky?t:t+this.beans.paginationProxy.getPixelOffset()*(s?1:-1)}setRowTop(t){if(!this.printLayout&&y(t)){const s=this.applyPaginationOffset(t),n=`${this.rowNode.isRowPinned()||this.rowNode.sticky?s:this.beans.rowContainerHeightService.getRealPixelPosition(s)}px`;this.setRowTopStyle(n)}}getInitialRowTop(t){return this.suppressRowTransform?this.getInitialRowTopShared(t):void 0}getInitialTransform(t){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(t)})`}getInitialRowTopShared(t){if(this.printLayout)return"";let s;if(this.isSticky())s=this.rowNode.stickyRowTop;else{const o=this.slideInAnimation[t]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,r=this.applyPaginationOffset(o);s=this.rowNode.isRowPinned()?r:this.beans.rowContainerHeightService.getRealPixelPosition(r)}return s+"px"}setRowTopStyle(t){this.allRowGuis.forEach(s=>this.suppressRowTransform?s.rowComp.setTop(t):s.rowComp.setTransform(`translateY(${t})`))}getRowNode(){return this.rowNode}getCellCtrl(t){let s=null;
1return this.getAllCellCtrls().forEach(o=>{o.getColumn()==t&&(s=o)}),null!=s||this.getAllCellCtrls().forEach(o=>{o.getColSpanningList().indexOf(t)>=0&&(s=o)}),s}onRowIndexChanged(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}getRowIndex(){return this.rowNode.getRowIndexString()}updateRowIndexes(t){const s=this.rowNode.getRowIndexString(),o=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount(),r=this.rowNode.rowIndex%2==0,n=o+this.rowNode.rowIndex+1;this.forEachGui(t,l=>{l.rowComp.setRowIndex(s),l.rowComp.addOrRemoveCssClass("ag-row-even",r),l.rowComp.addOrRemoveCssClass("ag-row-odd",!r),xr(l.element,n)})}};return e.DOM_DATA_KEY_ROW_CTRL="renderedRow",e})(),Xt=_c,Ne=class extends b{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()}addKeyboardListeners(){const e="keydown",i=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,i)}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",Ar("touchstart")?"touchstart":"mousedown"].forEach(t=>{const s=this.processMouseEvent.bind(this,t);this.addManagedListener(this.element,t,s)})}processMouseEvent(e,i){if(!this.mouseEventService.isEventFromThisGrid(i)||it(i))return;const t=this.getRowForEvent(i),s=this.mouseEventService.getRenderedCellForEvent(i);"contextmenu"===e?this.handleContextMenuMouseEvent(i,void 0,t,s):(s&&s.onMouseEvent(e,i),t&&t.onMouseEvent(e,i))}mockContextMenuForIPad(){if(!St())return;const e=new ge(this.element);this.addManagedListener(e,ge.EVENT_LONG_TAP,t=>{const s=this.getRowForEvent(t.touchEvent),o=this.mouseEventService.getRenderedCellForEvent(t.touchEvent);this.handleContextMenuMouseEvent(void 0,t.touchEvent,s,o)}),this.addDestroyFunc(()=>e.destroy())}getRowForEvent(e){let i=e.target;for(;i;){const t=this.gos.getDomData(i,Xt.DOM_DATA_KEY_ROW_CTRL);if(t)return t;i=i.parentElement}return null}handleContextMenuMouseEvent(e,i,t,s){const o=t?t.getRowNode():null,r=s?s.getColumn():null;let n=null;r&&(s.dispatchCellContextMenuEvent((e||i)??null),n=this.valueService.getValue(r,o));const l=this.ctrlsService.getGridBodyCtrl(),a=s?s.getGui():l.getGridBodyElement();this.menuService.showContextMenu({mouseEvent:e,touchEvent:i,rowNode:o,column:r,value:n,anchorToElement:a})}getControlsForEventTarget(e){return{cellCtrl:co(this.gos,e,Qt.DOM_DATA_KEY_CELL_CTRL),rowCtrl:co(this.gos,e,Xt.DOM_DATA_KEY_ROW_CTRL)}}processKeyboardEvent(e,i){const{cellCtrl:t,rowCtrl:s}=this.getControlsForEventTarget(i.target);i.defaultPrevented||(t?this.processCellKeyboardEvent(t,e,i):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,i))}processCellKeyboardEvent(e,i,t){const s=e.getRowNode(),o=e.getColumn(),r=e.isEditing();if(!Do(this.gos,t,s,o,r)&&"keydown"===i&&(!r&&this.navigationService.handlePageScrollingKey(t)||e.onKeyDown(t),this.doGridOperations(t,e.isEditing()),Ro(t)&&e.processCharacter(t)),"keydown"===i){const l=e.createEvent(t,g.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(l)}}processFullWidthRowKeyboardEvent(e,i,t){const s=e.getRowNode(),o=this.focusService.getFocusedCell();if(!Do(this.gos,t,s,o&&o.column,!1)&&"keydown"===i)switch(t.key){case v.PAGE_HOME:case v.PAGE_END:case v.PAGE_UP:case v.PAGE_DOWN:this.navigationService.handlePageScrollingKey(t,!0);break;case v.UP:case v.DOWN:e.onKeyboardNavigate(t);break;case v.TAB:e.onTabKeyDown(t)}if("keydown"===i){const l=e.createRowEvent(g.EVENT_CELL_KEY_DOWN,t);this.eventService.dispatchEvent(l)}}doGridOperations(e,i){if(!e.ctrlKey&&!e.metaKey||i||!this.mouseEventService.isEventFromThisGrid(e))return;const t=Sa(e);return t===v.A?this.onCtrlAndA(e):t===v.C?this.onCtrlAndC(e):t===v.D?this.onCtrlAndD(e):t===v.V?this.onCtrlAndV(e):t===v.X?this.onCtrlAndX(e):t===v.Y?this.onCtrlAndY():t===v.Z?this.onCtrlAndZ(e):void 0}onCtrlAndA(e){const{pinnedRowModel:i,paginationProxy:t,rangeService:s}=this;if(s&&t.isRowsToRender()){const[o,r]=[i.isEmpty("top"),i.isEmpty("bottom")],n=o?null:"top";let l,a;r?(l=null,a=this.paginationProxy.getRowCount()-1):(l="bottom",a=i.getPinnedBottomRowData().length-1);const u=this.columnModel.getAllDisplayedColumns();if(Fe(u))return;s.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:a,rowEndPinned:l,columnStart:u[0],columnEnd:$(u)})}e.preventDefault()}onCtrlAndC(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:i,rowCtrl:t}=this.getControlsForEventTarget(e.target);i?.isEditing()||t?.isEditing()||(e.preventDefault(),this.clipboardService.copyToClipboard())}onCtrlAndX(e){if(!this.clipboardService||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:i,rowCtrl:t}=this.getControlsForEventTarget(e.target);i?.isEditing()||t?.isEditing()||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}onCtrlAndV(e){const{cellCtrl:i,rowCtrl:t}=this.getControlsForEventTarget(e.target);i?.isEditing()||t?.isEditing()||this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()}onCtrlAndD(e){this.clipboardService&&!this.gos.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()}onCtrlAndZ(e){this.gos.get("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))}onCtrlAndY(){this.undoRedoService.redo("ui")}
1};d([p("mouseEventService")],Ne.prototype,"mouseEventService",2),d([p("valueService")],Ne.prototype,"valueService",2),d([p("menuService")],Ne.prototype,"menuService",2),d([p("ctrlsService")],Ne.prototype,"ctrlsService",2),d([p("navigationService")],Ne.prototype,"navigationService",2),d([p("focusService")],Ne.prototype,"focusService",2),d([p("undoRedoService")],Ne.prototype,"undoRedoService",2),d([p("columnModel")],Ne.prototype,"columnModel",2),d([p("paginationProxy")],Ne.prototype,"paginationProxy",2),d([p("pinnedRowModel")],Ne.prototype,"pinnedRowModel",2),d([q("rangeService")],Ne.prototype,"rangeService",2),d([q("clipboardService")],Ne.prototype,"clipboardService",2),d([T],Ne.prototype,"postConstruct",1);var Gi=class extends b{constructor(e){super(),this.centerContainerCtrl=e}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedListener(this.eventService,g.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this)),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const e=()=>this.onCenterViewportResized();this.centerContainerCtrl.registerViewportResizeListener(e),this.gridBodyCtrl.registerBodyViewportResizeListener(e)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.centerContainerCtrl.isViewportInTheDOMTree()){this.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}keepPinnedColumnsNarrowerThanViewport(){const i=Ut(this.gridBodyCtrl.getBodyViewportElement());if(i<=50)return;let t=this.getPinnedColumnsOverflowingViewport(i-50);const s=this.gos.getCallback("processUnpinnedColumns");t.length&&(s&&(t=s({columns:t,viewportWidth:i})),this.columnModel.setColumnsPinned(t,null,"viewportSizeFeature"))}getPinnedColumnsOverflowingViewport(e){const s=this.pinnedWidthService.getPinnedRightWidth()+this.pinnedWidthService.getPinnedLeftWidth();if(s<e)return[];const o=[...this.columnModel.getDisplayedLeftColumns()],r=[...this.columnModel.getDisplayedRightColumns()];let n=0,l=0;const u=[];let h=s-0-e;for(;(l<o.length||n<r.length)&&h>0;){if(n<r.length){const c=r[n++];h-=c.getActualWidth(),u.push(c)}if(l<o.length&&h>0){const c=o[l++];h-=c.getActualWidth(),u.push(c)}}return u}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const i=ps(this.gridBodyCtrl.getBodyViewportElement());this.bodyHeight!==i&&(this.bodyHeight=i,this.eventService.dispatchEvent({type:g.EVENT_BODY_HEIGHT_CHANGED}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)}isHorizontalScrollShowing(){return this.centerContainerCtrl.isHorizontalScrollShowing()}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),i=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,i)}};d([p("ctrlsService")],Gi.prototype,"ctrlsService",2),d([p("pinnedWidthService")],Gi.prototype,"pinnedWidthService",2),d([p("columnModel")],Gi.prototype,"columnModel",2),d([p("scrollVisibleService")],Gi.prototype,"scrollVisibleService",2),d([T],Gi.prototype,"postConstruct",1);var Fn=class extends b{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))}onPinnedLeftWidthChanged(){const e=this.pinnedWidthService.getPinnedLeftWidth();z(this.element,e>0),Ye(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedLeftWidth()}};d([p("pinnedWidthService")],Fn.prototype,"pinnedWidthService",2),d([T],Fn.prototype,"postConstruct",1);var Pn=class extends b{constructor(e){super(),this.element=e}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))}onPinnedRightWidthChanged(){const e=this.pinnedWidthService.getPinnedRightWidth();z(this.element,e>0),Ye(this.element,e)}getWidth(){return this.pinnedWidthService.getPinnedRightWidth()}};d([p("pinnedWidthService")],Pn.prototype,"pinnedWidthService",2),d([T],Pn.prototype,"postConstruct",1);var Ho=class extends b{constructor(e,i){super(),this.eContainer=e,this.eViewport=i}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))}onHeightChanged(){const e=this.maxDivHeightScaler.getUiContainerHeight(),i=null!=e?`${e}px`:"";this.eContainer.style.height=i,this.eViewport&&(this.eViewport.style.height=i)}};d([p("rowContainerHeightService")],Ho.prototype,"maxDivHeightScaler",2),d([T],Ho.prototype,"postConstruct",1);var ko=class extends b{constructor(e){super(),this.eContainer=e}postConstruct(){this.rangeService&&(this.params={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)},this.addManagedPropertyListener("enableRangeSelection",i=>
1{i.currentValue?this.enableFeature():this.disableFeature()}),this.addDestroyFunc(()=>this.disableFeature()),this.gos.get("enableRangeSelection")&&this.enableFeature())}enableFeature(){this.dragService.addDragSource(this.params)}disableFeature(){this.dragService.removeDragSource(this.params)}};d([p("dragService")],ko.prototype,"dragService",2),d([q("rangeService")],ko.prototype,"rangeService",2),d([T],ko.prototype,"postConstruct",1);var Ni=class extends b{constructor(e,i=!1){super(),this.callback=e,this.addSpacer=i}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,g.EVENT_COLUMN_CONTAINER_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()}setWidth(){const{columnModel:e}=this,i=this.gos.isDomLayout("print"),t=e.getBodyContainerWidth(),s=e.getDisplayedColumnsLeftWidth(),o=e.getDisplayedColumnsRightWidth();let r;i?r=t+s+o:(r=t,this.addSpacer&&0===(this.gos.get("enableRtl")?s:o)&&this.scrollVisibleService.isVerticalScrollShowing()&&(r+=this.gos.getScrollbarWidth())),this.callback(r)}};d([p("columnModel")],Ni.prototype,"columnModel",2),d([p("scrollVisibleService")],Ni.prototype,"scrollVisibleService",2),d([T],Ni.prototype,"postConstruct",1);var Bc=At([["center","ag-center-cols-container"],["left","ag-pinned-left-cols-container"],["right","ag-pinned-right-cols-container"],["fullWidth","ag-full-width-container"],["topCenter","ag-floating-top-container"],["topLeft","ag-pinned-left-floating-top"],["topRight","ag-pinned-right-floating-top"],["topFullWidth","ag-floating-top-full-width-container"],["stickyTopCenter","ag-sticky-top-container"],["stickyTopLeft","ag-pinned-left-sticky-top"],["stickyTopRight","ag-pinned-right-sticky-top"],["stickyTopFullWidth","ag-sticky-top-full-width-container"],["stickyBottomCenter","ag-sticky-bottom-container"],["stickyBottomLeft","ag-pinned-left-sticky-bottom"],["stickyBottomRight","ag-pinned-right-sticky-bottom"],["stickyBottomFullWidth","ag-sticky-bottom-full-width-container"],["bottomCenter","ag-floating-bottom-container"],["bottomLeft","ag-pinned-left-floating-bottom"],["bottomRight","ag-pinned-right-floating-bottom"],["bottomFullWidth","ag-floating-bottom-full-width-container"]]),Wc=At([["center","ag-center-cols-viewport"],["topCenter","ag-floating-top-viewport"],["stickyTopCenter","ag-sticky-top-viewport"],["bottomCenter","ag-floating-bottom-viewport"],["stickyBottomCenter","ag-sticky-bottom-viewport"]]),Zt=class eu extends b{constructor(i){super(),this.visible=!0,this.EMPTY_CTRLS=[],this.name=i,this.isFullWithContainer="topFullWidth"===this.name||"stickyTopFullWidth"===this.name||"stickyBottomFullWidth"===this.name||"bottomFullWidth"===this.name||"fullWidth"===this.name}static getRowContainerCssClasses(i){return{container:Bc.get(i),viewport:Wc.get(i)}}static getPinned(i){switch(i){case"bottomLeft":case"topLeft":case"stickyTopLeft":case"stickyBottomLeft":case"left":return"left";case"bottomRight":case"topRight":case"stickyTopRight":case"stickyBottomRight":case"right":return"right";default:return null}}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>this.viewportSizeFeature=this.createManagedBean(new Gi(this)))}registerWithCtrlsService(){switch(this.name){case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return;default:this.ctrlsService.register(this.name,this)}}forContainers(i,t){i.indexOf(this.name)>=0&&t()}getContainerElement(){return this.eContainer}getViewportSizeFeature(){return this.viewportSizeFeature}setComp(i,t,s){this.comp=i,this.eContainer=t,this.eViewport=s,this.createManagedBean(new Ne(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();this.forContainers(["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],()=>{this.pinnedWidthFeature=this.createManagedBean(new Fn(this.eContainer)),this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,(
1)=>this.onPinnedWidthChanged())}),this.forContainers(["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],()=>{this.pinnedWidthFeature=this.createManagedBean(new Pn(this.eContainer)),this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,()=>this.onPinnedWidthChanged())}),this.forContainers(["center","left","right","fullWidth"],()=>this.createManagedBean(new Ho(this.eContainer,"center"===this.name?s:void 0))),this.forContainers(["topCenter","topLeft","topRight","bottomCenter","bottomLeft","bottomRight","center","left","right","stickyTopCenter","stickyTopLeft","stickyTopRight","stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],()=>this.createManagedBean(new ko(this.eContainer))),this.forContainers(["center","topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],()=>this.createManagedBean(new Ni(C=>this.comp.setContainerWidth(`${C}px`)))),this.addListeners(),this.registerWithCtrlsService()}addListeners(){this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>this.onDisplayedColumnsChanged()),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>this.onDisplayedColumnsWidthChanged()),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_ROWS_CHANGED,i=>this.onDisplayedRowsChanged(i.afterScroll)),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if(["stickyTopCenter","stickyTopLeft","stickyTopRight","stickyTopFullWidth","stickyBottomCenter","stickyBottomLeft","stickyBottomRight","stickyBottomFullWidth"].indexOf(this.name)>=0)return void this.comp.setDomOrder(!0);const s=()=>{const o=this.gos.get("ensureDomOrder"),r=this.gos.isDomLayout("print");this.comp.setDomOrder(o||r)};this.addManagedPropertyListener("domLayout",s),s()}stopHScrollOnPinnedRows(){this.forContainers(["topCenter","stickyTopCenter","bottomCenter","stickyBottomCenter"],()=>{this.addManagedListener(this.eViewport,"scroll",()=>this.eViewport.scrollLeft=0)})}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}onDisplayedColumnsWidthChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const i=t=>{this.dragService.isDragging()&&t.cancelable&&t.preventDefault()};this.eContainer.addEventListener("touchmove",i,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",i))}onHorizontalViewportChanged(i=!1){const t=this.getCenterWidth(),s=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(t,s,i)}getCenterWidth(){return Ut(this.eViewport)}getCenterViewportScrollLeft(){return ms(this.eViewport,this.enableRtl)}registerViewportResizeListener(i){const t=this.resizeObserverService.observeResize(this.eViewport,i);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return on(this.eViewport)}getViewportScrollLeft(){return ms(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||ua(this.eViewport)}getViewportElement(){return this.eViewport}setContainerTranslateX(i){this.eContainer.style.transform=`translateX(${i}px)`}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(i){Cs(this.eViewport,i,this.enableRtl)}isContainerVisible(){return!eu.getPinned(this.name)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const i=this.isContainerVisible();this.visible!=i&&(this.visible=i,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(i=!1){const t=this.getRowCtrls();if(!this.visible||0===t.length)return void this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});const s=this.gos.isDomLayout("print"),r=this.gos.get("embedFullWidthRows")||s,n=t.filter(l=>{const a=l.isFullWidth();return this.isFullWithContainer?!r&&a:r||!a});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:i})}getRowCtrls(){switch(this.name){case"topCenter":case"topLeft":case"topRight":case"topFullWidth":return this.rowRenderer.getTopRowCtrls();case"stickyTopCenter":case"stickyTopLeft":case"stickyTopRight":case"stickyTopFullWidth":return this.rowRenderer.getStickyTopRowCtrls();case"stickyBottomCenter":case"stickyBottomLeft":case"stickyBottomRight":case"stickyBottomFullWidth":return this.rowRenderer.getStickyBottomRowCtrls();case"bottomCenter":case"bottomLeft":case"bottomRight":case"bottomFullWidth":return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls()}}};d([p("dragService")],Zt.prototype,"dragService",2),d([p("ctrlsService")],Zt.prototype,"ctrlsService",2),d([p("columnModel")],Zt.prototype,"columnModel",2),d([p("resizeObserverService")],Zt.prototype,"resizeObserverService",2),d([p("rowRenderer")],Zt.prototype,"rowRenderer",2),d([T],Zt.prototype,"postConstruct",1);var ad=Zt,nt=class extends V{constructor(){super('<div class="ag-root ag-unselectable" role="treegrid">\n <ag-header-root ref="gridHeader"></ag-header-root>\n <div class="ag-floating-top" ref="eTop" role="presentation">\n <ag-row-container ref="topLeftContainer" name="topLeft"></ag-row-container>\n <ag-row-container ref="topCenterContainer" name="topCenter"></ag-row-container>\n <ag-row-container ref="topRightContainer" name="top
1Right"></ag-row-container>\n <ag-row-container ref="topFullWidthContainer" name="topFullWidth"></ag-row-container>\n </div>\n <div class="ag-body" ref="eBody" role="presentation">\n <div class="ag-body-viewport" ref="eBodyViewport" role="presentation">\n <ag-row-container ref="leftContainer" name="left"></ag-row-container>\n <ag-row-container ref="centerContainer" name="center"></ag-row-container>\n <ag-row-container ref="rightContainer" name="right"></ag-row-container>\n <ag-row-container ref="fullWidthContainer" name="fullWidth"></ag-row-container>\n </div>\n <ag-fake-vertical-scroll></ag-fake-vertical-scroll>\n </div>\n <div class="ag-sticky-top" ref="eStickyTop" role="presentation">\n <ag-row-container ref="stickyTopLeftContainer" name="stickyTopLeft"></ag-row-container>\n <ag-row-container ref="stickyTopCenterContainer" name="stickyTopCenter"></ag-row-container>\n <ag-row-container ref="stickyTopRightContainer" name="stickyTopRight"></ag-row-container>\n <ag-row-container ref="stickyTopFullWidthContainer" name="stickyTopFullWidth"></ag-row-container>\n </div>\n <div class="ag-sticky-bottom" ref="eStickyBottom" role="presentation">\n <ag-row-container ref="stickyBottomLeftContainer" name="stickyBottomLeft"></ag-row-container>\n <ag-row-container ref="stickyBottomCenterContainer" name="stickyBottomCenter"></ag-row-container>\n <ag-row-container ref="stickyBottomRightContainer" name="stickyBottomRight"></ag-row-container>\n <ag-row-container ref="stickyBottomFullWidthContainer" name="stickyBottomFullWidth"></ag-row-container>\n </div>\n <div class="ag-floating-bottom" ref="eBottom" role="presentation">\n <ag-row-container ref="bottomLeftContainer" name="bottomLeft"></ag-row-container>\n <ag-row-container ref="bottomCenterContainer" name="bottomCenter"></ag-row-container>\n <ag-row-container ref="bottomRightContainer" name="bottomRight"></ag-row-container>\n <ag-row-container ref="bottomFullWidthContainer" name="bottomFullWidth"></ag-row-container>\n </div>\n <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>\n <ag-overlay-wrapper></ag-overlay-wrapper>\n </div>')}init(){const e=(t,s)=>{const o=`${t}px`;s.style.minHeight=o,s.style.height=o},i={setRowAnimationCssOnBodyViewport:(t,s)=>this.setRowAnimationCssOnBodyViewport(t,s),setColumnCount:t=>Yl(this.getGui(),t),setRowCount:t=>$l(this.getGui(),t),setTopHeight:t=>e(t,this.eTop),setBottomHeight:t=>e(t,this.eBottom),setTopDisplay:t=>this.eTop.style.display=t,setBottomDisplay:t=>this.eBottom.style.display=t,setStickyTopHeight:t=>this.eStickyTop.style.height=t,setStickyTopTop:t=>this.eStickyTop.style.top=t,setStickyTopWidth:t=>this.eStickyTop.style.width=t,setStickyBottomHeight:t=>this.eStickyBottom.style.height=t,setStickyBottomBottom:t=>this.eStickyBottom.style.bottom=t,setStickyBottomWidth:t=>this.eStickyBottom.style.width=t,setColumnMovingCss:(t,s)=>this.addOrRemoveCssClass(t,s),updateLayoutClasses:(t,s)=>{[this.eBodyViewport.classList,this.eBody.classList].forEach(r=>{r.toggle("ag-layout-auto-height",s.autoHeight),r.toggle("ag-layout-normal",s.normal),r.toggle("ag-layout-print",s.print)}),this.addOrRemoveCssClass("ag-layout-auto-height",s.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",s.normal),this.addOrRemoveCssClass("ag-layout-print",s.print)},setAlwaysVerticalScrollClass:(t,s)=>this.eBodyViewport.classList.toggle(nd,s),registerBodyViewportResizeListener:t=>{const s=this.resizeObserverService.observeResize(this.eBodyViewport,t);this.addDestroyFunc(()=>s())},setPinnedTopBottomOverflowY:t=>this.eTop.style.overflowY=this.eBottom.style.overflowY=t,setCellSelectableCss:(t,s)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(o=>o.classList.toggle(t,s))},setBodyViewportWidth:t=>this.eBodyViewport.style.width=t};
1this.ctrl=this.createManagedBean(new De),this.ctrl.setComp(i,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(this.rangeService&&this.gos.get("enableRangeSelection")||"multiple"===this.gos.get("rowSelection"))&&Kl(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,i){const t=this.eBodyViewport.classList;t.toggle("ag-row-animation",i),t.toggle("ag-row-no-animation",!i)}getFloatingTopBottom(){return[this.eTop,this.eBottom]}};d([p("resizeObserverService")],nt.prototype,"resizeObserverService",2),d([q("rangeService")],nt.prototype,"rangeService",2),d([F("eBodyViewport")],nt.prototype,"eBodyViewport",2),d([F("eStickyTop")],nt.prototype,"eStickyTop",2),d([F("eStickyBottom")],nt.prototype,"eStickyBottom",2),d([F("eTop")],nt.prototype,"eTop",2),d([F("eBottom")],nt.prototype,"eBottom",2),d([F("gridHeader")],nt.prototype,"headerRootComp",2),d([F("eBody")],nt.prototype,"eBody",2),d([T],nt.prototype,"init",1);var xi=class extends b{postConstruct(){this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))}onDisplayedColumnsChanged(){this.update()}onDisplayedColumnsWidthChanged(){this.update()}update(){this.columnAnimationService.isActive()?this.columnAnimationService.executeLaterVMTurn(()=>{this.columnAnimationService.executeLaterVMTurn(()=>this.updateImpl())}):this.updateImpl()}updateImpl(){const e=this.ctrlsService.get("center");if(!e||this.columnAnimationService.isActive())return;const i={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(i)}setScrollsVisible(e){this.horizontalScrollShowing===e.horizontalScrollShowing&&this.verticalScrollShowing===e.verticalScrollShowing||(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventService.dispatchEvent({type:g.EVENT_SCROLL_VISIBILITY_CHANGED}))}isHorizontalScrollShowing(){return this.horizontalScrollShowing}isVerticalScrollShowing(){return this.verticalScrollShowing}};d([p("ctrlsService")],xi.prototype,"ctrlsService",2),d([p("columnAnimationService")],xi.prototype,"columnAnimationService",2),d([T],xi.prototype,"postConstruct",1),xi=d([I("scrollVisibleService")],xi);var Rt=class extends b{constructor(){super(...arguments),this.gridInstanceId=Rt.gridInstanceSequence.next()}stampTopLevelGridCompWithGridInstance(e){e[Rt.GRID_DOM_KEY]=this.gridInstanceId}getRenderedCellForEvent(e){return co(this.gos,e.target,Qt.DOM_DATA_KEY_CELL_CTRL)}isEventFromThisGrid(e){return this.isElementInThisGrid(e.target)}isElementInThisGrid(e){let i=e;for(;i;){const t=i[Rt.GRID_DOM_KEY];if(y(t))return t===this.gridInstanceId;i=i.parentElement}return!1}getCellPositionForEvent(e){const i=this.getRenderedCellForEvent(e);return i?i.getCellPosition():null}getNormalisedPosition(e){const i=this.gos.isDomLayout("normal");let s,o;if(null!=e.clientX||null!=e.clientY?(s=e.clientX,o=e.clientY):(s=e.x,o=e.y),i){const r=this.ctrlsService.getGridBodyCtrl(),n=r.getScrollFeature().getVScrollPosition();s+=r.getScrollFeature().getHScrollPosition().left,o+=n.top}return{x:s,y:o}}};Rt.gridInstanceSequence=new Fi,Rt.GRID_DOM_KEY="__ag_grid_instance",d([p("ctrlsService")],Rt.prototype,"ctrlsService",2),Rt=d([I("mouseEventService")],Rt);var Ce=class extends b{constructor(){super(),this.onPageDown=wr(this.onPageDown,100),this.onPageUp=wr(this.onPageUp,100)}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,i=!1){const t=e.key,s=e.altKey,o=e.ctrlKey||e.metaKey,r=!!this.rangeService&&e.shiftKey,n=this.mouseEventService.getCellPositionForEvent(e);let l=!1;switch(t){case v.PAGE_HOME:case v.PAGE_END:!o&&!s&&(this.onHomeOrEndKey(t),l=!0);break;case v.LEFT:case v.RIGHT:case v.UP:case v.DOWN:if(!n)return!1;o&&!s&&!r&&(this.onCtrlUpDownLeftRight(t,n),l=!0);break;case v.PAGE_DOWN:case v.PAGE_UP:!o&&!s&&(l=this.handlePageUpDown(t,n,i))}return l&&e.preventDefault(),l}handlePageUpDown(e,i,t){return t&&(i=this.focusService.getFocusedCell()),!!i&&(e===v.PAGE_UP?this.onPageUp(i):this.onPageDown(i),!0)}navigateTo(e){var i;const{scrollIndex:t,scrollType:s,scrollColumn:o,focusIndex:r,focusColumn:n}=e;
1y(o)&&!o.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(o),y(t)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(t,s),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(r),this.focusService.setFocusedCell({rowIndex:r,column:n,rowPinned:null,forceBrowserFocus:!0}),null==(i=this.rangeService)||i.setRangeToCell({rowIndex:r,rowPinned:null,column:n})}onPageDown(e){const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),s=this.getViewportHeight(),o=this.paginationProxy.getPixelOffset(),n=this.paginationProxy.getRowIndexAtPixel(t.top+s+o);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,n):this.navigateToNextPage(e,n)}onPageUp(e){const t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),s=this.paginationProxy.getPixelOffset(),r=this.paginationProxy.getRowIndexAtPixel(t.top+s);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,r,!0):this.navigateToNextPage(e,r,!0)}navigateToNextPage(e,i,t=!1){const s=this.getViewportHeight(),o=this.paginationProxy.getPageFirstRow(),r=this.paginationProxy.getPageLastRow(),n=this.paginationProxy.getPixelOffset(),l=this.paginationProxy.getRow(e.rowIndex),a=t?l?.rowHeight-s-n:s-n;let c,h=this.paginationProxy.getRowIndexAtPixel(l?.rowTop+a+n);h===e.rowIndex&&(i=h=e.rowIndex+(t?-1:1)),t?(c="bottom",h<o&&(h=o),i<o&&(i=o)):(c="top",h>r&&(h=r),i>r&&(i=r)),this.isRowTallerThanView(h)&&(i=h,c="top"),this.navigateTo({scrollIndex:i,scrollType:c,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,i,t=!1){this.navigateTo({scrollIndex:i,scrollType:t?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column}),setTimeout(()=>{const s=this.getNextFocusIndexForAutoHeight(e,t);this.navigateTo({scrollIndex:i,scrollType:t?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,i=!1){var t;const s=i?-1:1,o=this.getViewportHeight(),r=this.paginationProxy.getPageLastRow();let n=0,l=e.rowIndex;for(;l>=0&&l<=r;){const a=this.paginationProxy.getRow(l);if(a){const u=null!=(t=a.rowHeight)?t:0;if(n+u>o)break;n+=u}l+=s}return Math.max(0,Math.min(l,r))}getViewportHeight(){const{gridBodyCtrl:e,center:i}=this.ctrlsService.getParams(),t=e.getScrollFeature().getVScrollPosition(),s=this.gos.getScrollbarWidth();let o=t.bottom-t.top;return i.isHorizontalScrollShowing()&&(o-=s),o}isRowTallerThanView(e){const i=this.paginationProxy.getRow(e);if(!i)return!1;const t=i.rowHeight;return"number"==typeof t&&t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,i){const t=this.cellNavigationService.getNextCellToFocus(e,i,!0),{rowIndex:s,column:o}=t;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:o,focusIndex:s,focusColumn:o})}onHomeOrEndKey(e){const i=e===v.PAGE_HOME,t=this.columnModel.getAllDisplayedColumns(),s=i?t[0]:$(t),o=i?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:s,focusIndex:o,focusColumn:s})}onTabKeyDown(e,i){const t=i.shiftKey,s=this.tabToNextCellCommon(e,t,i);if(!1===s)if(t){const{rowIndex:o,rowPinned:r}=e.getRowPosition();(r?0===o:o===this.paginationProxy.getPageFirstRow())&&(0===this.gos.get("headerHeight")||this.gos.get("suppressHeaderFocus")?this.focusService.focusNextGridCoreContainer(!0,!0):(i.preventDefault(),this.focusService.focusPreviousFromFirstCell(i)))}else e instanceof Qt&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(t)&&i.preventDefault();else s&&i.preventDefault()}tabToNextCell(e,i){const t=this.focusService.getFocusedCell();if(!t)return!1;let s=this.getCellByPosition(t);return!!(s||(s=this.rowRenderer.getRowByPosition(t),s&&s.isFullWidth()))&&!!this.tabToNextCellCommon(s,e,i)}tabToNextCellCommon(e,i,t){let o,s=e.isEditing();if(!s&&e instanceof Qt){const n=e.getRowCtrl();n&&(s=n.isEditing())}return o=s?"fullRow"===this.gos.get("editType")?this.moveToNextEditingRow(e,i,t):this.moveToNextEditingCell(e,i,t):this.moveToNextCellNotEditing(e,i),null===o?o:o||!!this.focusService.getFocusedHeader()}moveToNextEditingCell(e,i,t=null){const s=e.getCellPosition();e.getGui().focus(),e.stopEditing();const o=this.findNextCellToFocusOn(s,i,!0);return!1===o?null:null!=o&&(o.startEditing(null,!0,t),o.focusCell(!1),!0)}moveToNextEditingRow(e,i,t=null){const s=e.getCellPosition(),o=this.findNextCellToFocusOn(s,i,!0);if(!1===o)return null;if(null==o)return!1;const r=o.getCellPosition(),n=this.isCellEditable(s),l=this.isCellEditable(r),a=r&&s.rowIndex===r.rowIndex&&s.rowPinned===r.rowPinned;return n&&e.setFocusOutOnEditor(),a||(e.getRowCtrl().stopEditing(),o.getRowCtrl().startRowEditing(void 0,void 0,t)),l?(o.setFocusInOnEditor(),o.focusCell()):o.focusCell(!0),!0}
1moveToNextCellNotEditing(e,i){const t=this.columnModel.getAllDisplayedColumns();let s;s=e instanceof Xt?x(M({},e.getRowPosition()),{column:i?t[0]:$(t)}):e.getCellPosition();const o=this.findNextCellToFocusOn(s,i,!1);if(!1===o)return null;if(o instanceof Qt)o.focusCell(!0);else if(o)return this.tryToFocusFullWidthRow(o.getRowPosition(),i);return y(o)}findNextCellToFocusOn(e,i,t){var s;let o=e;for(;;){e!==o&&(e=o),i||(o=this.getLastCellOfColSpan(o)),o=this.cellNavigationService.getNextTabbedCell(o,i);const r=this.gos.getCallback("tabToNextCell");if(y(r)){const u=r({backwards:i,editing:t,previousCellPosition:e,nextCellPosition:o||null});if(!0===u||null===u)null===u&&O("Returning `null` from tabToNextCell is deprecated. Return `true` to stay on the current cell, or `false` to let the browser handle the tab behaviour."),o=e;else{if(!1===u)return!1;u.floating&&(O("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),u.rowPinned=u.floating),o={rowIndex:u.rowIndex,column:u.column,rowPinned:u.rowPinned}}}if(!o)return null;if(o.rowIndex<0){const a=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a+o.rowIndex,column:o.column},fromCell:!0}),null}const n="fullRow"===this.gos.get("editType");if(t&&!n&&!this.isCellEditable(o))continue;this.ensureCellVisible(o);const l=this.getCellByPosition(o);if(!l){const a=this.rowRenderer.getRowByPosition(o);if(!a||!a.isFullWidth()||t)continue;return a}if(!l.isSuppressNavigable())return null==(s=this.rangeService)||s.setRangeToCell(o),l}}isCellEditable(e){const i=this.lookupRowNodeForCell(e);return!!i&&e.column.isCellEditable(i)}getCellByPosition(e){const i=this.rowRenderer.getRowByPosition(e);return i?i.getCellCtrl(e.column):null}lookupRowNodeForCell(e){return"top"===e.rowPinned?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):"bottom"===e.rowPinned?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)}navigateToNextCell(e,i,t,s){let o=t,r=!1;for(;o&&(o===t||!this.isValidNavigateCell(o));)this.gos.get("enableRtl")?i===v.LEFT&&(o=this.getLastCellOfColSpan(o)):i===v.RIGHT&&(o=this.getLastCellOfColSpan(o)),o=this.cellNavigationService.getNextCellToFocus(i,o),r=_(o);if(r&&e&&e.key===v.UP&&(o={rowIndex:-1,rowPinned:null,column:t.column}),s){const l=this.gos.getCallback("navigateToNextCell");if(y(l)){const u=l({key:i,previousCellPosition:t,nextCellPosition:o||null,event:e});y(u)?(u.floating&&(O("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),u.rowPinned=u.floating),o={rowPinned:u.rowPinned,rowIndex:u.rowIndex,column:u.column}):o=null}}if(!o)return;if(o.rowIndex<0){const l=this.headerNavigationService.getHeaderRowCount();return void this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l+o.rowIndex,column:t.column},event:e||void 0,fromCell:!0})}const n=this.getNormalisedPosition(o);n?this.focusPosition(n):this.tryToFocusFullWidthRow(o)}getNormalisedPosition(e){this.ensureCellVisible(e);const i=this.getCellByPosition(e);return i?(e=i.getCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,i=!1){const t=this.columnModel.getAllDisplayedColumns(),s=this.rowRenderer.getRowByPosition(e);if(!s||!s.isFullWidth())return!1;const o=this.focusService.getFocusedCell(),r={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(i?$(t):t[0])};this.focusPosition(r);const n=null!=o&&this.rowPositionUtils.before(r,o);return this.eventService.dispatchEvent({type:g.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:r.column,isFullWidthCell:!0,floating:r.rowPinned,fromBelow:n}),!0}focusPosition(e){var i;this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),null==(i=this.rangeService)||i.setRangeToCell(e)}isValidNavigateCell(e){return!!this.rowPositionUtils.getRowNode(e)}getLastCellOfColSpan(e){const i=this.getCellByPosition(e);if(!i)return e;
1const t=i.getColSpanningList();return 1===t.length?e:{rowIndex:e.rowIndex,column:$(t),rowPinned:e.rowPinned}}ensureCellVisible(e){const i=this.gos.isGroupRowsSticky(),t=this.rowModel.getRow(e.rowIndex);!(i&&t?.sticky)&&_(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)}};d([p("mouseEventService")],Ce.prototype,"mouseEventService",2),d([p("paginationProxy")],Ce.prototype,"paginationProxy",2),d([p("focusService")],Ce.prototype,"focusService",2),d([p("columnModel")],Ce.prototype,"columnModel",2),d([p("rowModel")],Ce.prototype,"rowModel",2),d([p("ctrlsService")],Ce.prototype,"ctrlsService",2),d([p("rowRenderer")],Ce.prototype,"rowRenderer",2),d([p("headerNavigationService")],Ce.prototype,"headerNavigationService",2),d([p("rowPositionUtils")],Ce.prototype,"rowPositionUtils",2),d([p("cellNavigationService")],Ce.prototype,"cellNavigationService",2),d([p("pinnedRowModel")],Ce.prototype,"pinnedRowModel",2),d([q("rangeService")],Ce.prototype,"rangeService",2),d([T],Ce.prototype,"postConstruct",1),Ce=d([I("navigationService")],Ce);var dd=(()=>{let e=class tu extends Yt{constructor(t){super('<div class="ag-popup-editor" tabindex="-1"/>'),this.params=t}postConstruct(){this.gos.setDomData(this.getGui(),tu.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()}addKeyDownListener(){const t=this.getGui(),s=this.params;this.addManagedListener(t,"keydown",r=>{Do(this.gos,r,s.node,s.column,!0)||s.onKeyDown(r)})}};return e.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",e})();d([T],dd.prototype,"postConstruct",1);var zc=dd,Kc=class extends V{constructor(e,i,t,s,o){super(),this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=i.getColumn(),this.rowNode=i.getRowNode(),this.rowCtrl=i.getRowCtrl(),this.eRow=s,this.cellCtrl=i;const r=document.createElement("div");r.setAttribute("comp-id",`${this.getCompId()}`),this.setTemplateFromElement(r);const n=this.getGui();this.forceWrapper=i.isForceWrapper(),this.refreshWrapper(!1);const l=(h,c)=>{null!=c&&""!=c?n.setAttribute(h,c):n.removeAttribute(h)};oe(n,i.getCellAriaRole()),l("col-id",i.getColumnIdSanitised());const a=i.getTabIndex();void 0!==a&&l("tabindex",a.toString()),i.setComp({addOrRemoveCssClass:(h,c)=>this.addOrRemoveCssClass(h,c),setUserStyles:h=>ln(n,h),getFocusableElement:()=>this.getFocusableElement(),setIncludeSelection:h=>this.includeSelection=h,setIncludeRowDrag:h=>this.includeRowDrag=h,setIncludeDndSource:h=>this.includeDndSource=h,setRenderDetails:(h,c,f)=>this.setRenderDetails(h,c,f),setEditDetails:(h,c,f)=>this.setEditDetails(h,c,f),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()},this.getGui(),this.eCellWrapper,t,o)}getParentOfValue(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()}setRenderDetails(e,i,t){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=null==this.firstRender;const o=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!t&&!o&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(i))}setEditDetails(e,i,t){e?this.createCellEditorInstance(e,i,t):this.destroyEditor()}removeControls(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const i=this.includeRowDrag||this.includeDndSource||this.includeSelection,t=i||this.forceWrapper,s=t&&null==this.eCellWrapper;if(s){const u=document.createElement("div");u.setAttribute("role","presentation"),u.setAttribute("class","ag-cell-wrapper"),this.eCellWrapper=u,this.getGui().appendChild(this.eCellWrapper)}const o=!t&&null!=this.eCellWrapper;o&&(st(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!t);const r=!e&&t,n=r&&null==this.eCellValue;if(n){const u=document.createElement("span");u.setAttribute("role","presentation"),u.setAttribute("class","ag-cell-value"),this.eCellValue=u,this.eCellWrapper.appendChild(this.eCellValue)}const l=!r&&null!=this.eCellValue;l&&(st(this.eCellValue),this.eCellValue=void 0);const a=s||o||n||l;
1return a&&this.removeControls(),e||i&&this.addControls(),a}addControls(){this.includeRowDrag&&null==this.rowDraggingComp&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&null==this.dndSourceComp&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&null==this.checkboxSelectionComp&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))}createCellEditorInstance(e,i,t){const s=this.editorVersion,o=e.newAgStackInstance();if(!o)return;const{params:r}=e;o.then(l=>this.afterCellEditorCreated(s,l,r,i,t)),_(this.cellEditor)&&r.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const i=this.getParentOfValue();ne(i);const t=null!=e?ae(e,!0):null;null!=t&&(i.textContent=t)}destroyEditorAndRenderer(){this.destroyRenderer(),this.destroyEditor()}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),st(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),st(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh||this.cellRendererClass!==e.componentClass)return!1;const i=this.cellRenderer.refresh(e.params);return!0===i||void 0===i}createCellRendererInstance(e){const t=!this.beans.gos.get("suppressAnimationFrame"),s=this.rendererVersion,{componentClass:o}=e,r=()=>{if(this.rendererVersion!==s||!this.isAlive())return;const l=e.newAgStackInstance(),a=this.afterCellRendererCreated.bind(this,s,o);l&&l.then(a)};t&&this.firstRender?this.beans.animationFrameService.createTask(r,this.rowNode.rowIndex,"createTasksP2"):r()}getCtrl(){return this.cellCtrl}getRowCtrl(){return this.rowCtrl}getCellRenderer(){return this.cellRenderer}getCellEditor(){return this.cellEditor}afterCellRendererCreated(e,i,t){if(this.isAlive()&&e===this.rendererVersion){if(this.cellRenderer=t,this.cellRendererClass=i,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui){const o=this.getParentOfValue();ne(o),o.appendChild(this.cellRendererGui)}}else this.beans.context.destroyBean(t)}afterCellEditorCreated(e,i,t,s,o){if(e!==this.editorVersion)return void this.beans.context.destroyBean(i);if(i.isCancelBeforeStart&&i.isCancelBeforeStart())return this.beans.context.destroyBean(i),void this.cellCtrl.stopEditing(!0);if(!i.getGui)return console.warn(`AG Grid: cellEditor for column ${this.column.getId()} is missing getGui() method`),void this.beans.context.destroyBean(i);this.cellEditor=i,this.cellEditorGui=i.getGui();const l=s||void 0!==i.isPopup&&i.isPopup();l?this.addPopupCellEditor(t,o):this.addInCellEditor(),this.refreshEditStyles(!0,l),i.afterGuiAttached&&i.afterGuiAttached()}refreshEditStyles(e,i){var t;this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!i),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!i),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!i),null==(t=this.rowCtrl)||t.setInlineEditingCss(e)}addInCellEditor(){const e=this.getGui();e.contains(this.beans.gos.getActiveDomElement())&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,i){"fullRow"===this.beans.gos.get("editType")&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");const t=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new zc(e));const s=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&s.appendChild(this.cellEditorGui);const o=this.beans.popupService,r=this.beans.gos.get("stopEditingWhenCellsLoseFocus"),n=i??(t.getPopupPosition?t.getPopupPosition():"over"),l=this.beans.gos.get("enableRtl"),a={ePopup:s,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:n,alignSide:l?"right":"left",keepWithinBounds:!0},u=o.positionPopupByComponent.bind(o,a),h=this.beans.localeService.getLocaleTextFunc(),c=o.addPopup({modal:r,eChild:s,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:u,ariaLabel:h("ariaLabelCellEditor","Cell Editor")});c&&(this.hideEditorPopup=c.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}
1destroy(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),super.destroy()}clearParentOfValue(){const e=this.getGui();e.contains(this.beans.gos.getActiveDomElement())&&jr()&&e.focus({preventScroll:!0}),ne(this.getParentOfValue())}},$c=class extends V{constructor(e,i,t){super(),this.cellComps={},this.beans=i,this.rowCtrl=e;const s=document.createElement("div");s.setAttribute("comp-id",`${this.getCompId()}`),s.setAttribute("style",this.getInitialStyle(t)),this.setTemplateFromElement(s);const o=this.getGui(),r=o.style;this.domOrder=this.rowCtrl.getDomOrder(),oe(o,"row");const n=this.rowCtrl.getTabIndex();null!=n&&o.setAttribute("tabindex",n.toString()),e.setComp({setDomOrder:a=>this.domOrder=a,setCellCtrls:a=>this.setCellCtrls(a),showFullWidth:a=>this.showFullWidth(a),getFullWidthCellRenderer:()=>this.getFullWidthCellRenderer(),addOrRemoveCssClass:(a,u)=>this.addOrRemoveCssClass(a,u),setUserStyles:a=>ln(o,a),setTop:a=>r.top=a,setTransform:a=>r.transform=a,setRowIndex:a=>o.setAttribute("row-index",a),setRowId:a=>o.setAttribute("row-id",a),setRowBusinessKey:a=>o.setAttribute("row-business-key",a),refreshFullWidth:a=>this.refreshFullWidth(a)},this.getGui(),t),this.addDestroyFunc(()=>{e.unsetComp(t)})}getInitialStyle(e){const i=this.rowCtrl.getInitialTransform(e);return i?`transform: ${i}`:`top: ${this.rowCtrl.getInitialRowTop(e)}`}showFullWidth(e){const t=e.newAgStackInstance();t&&t.then(s=>{if(this.isAlive()){const o=s.getGui();this.getGui().appendChild(o),this.rowCtrl.setupDetailRowAutoHeight(o),this.setFullWidthRowComp(s)}else this.beans.context.destroyBean(s)})}setCellCtrls(e){const i=Object.assign({},this.cellComps);e.forEach(s=>{const o=s.getInstanceId();null==this.cellComps[o]?this.newCellComp(s):i[o]=null});const t=bt(i).filter(s=>null!=s);this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const i=[];e.forEach(t=>{const s=this.cellComps[t.getInstanceId()];s&&i.push(s.getGui())}),nn(this.getGui(),i)}newCellComp(e){const i=new Kc(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=i,this.getGui().appendChild(i.getGui())}destroy(){super.destroy(),this.destroyAllCells()}destroyAllCells(){const e=bt(this.cellComps).filter(i=>null!=i);this.destroyCells(e)}setFullWidthRowComp(e){this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}getFullWidthCellRenderer(){return this.fullWidthCellRenderer}destroyCells(e){e.forEach(i=>{if(!i)return;const t=i.getCtrl().getInstanceId();this.cellComps[t]===i&&(i.detach(),i.destroy(),this.cellComps[t]=null)})}refreshFullWidth(e){const{fullWidthCellRenderer:i}=this;if(!i||!i.refresh)return!1;const t=e();return i.refresh(t)}},Oi=class extends V{constructor(){super(function Yc(){const e=V.elementGettingCreated.getAttribute("name"),i=ad.getRowContainerCssClasses(e);let t;return t="center"===e||"topCenter"===e||"stickyTopCenter"===e||"bottomCenter"===e||"stickyBottomCenter"===e?`<div class="${i.viewport}" ref="eViewport" role="presentation">\n <div class="${i.container}" ref="eContainer"></div>\n </div>`:`<div class="${i.container}" ref="eContainer"></div>`,t}()),this.rowComps={},this.name=V.elementGettingCreated.getAttribute("name"),this.type=function kc(e){switch(e){case"center":case"topCenter":case"stickyTopCenter":case"bottomCenter":case"stickyBottomCenter":return"center";case"left":case"topLeft":case"stickyTopLeft":case"bottomLeft":case"stickyBottomLeft":return"left";case"right":case"topRight":case"stickyTopRight":case"bottomRight":case"stickyBottomRight":return"right";case"fullWidth":case"topFullWidth":case"stickyTopFullWidth":case"bottomFullWidth":case"stickyBottomFullWidth":return"fullWidth";default:throw Error("Invalid Row Container Type")}}(this.name)}postConstruct(){const e={setViewportHeight:t=>this.eViewport.style.height=t,setRowCtrls:({rowCtrls:t})=>this.setRowCtrls(t),setDomOrder:t=>{this.domOrder=t},setContainerWidth:t=>this.eContainer.style.width=t};this.createManagedBean(new ad(this.name)).setComp(e,this.eContainer,this.eViewport)}preDestroy(){this.setRowCtrls([])}setRowCtrls(e){const i=M({},this.rowComps);this.rowComps={},this.lastPlacedElement=null,e.forEach(s=>{const o=s.getInstanceId(),r=i[o];if(r)this.rowComps[o]=r,delete i[o],this.ensureDomOrder(r.getGui());else{if(!s.getRowNode().displayed)return;const n=new $c(s,this.beans,this.type);this.rowComps[o]=n,this.appendRow(n.getGui())}}
1),bt(i).forEach(s=>{this.eContainer.removeChild(s.getGui()),s.destroy()}),oe(this.eContainer,"rowgroup")}appendRow(e){this.domOrder?da(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e}ensureDomOrder(e){this.domOrder&&(rn(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)}};d([p("beans")],Oi.prototype,"beans",2),d([F("eViewport")],Oi.prototype,"eViewport",2),d([F("eContainer")],Oi.prototype,"eContainer",2),d([T],Oi.prototype,"postConstruct",1),d([ye],Oi.prototype,"preDestroy",1);var Ln=class{constructor(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const i=e.dragItem.columns;i&&i.forEach(t=>{t.isPrimary()&&(t.isAnyFunctionActive()||(t.isAllowValue()?this.columnsToAggregate.push(t):t.isAllowRowGroup()?this.columnsToGroup.push(t):t.isAllowPivot()&&this.columnsToPivot.push(t)))})}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?ee.ICON_PINNED:ee.ICON_MOVE:null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){this.columnsToAggregate.length>0&&this.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")}};d([p("columnModel")],Ln.prototype,"columnModel",2),d([p("gridOptionsService")],Ln.prototype,"gos",2);var Jt=class{static attemptMoveColumns(e){const{isFromHeader:i,hDirection:t,xPosition:s,fromEnter:o,fakeEvent:r,pinned:n,gos:l,columnModel:a}=e,u=0===t,h=1===t;let{allMovingColumns:c}=e;if(i){let P=[];c.forEach(L=>{var G;let N=null,ie=L.getParent();for(;null!=ie&&1===ie.getDisplayedLeafColumns().length;)N=ie,ie=ie.getParent();null!=N?(null!=(G=N.getColGroupDef())&&G.marryChildren?N.getProvidedColumnGroup().getLeafColumns():N.getLeafColumns()).forEach(_e=>{P.includes(_e)||P.push(_e)}):P.includes(L)||P.push(L)}),c=P}const f=c.slice();a.sortColumnsLikeGridColumns(f);const m=this.calculateValidMoves({movingCols:f,draggingRight:h,xPosition:s,pinned:n,gos:l,columnModel:a}),C=this.calculateOldIndex(f,a);if(0===m.length)return;const w=m[0];let S=null!==C&&!o;if(i&&(S=null!==C),S&&!r&&(u&&w>=C||h&&w<=C))return;const R=a.getAllDisplayedColumns();let E=[],A=null;for(let P=0;P<m.length;P++){const L=m[P],G=a.getProposedColumnOrder(f,L);if(!a.doesOrderPassRules(G))continue;const N=G.filter(J=>R.includes(J));if(null===A)A=N;else if(!lt(N,A))break;const ie=this.groupFragCount(G);E.push({move:L,fragCount:ie})}return 0!==E.length?(E.sort((P,L)=>P.fragCount-L.fragCount),this.moveColumns(c,E[0].move,"uiColumnMoved",!1,a)):void 0}static moveColumns(e,i,t,s,o){return o.moveColumns(e,i,t,s),s?null:{columns:e,toIndex:i}}static calculateOldIndex(e,i){const t=i.getAllGridColumns(),s=yl(e.map(a=>t.indexOf(a))),o=s[0];return $(s)-o!=s.length-1?null:o}static groupFragCount(e){function i(s){let o=[],r=s.getOriginalParent();for(;null!=r;)o.push(r),r=r.getOriginalParent();return o}let t=0;for(let s=0;s<e.length-1;s++){let o=i(e[s]),r=i(e[s+1]);[o,r]=o.length>r.length?[o,r]:[r,o],o.forEach(n=>{-1===r.indexOf(n)&&t++})}return t}static getDisplayedColumns(e,i){switch(i){case"left":return e.getDisplayedLeftColumns();case"right":return e.getDisplayedRightColumns();default:return e.getDisplayedCenterColumns()}}static calculateValidMoves(e){const{movingCols:i,draggingRight:t,xPosition:s,pinned:o,gos:r,columnModel:n}=e;if(r.get("suppressMovableColumns")||i.some(E=>E.getColDef().suppressMovable))return[];const a=this.getDisplayedColumns(n,o),u=n.getAllGridColumns(),h=a.filter(E=>Ve(i,E)),c=a.filter(E=>!Ve(i,E)),f=u.filter(E=>!Ve(i,E));let w,m=0,C=s;if(t){let E=0;h.forEach(A=>E+=A.getActualWidth()),C-=E}if(C>0){for(let E=0;E<c.length&&(C-=c[E].getActualWidth(),!(C<0));E++)m++;t&&m++}m>0?w=f.indexOf(c[m-1])+1:(w=f.indexOf(c[0]),-1===w&&(w=0));const S=[w],R=(E,A)=>E-A;if(t){let E=w+1;const A=u.length-1;for(;E<=A;)S.push(E),E++;S.sort(R)}else{let E=w;const A=u.length-1;let P=u[E];for(;E<=A&&a.indexOf(P)<0;)E++,S.push(E),P=u[E];E=w-1;const L=0;for(;E>=L;)S.push(E),E--;S.sort(R).reverse()}return S}static normaliseX(e,i,t,s,o){const r=o.getHeaderRowContainerCtrl(i).getViewport();return t&&(e-=r.getBoundingClientRect().left),s.get("enableRtl")&&(e=r.clientWidth-e),null==i&&(e+=o.get("center").getCenterViewportScrollLeft()),e}},_i=class{constructor(e){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.isCenterContainer=!y(e)}init(){this.ctrlsService.whenReady(e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){return this.pinned?ee.ICON_PINNED:ee.ICON_MOVE}onDragEnter(e){const i=e.dragItem.columns;if(0===e.dragSource.type)this.setColumnsVisible(i,!0,"uiColumnDragged");else{const s=e.dragItem.visibleState,o=(i||[]).filter(r=>s[r.getId()]);this.setColumnsVisible(o,!0,"uiColumnDragged")}this.setColumnsPinned(i,this.pinned,"uiColumnDragged"),this.onDragging(e,!0,!0)}onDragLeave(){this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,i,t){if(e){const s=e.filter(o=>!o.getColDef().lockVisible);this.columnModel.setColumnsVisible(s,i,t)}}setColumnsPinned(e,i,t){if(e){const s=e.filter(o=>!o.getColDef().lockPinned);this.columnModel.setColumnsPinned(s,i,t)}}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}checkCenterForScrolling(e){if(this.isCenterContainer){const i=this.ctrlsService.get("
1center"),t=i.getCenterViewportScrollLeft(),s=t+i.getCenterWidth();this.gos.get("enableRtl")?(this.needToMoveRight=e<t+50,this.needToMoveLeft=e>s-50):(this.needToMoveLeft=e<t+50,this.needToMoveRight=e>s-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}}onDragging(e=this.lastDraggingEvent,i=!1,t=!1,s=!1){var o;if(s){if(this.lastMovedInfo){const{columns:h,toIndex:c}=this.lastMovedInfo;Jt.moveColumns(h,c,"uiColumnMoved",!0,this.columnModel)}return}if(this.lastDraggingEvent=e,_(e.hDirection))return;const r=Jt.normaliseX(e.x,this.pinned,!1,this.gos,this.ctrlsService);i||this.checkCenterForScrolling(r);const n=this.normaliseDirection(e.hDirection),l=e.dragSource.type,a=(null==(o=e.dragSource.getDragItem().columns)?void 0:o.filter(h=>!h.getColDef().lockPinned||h.getPinned()==this.pinned))||[],u=Jt.attemptMoveColumns({allMovingColumns:a,isFromHeader:1===l,hDirection:n,xPosition:r,pinned:this.pinned,fromEnter:i,fakeEvent:t,gos:this.gos,columnModel:this.columnModel});u&&(this.lastMovedInfo=u)}normaliseDirection(e){if(!this.gos.get("enableRtl"))return e;switch(e){case 0:return 1;case 1:return 0;default:console.error(`AG Grid: Unknown direction ${e}`)}}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.dragAndDropService.setGhostIcon(this.needToMoveLeft?ee.ICON_LEFT:ee.ICON_RIGHT,!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(ee.ICON_MOVE))}moveInterval(){let e;this.intervalCount++,e=10+5*this.intervalCount,e>100&&(e=100);let i=null;const t=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?i=t.scrollHorizontally(-e):this.needToMoveRight&&(i=t.scrollHorizontally(e)),0!==i)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const o=this.lastDraggingEvent.dragItem.columns.filter(r=>!r.getColDef().lockPinned);o.length>0&&(this.dragAndDropService.setGhostIcon(ee.ICON_PINNED),this.failedMoveAttempts>7)&&(this.setColumnsPinned(o,this.needToMoveLeft?"left":"right","uiColumnDragged"),this.dragAndDropService.nudge())}}};d([p("columnModel")],_i.prototype,"columnModel",2),d([p("dragAndDropService")],_i.prototype,"dragAndDropService",2),d([p("gridOptionsService")],_i.prototype,"gos",2),d([p("ctrlsService")],_i.prototype,"ctrlsService",2),d([T],_i.prototype,"init",1);var Vi=class extends b{constructor(e,i){super(),this.pinned=e,this.eContainer=i}postConstruct(){this.ctrlsService.whenReady(e=>{switch(this.pinned){case"left":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.left.getContainerElement()],[e.bottomLeft.getContainerElement()],[e.topLeft.getContainerElement()]];break;case"right":this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.right.getContainerElement()],[e.bottomRight.getContainerElement()],[e.topRight.getContainerElement()]];break;default:this.eSecondaryContainers=[[e.gridBodyCtrl.getBodyViewportElement(),e.center.getViewportElement()],[e.bottomCenter.getViewportElement()],[e.topCenter.getViewportElement()]]}})}isInterestedIn(e){return 1===e||0===e&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}init(){this.moveColumnFeature=this.createManagedBean(new _i(this.pinned)),this.bodyDropPivotTarget=this.createManagedBean(new Ln(this.pinned)),this.dragAndDropService.addDropTarget(this)}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.columnModel.isPivotMode()&&0===e.dragSource.type}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}};d([p("dragAndDropService")],Vi.prototype,"dragAndDropService",2),d([p("columnModel")],Vi.prototype,"columnModel",2),d([p("ctrlsService")],Vi.prototype,"ctrlsService",2),d([T],Vi.prototype,"postConstruct",1),d([T],Vi.prototype,"init",1);var Ds=(()=>{let e=class iu extends An{constructor(t){super(iu.TEMPLATE,t),this.headerCompVersion=0,this.column=t.getColumnGroupChild(),this.pinned=t.getPinned()}postConstruct(){const t=this.getGui();var n,l;n="col-id",null!=(l=this.column.getColId())&&""!=l?t.setAttribute(n,l):t.removeAttribute(n);const o={setWidth:n=>t.style.width=n,addOrRemoveCssClass:(n,l)=>this.addOrRemoveCssClass(n,l),setAriaSort:n=>
1n?ql(t,n):Ql(t),setUserCompDetails:n=>this.setUserCompDetails(n),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(o,this.getGui(),this.eResize,this.eHeaderCompWrapper);const r=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",r)}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(t){this.headerCompVersion++;const s=this.headerCompVersion;t.newAgStackInstance().then(o=>this.afterCompCreated(s,o))}afterCompCreated(t,s){t==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=s,this.headerCompGui=s.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())):this.destroyBean(s)}};return e.TEMPLATE='<div class="ag-header-cell" role="columnheader">\n <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n <div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>\n </div>',e})();d([F("eResize")],Ds.prototype,"eResize",2),d([F("eHeaderCompWrapper")],Ds.prototype,"eHeaderCompWrapper",2),d([T],Ds.prototype,"postConstruct",1),d([ye],Ds.prototype,"destroyHeaderComp",1);var jc=Ds,Mn=(()=>{let e=class su extends An{constructor(t){super(su.TEMPLATE,t)}postConstruct(){const t=this.getGui();t.setAttribute("col-id",this.ctrl.getColId()),this.ctrl.setComp({addOrRemoveCssClass:(r,n)=>this.addOrRemoveCssClass(r,n),setResizableDisplayed:r=>z(this.eResize,r),setWidth:r=>t.style.width=r,setAriaExpanded:r=>((r,n)=>null!=n?t.setAttribute(r,n):t.removeAttribute(r))("aria-expanded",r),setUserCompDetails:r=>this.setUserCompDetails(r),getUserCompInstance:()=>this.headerGroupComp},t,this.eResize)}setUserCompDetails(t){t.newAgStackInstance().then(s=>this.afterHeaderCompCreated(s))}afterHeaderCompCreated(t){const s=()=>this.destroyBean(t);if(!this.isAlive())return void s();const o=this.getGui(),r=t.getGui();o.appendChild(r),this.addDestroyFunc(s),this.headerGroupComp=t,this.ctrl.setDragSource(o)}};return e.TEMPLATE='<div class="ag-header-group-cell" role="columnheader">\n <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n </div>',e})();d([F("eResize")],Mn.prototype,"eResize",2),d([T],Mn.prototype,"postConstruct",1);var qc=Mn,In=class extends V{constructor(e){super(),this.headerComps={},this.ctrl=e,this.setTemplate(`<div class="${this.ctrl.getHeaderRowClass()}" role="row"></div>`)}init(){xr(this.getGui(),this.ctrl.getAriaRowIndex()),this.ctrl.setComp({setHeight:i=>this.getGui().style.height=i,setTop:i=>this.getGui().style.top=i,setHeaderCtrls:(i,t)=>this.setHeaderCtrls(i,t),setWidth:i=>this.getGui().style.width=i})}destroyHeaderCtrls(){this.setHeaderCtrls([],!1)}setHeaderCtrls(e,i){if(!this.isAlive())return;const t=this.headerComps;if(this.headerComps={},e.forEach(s=>{const o=s.getInstanceId();let r=t[o];delete t[o],null==r&&(r=this.createHeaderComp(s),this.getGui().appendChild(r.getGui())),this.headerComps[o]=r}),me(t,(s,o)=>{this.getGui().removeChild(o.getGui()),this.destroyBean(o)}),i){const s=bt(this.headerComps);s.sort((r,n)=>r.getCtrl().getColumnGroupChild().getLeft()-n.getCtrl().getColumnGroupChild().getLeft());const o=s.map(r=>r.getGui());nn(this.getGui(),o)}}createHeaderComp(e){let i;switch(this.ctrl.getType()){case"group":i=new qc(e);break;case"filter":i=new sc(e);break;default:i=new jc(e)}return this.createBean(i),i.setParentComponent(this),i}};d([T],In.prototype,"init",1),d([ye],In.prototype,"destroyHeaderCtrls",1);var Xc=0,Gt=(()=>{let e=class ou extends b{constructor(t,s,o){super(),this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.columnGroupChild=t,this.parentRowCtrl=o,this.beans=s,this.instanceId=t.getUniqueId()+"-"+Xc++}postConstruct(){this.addManagedPropertyListeners(["suppressHeaderFocus"],()=>this.refreshTabIndex())}shouldStopEventPropagation(t){const{headerRowIndex:s,column:o}=this.focusService.getFocusedHeader();return wa(this.gos,t,s,o)}getWrapperHasFocus(){return this.gos.getActiveDomElement()===this.eGui}setGui(t){this.eGui=t,this.addDomData(),this.addManagedListener(this.beans.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}onDisplayedColumnsChanged(){!this.comp||!this.column||(this.refreshFirstAndLastStyles(),this.refreshAriaColIndex())}refreshFirstAndLastStyles(){const{comp:t,column:s,beans:o}=this;Vo.refreshFirstAndLastStyles(t,s,o.columnModel)}refreshAriaColIndex(){const{beans:t,column:s}=this,o=t.columnModel.getAriaColumnIndex(s);Or(this.eGui,o)}
1addResizeAndMoveKeyboardListeners(){this.resizeFeature&&(this.addManagedListener(this.eGui,"keydown",this.onGuiKeyDown.bind(this)),this.addManagedListener(this.eGui,"keyup",this.onGuiKeyUp.bind(this)))}refreshTabIndex(){this.gos.get("suppressHeaderFocus")?this.eGui.removeAttribute("tabindex"):this.eGui.setAttribute("tabindex","-1")}onGuiKeyDown(t){var s;const o=this.gos.getActiveDomElement(),r=t.key===v.LEFT||t.key===v.RIGHT;if(this.isResizing&&(t.preventDefault(),t.stopImmediatePropagation()),o!==this.eGui||!t.shiftKey&&!t.altKey||((this.isResizing||r)&&(t.preventDefault(),t.stopImmediatePropagation()),!r))return;const n=t.key===v.LEFT!==this.gos.get("enableRtl"),l=ja[n?"Left":"Right"];if(t.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const a=this.getViewportAdjustedResizeDiff(t);this.resizeHeader(a,t.shiftKey),null==(s=this.resizeFeature)||s.toggleColumnResizing(!0)}else this.moveHeader(l)}getViewportAdjustedResizeDiff(t){let s=this.getResizeDiff(t);if(this.column.getPinned()){const r=this.pinnedWidthService.getPinnedLeftWidth(),n=this.pinnedWidthService.getPinnedRightWidth(),l=Ut(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50;if(r+n+s>l){if(!(l>r+n))return 0;s=l-r-n}}return s}getResizeDiff(t){let s=t.key===v.LEFT!==this.gos.get("enableRtl");const o=this.column.getPinned(),r=this.gos.get("enableRtl");return o&&r!==("right"===o)&&(s=!s),(s?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=setTimeout(()=>{var t;null==(t=this.resizeFeature)||t.toggleColumnResizing(!1)},150))}handleKeyDown(t){const s=this.getWrapperHasFocus();switch(t.key){case v.PAGE_DOWN:case v.PAGE_UP:case v.PAGE_HOME:case v.PAGE_END:s&&t.preventDefault()}}addDomData(){const t=ou.DOM_DATA_KEY_HEADER_CTRL;this.gos.setDomData(this.eGui,t,this),this.addDestroyFunc(()=>this.gos.setDomData(this.eGui,t,null))}getGui(){return this.eGui}focus(t){return!!this.eGui&&(this.lastFocusEvent=t||null,this.eGui.focus(),!0)}getRowIndex(){return this.parentRowCtrl.getRowIndex()}getParentRowCtrl(){return this.parentRowCtrl}getPinned(){return this.parentRowCtrl.getPinned()}getInstanceId(){return this.instanceId}getColumnGroupChild(){return this.columnGroupChild}removeDragSource(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(t,s,o){const r=t??s;this.gos.get("preventDefaultOnContextMenu")&&r.preventDefault();const n=o instanceof Z?o:void 0;this.menuService.isHeaderContextMenuEnabled(n)&&this.menuService.showHeaderContextMenu(n,t,s),this.dispatchColumnMouseEvent(g.EVENT_COLUMN_HEADER_CONTEXT_MENU,o)}dispatchColumnMouseEvent(t,s){this.eventService.dispatchEvent({type:t,column:s})}destroy(){super.destroy(),this.removeDragSource(),this.comp=null,this.column=null,this.resizeFeature=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null,this.eGui=null}};return e.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",e})();d([p("pinnedWidthService")],Gt.prototype,"pinnedWidthService",2),d([p("focusService")],Gt.prototype,"focusService",2),d([p("userComponentFactory")],Gt.prototype,"userComponentFactory",2),d([p("ctrlsService")],Gt.prototype,"ctrlsService",2),d([p("dragAndDropService")],Gt.prototype,"dragAndDropService",2),d([p("menuService")],Gt.prototype,"menuService",2),d([T],Gt.prototype,"postConstruct",1);var Bo=Gt,Wo=class extends b{constructor(e,i,t,s){super(),this.columnOrGroup=e,this.eCell=i,this.ariaEl=this.eCell.querySelector("[role=columnheader]")||this.eCell,this.colsSpanning=s,this.beans=t}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){return this.beans.gos.get("enableRtl")&&this.colsSpanning?$(this.colsSpanning):this.columnOrGroup}postConstruct(){this.addManagedListener(this.columnOrGroup,Z.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))}setLeftFirstTime(){const e=this.beans.gos.get("suppressColumnMoveAnimation"),i=y(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&i&&!e?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),i=e.getLeft(),t=e.getOldLeft(),s=this.modifyLeftForPrintLayout(e,t),o=this.modifyLeftForPrintLayout(e,i);this.setLeft(s),this.actualLeft=o,this.beans.columnAnimationService.executeNextVMTurn(()=>
1{this.actualLeft===o&&this.setLeft(o)})}onLeftChanged(){const e=this.getColumnOrGroup(),i=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,i),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,i){if(!this.beans.gos.isDomLayout("print")||"left"===e.getPinned())return i;const s=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===e.getPinned()?s+this.beans.columnModel.getBodyContainerWidth()+i:s+i}setLeft(e){let i;if(y(e)&&(this.eCell.style.left=`${e}px`),this.columnOrGroup instanceof Z)i=this.columnOrGroup;else{const s=this.columnOrGroup.getLeafColumns();if(!s.length)return;s.length>1&&jl(this.ariaEl,s.length),i=s[0]}}};d([T],Wo.prototype,"postConstruct",1);var bs=class extends b{constructor(e,i){super(),this.columns=e,this.element=i}postConstruct(){this.gos.get("columnHoverHighlight")&&this.addMouseHoverListeners()}addMouseHoverListeners(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))}onMouseOut(){this.columnHoverService.clearMouseOver()}onMouseOver(){this.columnHoverService.setMouseOver(this.columns)}};d([p("columnHoverService")],bs.prototype,"columnHoverService",2),d([T],bs.prototype,"postConstruct",1);var Zc=class extends Bo{constructor(e,i,t){super(e,i,t),this.iconCreated=!1,this.column=e}setComp(e,i,t,s){this.comp=e,this.eButtonShowMainFilter=t,this.eFloatingFilterBody=s,this.setGui(i),this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this)),this.setupFilterChangedListener(),this.addManagedListener(this.column,Z.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))}resizeHeader(){}moveHeader(){}setupActive(){const e=this.column.getColDef();this.active=!!e.filter&&!!e.floatingFilter}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=se("filter",this.gos,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(){this.createManagedBean(new Pt(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.localeService.getLocaleTextFunc();He(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){if(this.gos.getActiveDomElement()===this.eGui)return;const s=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(s)return this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),void s.focus();const o=this.findNextColumnWithFloatingFilter(e.shiftKey);o&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:o},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const i=this.beans.columnModel;let t=this.column;do{if(t=e?i.getDisplayedColBefore(t):i.getDisplayedColAfter(t),!t)break}while(!t.getColDef().filter||!t.getColDef().floatingFilter);return t}handleKeyDown(e){super.handleKeyDown(e);const i=this.getWrapperHasFocus();switch(e.key){case v.UP:case v.DOWN:i||e.preventDefault();case v.LEFT:case v.RIGHT:if(i)return;e.stopPropagation();case v.ENTER:i&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case v.ESCAPE:i||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const t=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),s=!!e.relatedTarget&&Wt(e.relatedTarget,"ag-floating-filter");if(t&&s&&e.target===this.eGui){const r=this.lastFocusEvent;r&&r&&r.key===v.TAB&&this.focusService.focusInto(this.eGui,r.shiftKey)}const o=this.getRowIndex();this.beans.focusService.setFocusedHeader(o,this.column)}setupHover(){this.createManagedBean(new bs([this.column],this.eGui));const e=()=>{if(!this.gos.get("columnHoverHighlight"))return;const i=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",i)};this.addManagedListener(this.eventService,g.EVENT_COLUMN_HOVER_CHANGED,e),e()}setupLeft(){const e=new Wo(this.column,this.eGui,this.beans);this.createManagedBean(e)}setupFilterButton(){this.suppressFilterButton=!this.menuService.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!this.menuService.isLegacyMenuEnabled()}setupUserComp(){if(!this.active)return;
1const e=this.beans.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){this.menuService.showFilterMenu({column:this.column,buttonElement:this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(){if(!this.active)return;const{filterManager:e}=this.beans,i=t=>{if("filterDestroyed"===t?.source&&this.context.isDestroyed())return;const s=this.comp.getFloatingFilterComp();s&&s.then(o=>{var r;if(o){const n=e.getCurrentFloatingFilterParentModel(this.column);o.onParentModelChanged(n,t?this.gos.addGridCommonParams({columns:null!=(r=t.columns)?r:[],type:g.EVENT_FILTER_CHANGED,source:"api"===t.source?"api":"columnFilter"}):null)}})};this.destroySyncListener=this.addManagedListener(this.column,Z.EVENT_FILTER_CHANGED,i),e.isFilterActive(this.column)&&i(null)}setupWidth(){const e=()=>{const i=`${this.column.getActualWidth()}px`;this.comp.setWidth(i)};this.addManagedListener(this.column,Z.EVENT_WIDTH_CHANGED,e),e()}setupFilterChangedListener(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,Z.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=this.beans.filterManager.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(){var e,i;const t=this.active;this.setupActive();const s=!t&&this.active;t&&!this.active&&(null==(e=this.destroySyncListener)||e.call(this),null==(i=this.destroyFilterChangedListener)||i.call(this));const o=this.active?this.beans.filterManager.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();r&&o?r.then(n=>{var l;!n||this.beans.filterManager.areFilterCompsDifferent(null!=(l=this.userCompDetails)?l:null,o)?this.updateCompDetails(o,s):this.updateFloatingFilterParams(o)}):this.updateCompDetails(o,s)}updateCompDetails(e,i){this.isAlive()&&(this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),i&&(this.setupSyncWithFilter(),this.setupFilterChangedListener()))}updateFloatingFilterParams(e){var i;if(!e)return;const t=e.params;null==(i=this.comp.getFloatingFilterComp())||i.then(s=>{let o=!1;s?.refresh&&"function"==typeof s.refresh&&null!==s.refresh(t)&&(o=!0),!o&&s?.onParamsUpdated&&"function"==typeof s.onParamsUpdated&&null!==s.onParamsUpdated(t)&&O("Custom floating filter method 'onParamsUpdated' is deprecated. Use 'refresh' instead.")})}destroy(){super.destroy(),this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.destroySyncListener=null,this.destroyFilterChangedListener=null}},Hi=class extends b{constructor(e,i,t,s,o){super(),this.pinned=e,this.column=i,this.eResize=t,this.comp=s,this.ctrl=o}postConstruct(){const e=[];let i,t;const s=()=>
1{if(z(this.eResize,i),!i)return;const n=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(e.push(n),t){const l=this.gos.get("skipHeaderOnAutoSize"),a=()=>{this.columnModel.autoSizeColumn(this.column,"uiColumnResized",l)};this.eResize.addEventListener("dblclick",a);const u=new ge(this.eResize);u.addEventListener(ge.EVENT_DOUBLE_TAP,a),e.push(()=>{this.eResize.removeEventListener("dblclick",a),u.removeEventListener(ge.EVENT_DOUBLE_TAP,a),u.destroy()})}},o=()=>{e.forEach(n=>n()),e.length=0},r=()=>{const n=this.column.isResizable(),l=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(n!==i||l!==t)&&(i=n,t=l,o(),s())};r(),this.addDestroyFunc(o),this.ctrl.addRefreshFunction(r)}onResizing(e,i){const{column:t,lastResizeAmount:s,resizeStartWidth:o}=this,r=this.normaliseResizeAmount(i),l=[{key:t,newWidth:o+r}];this.column.getPinned()&&this.pinnedWidthService.getPinnedLeftWidth()+this.pinnedWidthService.getPinnedRightWidth()+(r-s)>Ut(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50||(this.lastResizeAmount=r,this.columnModel.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1))}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let i=e;const t="left"!==this.pinned,s="right"===this.pinned;return this.gos.get("enableRtl")?t&&(i*=-1):s&&(i*=-1),i}};d([p("horizontalResizeService")],Hi.prototype,"horizontalResizeService",2),d([p("pinnedWidthService")],Hi.prototype,"pinnedWidthService",2),d([p("ctrlsService")],Hi.prototype,"ctrlsService",2),d([p("columnModel")],Hi.prototype,"columnModel",2),d([T],Hi.prototype,"postConstruct",1);var Gn=class extends b{constructor(e){super(),this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1,this.column=e}onSpaceKeyDown(e){const i=this.cbSelectAll;i.isDisplayed()&&!i.getGui().contains(this.gos.getActiveDomElement())&&(e.preventDefault(),i.setValue(!i.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new Lo),this.cbSelectAll.addCssClass("ag-header-select-all"),oe(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,g.EVENT_FIELD_VALUE_CHANGED,this.onCbSelectAll.bind(this)),cs(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onNewColumnsLoaded(){this.showOrHideSelectAll()}onDisplayedColumnsChanged(){this.isAlive()&&this.showOrHideSelectAll()}showOrHideSelectAll(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e);const i=this.selectionService.hasNodesToSelect(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setDisabled(!i),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(){const e=this.localeService.getLocaleTextFunc(),t=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),s=e("ariaRowSelectAll","Press Space to toggle all rows selection");
1this.headerCellCtrl.setAriaDescriptionProperty("selectAll",this.cbSelectAllVisible?`${s} (${t})`:null),this.cbSelectAll.setInputAriaLabel(`${s} (${t})`),this.headerCellCtrl.announceAriaDescription()}checkSelectionType(e){return"multiple"===this.gos.get("rowSelection")||(console.warn(`AG Grid: ${e} is only available if using 'multiple' rowSelection.`),!1)}checkRightRowModelType(e){const i=this.rowModel.getType();return"clientSide"===i||"serverSide"===i||(console.warn(`AG Grid: ${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${i}.`),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),i=this.isFilteredOnly(),t=this.isCurrentPageOnly();let s="uiSelectAll";t?s="uiSelectAllCurrentPage":i&&(s="uiSelectAllFiltered");const o={source:s,justFiltered:i,justCurrentPage:t};e?this.selectionService.selectAllRowNodes(o):this.selectionService.deselectAllRowNodes(o)}isCheckboxSelection(){let e=this.column.getColDef().headerCheckboxSelection;return"function"==typeof e&&(e=e(this.gos.addGridCommonParams({column:this.column,colDef:this.column.getColDef()}))),!!e&&this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection")}isFilteredOnly(){return!!this.column.getColDef().headerCheckboxSelectionFilteredOnly}isCurrentPageOnly(){return!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly}};d([p("rowModel")],Gn.prototype,"rowModel",2),d([p("selectionService")],Gn.prototype,"selectionService",2);var Jc=class extends Bo{constructor(e,i,t){super(e,i,t),this.refreshFunctions=[],this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map,this.column=e}setComp(e,i,t,s){this.comp=e,this.setGui(i),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(s),this.addColumnHoverListener(),this.setupFilterClass(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.resizeFeature=this.createManagedBean(new Hi(this.getPinned(),this.column,t,e,this)),this.createManagedBean(new bs([this.column],i)),this.createManagedBean(new Wo(this.column,i,this.beans)),this.createManagedBean(new Pt(i,{shouldStopEventPropagation:o=>this.shouldStopEventPropagation(o),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(),this.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],this.refresh.bind(this)),this.addManagedListener(this.column,Z.EVENT_COL_DEF_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))}resizeHeader(e,i){var t,s;if(!this.column.isResizable())return;const o=this.column.getActualWidth(),r=null!=(t=this.column.getMinWidth())?t:0,n=null!=(s=this.column.getMaxWidth())?s:Number.MAX_SAFE_INTEGER,l=Math.min(Math.max(o+e,r),n);this.beans.columnModel.setColumnWidths([{key:this.column,newWidth:l}],i,!0,"uiColumnResized")}moveHeader(e){const{eGui:i,column:t,gos:s,ctrlsService:o}=this,r=this.getPinned(),n=i.getBoundingClientRect().left,l=t.getActualWidth(),a=s.get("enableRtl"),h=Jt.normaliseX(0===e!==a?n-20:n+l+20,r,!0,s,o);Jt.attemptMoveColumns({allMovingColumns:[t],isFromHeader:!0,hDirection:e,xPosition:h,pinned:r,fromEnter:!1,fakeEvent:!1,gos:s,columnModel:this.beans.columnModel}),o.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(t,"auto")}
1setupUserComp(){const e=this.lookupUserCompDetails();this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),i=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(i,e)}createParams(){return this.gos.addGridCommonParams({column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&this.menuService.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!this.openFilterEnabled||this.menuService.isLegacyMenuEnabled(),showColumnMenu:i=>{this.menuService.showColumnMenu({column:this.column,buttonElement:i,positionBy:"button"})},showColumnMenuAfterMouseClick:i=>{this.menuService.showColumnMenu({column:this.column,mouseEvent:i,positionBy:"mouse"})},showFilter:i=>{this.menuService.showFilterMenu({column:this.column,buttonElement:i,containerType:"columnFilter",positionBy:"button"})},progressSort:i=>{this.beans.sortController.progressSort(this.column,!!i,"uiColumnSorted")},setSort:(i,t)=>{this.beans.sortController.setSortForColumn(this.column,i,!!t,"uiColumnSorted")},eGridHeader:this.getGui(),setTooltip:(i,t)=>{this.setupTooltip(i,t)}})}setupSelectAll(){this.selectAllFeature=this.createManagedBean(new Gn(this.column)),this.selectAllFeature.setComp(this)}getSelectAllGui(){return this.selectAllFeature.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===v.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===v.ENTER&&this.onEnterKeyDown(e),e.key===v.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&this.beans.sortController.progressSort(this.column,e.shiftKey,"uiColumnSorted")}showMenuOnKeyPress(e,i){const t=this.comp.getUserCompInstance();!t||!(t instanceof yn)||t.onMenuKeyboardShortcut(i)&&e.preventDefault()}onFocusIn(e){if(!this.getGui().contains(e.relatedTarget)){const i=this.getRowIndex();this.focusService.setFocusedHeader(i,this.column),this.announceAriaDescription()}this.focusService.isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,i){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const t="whenTruncated"===this.gos.get("tooltipShowMode"),s=this.eGui,o=this.column.getColDef();!i&&t&&!o.headerComponent&&(i=()=>{const l=s.querySelector(".ag-header-cell-text");return!l||l.scrollWidth>l.clientWidth});const n=this.createManagedBean(new Et({getColumn:()=>this.column,getColDef:()=>this.column.getColDef(),getGui:()=>s,getLocation:()=>"header",getTooltipValue:()=>e??this.column.getColDef().headerTooltip,shouldDisplayTooltip:i}));this.refreshFunctions.push(()=>n.refreshToolTip())}setupClassesFromColDef(){const e=()=>{const i=this.column.getColDef(),t=Vo.getHeaderClassesFromColDef(i,this.gos,this.column,null),s=this.userHeaderClasses;this.userHeaderClasses=new Set(t),t.forEach(o=>{s.has(o)?s.delete(o):this.comp.addOrRemoveCssClass(o,!0)}),s.forEach(o=>this.comp.addOrRemoveCssClass(o,!1))};this.refreshFunctions.push(e),e()}setDragSource(e){if(this.dragSourceElement=e,this.removeDragSource(),!e||!this.draggable)return;const{column:i,beans:t,displayName:s,dragAndDropService:o,gos:r}=this,{columnModel:n}=t;let l=!this.gos.get("suppressDragLeaveHidesColumns");const a=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>l?ee.ICON_HIDE:ee.ICON_NOT_ALLOWED,getDragItem:()=>this.createDragItem(i),dragItemName:s,onDragStarted:()=>{l=!r.get("suppressDragLeaveHidesColumns"),i.setMoving(!0,"uiColumnMoved")},onDragStopped:()=>i.setMoving(!1,"uiColumnMoved"),onGridEnter:u=>{var h;if(l){const c=(null==(h=u?.columns)?void 0:h.filter(f=>!f.getColDef().lockVisible))||[];n.setColumnsVisible(c,!0,"uiColumnMoved")}},onGridExit:u=>{var h;if(l){const c=(null==(h=u?.columns)?void 0:h.filter(f=>!f.getColDef().lockVisible))||[];n.setColumnsVisible(c,!1,"uiColumnMoved")}}};o.addDragSource(a,!0)}createDragItem(e){const i={};return i[e.getId()]=e.isVisible(),{columns:[e],visibleState:i}}updateState(){this.menuEnabled=this.menuService.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=this.menuService.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}addRefreshFunction(e){this.refreshFunctions.push(e)}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach(e
1=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==e.componentClass&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const i=this.comp.getUserCompInstance();return!(!i||!i.refresh)&&i.refresh(e)}calculateDisplayName(){return this.beans.columnModel.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!(this.gos.get("suppressMovableColumns")||e.suppressMovable||e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}onColumnRowGroupChanged(){this.checkDisplayName()}onColumnPivotChanged(){this.checkDisplayName()}onColumnValueChanged(){this.checkDisplayName()}setupWidth(){const e=()=>{const i=this.column.getActualWidth();this.comp.setWidth(`${i}px`)};this.addManagedListener(this.column,Z.EVENT_WIDTH_CHANGED,e),e()}setupMovingCss(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};this.addManagedListener(this.column,Z.EVENT_MOVING_CHANGED,e),e()}setupMenuClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};this.addManagedListener(this.column,Z.EVENT_MENU_VISIBLE_CHANGED,e),e()}setupSortableClass(){const e=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};e(),this.addRefreshFunction(e),this.addManagedListener(this.eventService,Z.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))}setupFilterClass(){const e=()=>{const i=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",i),this.refreshAria()};this.addManagedListener(this.column,Z.EVENT_FILTER_ACTIVE_CHANGED,e),e()}setupWrapTextClass(){const e=()=>{const i=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",i)};e(),this.addRefreshFunction(e)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:i,comp:t,beans:s}=this;if(!i.isSpanHeaderHeight())return e.style.removeProperty("top"),e.style.removeProperty("height"),t.addOrRemoveCssClass("ag-header-span-height",!1),void t.addOrRemoveCssClass("ag-header-span-total",!1);const{numberOfParents:o,isSpanningTotal:r}=this.column.getColumnGroupPaddingInfo();t.addOrRemoveCssClass("ag-header-span-height",o>0);const{columnModel:n}=s,l=n.getColumnHeaderRowHeight();if(0===o)return t.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),void e.style.setProperty("height",`${l}px`);t.addOrRemoveCssClass("ag-header-span-total",r);const h=o*(n.isPivotMode()?n.getPivotGroupHeaderHeight():n.getGroupHeaderHeight());e.style.setProperty("top",-h+"px"),e.style.setProperty("height",`${l+h}px`)}setupAutoHeight(e){const{columnModel:i,resizeObserverService:t}=this.beans,s=u=>{if(!this.isAlive())return;const{paddingTop:h,paddingBottom:c,borderBottomWidth:f,borderTopWidth:m}=Ft(this.getGui()),S=e.offsetHeight+(h+c+f+m);if(u<5){const R=this.beans.gos.getDocument();if(!R||!R.contains(e)||0==S)return void window.setTimeout(()=>s(u+1),0)}i.setColumnHeaderHeight(this.column,S)};let r,o=!1;const n=()=>{const u=this.column.isAutoHeaderHeight();u&&!o&&l(),!u&&o&&a()},l=()=>{o=!0,s(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),r=t.observeResize(e,()=>s(0))},a=()=>{o=!1,r&&r(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),r=void 0};n(),this.addDestroyFunc(()=>a()),this.addManagedListener(this.column,Z.EVENT_WIDTH_CHANGED,()=>o&&s(0)),this.addManagedListener(this.eventService,Z.EVENT_SORT_CHANGED,()=>{o&&window.setTimeout(()=>s(0))}),this.addRefreshFunction(n)}refreshAriaSort(){if(this.sortable){const e=this.localeService.getLocaleTextFunc(),i=this.beans.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(Vl(i)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}
1refreshAriaMenu(){if(this.menuEnabled){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!this.menuService.isLegacyMenuEnabled()){const e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,i){null!=i?this.ariaDescriptionProperties.set(e,i):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(this.beans.gos.getActiveDomElement()))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((i,t)=>"filter"===i?-1:t.charCodeAt(0)-i.charCodeAt(0)).map(i=>this.ariaDescriptionProperties.get(i)).join(". ");this.beans.ariaAnnouncementService.announceValue(e)}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(){const e=()=>{if(!this.gos.get("columnHoverHighlight"))return;const i=this.beans.columnHoverService.isHovered(this.column);this.comp.addOrRemoveCssClass("ag-column-hover",i)};this.addManagedListener(this.eventService,g.EVENT_COLUMN_HOVER_CHANGED,e),e()}getColId(){return this.column.getColId()}addActiveHeaderMouseListeners(){const e=s=>this.handleMouseOverChange("mouseenter"===s.type);this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",()=>this.dispatchColumnMouseEvent(g.EVENT_COLUMN_HEADER_CLICKED,this.column)),this.addManagedListener(this.getGui(),"contextmenu",s=>this.handleContextMenuMouseEvent(s,void 0,this.column))}handleMouseOverChange(e){this.setActiveHeader(e),this.eventService.dispatchEvent({type:e?g.EVENT_COLUMN_HEADER_MOUSE_OVER:g.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const i=this.comp.getUserCompInstance();return i instanceof yn?i.getAnchorElementForMenu(e):this.getGui()}destroy(){super.destroy(),this.refreshFunctions=null,this.selectAllFeature=null,this.dragSourceElement=null,this.userCompDetails=null,this.userHeaderClasses=null,this.ariaDescriptionProperties=null}},Ts=class extends b{constructor(e,i,t,s){super(),this.eResize=i,this.comp=e,this.pinned=t,this.columnGroup=s}postConstruct(){if(!this.columnGroup.isResizable())return void this.comp.setResizableDisplayed(!1);const e=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(e),!this.gos.get("suppressAutoSize")){const i=this.gos.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",()=>{const t=[];this.columnGroup.getDisplayedLeafColumns().forEach(o=>{o.getColDef().suppressAutoSize||t.push(o.getColId())}),t.length>0&&this.columnModel.autoSizeColumns({columns:t,skipHeader:i,stopAtGroup:this.columnGroup,source:"uiColumnResized"}),this.resizeLeafColumnsToFit("uiColumnResized")})}}onResizeStart(e){const i=this.getInitialValues(e);this.storeLocalValues(i),this.toggleColumnResizing(!0)}onResizing(e,i,t="uiColumnResized"){const s=this.normaliseDragChange(i);this.resizeColumnsFromLocalValues(this.resizeStartWidth+s,t,e)}getInitialValues(e){const i=this.getColumnsToResize(),t=this.getInitialSizeOfColumns(i),o={columnsToResize:i,resizeStartWidth:t,resizeRatios:this.getSizeRatiosOfColumns(i,t)};let r=null;if(e&&(r=this.columnModel.getDisplayedGroupAtDirection(this.columnGroup,"After")),r){const n=r.getDisplayedLeafColumns(),l=o.groupAfterColumns=n.filter(u=>u.isResizable()),a=o.groupAfterStartWidth=this.getInitialSizeOfColumns(l);o.groupAfterRatios=this.getSizeRatiosOfColumns(l,a)}else o.groupAfterColumns=void 0,o.groupAfterStartWidth=void 0,o.groupAfterRatios=void 0;return o}storeLocalValues(e){const{columnsToResize:i,resizeStartWidth:t,resizeRatios:s,groupAfterColumns:o,groupAfterStartWidth:r,groupAfterRatios:n}=e;this.resizeCols=i,this.resizeStartWidth=t,this.resizeRatios=s,this.resizeTakeFromCols=o,this.resizeTakeFromStartWidth=r,this.resizeTakeFromRatios=n}clearLocalValues(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}resizeLeafColumnsToFit(e){const i=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),t=this.getInitialValues();i>t.resizeStartWidth&&this.resizeColumns(t,i,e,!0)}resizeColumnsFromLocalValues(e,i,t=!0){var s,o,r;if(!this.resizeCols||!this.resizeRatios)return;const n={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:null!=(s=this.resizeTakeFromCols)?s:void 0,groupAfterStartWidth:null!=(o=this.resizeTakeFromStartWidth)?o:void 0,groupAfterRatios:null!=(r=this.resizeTakeFromRatios)?r:void 0};this.resizeColumns(n,e,i,t)}resizeColumns(e,i,t,s=!0){const{columnsToResize:o,resizeStartWidth:r,resizeRatios:n,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:u}=e,h=[];h.push({columns:o,ratios:n,width:i}),l&&h.push({columns:l,ratios:u,width:a-(i-r)}),this.columnModel.resizeColumnSets({resizeSets:h,finished:s,source:t}),s&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(i=>i.isResizable())}getInitialSizeOfColumns(e){return e.reduce((i,t)=>i+t.getActualWidth(),0)}getSizeRatiosOfColumns(e,i){return e.map(t=>t.getActualWidth()/i)}normaliseDragChange(e){let i=e;return this.gos.get("enableRtl")?"left"!==this.pinned&&(i*=-1):"right"===this.pinned&&(i*=-1),i}destroy(){super.destroy(),this.clearLocalValues()}};d([p("horizontalResizeService")],Ts.prototype,"horizontalResizeService",2),d([p("autoWidthCalculator")],Ts.prototype,"autoWidthCalculator",2),d([p("columnModel")],Ts.prototype,"columnModel",2),d([T],Ts.prototype,"postConstruct",1);var ud=class extends b{constructor(e,i){super(),this.removeChildListenersFuncs=[],this.columnGroup=i,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,he.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);
1this.columnGroup.getLeafColumns().forEach(i=>{i.addEventListener("widthChanged",e),i.addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{i.removeEventListener("widthChanged",e),i.removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",0===e)}};d([T],ud.prototype,"postConstruct",1);var ep=class extends Bo{constructor(e,i,t){super(e,i,t),this.onSuppressColMoveChange=()=>{if(!this.isAlive()||this.isSuppressMoving())this.removeDragSource();else if(!this.dragSource){const s=this.getGui();this.setDragSource(s)}},this.column=e}setComp(e,i,t){this.comp=e,this.setGui(i),this.displayName=this.beans.columnModel.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.addDestroyFunc(()=>{this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature))}),this.setupUserComp(),this.addHeaderMouseListeners();const s=this.getParentRowCtrl().getPinned(),o=this.column.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new bs(o,i)),this.createManagedBean(new Wo(this.column,i,this.beans)),this.createManagedBean(new ud(e,this.column)),this.resizeFeature=this.createManagedBean(new Ts(e,t,s,this.column)),this.createManagedBean(new Pt(i,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addManagedPropertyListener(g.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners()}resizeHeader(e,i){if(!this.resizeFeature)return;const t=this.resizeFeature.getInitialValues(i);this.resizeFeature.resizeColumns(t,t.resizeStartWidth+e,"uiColumnResized",!0)}moveHeader(e){const{beans:i,eGui:t,column:s,gos:o,ctrlsService:r}=this,n=o.get("enableRtl"),l=0===e,a=this.getPinned(),u=t.getBoundingClientRect(),h=u.left,f=Jt.normaliseX(l!==n?h-20:h+u.width+20,a,!0,o,r),m=s.getGroupId(),C=this.focusService.getFocusedHeader();Jt.attemptMoveColumns({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,hDirection:e,xPosition:f,pinned:a,fromEnter:!1,fakeEvent:!1,gos:o,columnModel:i.columnModel});const w=s.getDisplayedLeafColumns(),S=l?w[0]:$(w);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(S,"auto"),!this.isAlive()&&C&&this.restoreFocus(m,s,C)}restoreFocus(e,i,t){const s=i.getLeafColumns();if(!s.length)return;const o=s[0].getParent();if(!o)return;const r=this.findGroupWidthId(o,e);r&&this.focusService.focusHeaderPosition({headerPosition:x(M({},t),{column:r})})}findGroupWidthId(e,i){for(;e;){if(e.getGroupId()===i)return e;e=e.getParent()}return null}resizeLeafColumnsToFit(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)}setupUserComp(){const e=this.gos.addGridCommonParams({displayName:this.displayName,columnGroup:this.column,setExpanded:t=>{this.beans.columnModel.setColumnGroupOpened(this.column.getProvidedColumnGroup(),t,"gridInitializing")},setTooltip:(t,s)=>{this.setupTooltip(t,s)}}),i=this.userComponentFactory.getHeaderGroupCompDetails(e);this.comp.setUserCompDetails(i)}addHeaderMouseListeners(){const e=s=>this.handleMouseOverChange("mouseenter"===s.type);this.addManagedListener(this.getGui(),"mouseenter",e),this.addManagedListener(this.getGui(),"mouseleave",e),this.addManagedListener(this.getGui(),"click",()=>this.dispatchColumnMouseEvent(g.EVENT_COLUMN_HEADER_CLICKED,this.column.getProvidedColumnGroup())),this.addManagedListener(this.getGui(),"contextmenu",s=>this.handleContextMenuMouseEvent(s,void 0,this.column.getProvidedColumnGroup()))}handleMouseOverChange(e){const t={type:e?g.EVENT_COLUMN_HEADER_MOUSE_OVER:g.EVENT_COLUMN_HEADER_MOUSE_LEAVE,column:this.column.getProvidedColumnGroup()};this.eventService.dispatchEvent(t)}setupTooltip(e,i){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature));const t=this.column.getColGroupDef(),s="whenTruncated"===this.gos.get("tooltipShowMode"),o=this.eGui;!i&&s&&!t?.headerGroupComponent&&(i=()=>{const n=o.querySelector(".ag-header-group-text");return!n||n.scrollWidth>n.clientWidth}
1);const r={getColumn:()=>this.column,getGui:()=>o,getLocation:()=>"headerGroup",getTooltipValue:()=>e??(t&&t.headerTooltip),shouldDisplayTooltip:i};t&&(r.getColDef=()=>t),this.createBean(new Et(r))}setupExpandable(){const e=this.column.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,le.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,le.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))}refreshExpanded(){const e=this.column;this.expandable=e.isExpandable();const i=e.isExpanded();this.comp.setAriaExpanded(this.expandable?i?"true":"false":void 0)}getColId(){return this.column.getUniqueId()}addClasses(){const e=this.column.getColGroupDef(),i=Vo.getHeaderClassesFromColDef(e,this.gos,null,this.column);this.column.isPadding()?(i.push("ag-header-group-cell-no-group"),this.column.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&i.push("ag-header-span-height")):i.push("ag-header-group-cell-with-group"),i.forEach(t=>this.comp.addOrRemoveCssClass(t,!0))}setupMovingCss(){const i=this.column.getProvidedColumnGroup().getLeafColumns(),t=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving());i.forEach(s=>{this.addManagedListener(s,Z.EVENT_MOVING_CHANGED,t)}),t()}onFocusIn(e){if(!this.eGui.contains(e.relatedTarget)){const i=this.getRowIndex();this.beans.focusService.setFocusedHeader(i,this.column)}}handleKeyDown(e){super.handleKeyDown(e);const i=this.getWrapperHasFocus();if(this.expandable&&i&&e.key===v.ENTER){const t=this.column,s=!t.isExpanded();this.beans.columnModel.setColumnGroupOpened(t.getProvidedColumnGroup(),s,"uiColumnExpanded")}}setDragSource(e){if(!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),!e))return;const{beans:i,column:t,displayName:s,gos:o,dragAndDropService:r}=this,{columnModel:n}=i,l=t.getProvidedColumnGroup().getLeafColumns();let a=!o.get("suppressDragLeaveHidesColumns");const u=this.dragSource={type:1,eElement:e,getDefaultIconName:()=>a?ee.ICON_HIDE:ee.ICON_NOT_ALLOWED,dragItemName:s,getDragItem:()=>this.getDragItemForGroup(t),onDragStarted:()=>{a=!o.get("suppressDragLeaveHidesColumns"),l.forEach(h=>h.setMoving(!0,"uiColumnDragged"))},onDragStopped:()=>l.forEach(h=>h.setMoving(!1,"uiColumnDragged")),onGridEnter:h=>{var c;if(a){const f=(null==(c=h?.columns)?void 0:c.filter(m=>!m.getColDef().lockVisible))||[];n.setColumnsVisible(f,!0,"uiColumnMoved")}},onGridExit:h=>{var c;if(a){const f=(null==(c=h?.columns)?void 0:c.filter(m=>!m.getColDef().lockVisible))||[];n.setColumnsVisible(f,!1,"uiColumnMoved")}}};r.addDragSource(u,!0)}getDragItemForGroup(e){const i=e.getProvidedColumnGroup().getLeafColumns(),t={};i.forEach(o=>t[o.getId()]=o.isVisible());const s=[];return this.beans.columnModel.getAllDisplayedColumns().forEach(o=>{i.indexOf(o)>=0&&(s.push(o),Le(i,o))}
1),i.forEach(o=>s.push(o)),{columns:s,visibleState:t}}isSuppressMoving(){let e=!1;return this.column.getLeafColumns().forEach(t=>{(t.getColDef().suppressMovable||t.getColDef().lockPosition)&&(e=!0)}),e||this.gos.get("suppressMovableColumns")}},tp=0,As=class extends b{constructor(e,i,t){super(),this.instanceId=tp++,this.rowIndex=e,this.pinned=i,this.type=t,this.headerRowClass="ag-header-row "+("group"==t?"ag-header-row-column-group":"filter"==t?"ag-header-row-column-filter":"ag-header-row-column")}postConstruct(){this.isPrintLayout=this.gos.isDomLayout("print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}getInstanceId(){return this.instanceId}setComp(e,i=!0){this.comp=e,i&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners()}getHeaderRowClass(){return this.headerRowClass}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(){this.addManagedListener(this.eventService,g.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_VIRTUAL_COLUMNS_CHANGED,e=>this.onVirtualColumnsChanged(e.afterScroll)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("ensureDomOrder",e=>this.isEnsureDomOrder=e.currentValue),this.addManagedPropertyListener("headerHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("groupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotGroupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("floatingFiltersHeight",this.onRowHeightChanged.bind(this))}getHeaderCellCtrl(e){if(this.headerCellCtrls)return Ht(this.headerCellCtrls).find(i=>i.getColumnGroupChild()===e)}onDisplayedColumnsChanged(){this.isPrintLayout=this.gos.isDomLayout("print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}getType(){return this.type}onColumnResized(){this.setWidth()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{columnModel:e}=this.beans;return this.isPrintLayout?null!=this.pinned?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){var{topOffset:e,rowHeight:i}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(i+"px")}getTopAndHeight(){const{columnModel:e,filterManager:i}=this.beans;let t=e.getHeaderRowCount();const s=[];let o=0;i.hasFloatingFilters()&&(t++,o=1);const r=e.getColumnGroupHeaderRowHeight(),n=e.getColumnHeaderRowHeight(),a=t-(1+o);for(let c=0;c<a;c++)s.push(r);s.push(n);for(let c=0;c<o;c++)s.push(e.getFloatingFiltersHeight());let u=0;for(let c=0;c<this.rowIndex;c++)u+=s[c];return{topOffset:u,rowHeight:s[this.rowIndex]}}getPinned(){return this.pinned}getRowIndex(){return this.rowIndex}onVirtualColumnsChanged(e=!1){const i=this.getHeaderCtrls();this.comp.setHeaderCtrls(i,this.isEnsureDomOrder||this.isPrintLayout,e)}getHeaderCtrls(){const e=this.headerCellCtrls;this.headerCellCtrls=new Map;const i=this.getColumnsInViewport();for(const o of i)this.recycleAndCreateHeaderCtrls(o,e);const t=o=>{const{focusService:r,columnModel:n}=this.beans;return!!r.isHeaderWrapperFocused(o)&&n.isDisplayed(o.getColumnGroupChild())};if(e)for(const[o,r]of e)t(r)?this.headerCellCtrls.set(o,r):this.destroyBean(r);return Array.from(this.headerCellCtrls.values())}recycleAndCreateHeaderCtrls(e,i){if(!this.headerCellCtrls||e.isEmptyGroup())return;const t=e.getUniqueId();let s;if(i&&(s=i.get(t),i.delete(t)),s&&s.getColumnGroupChild()!=e&&(this.destroyBean(s),s=void 0),null==s)switch(this.type){case"filter":s=this.createBean(new Zc(e,this.beans,this));break;case"group":s=this.createBean(new ep(e,this.beans,this));break;default:s=this.createBean(new Jc(e,this.beans,this))}this.headerCellCtrls.set(t,s)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(null!=this.pinned)return[];let e=[];const i=this.getActualDepth(),{columnModel:t}=this.beans;return["left",null,"right"].forEach(s=>{const o=t.getVirtualHeaderGroupRow(s,i);e=e.concat(o)}),e}getActualDepth(){return"filter"==this.type?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth())}focusHeader(e,i){if(!this.headerCellCtrls)return!1;const s=Array.from(this.headerCellCtrls.values()).find(o=>o.getColumnGroupChild()==e);return!!s&&s.focus(i)}
1destroy(){this.headerCellCtrls&&this.headerCellCtrls.forEach(e=>{this.destroyBean(e)}),this.headerCellCtrls=void 0,super.destroy()}};d([p("beans")],As.prototype,"beans",2),d([T],As.prototype,"postConstruct",1);var ei=class extends b{constructor(e){super(),this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[],this.pinned=e}setComp(e,i){this.comp=e,this.eViewport=i,this.setupCenterWidth(),this.setupPinnedWidth(),this.setupDragAndDrop(this.eViewport),this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.ctrlsService.registerHeaderContainer(this,this.pinned),this.columnModel.isReady()&&this.refresh()}setupDragAndDrop(e){const i=new Vi(this.pinned,e);this.createManagedBean(i)}refresh(e=!1){const i=new Fi,t=this.focusService.getFocusHeaderToUseAfterRefresh();(()=>{const l=this.columnModel.getHeaderRowCount()-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let a=0;a<l;a++){const u=this.createBean(new As(i.next(),this.pinned,"group"));this.groupsRowCtrls.push(u)}})(),(()=>{const l=i.next(),a=!(this.hidden||null!=this.columnsRowCtrl&&e&&this.columnsRowCtrl.getRowIndex()===l);(a||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),a&&(this.columnsRowCtrl=this.createBean(new As(l,this.pinned,"column")))})(),(()=>{this.includeFloatingFilter=this.filterManager.hasFloatingFilters()&&!this.hidden;const l=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter)return void l();const a=i.next();if(this.filtersRowCtrl){const u=this.filtersRowCtrl.getRowIndex()!==a;(!e||u)&&l()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new As(a,this.pinned,"filter")))})();const n=this.getAllCtrls();this.comp.setCtrls(n),this.restoreFocusOnHeader(t)}restoreFocusOnHeader(e){null==e||e.column.getPinned()!=this.pinned||this.focusService.focusHeaderPosition({headerPosition:e})}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(){const e=this.filterManager.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==e&&this.refresh(!0)}setupCenterWidth(){null==this.pinned&&this.createManagedBean(new Ni(e=>this.comp.setCenterWidth(`${e}px`),!0))}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}setupPinnedWidth(){if(null==this.pinned)return;
1const e="left"===this.pinned,i="right"===this.pinned;this.hidden=!0;const t=()=>{const s=e?this.pinnedWidthService.getPinnedLeftWidth():this.pinnedWidthService.getPinnedRightWidth();if(null==s)return;const o=0==s,r=this.hidden!==o,n=this.gos.get("enableRtl"),l=this.gos.getScrollbarWidth(),u=this.scrollVisibleService.isVerticalScrollShowing()&&(n&&e||!n&&i)?s+l:s;this.comp.setPinnedContainerWidth(`${u}px`),this.comp.setDisplayed(!o),r&&(this.hidden=o,this.refresh())};this.addManagedListener(this.eventService,g.EVENT_LEFT_PINNED_WIDTH_CHANGED,t),this.addManagedListener(this.eventService,g.EVENT_RIGHT_PINNED_WIDTH_CHANGED,t),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,t),this.addManagedListener(this.eventService,g.EVENT_SCROLLBAR_WIDTH_CHANGED,t)}getHeaderCtrlForColumn(e){if(e instanceof Z)return this.columnsRowCtrl?this.columnsRowCtrl.getHeaderCellCtrl(e):void 0;if(0!==this.groupsRowCtrls.length)for(let i=0;i<this.groupsRowCtrls.length;i++){const t=this.groupsRowCtrls[i].getHeaderCellCtrl(e);if(t)return t}}getHtmlElementForColumnHeader(e){const i=this.getHeaderCtrlForColumn(e);return i?i.getGui():null}getRowType(e){const t=this.getAllCtrls()[e];return t?t.getType():void 0}focusHeader(e,i,t){const o=this.getAllCtrls()[e];return!!o&&o.focusHeader(i,t)}getViewport(){return this.eViewport}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}destroy(){this.filtersRowCtrl&&(this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)),this.columnsRowCtrl&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),this.groupsRowCtrls&&this.groupsRowCtrls.length&&(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls)),super.destroy()}};d([p("ctrlsService")],ei.prototype,"ctrlsService",2),d([p("scrollVisibleService")],ei.prototype,"scrollVisibleService",2),d([p("pinnedWidthService")],ei.prototype,"pinnedWidthService",2),d([p("columnModel")],ei.prototype,"columnModel",2),d([p("focusService")],ei.prototype,"focusService",2),d([p("filterManager")],ei.prototype,"filterManager",2);var Uo=(()=>{let e=class hr extends V{constructor(t){super(),this.headerRowComps={},this.rowCompsList=[],this.pinned=t}init(){this.selectAndSetTemplate();const t={setDisplayed:o=>this.setDisplayed(o),setCtrls:o=>this.setCtrls(o),setCenterWidth:o=>this.eCenterContainer.style.width=o,setViewportScrollLeft:o=>this.getGui().scrollLeft=o,setPinnedContainerWidth:o=>{const r=this.getGui();r.style.width=o,r.style.maxWidth=o,r.style.minWidth=o}};this.createManagedBean(new ei(this.pinned)).setComp(t,this.getGui())}selectAndSetTemplate(){this.setTemplate("left"==this.pinned?hr.PINNED_LEFT_TEMPLATE:"right"==this.pinned?hr.PINNED_RIGHT_TEMPLATE:hr.CENTER_TEMPLATE),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()}destroyRowComps(){this.setCtrls([])}destroyRowComp(t){this.destroyBean(t),this.eRowContainer.removeChild(t.getGui())}setCtrls(t){const s=this.headerRowComps;let o;this.headerRowComps={},this.rowCompsList=[];const r=n=>{const l=n.getGui();l.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(l),o&&rn(this.eRowContainer,l,o),o=l};t.forEach(n=>{const l=n.getInstanceId(),a=s[l];delete s[l];const u=a||this.createBean(new In(n));this.headerRowComps[l]=u,this.rowCompsList.push(u),r(u)}),bt(s).forEach(n=>this.destroyRowComp(n))}};return e.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="rowgroup"></div>',e.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="rowgroup"></div>',e.CENTER_TEMPLATE='<div class="ag-header-viewport" role="presentation">\n <div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>\n </div>',e})();d([F("eCenterContainer")],Uo.prototype,"eCenterContainer",2),d([T],Uo.prototype,"init",1),d([ye],Uo.prototype,"destroyRowComps",1);var Nn=Uo,ti=class extends b{constructor(){super(...arguments),this.currentHeaderRowWithoutSpan=-1}postConstruct(){this.ctrlsService.whenReady(i=>{this.gridBodyCon=i.gridBodyCtrl});const e=this.gos.getDocument();this.addManagedListener(e,"mousedown",()=>this.setCurrentHeaderRowWithoutSpan(-1))}getHeaderRowCount(){const e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0}navigateVertically(e,i,t){if(i||(i=this.focusService.getFocusedHeader()),!i)return!1;const{headerRowIndex:s,column:o}=i,r=this.getHeaderRowCount(),n=0===e;let{headerRowIndex:l,column:a,headerRowIndexWithoutSpan:u}=n?this.headerPositionUtils.getColumnVisibleParent(o,s):this.headerPositionUtils.getColumnVisibleChild(o,s),h=!1;return l<0&&(l=0,a=o,h=!0),l>=r?(l=-1,this.setCurrentHeaderRowWithoutSpan(-1)):void 0!==u&&(this.currentHeaderRowWithoutSpan=u),!(!h&&!a)&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l,column:a},allowUserOverride:!0,event:t})}setCurrentHeaderRowWithoutSpan(e){this.currentHeaderRowWithoutSpan=e}navigateHorizontally(e,i=!1,t){const s=this.focusService.getFocusedHeader(),o=2===e,r=this.gos.get("enableRtl");let n,l;if(-1!==this.currentHeaderRowWithoutSpan?s.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=s.headerRowIndex,o!==r?(l="Before",n=this.headerPositionUtils.findHeader(s,l)):(l="After",n=this.headerPositionUtils.findHeader(s,l)),n||!i)return this.focusService.focusHeaderPosition({headerPosition:n,direction:l,fromTab:i,allowUserOverride:!0,event:t});if(i){const a=this.gos.getCallback("tabToNextHeader");if(a)return this.focusService.focusHeaderPositionFromUserFunc({userFunc:a,headerPosition:n,direction:l})}return this.focusNextHeaderRow(s,l,t)}focusNextHeaderRow(e,i,t){const s=e.headerRowIndex;let r,o=null;if("Before"===i?s>0&&(r=s-1,this.currentHeaderRowWithoutSpan-=1,o=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"end")):(r=s+1,this.currentHeaderRowWithoutSpan<this.getHeaderRowCount()?this.currentHeaderRowWithoutSpan+=1:this.setCurrentHeaderRowWithoutSpan(-1),o=this.headerPositionUtils.findColAtEdgeForHeaderRow(r,"start")),!o)return!1;const{column:n,headerRowIndex:l}=this.headerPositionUtils.getHeaderIndexToFocus(o.column,o?.headerRowIndex);return this.focusService.focusHeaderPosition({headerPosition:{column:n,headerRowIndex:l},direction:i,fromTab:!0,allowUserOverride:!0,event:t})}scrollToColumn(e,i="After"){if(e.getPinned())return;let t;if(e instanceof he){const s=e.getDisplayedLeafColumns();t="Before"===i?$(s):s[0]}else t=e;
1this.gridBodyCon.getScrollFeature().ensureColumnVisible(t)}};d([p("focusService")],ti.prototype,"focusService",2),d([p("headerPositionUtils")],ti.prototype,"headerPositionUtils",2),d([p("ctrlsService")],ti.prototype,"ctrlsService",2),d([T],ti.prototype,"postConstruct",1),ti=d([I("headerNavigationService")],ti);var ii=class extends b{setComp(e,i,t){this.comp=e,this.eGui=i,this.createManagedBean(new Pt(t,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight();const s=this.onHeaderContextMenu.bind(this);this.addManagedListener(this.eGui,"contextmenu",s),this.mockContextMenuForIPad(s),this.ctrlsService.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("pivotHeaderHeight",e),this.addManagedPropertyListener("groupHeaderHeight",e),this.addManagedPropertyListener("pivotGroupHeaderHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,e)}getHeaderHeight(){return this.headerHeight}setHeaderHeight(){const{columnModel:e}=this;let s,i=0,t=e.getHeaderRowCount();this.filterManager.hasFloatingFilters()&&(t++,i=1);const r=this.columnModel.getColumnGroupHeaderRowHeight(),n=this.columnModel.getColumnHeaderRowHeight(),a=t-(1+i);s=i*e.getFloatingFiltersHeight(),s+=a*r,s+=n,this.headerHeight!==s&&(this.headerHeight=s,this.comp.setHeightAndMinHeight(`${s+1}px`),this.eventService.dispatchEvent({type:g.EVENT_HEADER_HEIGHT_CHANGED}))}onPivotModeChanged(){const e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)}onDisplayedColumnsChanged(){const i=this.columnModel.getAllDisplayedColumns().some(t=>t.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",i)}onTabKeyDown(e){const i=this.gos.get("enableRtl");(this.headerNavigationService.navigateHorizontally(e.shiftKey!==i?2:3,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()}handleKeyDown(e){let i=null;switch(e.key){case v.LEFT:i=2;case v.RIGHT:y(i)||(i=3),this.headerNavigationService.navigateHorizontally(i,!1,e);break;case v.UP:i=0;case v.DOWN:y(i)||(i=1),this.headerNavigationService.navigateVertically(i,null,e)&&e.preventDefault();break;default:return}}onFocusOut(e){const{relatedTarget:i}=e;!i&&this.eGui.contains(this.gos.getActiveDomElement())||this.eGui.contains(i)||this.focusService.clearFocusedHeader()}onHeaderContextMenu(e,i,t){if(!e&&!t||!this.menuService.isHeaderContextMenuEnabled())return;const{target:s}=e??i;(s===this.eGui||s===this.ctrlsService.getHeaderRowContainerCtrl().getViewport())&&this.menuService.showHeaderContextMenu(void 0,e,t)}mockContextMenuForIPad(e){if(!St())return;const i=new ge(this.eGui);this.addManagedListener(i,ge.EVENT_LONG_TAP,s=>{e(void 0,s.touchStart,s.touchEvent)}),this.addDestroyFunc(()=>i.destroy())}};d([p("headerNavigationService")],ii.prototype,"headerNavigationService",2),d([p("focusService")],ii.prototype,"focusService",2),d([p("columnModel")],ii.prototype,"columnModel",2),d([p("ctrlsService")],ii.prototype,"ctrlsService",2),d([p("filterManager")],ii.prototype,"filterManager",2),d([p("menuService")],ii.prototype,"menuService",2);var hd=(()=>{let e=class ru extends V{constructor(){super(ru.TEMPLATE)}postConstruct(){const t={addOrRemoveCssClass:(r,n)=>this.addOrRemoveCssClass(r,n),setHeightAndMinHeight:r=>{this.getGui().style.height=r,this.getGui().style.minHeight=r}};this.createManagedBean(new ii).setComp(t,this.getGui(),this.getFocusableElement());const o=r=>{this.createManagedBean(r),this.appendChild(r)};o(new Nn("left")),o(new Nn(null)),o(new Nn("right"))}};return e.TEMPLATE='<div class="ag-header" role="presentation"/>',e})();d([T],hd.prototype,"postConstruct",1);var sp=hd,Fs=class extends b{addResizeBar(e){const i={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0};return this.dragService.addDragSource(i),()=>this.dragService.removeDragSource(i)}onDragStart(e,i){this.dragStartX=i.clientX,this.setResizeIcons();const t=i instanceof MouseEvent&&!0===i.shiftKey;e.onResizeStart(t)}setResizeIcons(){const e=this.ctrlsService.get("gridCtrl");
1e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e,i){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.ctrlsService.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,i){this.resizeAmount=i.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}};d([p("dragService")],Fs.prototype,"dragService",2),d([p("ctrlsService")],Fs.prototype,"ctrlsService",2),Fs=d([I("horizontalResizeService")],Fs);var Nt=class extends b{hideActiveMenu(){this.hidePopup&&this.hidePopup()}showMenuAfterMouseEvent(e,i,t){this.showPopup(e,s=>{this.popupService.positionPopupUnderMouseEvent({column:e,type:t,mouseEvent:i,ePopup:s})},t,i.target,this.menuService.isLegacyMenuEnabled())}showMenuAfterButtonClick(e,i,t){let s=-1,o="left";const r=this.menuService.isLegacyMenuEnabled();!r&&this.gos.get("enableRtl")&&(s=1,o="right");let n=r?void 0:4*s,l=r?void 0:4;this.showPopup(e,a=>{this.popupService.positionPopupByComponent({type:t,eventSource:i,ePopup:a,nudgeX:n,nudgeY:l,alignSide:o,keepWithinBounds:!0,position:"under",column:e})},t,i,r)}showPopup(e,i,t,s,o){const r=e?this.createBean(new Oo(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e)throw new Error("AG Grid - unable to show popup filter, filter instantiation failed");const n=document.createElement("div");let l;oe(n,"presentation"),n.classList.add("ag-menu"),o||n.classList.add("ag-filter-menu"),this.tabListener=this.addManagedListener(n,"keydown",C=>this.trapFocusWithin(C,n)),n.appendChild(r?.getGui());const u=this.menuService.isColumnMenuAnchoringEnabled()?s??this.ctrlsService.getGridBodyCtrl().getGui():void 0,c=this.localeService.getLocaleTextFunc(),f=o&&"columnFilter"!==t?c("ariaLabelColumnMenu","Column Menu"):c("ariaLabelColumnFilter","Column Filter"),m=this.popupService.addPopup({modal:!0,eChild:n,closeOnEsc:!0,closedCallback:C=>{e.setMenuVisible(!1,"contextMenu");const w=C instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),w&&s&&Ie(s)){const S=this.focusService.findTabbableParent(s);S&&S.focus()}r?.afterGuiDetached(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,t,e)},positionCallback:()=>i(n),anchorToElement:u,ariaLabel:f});m&&(this.hidePopup=l=m.hideFunc),r.afterInit().then(()=>{i(n),r.afterGuiAttached({container:t,hidePopup:l})}),e.setMenuVisible(!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,t,e)}trapFocusWithin(e,i){e.key!==v.TAB||e.defaultPrevented||this.focusService.findNextFocusableElement(i,!1,e.shiftKey)||(e.preventDefault(),this.focusService.focusInto(i,e.shiftKey))}dispatchVisibleChangedEvent(e,i,t){this.eventService.dispatchEvent({type:g.EVENT_COLUMN_MENU_VISIBLE_CHANGED,visible:e,switchingTab:!1,key:i,column:t??null})}isMenuEnabled(e){var i;return e.isFilterAllowed()&&(null!=(i=e.getColDef().menuTabs)?i:["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}};d([p("filterManager")],Nt.prototype,"filterManager",2),d([p("popupService")],Nt.prototype,"popupService",2),d([p("focusService")],Nt.prototype,"focusService",2),d([p("ctrlsService")],Nt.prototype,"ctrlsService",2),d([p("menuService")],Nt.prototype,"menuService",2),Nt=d([I("filterMenuFactory")],Nt);var xn=class extends b{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1;const{comp:i,eTopGuard:t,eBottomGuard:s,focusTrapActive:o,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:n,onFocusIn:l,onFocusOut:a,shouldStopEventPropagation:u,onTabKeyDown:h,handleKeyDown:c,eFocusableElement:f}=e;this.comp=i,this.eTopGuard=t,this.eBottomGuard=s,this.providedFocusInnerElement=n,this.eFocusableElement=f,this.focusTrapActive=!!o,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.providedFocusIn=l,this.providedFocusOut=a,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=h,this.providedHandleKeyDown=c}postConstruct(){this.createManagedBean(new Pt(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEac
1h(e=>this.addManagedListener(e,"focus",this.onFocus.bind(this)))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.skipTabGuardFocus)return void(this.skipTabGuardFocus=!1);if(this.forceFocusOutWhenTabGuardsAreEmpty&&0===this.focusService.findFocusableElements(this.eFocusableElement,".ag-tab-guard").length)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);const i=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(i):this.focusInnerElement(i)}findNextElementOutsideAndFocus(e){const i=this.gos.getDocument(),t=this.focusService.findFocusableElements(i.body,null,!0),s=t.indexOf(e?this.eTopGuard:this.eBottomGuard);if(-1===s)return;let o,r;e?(o=0,r=s):(o=s+1,r=t.length);const n=t.slice(o,r),l=this.gos.get("tabIndex");n.sort((a,u)=>{const h=parseInt(a.getAttribute("tabindex")||"0"),c=parseInt(u.getAttribute("tabindex")||"0");return c===l?1:h===l?-1:0===h?1:0===c?-1:h-c}),n[e?n.length-1:0].focus()}onFocusIn(e){this.focusTrapActive||(this.providedFocusIn&&this.providedFocusIn(e),this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown)return void this.providedOnTabKeyDown(e);if(this.focusTrapActive||e.defaultPrevented)return;const i=this.tabGuardsAreActive();i&&this.deactivateTabGuards();const t=this.getNextFocusableElement(e.shiftKey);i&&setTimeout(()=>this.activateTabGuards(),0),t&&(t.focus(),e.preventDefault())}focusInnerElement(e=!1){const i=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(i.splice(0,1),i.splice(i.length-1,1)),i.length&&i[e?i.length-1:0].focus({preventScroll:!0})}getNextFocusableElement(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const i=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,i.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e){return e===this.eTopGuard||e===this.eBottomGuard}};d([p("focusService")],xn.prototype,"focusService",2),d([T],xn.prototype,"postConstruct",1);var Ps=class extends V{initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.getFocusableElement();const i=[this.eTopGuard,this.eBottomGuard],t={setTabIndex:s=>{i.forEach(o=>null!=s?o.setAttribute("tabindex",s):o.removeAttribute("tabindex"))}};this.addTabGuards(this.eTopGuard,this.eBottomGuard),this.tabGuardCtrl=this.createManagedBean(new xn({comp:t,focusTrapActive:!!e.focusTrapActive,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:e.onFocusIn,onFocusOut:e.onFocusOut,focusInnerElement:e.focusInnerElement,handleKeyDown:e.handleKeyDown,onTabKeyDown:e.onTabKeyDown,shouldStopEventPropagation:e.shouldStopEventPropagation,forceFocusOutWhenTabGuardsAreEmpty:e.forceFocusOutWhenTabGuardsAreEmpty}))}createTabGuard(e){const i=document.createElement("div");return i.classList.add("ag-tab-guard","top"===e?"ag-tab-guard-top":"ag-tab-guard-bottom"),oe(i,"presentation"),i}addTabGuards(e,i){this.eFocusableElement.insertAdjacentElement("afterbegin",e),this.eFocusableElement.insertAdjacentElement("beforeend",i)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];ne(this.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,i){ws(e)||(e=e.getGui());const{eBottomGuard:t}=this;t?t.insertAdjacentElement("beforebegin",e):super.appendChild(e,i)}},zo=class nu extends Ps{constructor(i){super(nu.getTemplate(i.cssClass)),this.items=[],this.tabbedItemScrollMap=new Map,this.params=i}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEac
1h(i=>this.addItem(i)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>{var i,t,s;return null==(s=null==(t=null==(i=this.activeItem)?void 0:i.tabbedItem)?void 0:t.afterDetachedCallback)?void 0:s.call(t)})}static getTemplate(i){return`<div class="ag-tabs ${i}">\n <div ref="eHeader"></div>\n <div ref="eBody" role="presentation" class="ag-tabs-body ${i?`${i}-body`:""}"></div>\n </div>`}setupHeader(){const{enableCloseButton:i,cssClass:t}=this.params,s=(o,r)=>{o.classList.add(`ag-tabs-${r}`),t&&o.classList.add(`${t}-${r}`)};i?(this.setupCloseButton(s),this.eTabHeader=this.gos.getDocument().createElement("div"),s(this.eHeader,"header-wrapper"),oe(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,oe(this.eTabHeader,"tablist"),s(this.eTabHeader,"header")}setupCloseButton(i){const t=this.gos.getDocument(),s=t.createElement("button");i(s,"close-button");const o=se("close",this.gos,void 0,!0);He(s,this.params.closeButtonAriaLabel),s.appendChild(o),this.addManagedListener(s,"click",()=>{var n,l;return null==(l=(n=this.params).onCloseClicked)?void 0:l.call(n)});const r=t.createElement("div");i(r,"close-button-wrapper"),oe(r,"presentation"),r.appendChild(s),this.eHeader.appendChild(r),this.eCloseButton=s}handleKeyDown(i){switch(i.key){case v.RIGHT:case v.LEFT:if(!this.eTabHeader.contains(this.gos.getActiveDomElement()))return;const t=i.key===v.RIGHT,s=this.gos.get("enableRtl"),o=this.items.indexOf(this.activeItem),r=t!==s?Math.min(o+1,this.items.length-1):Math.max(o-1,0);if(o===r)return;i.preventDefault();const n=this.items[r];this.showItemWrapper(n),n.eHeaderButton.focus();break;case v.UP:case v.DOWN:i.stopPropagation()}}onTabKeyDown(i){var t,s,o,r;if(i.defaultPrevented)return;const{focusService:n,eHeader:l,eBody:a,activeItem:u,params:h}=this,{suppressTrapFocus:c,enableCloseButton:f}=h,m=this.gos.getActiveDomElement(),C=i.target,w=i.shiftKey;if(l.contains(m))return i.preventDefault(),void(!f||!w||null!=(t=this.eCloseButton)&&t.contains(m)?c&&w?null==(o=this.focusService.findFocusableElementBeforeTabGuard(this.gos.getDocument().body,C))||o.focus():this.focusBody(i.shiftKey):null==(s=this.eCloseButton)||s.focus());let S=null;if(n.isTargetUnderManagedComponent(a,C)&&(w&&(S=this.focusService.findFocusableElementBeforeTabGuard(a,C)),!S&&!c&&(S=u.eHeaderButton)),!S&&a.contains(m)&&(S=n.findNextFocusableElement(a,!1,w),!S))return i.preventDefault(),void(c&&!w?this.forceFocusOutOfContainer(w):f&&!w?null==(r=this.eCloseButton)||r.focus():this.focusHeader());S&&(i.preventDefault(),S.focus())}focusInnerElement(i){i?this.focusHeader():this.focusBody(!0)}focusHeader(i){this.activeItem.eHeaderButton.focus({preventScroll:i})}focusBody(i){this.focusService.focusInto(this.eBody,i)}setAfterAttachedParams(i){this.afterAttachedParams=i}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(i){const t=document.createElement("span");oe(t,"tab"),t.setAttribute("tabindex","-1"),t.appendChild(i.title),t.classList.add("ag-tab"),this.eTabHeader.appendChild(t),He(t,i.titleLabel);const s={tabbedItem:i,eHeaderButton:t};this.items.push(s),t.addEventListener("click",this.showItemWrapper.bind(this,s))}showItem(i){const t=this.items.find(s=>s.tabbedItem===i);t&&this.showItemWrapper(t)}showItemWrapper(i){var t,s,o,r,n,l;const{tabbedItem:a,eHeaderButton:u}=i;null==(s=(t=this.params).onItemClicked)||s.call(t,{item:a}),this.activeItem!==i?(this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),ne(this.eBody),a.bodyPromise.then(h=>{this.eBody.appendChild(h);const c=!this.focusService.isKeyboardMode();if(this.params.suppressFocusBodyOnOpen||this.focusService.focusInto(this.eBody,!1,c),a.afterAttachedCallback&&a.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){const f=a.getScrollableContainer&&a.getScrollableContainer()||h;this.lastScrollListener=this.addManagedListener(f,"scroll",()=>{this.tabbedItemScrollMap.set(a.name,f.scrollTop)});const m=this.tabbedItemScrollMap.get(a.name);void 0!==m&&setTimeout(()=>{f.scrollTop=m},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),null==(l=(n=this.activeItem.tabbedItem).afterDetachedCallback)||l.call(n)),u.classList.add("ag-tab-selected"),this.activeItem=i):null==(r=(o=this.params).onActiveItem
1Clicked)||r.call(o)}};d([p("focusService")],zo.prototype,"focusService",2),d([F("eHeader")],zo.prototype,"eHeader",2),d([F("eBody")],zo.prototype,"eBody",2),d([T],zo.prototype,"postConstruct",1);var On=class extends b{constructor(){super(...arguments),this.polyfillFunctions=[]}observeResize(e,i){const t=this.gos.getWindow(),o=()=>{var l,a;let u=null!=(l=e?.clientWidth)?l:0,h=null!=(a=e?.clientHeight)?a:0,c=!0;const f=()=>{var m,C;if(c){const w=null!=(m=e?.clientWidth)?m:0,S=null!=(C=e?.clientHeight)?C:0;(w!==u||S!==h)&&(u=w,h=S,i()),this.doNextPolyfillTurn(f)}};return f(),()=>c=!1},r=this.gos.get("suppressBrowserResizeObserver");return t.ResizeObserver&&!r?(()=>{const l=new t.ResizeObserver(i);return l.observe(e),()=>l.disconnect()})():this.getFrameworkOverrides().wrapIncoming(()=>o(),"resize-observer")}doNextPolyfillTurn(e){this.polyfillFunctions.push(e),this.schedulePolyfill()}schedulePolyfill(){this.polyfillScheduled||(this.polyfillScheduled=!0,window.setTimeout(()=>{const i=this.polyfillFunctions;this.polyfillScheduled=!1,this.polyfillFunctions=[],i.forEach(t=>t())},50))}};On=d([I("resizeObserverService")],On);var ki=class extends b{constructor(){super(...arguments),this.createTasksP1={list:[],sorted:!1},this.createTasksP2={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastPage=0,this.lastScrollTop=0,this.taskCount=0,this.cancelledTasks=new Set}setScrollTop(e){const i=this.gos.get("pagination");if(this.scrollGoingDown=e>=this.lastScrollTop,i&&0===e){const t=this.paginationProxy.getCurrentPage();t!==this.lastPage&&(this.lastPage=t,this.scrollGoingDown=!0)}this.lastScrollTop=e}init(){this.useAnimationFrame=!this.gos.get("suppressAnimationFrame")}isOn(){return this.useAnimationFrame}verifyAnimationFrameOn(e){!1===this.useAnimationFrame&&console.warn(`AG Grid: AnimationFrameService.${e} called but animation frames are off`)}createTask(e,i,t){this.verifyAnimationFrameOn(t);const s={task:e,index:i,createOrder:++this.taskCount};this.addTaskToList(this[t],s),this.schedule()}cancelTask(e){this.cancelledTasks.add(e)}addTaskToList(e,i){e.list.push(i),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const i=this.scrollGoingDown?1:-1;e.list.sort((t,s)=>t.index!==s.index?i*(s.index-t.index):s.createOrder-t.createOrder),e.sorted=!0}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");const i=this.createTasksP1,t=i.list,s=this.createTasksP2,o=s.list,r=this.destroyTasks,n=(new Date).getTime();let l=(new Date).getTime()-n;const a=e<=0,u=this.ctrlsService.getGridBodyCtrl();for(;a||l<e;){if(!u.getScrollFeature().scrollGridIfNeeded()){let c;if(t.length)this.sortTaskList(i),c=t.pop().task;else if(o.length)this.sortTaskList(s),c=o.pop().task;else{if(!r.length){this.cancelledTasks.clear();break}c=r.pop()}this.cancelledTasks.has(c)||c()}l=(new Date).getTime()-n}t.length||o.length||r.length?this.requestFrame():this.stopTicking()}stopTicking(){this.ticking=!1}flushAllFrames(){this.useAnimationFrame&&this.executeFrame(-1)}schedule(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);this.requestAnimationFrame(e)}requestAnimationFrame(e){const i=this.gos.getWindow();i.requestAnimationFrame?i.requestAnimationFrame(e):i.webkitRequestAnimationFrame?i.webkitRequestAnimationFrame(e):i.setTimeout(e,0)}isQueueEmpty(){return!this.ticking}debounce(e){let i=!1;return()=>{this.isOn()?i||(i=!0,this.addDestroyTask(()=>{i=!1,e()})):window.setTimeout(e,0)}}};d([p("ctrlsService")],ki.prototype,"ctrlsService",2),d([p("paginationProxy")],ki.prototype,"paginationProxy",2),d([T],ki.prototype,"init",1),ki=d([I("animationFrameService")],ki);var Ls=class extends b{postConstruct(){this.isClientSideRowModel="clientSide"===this.rowModel.getType()}expandRows(e){if(!this.isClientSideRowModel)return;const i=new Set(e);this.rowModel.forEachNode(t=>{t.id&&i.has(t.id)&&(t.expanded=!0)}),this.onGroupExpandedOrCollapsed()}getExpandedRows(){const e=[];return this.rowModel.forEachNode(({expanded:i,id:t})=>{i&&t&&e.push(t)}),e}expandAll(e){this.isClientSideRowModel&&this.rowModel.expandOrCollapseAll(e)}setRowNodeExpanded(e,i,t,s){e&&(t&&e.parent&&-1!==e.parent.level&&this.setRowNodeExpanded(e.parent,i,t,s),e.setExpanded(i,void 0,s))}onGroupExpandedOrCollapsed(){this.isClientSideRowModel&&this.rowModel.refreshModel({step:"map"})}};d([p("rowModel")],Ls.prototype,"rowModel",2),d([T],Ls.prototype,"postConstruct",1),Ls=d([I("expansionService")],Ls);var Qe=class extends b{postConstruct(){var e;this.activeMenuFactory=null!=(e=this.enterpriseMenuFactory)?e:this.filterMenuFactory}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const i=this.enterpriseMenuFactory&&this.isLegacyMenuEnabled()?this.enterpriseMenuFactory:this.filterMenuFactory;this.showColumnMenuCommon(i,e,e.containerType,!0)}showHeaderContextMenu(e,i,t){this.activeMenuFactory.showMenuAfterContextMenuEvent(e,i,t)}getContextMenuPosition(e,i){const t=this.getRowCtrl(e),s=this.getCellGui(t,i);if(!s)return t?{x:0,y:t.getRowYPosition()}:{x:0,y:0};const o=s.getBoundingClientRect();return{x:o.x+o.width/2,y:o.y+o.height/2}}showContextMenu(e){var i,t,s;const{column:o,rowNode:r}=e;let{anchorToElement:n,value:l}=e;r&&o&&null==l&&(l=r.getValueFromValueService(o)),null==n&&(n=this.getContextMenuAnchorElement(r,o)),null==(s=this.contextMenuFactory)||s.onContextMenu(null!=(i=e.mouseEvent)?i:null,null!=(t=e.touchEvent)?t:null,r??null,o??null,l,n)}showColumnChooser(e){var i;null==(i=this.columnChooserFactory)||i.showColumnChooser(e)}hidePopupMenu(){var e;null==(e=this.contextMenuFactory)||e.hideActiveMenu(),this.activeMenuFactory.hideActiveMenu()}hideColumnChooser(){var e;null==(e=this.columnChooserFactory)||e.hideActiveColumnChooser()}isColumnMenuInHeaderEnabled(e){const{suppressMenu:i,suppressHeaderMenuButton:t}=e.getColDef();return!(t??i)&&this.activeMenuFactory.isMenuEnabled(e)&&(this.isLegacyMenuEnabled()||!!this.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&this.filterManager.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!e?.getColDef().suppressHeaderContextMenu&&"new"===this.getColumnMenuType()}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(St()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!this.isLegacyMenuEnabled()&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return this.filterManager.isFilterAllowed(e)&&!this.isLegacyMenuEnabled()&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isColumnMenuAnchoringEnabled(){return!this.isLegacyMenuEnabled()}areAdditionalColumnMenuItemsEnabled(){return"new"===this.getColumnMenuType()}isLegacyMenuEnabled(){return"legacy"===this.getColumnMenuType()}isFloatingFilterButtonEnabled(e){var i;const t=e.getColDef(),s=null==(i=t.floatingFilterComponentParams)?void 0:i.suppressFilterButton;return null!=s&&O("As of v31.1, 'colDef.floatingFilterComponentParams.suppressFilterButton' is deprecated. Use 'colDef.suppressFloatingFilterButton' instead."),null==t.suppressFloatingFilterButton?!s:!t.suppressFloatingFilterButton}getColumnMenuType(){var e;return null!=(e=this.gos.get("columnMenu"))?e:"legacy"}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos.get("suppressMenuHide");return!this.isLegacyMenuEnabled()&&!this.gos.exists("suppressMenuHide")||e}showColumnMenuCommon(e,i,t,s){const{column:o,positionBy:r}=i;if("button"===r){const{buttonElement:n}=i;e.showMenuAfterButtonClick(o,n,t,s)}
1else if("mouse"===r){const{mouseEvent:n}=i;e.showMenuAfterMouseEvent(o,n,t,s)}else o&&(this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(o,"auto"),this.animationFrameService.requestAnimationFrame(()=>{const n=this.ctrlsService.getHeaderRowContainerCtrl(o.getPinned()).getHeaderCtrlForColumn(o);e.showMenuAfterButtonClick(o,n.getAnchorElementForMenu(s),t,!0)}))}getRowCtrl(e){const{rowIndex:i,rowPinned:t}=e||{};if(null!=i)return this.rowRenderer.getRowByPosition({rowIndex:i,rowPinned:t})||void 0}getCellGui(e,i){if(!e||!i)return;const t=e.getCellCtrl(i);return t?.getGui()||void 0}getContextMenuAnchorElement(e,i){const t=this.ctrlsService.getGridBodyCtrl().getGridBodyElement(),s=this.getRowCtrl(e);return s?this.getCellGui(s,i)||(s.isFullWidth()?s.getFullWidthElement():t):t}};d([p("filterMenuFactory")],Qe.prototype,"filterMenuFactory",2),d([p("ctrlsService")],Qe.prototype,"ctrlsService",2),d([p("animationFrameService")],Qe.prototype,"animationFrameService",2),d([p("filterManager")],Qe.prototype,"filterManager",2),d([p("rowRenderer")],Qe.prototype,"rowRenderer",2),d([q("columnChooserFactory")],Qe.prototype,"columnChooserFactory",2),d([q("contextMenuFactory")],Qe.prototype,"contextMenuFactory",2),d([q("enterpriseMenuFactory")],Qe.prototype,"enterpriseMenuFactory",2),d([T],Qe.prototype,"postConstruct",1),Qe=d([I("menuService")],Qe);var si=class extends b{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,i){const t=this.getHeaderCellForColumn(e);if(!t)return-1;const s=this.rowRenderer.getAllCellsForColumn(e);return i||s.push(t),this.addElementsToContainerAndGetWidth(s)}getPreferredWidthForColumnGroup(e){const i=this.getHeaderCellForColumn(e);return i?this.addElementsToContainerAndGetWidth([i]):-1}addElementsToContainerAndGetWidth(e){const i=document.createElement("form");i.style.position="fixed";const t=this.centerRowContainerCtrl.getContainerElement();e.forEach(r=>this.cloneItemIntoDummy(r,i)),t.appendChild(i);const s=i.offsetWidth;return t.removeChild(i),s+this.getAutoSizePadding()}getAutoSizePadding(){return this.gos.get("autoSizePadding")}getHeaderCellForColumn(e){let i=null;return this.ctrlsService.getHeaderRowContainerCtrls().forEach(t=>{const s=t.getHtmlElementForColumnHeader(e);null!=s&&(i=s)}),i}cloneItemIntoDummy(e,i){const t=e.cloneNode(!0);t.style.width="",t.style.position="static",t.style.left="";const s=document.createElement("div"),o=s.classList;["ag-header-cell","ag-header-group-cell"].some(l=>t.classList.contains(l))?(o.add("ag-header","ag-header-row"),s.style.position="static"):o.add("ag-row");let n=e.parentElement;for(;n;){if(["ag-header-row","ag-row"].some(a=>n.classList.contains(a))){for(let a=0;a<n.classList.length;a++){const u=n.classList[a];"ag-row-position-absolute"!=u&&o.add(u)}break}n=n.parentElement}s.appendChild(t),i.appendChild(s)}};d([p("rowRenderer")],si.prototype,"rowRenderer",2),d([p("ctrlsService")],si.prototype,"ctrlsService",2),d([p("rowCssClassCalculator")],si.prototype,"rowCssClassCalculator",2),d([T],si.prototype,"postConstruct",1),si=d([I("autoWidthCalculator")],si);var Ms=class extends b{constructor(e,i){super(),this.createRowCon=e,this.destroyRowCtrls=i,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.topContainerHeight=0,this.bottomContainerHeight=0}postConstruct(){this.isClientSide="clientSide"===this.rowModel.getType(),this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl})}getStickyTopRowCtrls(){return this.stickyTopRowCtrls}getStickyBottomRowCtrls(){return this.stickyBottomRowCtrls}getLastPixelOfGroup(e){return this.isClientSide?this.getClientSideLastPixelOfGroup(e):this.getServerSideLastPixelOfGroup(e)}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0}getServerSideLastPixelOfGroup(e){var i,t,s,o;if(this.isClientSide)throw new Error("This func should only be called in server side row model.");if(e.isExpandable()||e.footer){if(e.master)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex)){let n=null==(i=e.childStore)?void 0:i.getStoreBounds();return e.footer&&(n=null==(t=e.sibling.childStore)?void 0:t.getStoreBounds()),(null!=(s=n?.heightPx)?s:0)+(null!=(o=n?.topPx)?o:0)}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}getClientSideLastPixelOfGroup(e){if(!this.isClientSide)throw new Error("This func should only be called in client side row model.");if(e.isExpandable()||e.footer){const i=e.footer&&0===e.rowIndex,t=!e.sibling||1===Math.abs(e.sibling.rowIndex-e.rowIndex);if(i||t){let s=e.footer?e.sibling:e;for(;s.isExpandable()&&s.expanded;)if(s.master)s=s.detailNode;else if(s.childrenAfterSort){if(0===s.childrenAfterSort.length)break;s=$(s.childrenAfterSort)}return s.rowTop+s.rowHeight}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}updateStickyRows(e){const i="top"===e;let t=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set,t);const s=i?this.rowRenderer.getFirstVisibleVerticalPixel():this.rowRenderer.getLastVisibleVerticalPixel(),o=new Set,r=u=>{if(o.add(u),i){const h=this.getLastPixelOfGroup(u),c=s+t+u.rowHeight;u.stickyRowTop=h<c?t+(h-c):t}else{const h=this.getFirstPixelOfGroup(u),c=s-(t+u.rowHeight);u.stickyRowTop=h>c?t-(h-c):t}t=0,o.forEach(h=>{const c=h.stickyRowTop+h.rowHeight;t<c&&(t=c)})},n=this.areFooterRowsStickySuppressed(),l=this.gos.get("suppressGroupRowsSticky"),a=u=>!!u.displayed&&(u.footer?!(!0===n||"grand"===n&&-1===u.level||"group"===n&&u.level>-1||o.has(u)):!!u.isExpandable()&&!0!==l&&!o.has(u)&&u.expanded);for(let u=0;u<100;u++){let h=s+t;i||(h=s-t);const c=this.rowModel.getRowIndexAtPixel(h),f=this.rowModel.getRow(c);if(null==f)break;const C=this.getStickyAncestors(f).find(S=>(i?S.rowIndex<c:S.rowIndex>c)&&a(S));if(C)r(C);else{if(!(i?f.rowTop<h:f.rowTop+f.rowHeight>h)||!a(f))break;r(f)}}return i||o.forEach(u=>{u.stickyRowTop=t-(u.stickyRowTop+u.rowHeight)}),this.refreshNodesAndContainerHeight(e,o,t)}areFooterRowsStickySuppressed(){const e=this.gos.get("suppressStickyTotalRow");if(!0===e)return!0;const i=!!this.gos.get("groupIncludeFooter")||"group"===e,t=!!this.gos.get("groupIncludeTotalFooter")||"grand"===e;return!(!i||!t)||(t?"grand":!!i&&"group")}canRowsBeSticky(){const e=this.gos.isGroupRowsSticky(),i=this.areFooterRowsStickySuppressed(),t=this.gos.get("suppressGroupRowsSticky");return e&&(!i||!t)}getStickyAncestors(e){const i=[];let t=e.footer?e.sibling:e.parent;for(;t;)t.sibling&&i.push(t.sibling),i.push(t),t=t.parent;return i.reverse()}checkStickyRows(){const e=this.updateStickyRows("top"),i=this.updateStickyRows("bottom");return e||i}destroyStickyCtrls(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(e){const i=new Set;if(this.stickyTopRowCtrls.some(t=>t.getRowNode()===e)){for(let t=0;t<this.stickyTopRowCtrls.length;t++){const s=this.stickyTopRowCtrls[t].getRowNode();s!==e&&i.add(s)}this.refreshNodesAndContainerHeight("top",i,this.topContainerHeight)&&this.checkStickyRows()}else{for(let t=0;t<this.stickyBottomRowCtrls.length;t++){const s=this.stickyBottomRowCtrls[t].getRowNode();s!==e&&i.add(s)}this.refreshNodesAndContainerHeight("bottom",i,this.bottomContainerHeight)&&this.checkStickyRows()}}refreshNodesAndContainerHeight(e,i,t){const s="top"===e,o=s?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,r={},n=[];for(let c=0;c<o.length;c++){const f=o[c].getRowNode();i.has(f)?n.push(o[c]):(r[f.id]=o[c],f.sticky=!1)}const l=new Set;for(let c=0;c<n.length;c++)l.add(n[c].getRowNode());const a=[];
1i.forEach(c=>{l.has(c)||(c.sticky=!0,a.push(this.createRowCon(c,!1,!1)))});let u=!!a.length||n.length!==o.length;s?this.topContainerHeight!==t&&(this.topContainerHeight=t,this.gridBodyCtrl.setStickyTopHeight(t),u=!0):this.bottomContainerHeight!==t&&(this.bottomContainerHeight=t,this.gridBodyCtrl.setStickyBottomHeight(t),u=!0),this.destroyRowCtrls(r,!1);const h=[...n,...a];return h.sort((c,f)=>f.getRowNode().rowIndex-c.getRowNode().rowIndex),s||h.reverse(),h.forEach(c=>c.setRowTop(c.getRowNode().stickyRowTop)),!!u&&(s?this.stickyTopRowCtrls=h:this.stickyBottomRowCtrls=h,!0)}};d([p("rowModel")],Ms.prototype,"rowModel",2),d([p("rowRenderer")],Ms.prototype,"rowRenderer",2),d([p("ctrlsService")],Ms.prototype,"ctrlsService",2),d([T],Ms.prototype,"postConstruct",1);var We=class extends b{constructor(){super(...arguments),this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{this.getAllCellCtrls().forEach(r=>r.onRangeSelectionChanged())},i=()=>{this.getAllCellCtrls().forEach(r=>r.updateRangeBordersIfRangeCount())},t=()=>{this.eventService.addEventListener(g.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.addEventListener(g.EVENT_COLUMN_MOVED,i),this.eventService.addEventListener(g.EVENT_COLUMN_PINNED,i),this.eventService.addEventListener(g.EVENT_COLUMN_VISIBLE,i)},s=()=>{this.eventService.removeEventListener(g.EVENT_RANGE_SELECTION_CHANGED,e),this.eventService.removeEventListener(g.EVENT_COLUMN_MOVED,i),this.eventService.removeEventListener(g.EVENT_COLUMN_PINNED,i),this.eventService.removeEventListener(g.EVENT_COLUMN_VISIBLE,i)};this.addDestroyFunc(()=>s()),this.addManagedPropertyListener("enableRangeSelection",r=>{r.currentValue?t():s()}),this.gos.get("enableRangeSelection")&&t()}}postConstruct(){this.ctrlsService.whenReady(e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){if(this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addManagedListener(this.eventService,g.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,this.onBodyScroll.bind(this)),this.addManagedListener(this.eventService,g.EVENT_BODY_HEIGHT_CHANGED,this.redraw.bind(this)),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListeners(["suppressCellFocus","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.gos.isGroupRowsSticky()){const e=this.rowModel.getType();("clientSide"===e||"serverSide"===e)&&(this.stickyRowFeature=this.createManagedBean(new Ms(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this))))}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=this.gos.isDomLayout("print"),this.embedFullWidthRows=this.printLayout||this.gos.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount();this.cachedRowCtrls=new lp(e??3)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyTopRowCtrls():[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?this.stickyRowFeature.getStickyBottomRowCtrls():[]}updateAllRowCtrls(){const e=bt(this.rowCtrlsByRowIndex),i=bt(this.zombieRowCtrls),t=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];this.allRowCtrls=i.length>0||t.length>0?[...e,...i,...t]:e}
1onCellFocusChanged(e){this.getAllCellCtrls().forEach(i=>i.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(i=>i.onFullWidthRowFocused(e))}registerCellEventListeners(){this.addManagedListener(this.eventService,g.EVENT_CELL_FOCUSED,e=>{this.onCellFocusChanged(e)}),this.addManagedListener(this.eventService,g.EVENT_CELL_FOCUS_CLEARED,()=>{this.onCellFocusChanged()}),this.addManagedListener(this.eventService,g.EVENT_FLASH_CELLS,e=>{this.getAllCellCtrls().forEach(i=>i.onFlashCells(e))}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_HOVER_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())}),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())}),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedListener(this.eventService,g.EVENT_GRID_COLUMNS_CHANGED,this.refreshListenersToColumnsForCellComps.bind(this)),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.columnModel.getAllGridColumns().forEach(i=>{const t=a=>{this.getAllCellCtrls().forEach(u=>{u.getColumn()===i&&a(u)})},s=()=>{t(a=>a.onLeftChanged())},o=()=>{t(a=>a.onWidthChanged())},r=()=>{t(a=>a.onFirstRightPinnedChanged())},n=()=>{t(a=>a.onLastLeftPinnedChanged())},l=()=>{t(a=>a.onColDefChanged())};i.addEventListener("leftChanged",s),i.addEventListener("widthChanged",o),i.addEventListener("firstRightPinnedChanged",r),i.addEventListener("lastLeftPinnedChanged",n),i.addEventListener("colDefChanged",l),this.destroyFuncsForColumnListeners.push(()=>{i.removeEventListener("leftChanged",s),i.removeEventListener("widthChanged",o),i.removeEventListener("firstRightPinnedChanged",r),i.removeEventListener("lastLeftPinnedChanged",n),i.removeEventListener("colDefChanged",l)})})}onDomLayoutChanged(){const e=this.gos.isDomLayout("print"),i=e||this.gos.get("embedFullWidthRows"),t=i!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=i,t&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){this.redrawAfterModelUpdate({recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0})}getAllCellsForColumn(e){const i=[];return this.getAllRowCtrls().forEach(t=>{const s=t.getCellElement(e);s&&i.push(s)}),i}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,this.pinnedRowModel.getPinnedTopRowData()),this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData())}getTopRowCtrls(){return this.topRowCtrls}getCentreRowCtrls(){return this.allRowCtrls}getBottomRowCtrls(){return this.bottomRowCtrls}refreshFloatingRows(e,i){e.forEach(t=>{t.destroyFirstPass(),t.destroySecondPass()}),e.length=0,i&&i.forEach(t=>{const s=new Xt(t,this.beans,!1,!1,this.printLayout);e.push(s)})}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,i=!1){var t;if(e.sticky)this.stickyRowFeature.refreshStickyNode(e);else{if(null!=(t=this.cachedRowCtrls)&&t.has(e))return void this.cachedRowCtrls.removeRow(e);{const s=o=>{const r=o[e.rowIndex];r&&r.getRowNode()===e&&(r.destroyFirstPass(),r.destroySecondPass(),o[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":s(this.topRowCtrls);break;case"bottom":s(this.bottomRowCtrls);break;default:s(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}}i||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(null!=e)return e?.forEach(t=>this.redrawRow(t,!0)),void this.dispatchDisplayedRowsChanged(!1);this.redrawAfterModelUpdate()}
1getCellToRestoreFocusToAfterRefresh(e){const i=e?.suppressKeepFocus?null:this.focusService.getFocusCellToUseAfterRefresh();if(null==i)return null;const t=this.gos.getActiveDomElement(),s=this.gos.getDomData(t,Qt.DOM_DATA_KEY_CELL_CTRL),o=this.gos.getDomData(t,Xt.DOM_DATA_KEY_ROW_CTRL);return s||o?i:null}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const i=this.getCellToRestoreFocusToAfterRefresh(e);this.updateContainerHeights(),this.scrollToTopIfNewData(e);const t=!e.domLayoutChanged&&!!e.recycleRows,s=e.animate&&this.gos.isAnimateRows(),o=t?this.getRowsToRecycle():null;t||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender(),this.stickyRowFeature&&this.stickyRowFeature.checkStickyRows(),this.recycleRows(o,s),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),null!=i&&this.restoreFocusedCell(i),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const i=e.newData||e.newPage,t=this.gos.get("suppressScrollOnNewData");i&&!t&&this.gridBodyCtrl.getScrollFeature().scrollToTop()}updateContainerHeights(){if(this.printLayout)return void this.rowContainerHeightService.setModelHeight(null);let e=this.paginationProxy.getCurrentPageHeight();0===e&&(e=1),this.rowContainerHeightService.setModelHeight(e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }
1, 0). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0}releaseLockOnRefresh(){this.refreshInProgress=!1}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){e&&(this.focusService.setRestoreFocusedCell(e),this.onCellFocusChanged(this.beans.gos.addGridCommonParams({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"mock"})))}stopEditing(e=!1){this.getAllRowCtrls().forEach(i=>{i.stopEditing(e)})}getAllCellCtrls(){const e=[],i=this.getAllRowCtrls(),t=i.length;for(let s=0;s<t;s++){const o=i[s].getAllCellCtrls(),r=o.length;for(let n=0;n<r;n++)e.push(o[n])}return e}getAllRowCtrls(){const e=this.stickyRowFeature&&this.stickyRowFeature.getStickyTopRowCtrls()||[],i=this.stickyRowFeature&&this.stickyRowFeature.getStickyBottomRowCtrls()||[],t=[...this.topRowCtrls,...this.bottomRowCtrls,...e,...i];for(const s in this.rowCtrlsByRowIndex)t.push(this.rowCtrlsByRowIndex[s]);return t}addRenderedRowListener(e,i,t){const s=this.rowCtrlsByRowIndex[i];s&&s.addEventListener(e,t)}flashCells(e={}){this.getCellCtrls(e.rowNodes,e.columns).forEach(i=>i.flashCell(e))}refreshCells(e={}){const i={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};this.getCellCtrls(e.rowNodes,e.columns).forEach(t=>t.refreshOrDestroyCell(i)),e.rowNodes&&(this.getRowCtrls(e.rowNodes).forEach(t=>{t.isFullWidth()&&(t.refreshFullWidth()||this.redrawRow(t.getRowNode(),!0))}),this.dispatchDisplayedRowsChanged(!1))}getCellRendererInstances(e){var i;const t=this.getCellCtrls(e.rowNodes,e.columns).map(r=>r.getCellRenderer()).filter(r=>null!=r);if(null!=(i=e.columns)&&i.length)return t;const s=[],o=this.mapRowNodes(e.rowNodes);return this.getAllRowCtrls().forEach(r=>{if(o&&!this.isRowInMap(r.getRowNode(),o)||!r.isFullWidth())return;const n=r.getFullWidthCellRenderers();for(let l=0;l<n.length;l++){const a=n[l];null!=a&&s.push(a)}}),[...s,...t]}getCellEditorInstances(e){const i=[];return this.getCellCtrls(e.rowNodes,e.columns).forEach(t=>{const s=t.getCellEditor();s&&i.push(s)}),i}getEditingCells(){const e=[];return this.getAllCellCtrls().forEach(i=>{if(i.isEditing()){const t=i.getCellPosition();e.push(t)}}),e}mapRowNodes(e){if(!e)return;const i={top:{},bottom:{},normal:{}};return e.forEach(t=>{const s=t.id;switch(t.rowPinned){case"top":i.top[s]=t;break;case"bottom":i.bottom[s]=t;break;default:i.normal[s]=t}}),i}isRowInMap(e,i){const t=e.id;switch(e.rowPinned){case"top":return null!=i.top[t];case"bottom":return null!=i.bottom[t];default:return null!=i.normal[t]}}getRowCtrls(e){const i=this.mapRowNodes(e),t=this.getAllRowCtrls();return e&&i?t.filter(s=>{const o=s.getRowNode();return this.isRowInMap(o,i)}):t}getCellCtrls(e,i){let t;y(i)&&(t={},i.forEach(o=>{const r=this.columnModel.getGridColumn(o);y(r)&&(t[r.getId()]=!0)}));const s=[];return this.getRowCtrls(e).forEach(o=>{o.getAllCellCtrls().forEach(r=>{const n=r.getColumn().getId();t&&!t[n]||s.push(r)})}),s}destroy(){this.removeAllRowComps(),super.destroy()}removeAllRowComps(){const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e),this.stickyRowFeature&&this.stickyRowFeature.destroyStickyCtrls()}getRowsToRecycle(){const e=[];me(this.rowCtrlsByRowIndex,(t,s)=>{null==s.getRowNode().id&&e.push(t)}),this.removeRowCtrls(e);const i={};return me(this.rowCtrlsByRowIndex,(t,s)=>{const o=s.getRowNode();i[o.id]=s}),this.rowCtrlsByRowIndex={},i}removeRowCtrls(e,i=!1){e.forEach(t=>{const s=this.rowCtrlsByRowIndex[t];s&&(s.destroyFirstPass(i),s.destroySecondPass()),delete this.rowCtrlsByRowIndex[t]})}onBodyScroll(e){"vertical"===e.direction&&this.redraw({afterScroll:!0})}redraw(e={}){const{afterScroll:i}=e;let t;this.stickyRowFeature&&jr()&&(t=this.getCellToRestoreFocusToAfterRefresh()||void 0);const s=this.firstRenderedRow,o=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let r=!1;if(this.stickyRowFeature&&(r=this.stickyRowFeature.checkStickyRows()),(!i||r||this.firstRenderedRow!==s||this.lastRenderedRow!==o)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!r),null!=t)){const l=this.getCellToRestoreFocusToAfterRefresh();null!=t&&null==l&&(this.animationFrameService.flushAllFrames(),this.restoreFocusedCell(t))}}removeRowCompsNotToDraw(e,i){const t={};e.forEach(r=>t[r]=!0);const o=Object.keys(this.rowCtrlsByRowIndex).filter(r=>!t[r]);this.removeRowCtrls(o,i)}
1calculateIndexesToDraw(e){let i=ra(this.firstRenderedRow,this.lastRenderedRow);const t=(o,r)=>{const n=r.getRowNode().rowIndex;null!=n&&(n<this.firstRenderedRow||n>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&i.push(n)};me(this.rowCtrlsByRowIndex,t),me(e,t),i.sort((o,r)=>o-r);const s=[];for(let o=0;o<i.length;o++){const r=i[o],n=this.paginationProxy.getRow(r);n&&!n.sticky&&s.push(r)}return s}recycleRows(e,i=!1,t=!1){const s=this.calculateIndexesToDraw(e);(this.printLayout||t)&&(i=!1),this.removeRowCompsNotToDraw(s,!i);const o=[];s.forEach(r=>{const n=this.createOrUpdateRowCtrl(r,e,i,t);y(n)&&o.push(n)}),e&&(!t||this.gos.get("suppressAnimationFrame")||this.printLayout?this.destroyRowCtrls(e,i):this.beans.animationFrameService.addDestroyTask(()=>{this.destroyRowCtrls(e,i),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()})),this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventService.dispatchEvent({type:g.EVENT_DISPLAYED_ROWS_CHANGED,afterScroll:e})}onDisplayedColumnsChanged(){const e=this.columnModel.isPinningLeft(),i=this.columnModel.isPinningRight();(this.pinningLeft!==e||i!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=i,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(i=>{const t=i.getRowNode().rowIndex;e.push(t.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const i=this.mapRowNodes(e);return this.getAllRowCtrls().filter(t=>{if(!t.isFullWidth())return!1;const s=t.getRowNode();return!(null!=i&&!this.isRowInMap(s,i))})}createOrUpdateRowCtrl(e,i,t,s){let o,r=this.rowCtrlsByRowIndex[e];if(r||(o=this.paginationProxy.getRow(e),y(o)&&y(i)&&i[o.id]&&o.alreadyRendered&&(r=i[o.id],i[o.id]=null)),!r){if(o||(o=this.paginationProxy.getRow(e)),!y(o))return;r=this.createRowCon(o,t,s)}return o&&(o.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=r,r}destroyRowCtrls(e,i){const t=[];me(e,(s,o)=>{if(o){if(this.cachedRowCtrls&&o.isCacheable())return void this.cachedRowCtrls.addRow(o);o.destroyFirstPass(!i),i?(this.zombieRowCtrls[o.getInstanceId()]=o,t.push(()=>{o.destroySecondPass(),delete this.zombieRowCtrls[o.getInstanceId()]})):o.destroySecondPass()}}),i&&(t.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),cl(t))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){return this.getRowBuffer()*this.gos.getRowHeightAsNumber()}workOutFirstAndLastRowsToRender(){let e,i;if(this.rowContainerHeightService.updateOffset(),this.paginationProxy.isRowsToRender())if(this.printLayout)this.environment.refreshRowHeightVariable(),e=this.paginationProxy.getPageFirstRow(),i=this.paginationProxy.getPageLastRow();else{const l=this.getRowBufferInPixels(),a=this.ctrlsService.getGridBodyCtrl(),u=this.gos.get("suppressRowVirtualisation");let c,f,h=!1;do{const R=this.paginationProxy.getPixelOffset(),{pageFirstPixel:E,pageLastPixel:A}=this.paginationProxy.getCurrentPagePixelRange(),P=this.rowContainerHeightService.getDivStretchOffset(),L=a.getScrollFeature().getVScrollPosition(),G=L.top,N=L.bottom;u?(c=E+P,f=A+P):(c=Math.max(G+R-l,E)+P,f=Math.min(N+R+l,A)+P),this.firstVisibleVPixel=Math.max(G+R,E)+P,this.lastVisibleVPixel=Math.min(N+R,A)+P,h=this.ensureAllRowsInRangeHaveHeightsCalculated(c,f)}while(h);let m=this.paginationProxy.getRowIndexAtPixel(c),C=this.paginationProxy.getRowIndexAtPixel(f);const w=this.paginationProxy.getPageFirstRow(),S=this.paginationProxy.getPageLastRow();m<w&&(m=w),C>S&&(C=S),e=m,i=C}else e=0,i=-1;const t=this.gos.isDomLayout("normal"),s=this.gos.get("suppressMaxRenderedRowRestriction"),o=Math.max(this.getRowBuffer(),500);t&&!s&&i-e>o&&(i=e+o),e===this.firstRenderedRow&&i===this.lastRenderedRow||(this.firstRenderedRow=e,this.lastRenderedRow=i,this.eventService.dispatchEvent({type:g.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:i}))}dispatchFirstDataRenderedEvent(){if(this.dataFirstRenderedFired)return;this.dataFirstRenderedFired=!0;const e={type:g.EVENT_FIRST_DATA_RENDERED,firstRow:this.firstRen
1deredRow,lastRow:this.lastRenderedRow};window.requestAnimationFrame(()=>{this.beans.eventService.dispatchEvent(e)})}ensureAllRowsInRangeHaveHeightsCalculated(e,i){const t=this.paginationProxy.ensureRowHeightsValid(e,i,-1,-1);return t&&this.updateContainerHeights(),t}getFirstVisibleVerticalPixel(){return this.firstVisibleVPixel}getLastVisibleVerticalPixel(){return this.lastVisibleVPixel}getFirstVirtualRenderedRow(){return this.firstRenderedRow}getLastVirtualRenderedRow(){return this.lastRenderedRow}doNotUnVirtualiseRow(e){const s=e.getRowNode(),o=this.focusService.isRowNodeFocused(s),r=e.isEditing();return!!(o||r||s.detail)&&!!this.paginationProxy.isRowPresent(s)}createRowCon(e,i,t){const s=this.cachedRowCtrls?this.cachedRowCtrls.getRow(e):null;if(s)return s;const o=this.gos.get("suppressAnimationFrame");return new Xt(e,this.beans,i,t&&!o&&!this.printLayout,this.printLayout)}getRenderedNodes(){return Object.values(this.rowCtrlsByRowIndex).map(i=>i.getRowNode())}getRowByPosition(e){let i;const{rowIndex:t}=e;switch(e.rowPinned){case"top":i=this.topRowCtrls[t];break;case"bottom":i=this.bottomRowCtrls[t];break;default:i=this.rowCtrlsByRowIndex[t],i||(i=this.getStickyTopRowCtrls().find(s=>s.getRowNode().rowIndex===t)||null,i||(i=this.getStickyBottomRowCtrls().find(s=>s.getRowNode().rowIndex===t)||null))}return i}isRangeInRenderedViewport(e,i){return null!=e&&null!=i&&!(i<this.firstRenderedRow||e>this.lastRenderedRow)}};d([p("animationFrameService")],We.prototype,"animationFrameService",2),d([p("paginationProxy")],We.prototype,"paginationProxy",2),d([p("columnModel")],We.prototype,"columnModel",2),d([p("pinnedRowModel")],We.prototype,"pinnedRowModel",2),d([p("rowModel")],We.prototype,"rowModel",2),d([p("focusService")],We.prototype,"focusService",2),d([p("beans")],We.prototype,"beans",2),d([p("rowContainerHeightService")],We.prototype,"rowContainerHeightService",2),d([p("ctrlsService")],We.prototype,"ctrlsService",2),d([T],We.prototype,"postConstruct",1),We=d([I("rowRenderer")],We);var lp=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.getRowNode().id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const i=this.entriesList[0];i.destroyFirstPass(),i.destroySecondPass(),this.removeFromCache(i)}}getRow(e){if(null==e||null==e.id)return null;const i=this.entriesMap[e.id];return i?(this.removeFromCache(i),i.setCached(!1),i.getRowNode()!=e?null:i):null}has(e){return null!=this.entriesMap[e.id]}removeRow(e){const i=e.id,t=this.entriesMap[i];delete this.entriesMap[i],Le(this.entriesList,t)}removeFromCache(e){const i=e.getRowNode().id;delete this.entriesMap[i],Le(this.entriesList,e)}getEntries(){return this.entriesList}},Is=class extends b{init(){this.setPinnedTopRowData(),this.setPinnedBottomRowData(),this.addManagedPropertyListener("pinnedTopRowData",()=>this.setPinnedTopRowData()),this.addManagedPropertyListener("pinnedBottomRowData",()=>this.setPinnedBottomRowData())}isEmpty(e){return Fe("top"===e?this.pinnedTopRows:this.pinnedBottomRows)}isRowsToRender(e){return!this.isEmpty(e)}getRowAtPixel(e,i){const t="top"===i?this.pinnedTopRows:this.pinnedBottomRows;if(Fe(t))return 0;for(let s=0;s<t.length;s++){const o=t[s];if(o.rowTop+o.rowHeight-1>=e)return s}return t.length-1}setPinnedTopRowData(){const e=this.gos.get("pinnedTopRowData");this.pinnedTopRows=this.createNodesFromData(e,!0),this.eventService.dispatchEvent({type:g.EVENT_PINNED_ROW_DATA_CHANGED})}setPinnedBottomRowData(){const e=this.gos.get("pinnedBottomRowData");this.pinnedBottomRows=this.createNodesFromData(e,!1),this.eventService.dispatchEvent({type:g.EVENT_PINNED_ROW_DATA_CHANGED})}createNodesFromData(e,i){const t=[];if(e){let s=0;e.forEach((o,r)=>{const n=new B(this.beans);n.data=o,n.id=(i?B.ID_PREFIX_TOP_PINNED:B.ID_PREFIX_BOTTOM_PINNED)+r,n.rowPinned=i?"top":"bottom",n.setRowTop(s),n.setRowHeight(this.gos.getRowHeightForNode(n).height),n.setRowIndex(r),s+=n.rowHeight,t.push(n)})}return t}getPinnedTopRowData(){return this.pinnedTopRows}getPinnedBottomRowData(){return this.pinnedBottomRows}getPinnedTopTotalHeight(){return this.getTotalHeight(this.pinnedTopRows)}getPinnedTopRowCount(){return this.pinnedTopRows?this.pinnedTopRows.length:0}getPinnedBottomRowCount(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0}getPinnedTopRow(e){return this.pinnedTopRows[e]}getPinnedBottomRow(e){return this.pinnedBottomRows[e]}forEachPinnedTopRow(e){Fe(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)}forEachPinnedBottomRow(e){Fe(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)}getPinnedBottomTotalHeight(){return this.getTotalHeight(this.pinnedBottomRows)}getTotalHeight(e){if(!e||0===e.length)return 0;const i=$(e);return i.rowTop+i.rowHeight}};d([p("beans")],Is.prototype,"beans",2),d([T],Is.prototype,"init",1),Is=d([I("pinnedRowModel")],Is);var Ko=class{constructor(e,i){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:i,children:null},this.mapToItems[i.id]=this.pathRoot}setInactive(){this.active=!1}isActive(){return this.active}depthFirstSearchChangedPath(e,i){if(e.children)for(let t=0;t<e.children.length;t++)this.depthFirstSearchChangedPath(e.children[t],i);i(e.rowNode)}depthFirstSearchEverything(e,i,t){if(e.childrenAfterGroup)for(let s=0;s<e.childrenAfterGroup.length;s++){const o=e.childrenAfterGroup[s];
1o.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[s],i,t):t&&i(o)}i(e)}forEachChangedNodeDepthFirst(e,i=!1,t=!1){this.active&&!t?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,i)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let i=e,t=0;for(;!this.mapToItems[i.id];)this.mapToItems[i.id]={rowNode:i,children:null},t++,i=i.parent;return t}populateColumnsMap(e,i){if(!this.keepingColumns||!i)return;let t=e;for(;t;)this.nodeIdsToColumns[t.id]||(this.nodeIdsToColumns[t.id]={}),i.forEach(s=>this.nodeIdsToColumns[t.id][s.getId()]=!0),t=t.parent}linkPathItems(e,i){let t=e;for(let s=0;s<i;s++){const o=this.mapToItems[t.id],r=this.mapToItems[t.parent.id];r.children||(r.children=[]),r.children.push(o),t=t.parent}}addParentNode(e,i){if(!e||e.isRowPinned())return;const t=this.createPathItems(e);this.linkPathItems(e,t),this.populateColumnsMap(e,i)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,i){if(!this.keepingColumns)return i;const t=this.nodeIdsToColumns[e.id];return i.filter(o=>t[o.getId()])}getNotValueColumnsForNode(e,i){if(!this.keepingColumns)return null;const t=this.nodeIdsToColumns[e.id];return i.filter(o=>!t[o.getId()])}},dp=(()=>{let e=class mi extends b{constructor(t){super(),this.state=mi.STATE_WAITING_TO_LOAD,this.version=0,this.id=t}getId(){return this.id}load(){this.state=mi.STATE_LOADING,this.loadFromDatasource()}getVersion(){return this.version}setStateWaitingToLoad(){this.version++,this.state=mi.STATE_WAITING_TO_LOAD}getState(){return this.state}pageLoadFailed(t){this.isRequestMostRecentAndLive(t)&&(this.state=mi.STATE_FAILED,this.processServerFail()),this.dispatchLoadCompleted(!1)}success(t,s){this.successCommon(t,s)}pageLoaded(t,s,o){this.successCommon(t,{rowData:s,rowCount:o})}isRequestMostRecentAndLive(t){const s=t===this.version,o=this.isAlive();return s&&o}successCommon(t,s){this.dispatchLoadCompleted(),this.isRequestMostRecentAndLive(t)&&(this.state=mi.STATE_LOADED,this.processServerResult(s))}dispatchLoadCompleted(t=!0){this.dispatchEvent({type:mi.EVENT_LOAD_COMPLETE,success:t,block:this})}};return e.EVENT_LOAD_COMPLETE="loadComplete",e.STATE_WAITING_TO_LOAD="needsLoading",e.STATE_LOADING="loading",e.STATE_LOADED="loaded",e.STATE_FAILED="failed",e})(),_n=dp,Bi=(()=>{let e=class extends b{constructor(){super(...arguments),this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();const i=this.gos.get("blockLoadDebounceMillis");i&&i>0&&(this.checkBlockToLoadDebounce=k.debounce(this.performCheckBlocksToLoad.bind(this),i))}setBeans(i){this.logger=i.create("RowNodeBlockLoader")}getMaxConcurrentDatasourceRequests(){const i=this.gos.get("maxConcurrentDatasourceRequests");return null==i?2:i<=0?void 0:i}addBlock(i){this.blocks.push(i),i.addEventListener(_n.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(i){k.removeFromArray(this.blocks,i)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad(),this.dispatchEvent({type:e.BLOCK_LOADED_EVENT}),0==this.activeBlockLoadsCount&&this.dispatchEvent({type:e.BLOCK_LOADER_FINISHED_EVENT})}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)return void this.logger.log("checkBlockToLoad: max loads exceeded");const i=this.getAvailableLoadingCount(),t=this.blocks.filter(s=>s.getState()===_n.STATE_WAITING_TO_LOAD).slice(0,i);this.registerLoads(t.length),t.forEach(s=>s.load()),this.printCacheStatus()}getBlockState(){if(this.gos.isRowModelType("serverSide"))return this.rowModel.getBlockStates();const i={};return this.blocks.forEach(t=>{const{id:s,state:o}=t.getBlockStateJson();i[s]=o}),i}printCacheStatus(){this.logger.isLogging()&&this.logger.log(`printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}isLoading(){return this.activeBlockLoadsCount>0}registerLoads(i){this.activeBlockLoadsCount+=i}getAvailableLoadingCount(){return void 0!==this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:void 0}};return e.BLOCK_LOADED_EVENT="blockLoaded",e.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinis
1hed",e})();d([p("rowModel")],Bi.prototype,"rowModel",2),d([T],Bi.prototype,"postConstruct",1),d([Se(0,Ue("loggerFactory"))],Bi.prototype,"setBeans",1),Bi=d([I("rowNodeBlockLoader")],Bi);var Gs=class extends b{constructor(){super(...arguments),this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.pixelOffset=0,this.masterRowCount=0}postConstruct(){this.active=this.gos.get("pagination"),this.pageSizeFromGridOptions=this.gos.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedListener(this.eventService,g.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this)),this.onModelUpdated()}ensureRowHeightsValid(e,i,t,s){const o=this.rowModel.ensureRowHeightsValid(e,i,this.getPageFirstRow(),this.getPageLastRow());return o&&this.calculatePages(),o}isPaginateChildRows(){return!(!this.gos.get("groupRemoveSingleChildren")&&!this.gos.get("groupRemoveLowestSingleChildren"))||this.gos.get("paginateChildRows")}onModelUpdated(e){this.calculatePages(),this.eventService.dispatchEvent({type:g.EVENT_PAGINATION_CHANGED,animate:!!e&&e.animate,newData:!!e&&e.newData,newPage:!!e&&e.newPage,newPageSize:!!e&&e.newPageSize,keepRenderedRows:!!e&&e.keepRenderedRows})}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.eventService.dispatchEvent({type:g.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!1,keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){this.active&&this.currentPage!==e&&"number"==typeof this.currentPage&&(this.currentPage=e,this.calculatePages(),this.eventService.dispatchEvent({type:g.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!0,newPageSize:!1,keepRenderedRows:!1}))}getPixelOffset(){return this.pixelOffset}getRow(e){return this.rowModel.getRow(e)}getRowNode(e){return this.rowModel.getRowNode(e)}getRowIndexAtPixel(e){return this.rowModel.getRowIndexAtPixel(e)}getCurrentPageHeight(){return _(this.topRowBounds)||_(this.bottomRowBounds)?0:Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)}getCurrentPagePixelRange(){return{pageFirstPixel:this.topRowBounds?this.topRowBounds.rowTop:0,pageLastPixel:this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0}}isRowPresent(e){return!!this.rowModel.isRowPresent(e)&&e.rowIndex>=this.topDisplayedRowIndex&&e.rowIndex<=this.bottomDisplayedRowIndex}isEmpty(){return this.rowModel.isEmpty()}isRowsToRender(){return this.rowModel.isRowsToRender()}forEachNode(e){return this.rowModel.forEachNode(e)}forEachNodeOnPage(e){const i=this.getPageFirstRow(),t=this.getPageLastRow();for(let s=i;s<=t;s++){const o=this.getRow(s);o&&e(o)}}getType(){return this.rowModel.getType()}getRowBounds(e){const i=this.rowModel.getRowBounds(e);return i.rowIndex=e,i}getPageFirstRow(){return this.topRowBounds?this.topRowBounds.rowIndex:-1}getPageLastRow(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1}getRowCount(){return this.rowModel.getRowCount()}getPageForIndex(e){return Math.floor(e/this.pageSize)}goToPageWithIndex(e){if(!this.active)return;const i=this.getPageForIndex(e);this.goToPage(i)}isRowInPage(e){return!this.active||this.getPageForIndex(e.rowIndex)===this.currentPage}isLastPageFound(){return this.rowModel.isLastRowIndexKnown()}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.rowModel.getRowCount(),i=Math.floor(e/this.pageSize);this.goToPage(i)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return y(this.pageSizeAutoCalculated)?this.pageSizeAutoCalculated:y(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:y(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:y(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}unsetAutoCalculatedPageSize(){if(void 0===this.pageSizeAutoCalculated)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.eventService.dispatchEvent({type:g.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!1}))}setPageSize(e,i){const t=this.pageSize;switch(i){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,0!==this.currentPage&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,0!==this.currentPage&&this.goToFirstPage()}t!==this.pageSize&&(this.calculatePages(),this.eventService.dispatchEvent({type:g.EVENT_PAGINATION_CHANGED,animate:!1,newData:!1,newPage:!1,newPageSize:!0,keepRenderedRows:!0}))}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.topRowBounds=this.rowModel.getRowBounds(this.topDisplayedRowIndex),this.topRowBounds&&(this.topRowBounds.rowIndex=this.topDisplayedRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomDis
1playedRowIndex),this.bottomRowBounds&&(this.bottomRowBounds.rowIndex=this.bottomDisplayedRowIndex),this.setPixelOffset(y(this.topRowBounds)?this.topRowBounds.rowTop:0)}setPixelOffset(e){this.pixelOffset!==e&&(this.pixelOffset=e,this.eventService.dispatchEvent({type:g.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){if(this.masterRowCount=this.rowModel.getTopLevelRowCount(),this.masterRowCount<=0)return void this.setZeroRows();const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid();let t=this.pageSize*(this.currentPage+1)-1;if(t>e&&(t=e),this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(this.pageSize*this.currentPage),t===e)this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1;else{const s=this.rowModel.getTopLevelRowDisplayedIndex(t+1);this.bottomDisplayedRowIndex=s-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){if(this.masterRowCount=this.rowModel.getRowCount(),0===this.masterRowCount)return void this.setZeroRows();const e=this.masterRowCount-1;this.totalPages=Math.floor(e/this.pageSize)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=this.pageSize*this.currentPage,this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1,this.bottomDisplayedRowIndex>e&&(this.bottomDisplayedRowIndex=e)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1}};d([p("rowModel")],Gs.prototype,"rowModel",2),d([T],Gs.prototype,"postConstruct",1),Gs=d([I("paginationProxy")],Gs);var $o=class extends b{processAllCellClasses(e,i,t,s){this.processClassRules(void 0,e.cellClassRules,i,t,s),this.processStaticCellClasses(e,i,t)}processClassRules(e,i,t,s,o){if(null==i&&null==e)return;const r={},n={},l=(a,u)=>{a.split(" ").forEach(h=>{""!=h.trim()&&u(h)})};if(i){const a=Object.keys(i);for(let u=0;u<a.length;u++){const h=a[u],c=i[h];let f;"string"==typeof c?f=this.expressionService.evaluate(c,t):"function"==typeof c&&(f=c(t)),l(h,m=>{f?r[m]=!0:n[m]=!0})}}e&&o&&Object.keys(e).forEach(a=>l(a,u=>{r[u]||(n[u]=!0)})),o&&Object.keys(n).forEach(o),Object.keys(r).forEach(s)}getStaticCellClasses(e,i){const{cellClass:t}=e;if(!t)return[];let s;return s="function"==typeof t?t(i):t,"string"==typeof s&&(s=[s]),s||[]}processStaticCellClasses(e,i,t){this.getStaticCellClasses(e,i).forEach(o=>{t(o)})}};d([p("expressionService")],$o.prototype,"expressionService",2),$o=d([I("stylingService")],$o);var cd=class extends Lo{constructor(e){super(e,"ag-toggle-button")}setValue(e,i){return super.setValue(e,i),this.addOrRemoveCssClass("ag-selected",this.getValue()),this}},up=class extends ot{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,i){const t=super.setValue(e,i);return this.eInput.value=e,t}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},hp=class extends $t{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct(),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this));const e=at();this.addManagedListener(this.eInput,"mousedown",()=>{this.isDisabled()||e||this.eInput.focus()}),this.eInput.step="any"}onWheel(e){this.gos.getActiveDomElement()===this.eInput&&e.preventDefault()}setMin(e){var i;const t=e instanceof Date?null!=(i=$e(e??null,!1))?i:void 0:e;return this.min===t||(this.min=t,dt(this.eInput,"min",t)),this}setMax(e){var i;const t=e instanceof Date?null!=(i=$e(e??null,!1))?i:void 0:e;return this.max===t||(this.max=t,dt(this.eInput,"max",t)),this}setStep(e){return this.step===e||(this.step=e,dt(this.eInput,"step",e)),this}getDate(){var e;if(this.eInput.validity.valid)return null!=(e=Me(this.getValue()))?e:void 0}setDate(e,i){this.setValue($e(e??null,!1),i)}},cp=class extends ot{constructor(e){super(e,"ag-range-field","range")}
1postConstruct(){super.postConstruct();const{min:e,max:i,step:t}=this.config;null!=e&&this.setMinValue(e),null!=i&&this.setMaxValue(i),this.setStep(t||1)}addInputListeners(){this.addManagedListener(this.eInput,"input",e=>{this.setValue(e.target.value)})}setMinValue(e){return this.min=e,this.eInput.setAttribute("min",e.toString()),this}setMaxValue(e){return this.max=e,this.eInput.setAttribute("max",e.toString()),this}setStep(e){return this.eInput.setAttribute("step",e.toString()),this}setValue(e,i){null!=this.min&&(e=Math.max(parseFloat(e),this.min).toString()),null!=this.max&&(e=Math.min(parseFloat(e),this.max).toString());const t=super.setValue(e,i);return this.eInput.value=e,t}},Vn=class extends V{constructor(e,i){super('<div class="ag-rich-select-row" role="presentation"></div>'),this.params=e,this.wrapperEl=i}postConstruct(){this.addManagedListener(this.getGui(),"click",this.onClick.bind(this))}setState(e){let i="";this.params.valueFormatter&&(i=this.params.valueFormatter(e)),this.populateWithRenderer(e,i)||this.populateWithoutRenderer(e,i),this.value=e}highlightString(e){const{parsedValue:i}=this;if(this.params.cellRenderer||!y(i))return;let t=y(e);if(t){const s=i?.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){const o=s+e.length,r=ae(i.slice(0,s),!0),n=ae(i.slice(s,o),!0),l=ae(i.slice(o));this.renderValueWithoutRenderer(`${r}<span class="ag-rich-select-row-text-highlight">${n}</span>${l}`)}else t=!1}t||this.renderValueWithoutRenderer(i)}updateHighlighted(e){var i;const t=this.getGui(),s=`ag-rich-select-row-${this.getCompId()}`;null==(i=t.parentElement)||i.setAttribute("id",s),e&&(Nr(this.getParentComponent().getAriaElement(),s),this.wrapperEl.setAttribute("data-active-option",s)),Di(t.parentElement,e),this.addOrRemoveCssClass("ag-rich-select-row-selected",e)}populateWithoutRenderer(e,i){const t=this.gos.getDocument(),s=this.getGui(),o=t.createElement("span");o.style.overflow="hidden",o.style.textOverflow="ellipsis";const r=ae(y(i)?i:e,!0);this.parsedValue=y(r)?r:null,s.appendChild(o),this.renderValueWithoutRenderer(r),this.setTooltip({newTooltipText:this.parsedValue,shouldDisplayTooltip:()=>o.scrollWidth>o.clientWidth})}renderValueWithoutRenderer(e){const i=this.getGui().querySelector("span");i&&(i.innerHTML=y(e)?e:" ")}
1populateWithRenderer(e,i){let t,s;return this.params.cellRenderer&&(s=this.userComponentFactory.getCellRendererDetails(this.params,{value:e,valueFormatted:i,setTooltip:(o,r)=>{this.setTooltip({newTooltipText:o,shouldDisplayTooltip:r})}})),s&&(t=s.newAgStackInstance()),t&&dn(t,this.getGui()),!!t&&(t.then(o=>{this.addDestroyFunc(()=>{this.getContext().destroyBean(o)})}),!0)}onClick(){const e=this.getParentComponent(),i={type:g.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:!1,value:this.value};e?.dispatchEvent(i)}};d([p("userComponentFactory")],Vn.prototype,"userComponentFactory",2),d([T],Vn.prototype,"postConstruct",1);var Ns=class lu extends Ps{constructor(i){super(lu.getTemplate(i?.cssIdentifier||"default")),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0;const{cssIdentifier:t="default",ariaRole:s="listbox",listName:o}=i||{};this.cssIdentifier=t,this.ariaRole=s,this.listName=o}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:i=>this.onFocusIn(i),onFocusOut:i=>this.onFocusOut(i),focusInnerElement:i=>this.focusInnerElement(i),onTabKeyDown:i=>this.onTabKeyDown(i),handleKeyDown:i=>this.handleKeyDown(i)}),this.setAriaProperties(),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanged.bind(this))}onGridStylesChanged(){this.rowHeight=this.getItemHeight(),this.refresh()}setAriaProperties(){const t=this.localeService.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),s=this.eContainer;oe(s,this.ariaRole),He(s,t)}addResizeObserver(){const t=this.resizeObserverService.observeResize(this.getGui(),()=>this.animationFrameService.requestAnimationFrame(()=>this.drawVirtualRows()));this.addDestroyFunc(t)}focusInnerElement(i){this.focusRow(i?this.model.getRowCount()-1:0)}onFocusIn(i){const t=i.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=Hl(t)-1)}onFocusOut(i){this.getFocusableElement().contains(i.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(i){switch(i.key){case v.UP:case v.DOWN:this.navigate(i.key===v.UP)&&i.preventDefault();break;case v.PAGE_HOME:case v.PAGE_END:case v.PAGE_UP:case v.PAGE_DOWN:null!==this.navigateToPage(i.key)&&i.preventDefault()}}onTabKeyDown(i){this.navigate(i.shiftKey)?i.preventDefault():(tt(i),this.forceFocusOutOfContainer(i.shiftKey))}navigate(i){if(null==this.lastFocusedRowIndex)return!1;const t=this.lastFocusedRowIndex+(i?-1:1);return!(t<0||t>=this.model.getRowCount()||(this.focusRow(t),0))}navigateToPage(i,t="focused"){let s=!1;"focused"===t&&(t=this.getLastFocusedRow(),s=!0);const o=this.model.getRowCount()-1;let r=-1;return i===v.PAGE_HOME?r=0:i===v.PAGE_END?r=o:i===v.PAGE_DOWN?r=Math.min(t+this.pageSize,o):i===v.PAGE_UP&&(r=Math.max(t-this.pageSize,0)),-1===r?null:(s?this.focusRow(r):this.ensureIndexVisible(r),r)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(i){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(i),this.animationFrameService.requestAnimationFrame(()=>{if(this.isScrolling=!1,!this.isAlive())return;const t=this.renderedRows.get(i);t&&t.eDiv.focus()}))}getComponentAt(i){const t=this.renderedRows.get(i);return t&&t.rowComponent}forEachRenderedRow(i){this.renderedRows.forEach((t,s)=>i(t.rowComponent,s))}static getTemplate(i){return`<div class="ag-virtual-list-viewport ag-${i}-virtual-list-viewport" role="presentation">\n <div class="ag-virtual-list-container ag-${i}-virtual-list-container" ref="eContainer"></div>\n </div>`}getItemHeight(){return this.isHeightFromTheme?this.environment.getListItemHeight():this.rowHeight}ensureIndexVisible(i,t=!0){const s=this.model.getRowCount();if("number"!=typeof i||i<0||i>=s)return console.warn("AG Grid: invalid row index for ensureIndexVisible: "+i),!1;const o=i*this.rowHeight,r=o+this.rowHeight,n=this.getGui(),l=n.scrollTop,a=n.offsetHeight,h=t?0:this.rowHeight,f=l+a<r-h;return l>o+h?(n.scrollTop=o,!0):!!f&&(n.scrollTop=r-a,!0)}setComponentCreator(i){this.componentCreator=i}setComponentUpdater(i){this.componentUpdater=i}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(i){this.isHeightFromTheme=!1,this.rowHeight=i,this.refresh()}refresh(i){if(null==this.model||!this.isAlive())return;const t=this.model.getRowCount();this.eContainer.style.height=t*this.rowHeight+"px",Sr(()=>this.eContainer.clientHeight>=t*this.rowHeight,()=>{this.isAlive()&&(this.canSoftRefresh(i)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}canSoftRefresh(i){return!!(i&&this.renderedRows.size&&"function"==typeof this.model.areRowsEqual&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((i,t)=>this.removeRow(t))}drawVirtualRows(i){if(!this.isAlive()||!this.model)return;const t=this.getGui(),s=t.scrollTop,o=s+t.offsetHeight,r=Math.floor(s/this.rowHeight),n=Math.floor(o/this.rowHeight);this.pageSize=Math.floor((o-s)/this.rowHeight),this.ensureRowsRendered(r,n,i)}ensureRowsRendered(i,t,s){this.renderedRows.forEach((o,r)=>
1{(r<i||r>t)&&r!==this.lastFocusedRowIndex&&this.removeRow(r)}),s&&this.refreshRows();for(let o=i;o<=t;o++)this.renderedRows.has(o)||o<this.model.getRowCount()&&this.insertRow(o)}insertRow(i){const t=this.model.getRow(i),s=document.createElement("div");s.classList.add("ag-virtual-list-item",`ag-${this.cssIdentifier}-virtual-list-item`),oe(s,"tree"===this.ariaRole?"treeitem":"option"),fo(s,this.model.getRowCount()),mo(s,i+1),s.setAttribute("tabindex","-1"),s.style.height=`${this.rowHeight}px`,s.style.top=this.rowHeight*i+"px";const o=this.componentCreator(t,s);o.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=i),s.appendChild(o.getGui()),this.renderedRows.has(i-1)?this.renderedRows.get(i-1).eDiv.insertAdjacentElement("afterend",s):this.renderedRows.has(i+1)?this.renderedRows.get(i+1).eDiv.insertAdjacentElement("beforebegin",s):this.eContainer.appendChild(s),this.renderedRows.set(i,{rowComponent:o,eDiv:s,value:t})}removeRow(i){const t=this.renderedRows.get(i);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(i)}refreshRows(){const i=this.model.getRowCount();this.renderedRows.forEach((t,s)=>{var o,r;if(s>=i)this.removeRow(s);else{const n=this.model.getRow(s);null!=(r=(o=this.model).areRowsEqual)&&r.call(o,t.value,n)?this.componentUpdater(n,t.rowComponent):this.removeRow(s)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(i){this.model=i}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),super.destroy())}};d([p("resizeObserverService")],Ns.prototype,"resizeObserverService",2),d([p("animationFrameService")],Ns.prototype,"animationFrameService",2),d([F("eContainer")],Ns.prototype,"eContainer",2),d([T],Ns.prototype,"postConstruct",1);var pd=Ns,Yo=class extends Kt{constructor(e){var i,t;super(x(M({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:null!=(i=e?.template)?i:'\n <div class="ag-picker-field" role="presentation">\n <div ref="eLabel"></div>\n <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">\n <div ref="eDisplayField" class="ag-picker-field-display"></div>\n <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n </div>\n </div>',modalPicker:!1},e),{maxPickerHeight:null!=(t=e?.maxPickerHeight)?t:"calc(var(--ag-row-height) * 6.5)"})),this.searchString="",this.highlightedItem=-1,this.lastRowHovered=-1,this.searchStringCreator=null;const{cellRowHeight:s,value:o,valueList:r,searchStringCreator:n}=e||{};null!=s&&(this.cellRowHeight=s),void 0!==o&&(this.value=o),null!=r&&(this.values=r),n&&(this.searchStringCreator=n)}postConstruct(){super.postConstruct(),this.createLoadingElement(),this.createListComponent();const{allowTyping:e,placeholder:i}=this.config;e?(this.eInput.setAutoComplete(!1).setInputPlaceholder(i),this.eDisplayField.classList.add("ag-hidden")):this.eInput.setDisplayed(!1),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{searchDebounceDelay:t=300}=this.config;this.clearSearchString=Ee(this.clearSearchString,t),this.renderSelectedValue(),e&&(this.eInput.onValueChange(s=>this.searchTextFromString(s)),this.addManagedListener(this.eWrapper,"focus",this.onWrapperFocus.bind(this))),this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))}createLoadingElement(){const e=this.gos.getDocument(),i=this.localeService.getLocaleTextFunc(),t=e.createElement("div");t.classList.add("ag-loading-text"),t.innerText=i("loadingOoo","Loading..."),this.eLoading=t}createListComponent(){this.listComponent=this.createBean(new pd({cssIdentifier:"rich-select"})),this.listComponent.setComponentCreator(this.createRowComponent.bind(this)),this.listComponent.setComponentUpdater((l,a)=>{}),this.listComponent.setParentComponent(this),this.addManagedListener(this.listComponent,g.EVENT_FIELD_PICKER_VALUE_SELECTED,l=>{this.onListValueSelected(l.value,l.fromEnterKey)});const{cellRowHeight:i}=this;i&&this.listComponent.setRowHeight(i);const t=this.listComponent.getGui(),s=this.listComponent.getAriaElement();this.addManagedListener(t,"mousemove",this.onPickerMouseMove.bind(this)),this.addManagedListener(t,"mousedown",l=>l.preventDefault()),t.classList.add("ag-rich-select-list");const o=`ag-rich-select-list-${this.listComponent.getCompId()}`;s.setAttribute("id",o),He(s,this.localeService.getLocaleTextFunc()(this.config.pickerAriaLabelKey,this.config.pickerAriaLabelValue)),_r(this.eWrapper,s)}renderSelectedValue(){const{value:e,eDisplayField:i,config:t}=this,{allowTyping:s,initialInputValue:o}=this.config,r=this.config.valueFormatter?this.config.valueFormatter(e):e;if(s)return void this.eInput.setValue(o??r);let n,l;if(t.cellRenderer&&(n=this.userComponentFactory.getCellRendererDetails(this.config,{value:e,valueFormatted:r})),n&&(l=n.newAgStackInstance()),l)ne(i),dn(l,i),l.then(a=>{this.addDestroyFunc(()=>this.getContext().destroyBean(a))});else{if(y(this.value))i.innerText=r,i.classList.remove("ag-display-as-placeholder");else{const{placeholder:a}=t;y(a)?(i.innerHTML=`${ae(a)}`,i.classList.add("ag-display-as-placeholder")):ne(i)}this.setTooltip({newTooltipText:r??null,shouldDisplayTooltip:()=>this.eDisplayField.scrollWidth>this.eDisplayField.clientWidth}
1)}}getCurrentValueIndex(){const{currentList:e,value:i}=this;if(null==i||!e)return-1;for(let t=0;t<e.length;t++)if(e[t]===i)return t;return-1}highlightFilterMatch(){var e;null==(e=this.listComponent)||e.forEachRenderedRow((i,t)=>{i.highlightString(this.searchString)})}highlightSelectedValue(e){var i;null==e&&(e=this.getCurrentValueIndex()),this.highlightedItem=e,null==(i=this.listComponent)||i.forEachRenderedRow((t,s)=>{t.updateHighlighted(-1!==e&&this.highlightedItem===s)})}setRowHeight(e){e!==this.cellRowHeight&&(this.cellRowHeight=e),this.listComponent&&this.listComponent.setRowHeight(e)}createPickerComponent(){const{values:e}=this;return e&&this.setValueList({valueList:e}),this.listComponent}setSearchStringCreator(e){this.searchStringCreator=e}setValueList(e){const{valueList:i,refresh:t}=e;this.listComponent&&this.currentList!==i&&(this.currentList=i,this.listComponent.setModel({getRowCount:()=>i.length,getRow:s=>i[s],areRowsEqual:(s,o)=>s===o}),t&&(this.values?this.listComponent.refresh(!0):(this.values=i,this.isPickerDisplayed&&this.showCurrentValueInPicker())))}showPicker(){super.showPicker(),this.showCurrentValueInPicker(),this.displayOrHidePicker()}showCurrentValueInPicker(){var e,i;if(!this.listComponent)return;if(!this.currentList)return void(this.isPickerDisplayed&&this.eLoading&&this.listComponent.appendChild(this.eLoading));null!=(e=this.eLoading)&&e.offsetParent&&(null==(i=this.eLoading.parentElement)||i.removeChild(this.eLoading));const t=this.getCurrentValueIndex();-1!==t?(this.listComponent.refresh(),this.listComponent.ensureIndexVisible(t),this.listComponent.refresh(!0),this.highlightSelectedValue(t)):this.listComponent.refresh()}beforeHidePicker(){this.highlightedItem=-1,super.beforeHidePicker()}onWrapperFocus(){if(!this.eInput)return;const e=this.eInput.getFocusableElement();e.focus(),e.select()}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}buildSearchStringFromKeyboardEvent(e){let{key:i}=e;if(i===v.BACKSPACE)this.searchString=this.searchString.slice(0,-1),i="";else if(!Ro(e))return;e.preventDefault(),this.searchTextFromCharacter(i)}searchTextFromCharacter(e){this.searchString+=e,this.runSearch(),this.clearSearchString()}searchTextFromString(e){null==e&&(e=""),this.searchString=e,this.runSearch()}buildSearchStrings(e){const{valueFormatter:i=s=>s}=this.config;let t;return"number"==typeof e[0]||"string"==typeof e[0]?t=e.map(s=>i(s)):"object"==typeof e[0]&&this.searchStringCreator&&(t=this.searchStringCreator(e)),t}getSuggestionsAndFilteredValues(e,i){let t=[],s=[];if(!e.length)return{suggestions:t,filteredValues:s};const{searchType:o="fuzzy",filterList:r}=this.config;if("fuzzy"===o){const n=Ss(this.searchString,i,!0);t=n.values;const l=n.indices;if(r&&l.length)for(let a=0;a<l.length;a++)s.push(this.values[l[a]])}else t=i.filter((n,l)=>{const a=n.toLocaleLowerCase(),u=this.searchString.toLocaleLowerCase(),h="match"===o?a.startsWith(u):-1!==a.indexOf(u);return r&&h&&s.push(this.values[l]),h});return{suggestions:t,filteredValues:s}}filterListModel(e){const{filterList:i}=this.config;i&&(this.setValueList({valueList:e,refresh:!0}),this.alignPickerToComponent())}runSearch(){var e,i;const{values:t}=this,s=this.buildSearchStrings(t);if(!s)return void this.highlightSelectedValue(-1);const{suggestions:o,filteredValues:r}=this.getSuggestionsAndFilteredValues(this.searchString,s),{filterList:n,highlightMatch:l,searchType:a="fuzzy"}=this.config,u=r.length,h=!(!n||""===this.searchString);if(this.filterListModel(h?r:t),o.length){const c=h?0:s.indexOf(o[0]);this.selectListItem(c)}else if(this.highlightSelectedValue(-1),!h||u)null==(e=this.listComponent)||e.ensureIndexVisible(0);else if(h){this.getAriaElement().removeAttribute("data-active-option");const c=null==(i=this.listComponent)?void 0:i.getAriaElement();c&&Nr(c,null)}l&&"fuzzy"!==a&&this.highlightFilterMatch(),this.displayOrHidePicker()}displayOrHidePicker(){var e;const i=null==(e=this.listComponent)?void 0:e.getGui(),t=!!this.currentList&&0===this.currentList.length;i?.classList.toggle("ag-hidden",t)}clearSearchString(){this.searchString=""}selectListItem(e,i){!this.isPickerDisplayed||!this.currentList||!this.listComponent||e<0||e>=this.currentList.length||(this.listComponent.ensureIndexVisible(e,!i)&&!i&&this.listComponent.refresh(!0),this.highlightSelectedValue(e))}setValue(e,i,t){const s=this.currentList?this.currentList.indexOf(e):-1;return-1===s?this:(this.value=e,t||this.selectListItem(s),this.renderSelectedValue(),super.setValue(e,i))}createRowComponent(e){const i=new Vn(this.config,this.eWrapper);i.setParentComponent(this.listComponent),this.getContext().createBean(i),i.setState(e);const{highlightMatch:t,searchType:s="fuzzy"}=this.config;return t&&"fuzzy"!==s&&i.highlightString(this.searchString),i}getRowForMouseEvent(e){const{listComponent:i}=this;if(!i)return-1;const s=(i?.getGui()).getBoundingClientRect(),o=i.getScrollTop();return Math.floor((e.clientY-s.top+o)/i.getRowHeight())}onPickerMouseMove(e){if(!this.listComponent)return;const i=this.getRowForMouseEvent(e);-1!==i&&i!=this.lastRowHovered&&(this.lastRowHovered=i,this.selectListItem(i,!0))}onNavigationKeyDown(e,i){e.preventDefault();const t=i===v.DOWN;if(!this.isPickerDisplayed&&t)return void this.showPicker();const s=this.highlightedItem;this.selectListItem(-1===s?0:s+(t?1:-1))}onPageNavigation(e){var i;if(!this.isPickerDisplayed)return;const t=null==(i=this.listComponent)?void 0:i.navigateToPage(e,this.highlightedItem);null!=t&&this.animationFrameService.requestAnimationFrame(()=>{if(!this.isAlive())return null;this.highlightSelectedValue(t)})}
1onEnterKeyDown(e){this.isPickerDisplayed&&(e.preventDefault(),this.currentList&&this.onListValueSelected(this.currentList[this.highlightedItem],!0))}onTabKeyDown(){!this.isPickerDisplayed||!this.currentList||this.setValue(this.currentList[this.highlightedItem],!1,!0)}onListValueSelected(e,i){this.setValue(e,!1,!0),this.dispatchPickerEvent(e,i),this.hidePicker()}dispatchPickerEvent(e,i){this.dispatchEvent({type:g.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:i,value:e})}getFocusableElement(){const{allowTyping:e}=this.config;return e?this.eInput.getFocusableElement():super.getFocusableElement()}onKeyDown(e){const i=e.key,{allowTyping:t}=this.config;switch(i){case v.LEFT:case v.RIGHT:t||e.preventDefault();break;case v.PAGE_HOME:case v.PAGE_END:if(t){e.preventDefault();const s=this.eInput.getInputElement(),o=i===v.PAGE_HOME?0:s.value.length;s.setSelectionRange(o,o);break}case v.PAGE_UP:case v.PAGE_DOWN:e.preventDefault(),this.onPageNavigation(i);break;case v.DOWN:case v.UP:this.onNavigationKeyDown(e,i);break;case v.ESCAPE:this.isPickerDisplayed&&(Ie(this.listComponent.getGui())&&(e.preventDefault(),tt(e)),this.hidePicker());break;case v.ENTER:this.onEnterKeyDown(e);break;case v.TAB:this.onTabKeyDown();break;default:t||this.buildSearchStringFromKeyboardEvent(e)}}destroy(){this.listComponent&&(this.destroyBean(this.listComponent),this.listComponent=void 0),this.eLoading=void 0,super.destroy()}};d([p("userComponentFactory")],Yo.prototype,"userComponentFactory",2),d([p("animationFrameService")],Yo.prototype,"animationFrameService",2),d([F("eInput")],Yo.prototype,"eInput",2);var xs=(()=>{let e=class au extends gn{constructor(t){super(t,au.TEMPLATE),this.labelAlignment="top"}init(){this.eSlider.addCssClass("ag-slider-field");const{minValue:t,maxValue:s,textFieldWidth:o,step:r,value:n,onValueChange:l}=this.config;null!=t&&this.setMinValue(t),null!=s&&this.setMaxValue(s),null!=o&&this.setTextFieldWidth(o),null!=r&&this.setStep(r),null!=n&&this.setValue(n),null!=l&&this.onValueChange(l)}onValueChange(t){const s=g.EVENT_FIELD_VALUE_CHANGED;return this.addManagedListener(this.eText,s,()=>{const o=parseFloat(this.eText.getValue());this.eSlider.setValue(o.toString(),!0),t(o||0)}),this.addManagedListener(this.eSlider,s,()=>{const o=this.eSlider.getValue();this.eText.setValue(o,!0),t(parseFloat(o))}),this}setSliderWidth(t){return this.eSlider.setWidth(t),this}setTextFieldWidth(t){return this.eText.setWidth(t),this}setMinValue(t){return this.eSlider.setMinValue(t),this.eText.setMin(t),this}setMaxValue(t){return this.eSlider.setMaxValue(t),this.eText.setMax(t),this}getValue(){return this.eText.getValue()}setValue(t,s){return this.getValue()===t||(this.eText.setValue(t,!0),this.eSlider.setValue(t,!0),s||this.dispatchEvent({type:g.EVENT_FIELD_VALUE_CHANGED})),this}setStep(t){return this.eSlider.setStep(t),this.eText.setStep(t),this}};return e.TEMPLATE='<div class="ag-slider">\n <label ref="eLabel"></label>\n <div class="ag-wrapper ag-slider-wrapper">\n <ag-input-range ref="eSlider"></ag-input-range>\n <ag-input-number-field ref="eText"></ag-input-number-field>\n </div>\n </div>',e})();d([F("eLabel")],xs.prototype,"eLabel",2),d([F("eSlider")],xs.prototype,"eSlider",2),d([F("eText")],xs.prototype,"eText",2),d([T],xs.prototype,"init",1);var gp=xs,Os=(()=>{let e=class ss extends V{constructor(t={}){super(ss.getTemplate(t)),this.params=t,this.suppressEnabledCheckbox=!0,this.suppressToggleExpandOnEnableChange=!1;const{enabled:s,items:o,suppressEnabledCheckbox:r,expanded:n,suppressToggleExpandOnEnableChange:l,useToggle:a}=t;this.cssIdentifier=t.cssIdentifier||"default",this.enabled=s??!0,this.items=o||[],this.useToggle=a??!1,this.alignItems=t.alignItems||"center",this.expanded=n??!0,null!=r&&(this.suppressEnabledCheckbox=r),null!=l&&(this.suppressToggleExpandOnEnableChange=l)}static getTemplate(t){const s=t.cssIdentifier||"default";return`\n <div class="ag-group ag-${s}-group" role="presentation">\n <div ref="eToolbar" class="ag-group-toolbar ag-${s}-group-toolbar">\n <ag-checkbox ref="cbGroupEnabled"></ag-checkbox>\n </div>\n <div ref="eContainer" class="ag-group-container ag-group-container-${t.direction||"vertical"} ag-${s}-group-container"></div>\n </div>\n `}postConstruct(){if(this.setupTitleBar(),this.items.length){const r=this.items;this.items=[],this.addItems(r)}const t=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(t("enabled","Enabled")),this.enabled&&this.setEnabled(this.enabled,void 0,!0),this.setAlignItems(this.alignItems);const{onEnableChange:s,suppressOpenCloseIcons:o}=this.params;this.hideEnabledCheckbox(this.suppressEnabledCheckbox),this.hideOpenCloseIcons(o??!1),this.refreshChildDisplay(),z(this.eContainer,this.expanded),this.cbGroupEnabled.onValueChange(r=>{this.setEnabled(r,!0,this.suppressToggleExpandOnEnableChange),this.dispatchEnableChangeEvent(r)}),null!=s&&this.onEnableChange(s)}refreshChildDisplay(){var t;z(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox),null==(t=this.eTitleBar)||t.refreshOnExpand(this.expanded)}isExpanded(){return this.expanded}setAlignItems(t){return this.alignItems!==t&&this.removeCssClass(`ag-group-item-alignment-${this.alignItems}`),this.alignItems=t,this.addCssClass(`ag-group-item-alignment-${this.alignItems}`),this}toggleGroupExpand(t){var s;let o=!1;if(null!=(s=this.eTitleBar)&&s.isSuppressCollapse()&&!this.useToggle)t=!0,o=!0;else if(this.expanded===(t=t??!this.expanded))return this;return this.expanded=t,this.refreshChildDisplay(),z(this.eContainer,t),o||this.dispatchEvent({type:t?ss.EVENT_EXPANDED:ss.EVENT_COLLAPSED}),this}addItems(t){t.forEach(s=>this.addItem(s))}prependItem(t){this.insertItem(t,!0)}addItem(t){this.insertItem(t,!1)}insertItem(t,s){const o=this.eContainer,r=t instanceof V?t.getGui():t;r.classList.add("ag-group-item",`ag-${this.cssIdentifier}-group-item`),s?(o.insertAdjacentElement("afterbegin",r),this.items.unshift(r)):(o.appendChild(r),this.items.push(r))}hideItem(t,s){z(this.items[s],!t)}getItemIndex(t){const s=t instanceof V?t.getGui():t;return this.items.indexOf(s)}setTitle(t){var s;return null==(s=this.eTitleBar)||s.setTitle(t),this}addTitleBarWidget(t){var s;return null==(s=this.eTitleBar)||s.addWidget(t),this}addCssClassToTitleBar(t){var s;null==(s=this.eTitleBar)||s.addCssClass(t)}
1dispatchEnableChangeEvent(t){this.dispatchEvent({type:ss.EVENT_ENABLE_CHANGE,enabled:t})}setEnabled(t,s,o){var r;return this.enabled=t,this.refreshDisabledStyles(),o||this.toggleGroupExpand(t),s||(this.cbGroupEnabled.setValue(t),null==(r=this.eToggle)||r.setValue(t)),this}isEnabled(){return this.enabled}onEnableChange(t){return this.addManagedListener(this,ss.EVENT_ENABLE_CHANGE,s=>t(s.enabled)),this}hideEnabledCheckbox(t){return this.suppressEnabledCheckbox=t,this.refreshChildDisplay(),this.refreshDisabledStyles(),this}hideOpenCloseIcons(t){var s;return null==(s=this.eTitleBar)||s.hideOpenCloseIcons(t),this}refreshDisabledStyles(){var t;const s=!this.enabled;this.eContainer.classList.toggle("ag-disabled",s),null==(t=this.eTitleBar)||t.refreshDisabledStyles(this.suppressEnabledCheckbox&&s),this.eContainer.classList.toggle("ag-disabled-group-container",s)}setupTitleBar(){const t=this.useToggle?this.createToggleTitleBar():this.createDefaultTitleBar();this.eToolbar.insertAdjacentElement("beforebegin",t.getGui())}createDefaultTitleBar(){const t=this.createManagedBean(new gd(this.params));return this.eTitleBar=t,t.refreshOnExpand(this.expanded),this.addManagedListener(t,gd.EVENT_EXPAND_CHANGED,s=>this.toggleGroupExpand(s.expanded)),t}createToggleTitleBar(){var t;const s=this.createManagedBean(new cd({value:this.enabled,label:this.params.title,labelAlignment:"left",labelWidth:"flex",onValueChange:o=>{this.setEnabled(o,!0),this.dispatchEnableChangeEvent(o)}}));return s.addCssClass("ag-group-title-bar"),s.addCssClass(`ag-${null!=(t=this.params.cssIdentifier)?t:"default"}-group-title-bar ag-unselectable`),this.eToggle=s,this.toggleGroupExpand(this.enabled),s}};return e.EVENT_EXPANDED="expanded",e.EVENT_COLLAPSED="collapsed",e.EVENT_ENABLE_CHANGE="enableChange",e})();d([F("eToolbar")],Os.prototype,"eToolbar",2),d([F("cbGroupEnabled")],Os.prototype,"cbGroupEnabled",2),d([F("eContainer")],Os.prototype,"eContainer",2),d([T],Os.prototype,"postConstruct",1);var fp=Os,Hn="ag-disabled-group-title-bar",_s=(()=>{let e=class nl extends V{constructor(t={}){super(nl.getTemplate(t)),this.suppressOpenCloseIcons=!1;const{title:s,suppressOpenCloseIcons:o}=t;s&&s.length>0&&(this.title=s),null!=o&&(this.suppressOpenCloseIcons=o)}static getTemplate(t){var s;const o=null!=(s=t.cssIdentifier)?s:"default";return`\n <div class="ag-group-title-bar ag-${o}-group-title-bar ag-unselectable" role="button">\n <span class="ag-group-title-bar-icon ag-${o}-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>\n <span class="ag-group-title-bar-icon ag-${o}-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>\n <span ref="eTitle" class="ag-group-title ag-${o}-group-title"></span>\n </div>\n `}postConstruct(){this.setTitle(this.title),this.hideOpenCloseIcons(this.suppressOpenCloseIcons),this.setupExpandContract()}setupExpandContract(){this.eGroupClosedIcon.appendChild(je("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(je("columnSelectOpen",this.gos,null)),this.addManagedListener(this.getGui(),"click",()=>this.dispatchExpandChanged()),this.addManagedListener(this.getGui(),"keydown",t=>{switch(t.key){case v.ENTER:case v.SPACE:t.preventDefault(),this.dispatchExpandChanged();break;case v.RIGHT:case v.LEFT:t.preventDefault(),this.dispatchExpandChanged(t.key===v.RIGHT)}})}refreshOnExpand(t){this.refreshAriaStatus(t),this.refreshOpenCloseIcons(t)}refreshAriaStatus(t){this.suppressOpenCloseIcons||wt(this.getGui(),t)}refreshOpenCloseIcons(t){const s=!this.suppressOpenCloseIcons;z(this.eGroupOpenedIcon,s&&t),z(this.eGroupClosedIcon,s&&!t)}isSuppressCollapse(){return this.suppressOpenCloseIcons}dispatchExpandChanged(t){this.dispatchEvent({type:nl.EVENT_EXPAND_CHANGED,expanded:t})}setTitle(t){const s=this.getGui(),o=!!t&&t.length>0;this.eTitle.textContent=(t=o?t:void 0)??"",z(s,o),t!==this.title&&(this.title=t);const r=s.classList.contains(Hn);return this.refreshDisabledStyles(r),this}addWidget(t){return this.getGui().appendChild(t),this}hideOpenCloseIcons(t){return this.suppressOpenCloseIcons=t,t&&this.dispatchExpandC
1hanged(!0),this}refreshDisabledStyles(t){const s=this.getGui();t?(s.classList.add(Hn),s.removeAttribute("tabindex")):(s.classList.remove(Hn),"string"==typeof this.title?s.setAttribute("tabindex","0"):s.removeAttribute("tabindex"))}};return e.EVENT_EXPAND_CHANGED="expandedChanged",e})();d([F("eGroupOpenedIcon")],_s.prototype,"eGroupOpenedIcon",2),d([F("eGroupClosedIcon")],_s.prototype,"eGroupClosedIcon",2),d([F("eTitle")],_s.prototype,"eTitle",2),d([T],_s.prototype,"postConstruct",1);var gd=_s,kn=class extends Ps{constructor(e=0,i){super('<div class="ag-menu-list" role="tree"></div>'),this.level=e,this.menuItems=[],this.params=i??{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)})}onTabKeyDown(e){const i=this.getParentComponent(),t=i&&i.getGui();t&&t.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case v.UP:case v.RIGHT:case v.DOWN:case v.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case v.ESCAPE:this.closeIfIsChild()&&tt(e)}}handleFocusIn(e){var i,t;const s=e.relatedTarget;!this.tabGuardCtrl.isTabGuard(s)&&(this.getGui().contains(s)||null!=(t=null==(i=this.activeMenuItem)?void 0:i.getSubMenuGui())&&t.contains(s))||(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){var i;const t=e.relatedTarget;!this.activeMenuItem||this.getGui().contains(t)||null!=(i=this.activeMenuItem.getSubMenuGui())&&i.contains(t)||this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate()}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){null!=e&&ke.all(e.map(i=>"separator"===i?ke.resolve({eGui:this.createSeparator()}):"string"==typeof i?(console.warn(`AG Grid: unrecognised menu item ${i}`),ke.resolve({eGui:null})):this.addItem(i))).then(i=>{i.forEach(t=>{t?.eGui&&(this.appendChild(t.eGui),t.comp&&this.menuItems.push(t.comp))})})}addItem(e){const i=this.createManagedBean(new jo);return i.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(t=>t.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(i.setParentComponent(this),this.addManagedListener(i,jo.EVENT_CLOSE_MENU,t=>{this.dispatchEvent(t)}),this.addManagedListener(i,jo.EVENT_MENU_ITEM_ACTIVATED,t=>{this.activeMenuItem&&this.activeMenuItem!==t.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=t.menuItem}),{comp:i,eGui:i.getGui()}))}activateFirstItem(){const e=this.menuItems.filter(i=>!i.isDisabled())[0];e&&e.activate()}createSeparator(){return Ge('\n <div class="ag-menu-separator" aria-hidden="true">\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n </div>')}handleNavKey(e){switch(e){case v.UP:case v.DOWN:const t=this.findNextItem(e===v.UP);return void(t&&t!==this.activeMenuItem&&t.activate())}e===(this.gos.get("enableRtl")?v.RIGHT:v.LEFT)?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){const i=this.getParentComponent();return!!(i&&i instanceof jo)&&(e&&e.preventDefault(),i.closeSubMenu(),i.getGui().focus(),!0)}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){const i=this.menuItems.filter(o=>!o.isDisabled());if(!i.length)return;if(!this.activeMenuItem)return e?$(i):i[0];e&&i.reverse();let t,s=!1;for(let o=0;o<i.length;o++){const r=i[o];if(s){t=r;break}r===this.activeMenuItem&&(s=!0)}return s&&!t?i[0]:t||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}};d([p("focusService")],kn.prototype,"focusService",2),d([T],kn.prototype,"postConstruct",1);var fd=class extends Ps{constructor(e){super(),this.wrappedComponent=e,this.setTemplateFromElement(e.getGui())}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}handleKeyDown(e){e.key===v.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){const e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>
1e.getGui().focus(),0)}};d([T],fd.prototype,"postConstruct",1);var Bn=(()=>{let e=class os extends b{constructor(){super(...arguments),this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}init(t){var s,o;const{menuItemDef:r,isAnotherSubMenuOpen:n,level:l,childComponent:a,contextParams:u}=t;return this.params=t.menuItemDef,this.level=l,this.isAnotherSubMenuOpen=n,this.childComponent=a,this.contextParams=u,this.cssClassPrefix=null!=(o=null==(s=this.params.menuItemParams)?void 0:s.cssClassPrefix)?o:"ag-menu-option",this.userComponentFactory.getMenuItemCompDetails(this.params,x(M({},r),{level:l,isAnotherSubMenuOpen:n,openSubMenu:c=>this.openSubMenu(c),closeSubMenu:()=>this.closeSubMenu(),closeMenu:c=>this.closeMenu(c),updateTooltip:(c,f)=>this.refreshTooltip(c,f),onItemActivated:()=>this.onItemActivated()})).newAgStackInstance().then(c=>{var f;this.menuItemComp=c;const m=null==(f=c.configureDefaults)?void 0:f.call(c);m&&this.configureDefaults(!0===m?void 0:m)})}addListeners(t,s){s?.suppressClick||this.addManagedListener(t,"click",o=>this.onItemSelected(o)),s?.suppressKeyboardSelect||this.addManagedListener(t,"keydown",o=>{(o.key===v.ENTER||o.key===v.SPACE)&&(o.preventDefault(),this.onItemSelected(o))}),s?.suppressMouseDown||this.addManagedListener(t,"mousedown",o=>{o.stopPropagation(),o.preventDefault()}),s?.suppressMouseOver||(this.addManagedListener(t,"mouseenter",()=>this.onMouseEnter()),this.addManagedListener(t,"mouseleave",()=>this.onMouseLeave()))}isDisabled(){return!!this.params.disabled}openSubMenu(t=!1){var s,o;if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;const r=Ge('<div class="ag-menu" role="presentation"></div>');this.eSubMenuGui=r;let n,l=()=>{this.subMenuIsOpening=!1};if(this.childComponent){const c=this.createBean(new fd(this.childComponent));c.setParentComponent(this);const f=c.getGui(),m="mouseenter",C=()=>this.cancelDeactivate();f.addEventListener(m,C),n=()=>f.removeEventListener(m,C),r.appendChild(f),this.childComponent.afterGuiAttached&&(l=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){const c=this.createBean(new kn(this.level+1,this.contextParams));c.setParentComponent(this),c.addMenuItems(this.params.subMenu),r.appendChild(c.getGui()),this.addManagedListener(c,os.EVENT_CLOSE_MENU,f=>this.dispatchEvent(f)),c.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),n=()=>this.destroyBean(c),t&&(l=()=>{c.activateFirstItem(),this.subMenuIsOpening=!1})}const a=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:this.eGui,ePopup:r}),u=this.localeService.getLocaleTextFunc(),h=this.popupService.addPopup({modal:!0,eChild:r,positionCallback:a,anchorToElement:this.eGui,ariaLabel:u("ariaLabelSubMenu","SubMenu"),afterGuiAttached:l});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{var c,f;h&&h.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),n(),null==(f=(c=this.menuItemComp).setExpanded)||f.call(c,!1),this.eSubMenuGui=void 0},null==(o=(s=this.menuItemComp).setExpanded)||o.call(s,!0)}setAriaExpanded(t){this.suppressAria||wt(this.eGui,t)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(t){var s,o;this.cancelActivate(),!this.params.disabled&&(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),null==(o=(s=this.menuItemComp).setActive)||o.call(s,!0),this.suppressFocus||this.eGui.focus({preventScroll:!0}),t&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){var t,s;this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),null==(s=(t=this.menuItemComp).setActive)||s.call(t,!1),this.isActive=!1,this.subMenuIsOpen&&this.hideSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(t){this.parentComponent=t}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(t){var s,o;null==(o=(s=this.menuItemComp).select)||o.call(s),this.params.action?this.getFrameworkOverrides().wrapOutgoing(()=>this.params.action(this.gos.addGridCommonParams(M({},this.contextParams)))):this.openSubMenu(t&&"keydown"===t.type),!(this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect)&&this.closeMenu(t)}closeMenu(t){const s={type:os.EVENT_CLOSE_MENU};t&&(t instanceof MouseEvent?s.mouseEvent=t:s.keyboardEvent=t),this.dispatchEvent(s)}onItemActivated(){this.dispatchEvent({type:os.EVENT_MENU_ITEM_ACTIVATED,menuItem:this})}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),os.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),os.ACTIVATION_DELAY):this.deactivate()}configureDefaults(t){var s,o,r;if(!this.menuItemComp)return void setTimeout(()=>this.configureDefaults(t));let n=this.menuItemComp.getGui();const l=null==(o=(s=this.menuItemComp).getRootElement)?void 0:o.call(s);l&&(t?.suppressRootStyles||n.classList.add("ag-menu-option-custom"),n=l),this.eGui=n,this.suppressRootStyles=!!t?.suppressRootStyles,this.suppressRootStyles||(n.classList.add(this.cssClassPrefix),null==(r=this.params.cssClasse
1s)||r.forEach(a=>n.classList.add(a)),this.params.disabled&&n.classList.add(`${this.cssClassPrefix}-disabled`)),t?.suppressTooltip||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!t?.suppressAria,this.suppressAria||(oe(n,"treeitem"),Ul(n,this.level+1),this.params.disabled&&Gr(n,!0)),t?.suppressTabIndex||n.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(n,t),this.suppressFocus=!!t?.suppressFocus}refreshTooltip(t,s){this.tooltip=t,this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),t&&this.menuItemComp&&(this.tooltipFeature=this.createBean(new Et({getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:s})))}destroy(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),super.destroy()}};return e.EVENT_CLOSE_MENU="closeMenu",e.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated",e.ACTIVATION_DELAY=80,e})();d([p("popupService")],Bn.prototype,"popupService",2),d([p("userComponentFactory")],Bn.prototype,"userComponentFactory",2);var jo=Bn,Wi=(()=>{let e=class ll extends V{constructor(t){super(ll.getTemplate(t)),this.config=t,this.closable=!0}static getTemplate(t){const s=t.cssIdentifier||"default";return`<div class="ag-panel ag-${s}-panel" tabindex="-1">\n <div ref="eTitleBar" class="ag-panel-title-bar ag-${s}-panel-title-bar ag-unselectable">\n <span ref="eTitle" class="ag-panel-title-bar-title ag-${s}-panel-title-bar-title"></span>\n <div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-${s}-panel-title-bar-buttons"></div>\n </div>\n <div ref="eContentWrapper" class="ag-panel-content-wrapper ag-${s}-panel-content-wrapper"></div>\n </div>`}postConstruct(){const{component:t,closable:s,hideTitleBar:o,title:r,minWidth:n=250,width:l,minHeight:a=250,height:u,centered:h,popup:c,x:f,y:m}=this.config;this.positionableFeature=new Pi(this.getGui(),{minWidth:n,width:l,minHeight:a,height:u,centered:h,x:f,y:m,popup:c,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);const C=this.getGui();t&&this.setBodyComponent(t),o?z(this.eTitleBar,!1):(r&&this.setTitle(r),this.setClosable(s??this.closable)),this.addManagedListener(this.eTitleBar,"mousedown",w=>{if(C.contains(w.relatedTarget)||C.contains(this.gos.getActiveDomElement())||this.eTitleBarButtons.contains(w.target))return void w.preventDefault();const S=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");S&&S.focus()}),(!c||!this.positionableFeature.isPositioned())&&(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){const t=this.getGui();t.focus(),this.close=()=>{t.parentElement.removeChild(t),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(t){this.positionableFeature.setHeight(t)}getWidth(){return this.positionableFeature.getWidth()}setWidth(t){this.positionableFeature.setWidth(t)}setClosable(t){if(t!==this.closable&&(this.closable=t),t){const s=this.closeButtonComp=new V(ll.CLOSE_BTN_TEMPLATE);this.getContext().createBean(s);const o=s.getGui(),r=se("close",this.gos);r.classList.add("ag-panel-title-bar-button-icon"),o.appendChild(r),this.addTitleBarButton(s),s.addManagedListener(o,"click",this.onBtClose.bind(this))}else if(this.closeButtonComp){const s=this.closeButtonComp.getGui();s.parentElement.removeChild(s),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(t){t.setParentComponent(this),this.eContentWrapper.appendChild(t.getGui())}addTitleBarButton(t,s){const o=this.eTitleBarButtons,r=o.children,n=r.length;null==s&&(s=n),s=Math.max(0,Math.min(s,n)),t.addCssClass("ag-panel-title-bar-button");const l=t.getGui();0===s?o.insertAdjacentElement("afterbegin",l):s===n?o.insertAdjacentElement("beforeend",l):r[s-1].insertAdjacentElement("afterend",l),t.setParentComponent(this)}getBodyHeight(){return ps(this.eContentWrapper)}getBodyWidth(){return Ut(this.eContentWrapper)}setTitle(t){this.eTitle.innerText=t}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));const t=this.getGui();t&&Ie(t)&&this.close(),super.destroy()}};return e.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>',e})();d([F("eContentWrapper")],Wi.prototype,"eContentWrapper",2),d([F("eTitleBar")],Wi.prototype,"eTitleBar",2),d([F("eTitleBarButtons")],Wi.prototype,"eTitleBarButtons",2),d([F("eTitle")],Wi.prototype,"eTitle",2),d([T],Wi.prototype,"postConstruct",1);var mp=Wi;d([p("popupService")],class extends mp{constructor(e){super(x(M({},e),{popup:!0})),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}postConstruct(){const e=this.getGui(),{movable:i,resizable:t,maximizable:s}=this.config;this.addCssClass("ag-dialog"),super.postConstruct(),this.addManagedListener(e,"focusin",o=>{this.popupService.bringPopupToFront(e)}),i&&this.setMovable(i),s&&this.setMaximizable(s),t&&this.setResizable(t)}renderComponent(){const e=this.getGui(),{alwaysOnTop:i,modal:t,title:s,afterGuiAttached:o}=this.config,r=this.localeService.getLocaleTextFunc(),n=this.popupService.addPopup({modal:t,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:i,ariaLabel:s||r("ariaLabelDialog","Dialog"),afterGuiAttached:o});n&&(this.close=n.hideFunc)}onClosed(e){var i,t;this.destroy(),null==(t=(i=this.config).closedCallback)||t.call(i,e)}toggleMaximize(){const e=this.positionableFeature.getPosition();if(this.isMaximized){const{x:i,y:t,width:s,height:o}=this.lastPosition;this.setWidth(s),this.setHeight(o),this.positionableFeature.offsetElement(i,t)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){z(this.maximizeIcon,!this.isMaximized),z(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEac
1h(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e)return this.clearMaximizebleListeners(),void(this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0));const i=this.eTitleBar;if(!i||e===this.isMaximizable)return;const t=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),t.addManagedListener(t.getGui(),"click",this.toggleMaximize.bind(this)),this.addTitleBarButton(t,0),this.maximizeListeners.push(this.addManagedListener(i,"dblclick",this.toggleMaximize.bind(this))),this.resizeListenerDestroy=this.addManagedListener(this,"resize",()=>{this.isMaximized=!1,this.refreshMaximizeIcon()})}buildMaximizeAndMinimizeElements(){const e=this.maximizeButtonComp=this.createBean(new V('<div class="ag-dialog-button"></span>')),i=e.getGui();return this.maximizeIcon=se("maximize",this.gos),i.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=se("minimize",this.gos),i.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}}.prototype,"popupService",2);var vp=0,oi=(()=>{let e=class extends b{constructor(){super(...arguments),this.popupList=[]}postConstruct(){this.ctrlsService.whenReady(i=>{this.gridCtrl=i.gridCtrl}),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.handleThemeChange.bind(this))}getPopupParent(){return this.gos.get("popupParent")||this.gridCtrl.getGui()}positionPopupForMenu(i){const{eventSource:t,ePopup:s}=i,o=this.getPopupIndex(s);-1!==o&&(this.popupList[o].alignedToElement=t);const r=t.getBoundingClientRect(),n=this.getParentRect(),l=this.keepXYWithinBounds(s,r.top-n.top,0),a=s.clientWidth>0?s.clientWidth:200;s.style.minWidth=`${a}px`;const h=n.right-n.left-a;let c;function f(){return r.right-n.left-2}function m(){return r.left-n.left-a}this.gos.get("enableRtl")?(c=m(),c<0&&(c=f(),this.setAlignedStyles(s,"left")),c>h&&(c=0,this.setAlignedStyles(s,"right"))):(c=f(),c>h&&(c=m(),this.setAlignedStyles(s,"right")),c<0&&(c=0,this.setAlignedStyles(s,"left"))),s.style.left=`${c}px`,s.style.top=`${l}px`}positionPopupUnderMouseEvent(i){const{ePopup:t,nudgeX:s,nudgeY:o,skipObserver:r}=i;this.positionPopup({ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:!0,skipObserver:r,updatePosition:()=>this.calculatePointerAlign(i.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(i.type,i.ePopup,null,i.mouseEvent,i.column,i.rowNode)})}calculatePointerAlign(i){const t=this.getParentRect();return{x:i.clientX-t.left,y:i.clientY-t.top}}positionPopupByComponent(i){const{ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:r,eventSource:n,alignSide:l="left",position:a="over",column:u,rowNode:h,type:c}=i,f=n.getBoundingClientRect(),m=this.getParentRect(),C=this.getPopupIndex(t);-1!==C&&(this.popupList[C].alignedToElement=n),this.positionPopup({ePopup:t,nudgeX:s,nudgeY:o,keepWithinBounds:r,updatePosition:()=>{let R,S=f.left-m.left;return"right"===l&&(S-=t.offsetWidth-f.width),"over"===a?(R=f.top-m.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),R="under"===this.shouldRenderUnderOrAbove(t,f,m,i.nudgeY||0)?f.top-m.top+f.height:f.top-t.offsetHeight-2*(o||0)-m.top),{x:S,y:R}},postProcessCallback:()=>this.callPostProcessPopup(c,t,n,null,u,h)})}shouldRenderUnderOrAbove(i,t,s,o){const r=s.bottom-t.bottom,n=t.top-s.top,l=i.offsetHeight+o;return r>l?"under":n>l||n>r?"above":"under"}setAlignedStyles(i,t){const s=this.getPopupIndex(i);if(-1===s)return;const o=this.popupList[s],{alignedToElement:r}=o;!r||(["right","left","over","above","under"].forEach(l=>{r.classList.remove(`ag-has-popup-positioned-${l}`),i.classList.remove(`ag-popup-positioned-${l}`)}),!t)||(r.classList.add(`ag-has-popup-positioned-${t}`),i.classList.add(`ag-popup-positioned-${t}`))}callPostProcessPopup(i,t,s,o,r,n){const l=this.gos.getCallback("postProcessPopup");l&&l({column:r,rowNode:n,ePopup:t,type:i,eventSource:s,mouseEvent:o})}positionPopup(i){const{ePopup:t,keepWithinBounds:s,nudgeX:o,nudgeY:r,skipObserver:n,updatePosition:l}=i,a={width:0,height:0},u=(h=!1)=>{let{x:c,y:f}=l();h&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,o&&(c+=o),r&&(f+=r),s&&(c=this.keepXYWithinBounds(t,c,1),f=this.keepXYWithinBounds(t,f,0)),t.style.left=`${c}px`,t.style.top=`${f}px`,i.postProcessCallback&&i.postProcessCallback())};if(u(),!n){const h=this.resizeObserverService.observeResize(t,()=>u(!0));setTimeout(()=>h(),e.WAIT_FOR_POPUP_CONTENT_RESIZE)}}getActivePopups(){return this.popupList.map(i=>i.element)}getPopupList(){return this.popupList}getParentRect(){const i=this.gos.getDocument();let t=this.getPopupParent();return t===i.body?t=i.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),sn(t)}keepXYWithinBounds(i,t,s){const o=0===s,r=o?"clientHeight":"clientWidth",n=o?"top":"left",l=o?"offsetHeight":"offsetWidth",a=o?"scrollTop":"scrollLeft",u=this.gos.getDocument(),h=u.documentElement,c=this.getPopupParent(),f=c.getBoundingClientRect(),m=u.documentElement.getBoundingClientRect(),C=c===u.body,w=i[l];let R=C?(o?tn:gs)(h)+h[a]:c[r];C&&(R-=Math.abs(m[n]-f[n]));const E=R-w;return Math.min(Math.max(t,0),Math.abs(E))}addPopup(i){const t=this.gos.getDocument(),{eChild:s,ariaLabel:o,alwaysOnTop:r,positionCallback:n,anch
1orToElement:l}=i;if(!t)return console.warn("AG Grid: could not find the document, document is empty"),{hideFunc:()=>{}};const a=this.getPopupIndex(s);if(-1!==a)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(s);const u=this.createPopupWrapper(s,o,!!r),h=this.addEventListenersToPopup(x(M({},i),{wrapperEl:u}));return n&&n(),this.addPopupToPopupList(s,u,h,l),{hideFunc:h}}initialisePopupPosition(i){const s=this.getPopupParent().getBoundingClientRect();y(i.style.top)||(i.style.top=-1*s.top+"px"),y(i.style.left)||(i.style.left=-1*s.left+"px")}createPopupWrapper(i,t,s){const o=this.getPopupParent(),r=document.createElement("div"),{allThemes:n}=this.environment.getTheme();return n.length&&r.classList.add(...n),r.classList.add("ag-popup"),i.classList.add(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),i.hasAttribute("role")||oe(i,"dialog"),He(i,t),r.appendChild(i),o.appendChild(r),s?this.setAlwaysOnTop(i,!0):this.bringPopupToFront(i),r}handleThemeChange(){const{allThemes:i}=this.environment.getTheme();for(const t of this.popupList){for(const s of Array.from(t.wrapper.classList))s.startsWith("ag-theme-")&&t.wrapper.classList.remove(s);i.length&&t.wrapper.classList.add(...i)}}addEventListenersToPopup(i){const t=this.gos.getDocument(),s=this.getPopupParent(),{wrapperEl:o,eChild:r,closedCallback:n,afterGuiAttached:l,closeOnEsc:a,modal:u}=i;let h=!1;const c=w=>{o.contains(this.gos.getActiveDomElement())&&w.key===v.ESCAPE&&!it(w)&&C({keyboardEvent:w})},f=w=>C({mouseEvent:w}),m=w=>C({touchEvent:w}),C=(w={})=>{const{mouseEvent:S,touchEvent:R,keyboardEvent:E,forceHide:A}=w;!A&&(this.isEventFromCurrentPopup({mouseEvent:S,touchEvent:R},r)||h)||(h=!0,s.removeChild(o),t.removeEventListener("keydown",c),t.removeEventListener("mousedown",f),t.removeEventListener("touchstart",m),t.removeEventListener("contextmenu",f),this.eventService.removeEventListener(g.EVENT_DRAG_STARTED,f),n&&n(S||R||E),this.removePopupFromPopupList(r))};return l&&l({hidePopup:C}),window.setTimeout(()=>{a&&t.addEventListener("keydown",c),u&&(t.addEventListener("mousedown",f),this.eventService.addEventListener(g.EVENT_DRAG_STARTED,f),t.addEventListener("touchstart",m),t.addEventListener("contextmenu",f))},0),C}addPopupToPopupList(i,t,s,o){this.popupList.push({element:i,wrapper:t,hideFunc:s,instanceId:vp++,isAnchored:!!o}),o&&this.setPopupPositionRelatedToElement(i,o)}getPopupIndex(i){return this.popupList.findIndex(t=>t.element===i)}setPopupPositionRelatedToElement(i,t){const s=this.getPopupIndex(i);if(-1===s)return;const o=this.popupList[s];if(o.stopAnchoringPromise&&o.stopAnchoringPromise.then(n=>n&&n()),o.stopAnchoringPromise=void 0,o.isAnchored=!1,!t)return;const r=this.keepPopupPositionedRelativeTo({element:t,ePopup:i,hidePopup:o.hideFunc});return o.stopAnchoringPromise=r,o.isAnchored=!0,r}removePopupFromPopupList(i){this.setAlignedStyles(i,null),this.setPopupPositionRelatedToElement(i,null),this.popupList=this.popupList.filter(t=>t.element!==i)}keepPopupPositionedRelativeTo(i){const t=this.getPopupParent(),s=t.getBoundingClientRect(),{element:o,ePopup:r}=i,n=o.getBoundingClientRect(),l=s.top-n.top,a=s.left-n.left;let u=l,h=a;const c=r.style.top,f=parseInt(c.substring(0,c.length-1),10),m=r.style.left,C=parseInt(m.substring(0,m.length-1),10);return new ke(w=>{this.getFrameworkOverrides().setInterval(()=>{const S=t.getBoundingClientRect(),R=o.getBoundingClientRect();if(0==R.top&&0==R.left&&0==R.height&&0==R.width)return void i.hidePopup();const A=S.top-R.top;if(A!=u){const L=this.keepXYWithinBounds(r,f+l-A,0);r.style.top=`${L}px`}u=A;const P=S.left-R.left;if(P!=h){const L=this.keepXYWithinBounds(r,C+a-P,1);r.style.left=`${L}px`}h=P},200).then(S=>{w(()=>{null!=S&&window.clearInterval(S)})})})}hasAnchoredPopup(){return this.popupList.some(i=>i.isAnchored)}isEventFromCurrentPopup(i,t){const{mouseEvent:s,touchEvent:o}=i,r=s||o;if(!r)return!1;const n=this.getPopupIndex(t);if(-1===n)return!1;for(let l=n;l<this.popupList.length;l++)if(po(this.popupList[l].element,r))return!0;return this.isElementWithinCustomPopup(r.target)}isElementWithinCustomPopup(i){const t=this.gos.getDocument();for(;i&&i!==t.body;){if(i.classList.contains("ag-custom-component-popup")||null===i.parentElement)return!0;
1i=i.parentElement}return!1}getWrapper(i){for(;!i.classList.contains("ag-popup")&&i.parentElement;)i=i.parentElement;return i.classList.contains("ag-popup")?i:null}setAlwaysOnTop(i,t){const s=this.getWrapper(i);s&&(s.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(s))}bringPopupToFront(i){const t=this.getPopupParent(),s=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),o=s.length,r=Array.prototype.slice.call(t.querySelectorAll(".ag-popup.ag-always-on-top")),n=r.length,l=this.getWrapper(i);if(!l||o<=1||!t.contains(i))return;const a=s.indexOf(l),u=l.querySelectorAll("div"),h=[];for(u.forEach(c=>{0!==c.scrollTop&&h.push([c,c.scrollTop])}),n?l.classList.contains("ag-always-on-top")?a!==o-1&&$(r).insertAdjacentElement("afterend",l):a!==o-n-1&&r[0].insertAdjacentElement("beforebegin",l):a!==o-1&&$(s).insertAdjacentElement("afterend",l);h.length;){const c=h.pop();c[0].scrollTop=c[1]}}};return e.WAIT_FOR_POPUP_CONTENT_RESIZE=200,e})();d([p("focusService")],oi.prototype,"focusService",2),d([p("ctrlsService")],oi.prototype,"ctrlsService",2),d([p("resizeObserverService")],oi.prototype,"resizeObserverService",2),d([T],oi.prototype,"postConstruct",1),oi=d([I("popupService")],oi);var wp=class extends V{constructor(){super('\n <div class="ag-autocomplete-row" role="presentation">\n <div class="ag-autocomplete-row-label"></div>\n </div>'),this.hasHighlighting=!1}setState(e,i){this.value=e,this.render(),this.updateSelected(i)}updateSelected(e){this.addOrRemoveCssClass("ag-autocomplete-row-selected",e)}setSearchString(e){var i;let t=!1;if(y(e)){const s=null==(i=this.value)?void 0:i.toLocaleLowerCase().indexOf(e.toLocaleLowerCase());if(s>=0){t=!0,this.hasHighlighting=!0;const o=s+e.length,r=ae(this.value.slice(0,s)),n=ae(this.value.slice(s,o)),l=ae(this.value.slice(o));this.getGui().lastElementChild.innerHTML=`${r}<b>${n}</b>${l}`}}!t&&this.hasHighlighting&&(this.hasHighlighting=!1,this.render())}render(){var e;this.getGui().lastElementChild.innerHTML=null!=(e=ae(this.value))?e:" "}},Wn=(()=>{let e=class du extends Yt{constructor(t){super(du.TEMPLATE),this.params=t,this.searchString=""}destroy(){super.destroy()}init(){this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList=this.createManagedBean(new pd({cssIdentifier:"autocomplete"})),this.virtualList.setComponentCreator(this.createRowComponent.bind(this)),this.eList.appendChild(this.virtualList.getGui()),this.virtualList.setModel({getRowCount:()=>this.autocompleteEntries.length,getRow:s=>this.autocompleteEntries[s]});const t=this.virtualList.getGui();this.addManagedListener(t,"click",()=>this.params.onConfirmed()),this.addManagedListener(t,"mousemove",this.onMouseMove.bind(this)),this.addManagedListener(t,"mousedown",s=>s.preventDefault()),this.setSelectedValue(0)}onNavigationKeyDown(t,s){t.preventDefault();const o=this.autocompleteEntries.indexOf(this.selectedValue);this.checkSetSelectedValue(s===v.UP?o-1:o+1)}setSearch(t){this.searchString=t,y(t)?this.runSearch():(this.autocompleteEntries=this.params.autocompleteEntries,this.virtualList.refresh(),this.checkSetSelectedValue(0)),this.updateSearchInList()}runContainsSearch(t,s){let o,r=!1;const n=t.toLocaleLowerCase(),l=s.filter(a=>{const h=a.toLocaleLowerCase().indexOf(n),c=0===h,f=h>=0;return f&&(!o||!r&&c||r===c&&a.length<o.length)&&(o=a,r=c),f});return!o&&l.length&&(o=l[0]),{topMatch:o,allMatches:l}}runSearch(){var t,s;const{autocompleteEntries:o}=this.params,r=o.map(h=>{var c;return null!=(c=h.displayValue)?c:h.key});let n,l;if(this.params.useFuzzySearch)n=Ss(this.searchString,r,!0).values,l=n.length?n[0]:void 0;else{const h=this.runContainsSearch(this.searchString,r);n=h.allMatches,l=h.topMatch}let a=o.filter(({key:h,displayValue:c})=>n.includes(c??h));if(!a.length&&this.selectedValue&&null!=(s=null==(t=this.params)?void 0:t.forceLastSelection)&&s.call(t,this.selectedValue,this.searchString)&&(a=[this.selectedValue]),this.autocompleteEntries=a,this.virtualList.refresh(),!l)return;const u=n.indexOf(l);this.checkSetSelectedValue(u)}updateSearchInList(){this.virtualList.forEachRenderedRow(t=>t.setSearchString(this.searchString))}checkSetSelectedValue(t){t>=0&&t<this.autocompleteEntries.length&&this.setSelectedValue(t)}setSelectedValue(t){const s=this.autocompleteEntries[t];this.selectedValue!==s&&(this.selectedValue=s,this.virtualList.ensureIndexVisible(t),this.virtualList.forEachRenderedRow((o,r)=>{o.updateSelected(t===r)}))}createRowComponent(t){var s;const o=new wp;return this.getContext().createBean(o),o.setState(null!=(s=t.displayValue)?s:t.key,t===this.selectedValue),o}onMouseMove(t){const s=this.virtualList.getGui().getBoundingClientRect(),o=this.virtualList.getScrollTop(),n=Math.floor((t.clientY-s.top+o)/this.virtualList.getRowHeight());this.checkSetSelectedValue(n)}afterGuiAttached(){this.virtualList.refresh()}getSelectedValue(){var t;return this.autocompleteEntries.length&&null!=(t=this.selectedValue)?t:null}};return e.TEMPLATE='<div class="ag-autocomplete-list-popup">\n <div ref="eList" class="ag-autocomplete-list"></div>\n <div>',e})();d([F("eList")],Wn.prototype,"eList",2),d([T],Wn.prototype,"init",1);var Sp=Wn,qo=(()=>{let e=class eo extends V{constructor(){super('\n <div class="ag-autocomplete" role="presentation">\n <ag-input-text-field ref="eAutocompleteInput"></ag-input-text-field>\n </div>'),this.isListOpen=!1,this.lastPosition=0,this.valid=!0}postConstruct(){this.eAutocompleteInput.onValueChange(t=>this.onValueChanged(t)),this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off"),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.addGuiEventListener("click",this.updatePositionAndList.bind(this)),this.addDestroyFunc(()=>{this.destroyBean(this.autocompleteList)}),this.addGuiEventListener("focusout",()=>this.onFocusOut())}onValueChanged(t){const s=Ze(t);
1this.updateValue(s),this.updateAutocompleteList(s)}updateValue(t){this.updateLastPosition(),this.dispatchEvent({type:eo.EVENT_VALUE_CHANGED,value:t}),this.validate(t)}updateAutocompleteList(t){var s,o,r,n;const l=null!=(o=null==(s=this.listGenerator)?void 0:s.call(this,t,this.lastPosition))?o:{enabled:!1};if((!l.type||l.type!==(null==(r=this.autocompleteListParams)?void 0:r.type))&&this.isListOpen&&this.closeList(),this.autocompleteListParams=l,null!=(n=this.autocompleteListParams)&&n.enabled){this.isListOpen||this.openList();const{searchString:a}=this.autocompleteListParams;this.autocompleteList.setSearch(a??"")}else this.isListOpen&&this.closeList()}onKeyDown(t){const s=t.key;switch(this.updateLastPosition(),s){case v.ENTER:this.onEnterKeyDown(t);break;case v.TAB:this.onTabKeyDown(t);break;case v.DOWN:case v.UP:this.onUpDownKeyDown(t,s);break;case v.LEFT:case v.RIGHT:case v.PAGE_HOME:case v.PAGE_END:setTimeout(()=>{this.updatePositionAndList()});break;case v.ESCAPE:this.onEscapeKeyDown(t);break;case v.SPACE:t.ctrlKey&&!this.isListOpen&&(t.preventDefault(),this.forceOpenList())}}confirmSelection(){var t;const s=null==(t=this.autocompleteList)?void 0:t.getSelectedValue();s&&(this.closeList(),this.dispatchEvent({type:eo.EVENT_OPTION_SELECTED,value:this.getValue(),position:this.lastPosition,updateEntry:s,autocompleteType:this.autocompleteListParams.type}))}onTabKeyDown(t){this.isListOpen&&(t.preventDefault(),t.stopPropagation(),this.confirmSelection())}onEnterKeyDown(t){t.preventDefault(),this.isListOpen?this.confirmSelection():this.onCompleted()}onUpDownKeyDown(t,s){var o;t.preventDefault(),this.isListOpen?null==(o=this.autocompleteList)||o.onNavigationKeyDown(t,s):this.forceOpenList()}onEscapeKeyDown(t){this.isListOpen&&(t.preventDefault(),t.stopPropagation(),this.closeList(),this.setCaret(this.lastPosition,!0))}onFocusOut(){this.isListOpen&&this.closeList()}updatePositionAndList(){var t;this.updateLastPosition(),this.updateAutocompleteList(null!=(t=this.eAutocompleteInput.getValue())?t:null)}setCaret(t,s){const o=this.gos.getDocument(),r=this.gos.getActiveDomElement();s&&(!r||r===o.body)&&this.eAutocompleteInput.getFocusableElement().focus();const n=this.eAutocompleteInput.getInputElement();n.setSelectionRange(t,t),t===n.value.length&&(n.scrollLeft=n.scrollWidth)}forceOpenList(){this.onValueChanged(this.eAutocompleteInput.getValue())}updateLastPosition(){var t;this.lastPosition=null!=(t=this.eAutocompleteInput.getInputElement().selectionStart)?t:0}validate(t){var s;this.validator&&(this.validationMessage=this.validator(t),this.eAutocompleteInput.getInputElement().setCustomValidity(null!=(s=this.validationMessage)?s:""),this.valid=!this.validationMessage,this.dispatchEvent({type:eo.EVENT_VALID_CHANGED,isValid:this.valid,validationMessage:this.validationMessage}))}openList(){this.isListOpen=!0,this.autocompleteList=this.createBean(new Sp({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:()=>this.confirmSelection(),forceLastSelection:this.forceLastSelection}));const t=this.autocompleteList.getGui(),s={ePopup:t,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gos.get("enableRtl")?"right":"left",keepWithinBounds:!0},o=this.popupService.addPopup({eChild:t,anchorToElement:this.getGui(),positionCallback:()=>this.popupService.positionPopupByComponent(s),ariaLabel:this.listAriaLabel});this.hidePopup=o.hideFunc,this.autocompleteList.afterGuiAttached()}closeList(){this.isListOpen=!1,this.hidePopup(),this.destroyBean(this.autocompleteList),this.autocompleteList=null}onCompleted(){this.isListOpen&&this.closeList(),this.dispatchEvent({type:eo.EVENT_VALUE_CONFIRMED,value:this.getValue(),isValid:this.isValid()})}getValue(){return Ze(this.eAutocompleteInput.getValue())}setInputPlaceholder(t){return this.eAutocompleteInput.setInputPlaceholder(t),this}setInputAriaLabel(t){return this.eAutocompleteInput.setInputAriaLabel(t),this}setListAriaLabel(t){return this.listAriaLabel=t,this}setListGenerator(t){return this.listGenerator=t,this}setValidator(t){return this.validator=t,this}isValid(){return this.valid}setValue(t){const{value:s,position:o,silent:r,updateListOnlyIfOpen:n,restoreFocus:l}=t;this.eAutocompleteInput.setValue(s,!0),this.setCaret(o??this.lastPosition,l),r||this.updateV
1alue(s),(!n||this.isListOpen)&&this.updateAutocompleteList(s)}setForceLastSelection(t){return this.forceLastSelection=t,this}setInputDisabled(t){return this.eAutocompleteInput.setDisabled(t),this}};return e.EVENT_VALUE_CHANGED="eventValueChanged",e.EVENT_VALUE_CONFIRMED="eventValueConfirmed",e.EVENT_OPTION_SELECTED="eventOptionSelected",e.EVENT_VALID_CHANGED="eventValidChanged",e})();d([p("popupService")],qo.prototype,"popupService",2),d([F("eAutocompleteInput")],qo.prototype,"eAutocompleteInput",2),d([T],qo.prototype,"postConstruct",1);var Ep=qo,Ui=(()=>{let e=class cr extends V{constructor(t,s,o,r){super(),this.dragSourceDropTarget=t,this.ghost=s,this.horizontal=o,this.template=r}init(){var t;this.setTemplate(null!=(t=this.template)?t:cr.TEMPLATE);const s=this.getGui();this.addElementClasses(s),this.addElementClasses(this.eDragHandle,"drag-handle"),this.addElementClasses(this.eText,"text"),this.addElementClasses(this.eButton,"button"),this.eDragHandle.appendChild(se("columnDrag",this.gos)),this.eButton.appendChild(se("cancel",this.gos)),this.setupComponents(),!this.ghost&&this.isDraggable()&&this.addDragSource(),this.setupAria(),this.setupTooltip(),this.activateTabIndex(),this.refreshDraggable()}isDraggable(){return!0}refreshDraggable(){this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!this.isDraggable())}setupAria(){const t=this.localeService.getLocaleTextFunc(),s=[this.getAriaDisplayName()];this.addAdditionalAriaInstructions(s,t),He(this.getGui(),s.join(". "))}addAdditionalAriaInstructions(t,s){if(this.isRemovable()){const o=s("ariaDropZoneColumnComponentDescription","Press DELETE to remove");t.push(o)}}setupTooltip(){const t=()=>{const s=this.getTooltip();this.setTooltip({newTooltipText:s})};t(),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,t)}getDragSourceId(){}getDefaultIconName(){return ee.ICON_NOT_ALLOWED}addDragSource(){const{dragAndDropService:t,eDragHandle:s}=this,o=this.createGetDragItem(),r=this.getDefaultIconName(),n={type:this.getDragSourceType(),sourceId:this.getDragSourceId(),eElement:s,getDefaultIconName:()=>r,getDragItem:o,dragItemName:this.getDisplayName()};t.addDragSource(n,!0),this.addDestroyFunc(()=>t.removeDragSource(n))}setupComponents(){this.setTextValue(),this.setupRemove(),this.ghost&&this.addCssClass("ag-column-drop-cell-ghost")}isRemovable(){return!0}refreshRemove(){z(this.eButton,this.isRemovable())}setupRemove(){this.refreshRemove();const t={type:cr.EVENT_COLUMN_REMOVE};this.addGuiEventListener("keydown",o=>this.onKeyDown(o)),this.addManagedListener(this.eButton,"click",o=>{this.dispatchEvent(t),o.stopPropagation()});const s=new ge(this.eButton);this.addManagedListener(s,ge.EVENT_TAP,()=>{this.dispatchEvent(t)}),this.addDestroyFunc(s.destroy.bind(s))}onKeyDown(t){t.key===v.DELETE&&this.isRemovable()&&(t.preventDefault(),this.dispatchEvent({type:cr.EVENT_COLUMN_REMOVE}))}getDisplayValue(){return this.getDisplayName()}setTextValue(){const s=ae(this.getDisplayValue());this.eText.innerHTML=s}addElementClasses(t,s){t.classList.add("ag-column-drop-cell"+(s=s?`-${s}`:""),`ag-column-drop-${this.horizontal?"horizontal":"vertical"}-cell${s}`)}destroy(){super.destroy(),this.dragSourceDropTarget=null}};return e.EVENT_COLUMN_REMOVE="columnRemove",e.TEMPLATE='<span role="option">\n <span ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>\n <span ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>\n <span ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>\n </span>',e})();d([p("dragAndDropService")],Ui.prototype,"dragAndDropService",2),d([F("eText")],Ui.prototype,"eText",2),d([F("eDragHandle")],Ui.prototype,"eDragHandle",2),d([F("eButton")],Ui.prototype,"eButton",2),d([T],Ui.prototype,"init",1);var yp=Ui,md=(()=>{let e=class ft extends V{constructor(t){super('<div class="ag-unselectable" role="presentation"></div>'),this.horizontal=t,this.state=ft.STATE_NOT_DRAGGING,this.guiDestroyFunctions=[],this.childPillComponents=[],this.resizeEnabled=!1,this.addElementClasses(this.getGui()),this.ePillDropList=document.createElement("div"),this.addElementClasses(this.ePillDropList,"list"),oe(this.ePillDropList,"listbox")}isHorizontal(){return this.horizontal}
1toggleResizable(t){this.positionableFeature.setResizable(!!t&&{bottom:!0}),this.resizeEnabled=t}isSourceEventFromTarget(t){const{dropZoneTarget:s,dragSource:o}=t;return s.contains(o.eElement)}destroy(){this.destroyGui(),super.destroy()}destroyGui(){this.guiDestroyFunctions.forEach(t=>t()),this.guiDestroyFunctions.length=0,this.childPillComponents.length=0,ne(this.getGui()),ne(this.ePillDropList)}init(t){this.params=t??{},this.createManagedBean(new Pt(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.setupDropTarget(),this.positionableFeature=new Pi(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature),this.refreshGui(),He(this.ePillDropList,this.getAriaLabel())}handleKeyDown(t){let o=t.key===v.DOWN,r=t.key===v.UP;if(this.horizontal){const l=this.gos.get("enableRtl");o=!l&&t.key===v.RIGHT||l&&t.key===v.LEFT,r=!l&&t.key===v.LEFT||l&&t.key===v.RIGHT}if(!o&&!r)return;const n=this.focusService.findNextFocusableElement(this.getFocusableElement(),!1,r);n&&(t.preventDefault(),n.focus())}addElementClasses(t,s){t.classList.add("ag-column-drop"+(s=s?`-${s}`:""),`ag-column-drop-${this.horizontal?"horizontal":"vertical"}${s}`)}setupDropTarget(){this.dropTarget={getContainer:this.getGui.bind(this),getIconName:this.getIconName.bind(this),onDragging:this.onDragging.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragStop:this.onDragStop.bind(this),isInterestedIn:this.isInterestedIn.bind(this)},this.dragAndDropService.addDropTarget(this.dropTarget)}minimumAllowedNewInsertIndex(){return 0}checkInsertIndex(t){const s=this.getNewInsertIndex(t);if(s<0)return!1;const o=this.minimumAllowedNewInsertIndex(),r=Math.max(o,s),n=r!==this.insertIndex;return n&&(this.insertIndex=r),n}getNewInsertIndex(t){const s=t.event,o=this.horizontal?s.clientX:s.clientY,r=this.childPillComponents.map(l=>l.getGui().getBoundingClientRect()),n=r.findIndex(l=>this.horizontal?l.right>o&&l.left<o:l.top<o&&l.bottom>o);if(-1===n){const l=this.gos.get("enableRtl");return r.every(h=>o>(this.horizontal?h.right:h.bottom))?l&&this.horizontal?0:this.childPillComponents.length:r.every(h=>o<(this.horizontal?h.left:h.top))?l&&this.horizontal?this.childPillComponents.length:0:this.insertIndex}return this.insertIndex<=n?n+1:n}checkDragStartedBySelf(t){this.state===ft.STATE_NOT_DRAGGING&&(this.state=ft.STATE_REARRANGE_ITEMS,this.potentialDndItems=this.getItems(t.dragSource.getDragItem()),this.refreshGui(),this.checkInsertIndex(t),this.refreshGui())}onDragging(t){this.checkDragStartedBySelf(t),this.checkInsertIndex(t)&&this.refreshGui()}handleDragEnterEnd(t){}onDragEnter(t){const s=this.getItems(t.dragSource.getDragItem());this.state=ft.STATE_NEW_ITEMS_IN;const o=s.filter(n=>this.isItemDroppable(n,t)),r=o.every(n=>-1!==this.childPillComponents.map(l=>l.getItem()).indexOf(n));if(0!==o.length){if(this.potentialDndItems=o,r)return void(this.state=ft.STATE_NOT_DRAGGING);this.handleDragEnterEnd(t),this.checkInsertIndex(t),this.refreshGui()}}isPotentialDndItems(){return El(this.potentialDndItems)}handleDragLeaveEnd(t){}onDragLeave(t){if(this.state===ft.STATE_REARRANGE_ITEMS){const s=this.getItems(t.dragSource.getDragItem());this.removeItems(s)}this.isPotentialDndItems()&&(this.handleDragLeaveEnd(t),this.potentialDndItems=[],this.refreshGui()),this.state=ft.STATE_NOT_DRAGGING}refreshOnDragStop(){return!0}onDragStop(){if(this.isPotentialDndItems()){let t=!1;this.state===ft.STATE_NEW_ITEMS_IN?(this.addItems(this.potentialDndItems),t=!0):t=this.rearrangeItems(this.potentialDndItems),this.potentialDndItems=[],(this.refreshOnDragStop()||!t)&&this.refreshGui()}this.state=ft.STATE_NOT_DRAGGING}removeItems(t){const s=this.getExistingItems().filter(o=>!Ve(t,o));this.updateItems(s)}addItems(t){if(!t)return;const s=this.getExistingItems().slice(),o=t.filter(r=>s.indexOf(r)<0);Rr(s,o,this.insertIndex),this.updateItems(s)}addItem(t){this.insertIndex=this.getExistingItems().length,this.addItems([t]),this.refreshGui()}rearrangeItems(t){const s=this.getNonGhostItems().slice();return Rr(s,t,this.insertIndex),!lt(s,this.getExistingItems())&&(this.updateItems(s),!0)}refreshGui(){const t=this.ePillDropList.scrollTop,s=this.resizeEnabled,o=this.getFocusedItem();let r=this.focusService.findNextFocusableElement();r||(r=this.focusService.findNextFocusableElement(void 0,!1,!0)),this.toggleResizable(!1),this.destroyGui(),this.addIconAndTitleToGui(),this.addEmptyMessageToGui(),this.addItemsToGui(),this.isHorizontal()||(this.ePillDropList.scrollTop=t),s&&this.toggleResizable(s),this.focusService.isKeyboardMode()&&this.restoreFocus(o,r)}getFocusedItem(){const t=this.getGui(),s=this.gos.getActiveDomElement();return t.contains(s)?Array.from(t.querySelectorAll(".ag-column-drop-cell")).indexOf(s):-1}restoreFocus(t,s){const o=this.getGui(),r=Array.from(o.querySelectorAll(".ag-column-drop-cell"));if(-1===t)return;0===r.length&&s.focus();const l=r[Math.min(r.length-1,t)];l&&l.focus()}focusList(t){this.restoreFocus(t?this.childPillComponents.length-1:0,this.getFocusableElement())}getNonGhostItems(){const t=this.getExistingItems();return this.isPotentialDndItems()?t.filter(s=>!Ve(this.potentialDndItems,s)):t}addItemsToGui(){const s=this.getNonGhostItems().map(o=>this.createItemComponent(o,!1));if(this.isPotentialDndItems()){const o=this.potentialDndItems.map(r=>this.createItemComponent(r,!0));this.insertIndex>=s.length?s.push(...o):s.splice(this.insertIndex,0,...o)}
1this.appendChild(this.ePillDropList),s.forEach((o,r)=>{r>0&&this.addArrow(this.ePillDropList),this.ePillDropList.appendChild(o.getGui())}),this.addAriaLabelsToComponents()}addAriaLabelsToComponents(){this.childPillComponents.forEach((t,s)=>{const o=t.getGui();mo(o,s+1),fo(o,this.childPillComponents.length)})}createItemComponent(t,s){const o=this.createPillComponent(t,this.dropTarget,s,this.horizontal);return o.addEventListener(yp.EVENT_COLUMN_REMOVE,this.removeItems.bind(this,[t])),this.context.createBean(o),this.guiDestroyFunctions.push(()=>this.destroyBean(o)),s||this.childPillComponents.push(o),o}addIconAndTitleToGui(){const{title:t,icon:s}=this.params;if(!t||!s)return;const o=document.createElement("div");if(cs(o,!0),this.addElementClasses(o,"title-bar"),this.addElementClasses(s,"icon"),this.addOrRemoveCssClass("ag-column-drop-empty",this.isExistingItemsEmpty()),o.appendChild(s),!this.horizontal){const r=document.createElement("span");this.addElementClasses(r,"title"),r.innerHTML=t,o.appendChild(r)}this.appendChild(o)}isExistingItemsEmpty(){return 0===this.getExistingItems().length}addEmptyMessageToGui(){const{emptyMessage:t}=this.params;if(!t||!this.isExistingItemsEmpty()||this.isPotentialDndItems())return;const s=document.createElement("span");s.innerHTML=t,this.addElementClasses(s,"empty-message"),this.ePillDropList.appendChild(s)}addArrow(t){if(this.horizontal){const o=se(this.gos.get("enableRtl")?"smallLeft":"smallRight",this.gos);this.addElementClasses(o,"cell-separator"),t.appendChild(o)}}};return e.STATE_NOT_DRAGGING="notDragging",e.STATE_NEW_ITEMS_IN="newItemsIn",e.STATE_REARRANGE_ITEMS="rearrangeItems",e})();d([p("focusService")],md.prototype,"focusService",2),d([p("dragAndDropService")],md.prototype,"dragAndDropService",2);var Rp=["touchstart","touchend","touchmove","touchcancel"],Cd=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=i=>i(),this.wrapOutgoing=i=>i()}setInterval(e,i){return new ke(t=>{t(window.setInterval(e,i))})}addEventListener(e,i,t,s){const o=Ve(Rp,i);e.addEventListener(i,t,{capture:!!s,passive:o})}get shouldWrapOutgoing(){return!1}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`https://www.ag-grid.com/${"solid"===this.frameworkName?"react":this.frameworkName}-data-grid${e?`/${e}`:""}`}},xt=class extends b{getNextCellToFocus(e,i,t=!1){return t?this.getNextCellToFocusWithCtrlPressed(e,i):this.getNextCellToFocusWithoutCtrlPressed(e,i)}getNextCellToFocusWithCtrlPressed(e,i){const t=e===v.UP,o=e===v.LEFT;let r,n;if(t||e===v.DOWN)n=t?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow(),r=i.column;else{const l=this.columnModel.getAllDisplayedColumns(),a=this.gos.get("enableRtl");n=i.rowIndex,r=o!==a?l[0]:$(l)}return{rowIndex:n,rowPinned:null,column:r}}getNextCellToFocusWithoutCtrlPressed(e,i){let t=i,s=!1;for(;!s;){switch(e){case v.UP:t=this.getCellAbove(t);break;case v.DOWN:t=this.getCellBelow(t);break;case v.RIGHT:t=this.gos.get("enableRtl")?this.getCellToLeft(t):this.getCellToRight(t);break;case v.LEFT:t=this.gos.get("enableRtl")?this.getCellToRight(t):this.getCellToLeft(t);break;default:t=null,console.warn("AG Grid: unknown key for navigation "+e)}s=!t||this.isCellGoodToFocusOn(t)}return t}isCellGoodToFocusOn(e){const i=e.column;let t;switch(e.rowPinned){case"top":t=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case"bottom":t=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:t=this.rowModel.getRow(e.rowIndex)}return!!t&&!i.isSuppressNavigable(t)}getCellToLeft(e){if(!e)return null;const i=this.columnModel.getDisplayedColBefore(e.column);return i?{rowIndex:e.rowIndex,column:i,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const i=this.columnModel.getDisplayedColAfter(e.column);return i?{rowIndex:e.rowIndex,column:i,rowPinned:e.rowPinned}:null}getRowBelow(e){const i=e.rowIndex,t=e.rowPinned;if(this.isLastRowInContainer(e))switch(t){case"bottom":return null;case"top":return this.rowModel.isRowsToRender()?{rowIndex:this.paginationProxy.getPageFirstRow(),rowPinned:null}:this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;default:return this.pinnedRowModel.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null}const s=this.rowModel.getRow(e.rowIndex);return this.getNextStickyPosition(s)||{rowIndex:i+1,rowPinned:t}}getNextStickyPosition(e,i){if(!this.gos.isGroupRowsSticky()||!e||!e.sticky)return;let s=[];s=this.rowRenderer.getStickyTopRowCtrls().some(l=>l.getRowNode().rowIndex===e.rowIndex)?[...this.rowRenderer.getStickyTopRowCtrls()].sort((l,a)=>l.getRowNode().rowIndex-a.getRowNode().rowIndex):[...this.rowRenderer.getStickyBottomRowCtrls()].sort((l,a)=>a.getRowNode().rowIndex-l.getRowNode().rowIndex);const o=i?-1:1,r=s.findIndex(l=>l.getRowNode().rowIndex===e.rowIndex),n=s[r+o];return n?{rowIndex:n.getRowNode().rowIndex,rowPinned:null}:void 0}getCellBelow(e){if(!e)return null;const i=this.getRowBelow(e);return i?{rowIndex:i.rowIndex,column:e.column,rowPinned:i.rowPinned}:null}isLastRowInContainer(e){const i=e.rowPinned,t=e.rowIndex;return"top"===i?this.pinnedRowModel.getPinnedTopRowData().length-1<=t:"bottom"===i?this.pinnedRowModel.getPinnedBottomRowData().length-1<=t:this.paginationProxy.getPageLastRow()<=t}getRowAbove(e){const i=e.rowIndex,t=e.rowPinned;if(t?0===i:i===this.paginationProxy.getPageFirstRow())return"top"===t?null:t&&this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender("top")?this.getLastFloatingTopRow():null;const o=this.rowModel.getRow(e.rowIndex);return this.getNextStickyPosition(o,!0)||{rowIndex:i-1,rowPinned:t}}getCellAbove(e){if(!e)return null;const i=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});return i?{rowIndex:i.rowIndex,column:e.column,rowPinned:i.rowPinned}:null}getLastBodyCell(){return{rowIndex:this.paginationProxy.getPageLastRow(),rowPinned:null}}getLastFloatingTopRow(){return{rowIndex:this.pinnedRowModel.getPinnedTopRowData().length-1,rowPinned:"top"}}getNextTabbedCell(e,i){return i?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const i=this.columnModel.getAllDisplayedColumns();let t=e.rowIndex,s=e.rowPinned,o=this.columnModel.getDisplayedColAfter(e.column);if(!o){o=i[0];const r=this.getRowBelow(e);if(_(r)||!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;t=r?r.rowIndex:null,s=r?r.rowPinned:null}return{rowIndex:t,column:o,rowPinned:s}}getNextTabbedCellBackwards(e){const i=this.columnModel.getAllDisplayedColumns();let t=e.rowIndex,s=e.rowPinned,o=this.columnModel.getDisplayedColBefore(e.column);if(!o){o=$(i);const r=this.getRowAbove({rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(_(r)||!r.rowPinned&&!this.paginationProxy.isRowInPage(r))return null;t=r?r.rowIndex:null,s=r?r.rowPinned:null}return{rowIndex:t,column:o,rowPinned:s}}};d([p("columnModel")],xt.prototype,"columnModel",2),d([p("rowModel")],xt.prototype,"rowModel",2),d([p("rowRenderer")],xt.prototype,"rowRenderer",2),d([p("pinnedRowModel")],xt.prototype,"pinnedRowModel",2),d([p("paginationProxy")],xt.prototype,"paginationProxy",2),xt=d([I("cellNavigationService")],xt);var ri=class extends b{constructor(){super(...arguments),this.consuming=!1}setBeans(e){this.logger=e.create("AlignedGridsService")}getAlignedGridApis(){var e;let i=null!=(e=this.gos.get("alignedGrids"))?e:[];const t="function"==typeof i;"function"==typeof i&&(i=i());const s=()=>`See ${this.getFrameworkOverrides().getDocLink("aligned-grids")}`;return i.map(r=>{var n;if(!r)return Je("alignedGrids contains an undefined option."),t||Je('You may want to configure via a callback to avoid setup race conditions:\n "alignedGrids: () => [linkedGrid]"'),void Je(s());if(r instanceof W)return r;const l=r;return"current"in l?null==(n=l.current)?void 0:n.api:(l.api||Je(`alignedGrids - No api found on the linked grid. If you are passing gridOptions to alignedGrids since v31 this is no longer valid. ${s()}`),l.api)}).filter(r=>!!r&&!r.isDestroyed())}init(){this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))}
1fireEvent(e){this.consuming||this.getAlignedGridApis().forEach(i=>{if(i.isDestroyed())return;const t=i.__getAlignedGridService();e(t)})}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent(i=>{i.onColumnEvent(e)})}fireScrollEvent(e){"horizontal"===e.direction&&this.fireEvent(i=>{i.onScrollEvent(e)})}onScrollEvent(e){this.onEvent(()=>{this.ctrlsService.getGridBodyCtrl().getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}getMasterColumns(e){const i=[];return e.columns?e.columns.forEach(t=>{i.push(t)}):e.column&&i.push(e.column),i}getColumnIds(e){const i=[];return e.columns?e.columns.forEach(t=>{i.push(t.getColId())}):e.column&&i.push(e.column.getColId()),i}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case g.EVENT_COLUMN_MOVED:case g.EVENT_COLUMN_VISIBLE:case g.EVENT_COLUMN_PINNED:case g.EVENT_COLUMN_RESIZED:this.processColumnEvent(e);break;case g.EVENT_COLUMN_GROUP_OPENED:this.processGroupOpenedEvent(e);break;case g.EVENT_COLUMN_PIVOT_CHANGED:console.warn("AG Grid: pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.")}})}processGroupOpenedEvent(e){e.columnGroups.forEach(i=>{let t=null;if(i){const s=i.getGroupId();t=this.columnModel.getProvidedColumnGroup(s)}i&&!t||(this.logger.log("onColumnEvent-> processing "+e+" expanded = "+i.isExpanded()),this.columnModel.setColumnGroupOpened(t,i.isExpanded(),"alignedGridChanged"))})}processColumnEvent(e){var i;const t=e.column;let s=null;if(t&&(s=this.columnModel.getPrimaryColumn(t.getColId())),t&&!s)return;const o=this.getMasterColumns(e);switch(e.type){case g.EVENT_COLUMN_MOVED:{const u=e,c=e.api.getColumnState().map(f=>({colId:f.colId}));this.columnModel.applyColumnState({state:c,applyOrder:!0},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} toIndex = ${u.toIndex}`)}break;case g.EVENT_COLUMN_VISIBLE:{const u=e,c=e.api.getColumnState().map(f=>({colId:f.colId,hide:f.hide}));this.columnModel.applyColumnState({state:c},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} visible = ${u.visible}`)}break;case g.EVENT_COLUMN_PINNED:{const u=e,c=e.api.getColumnState().map(f=>({colId:f.colId,pinned:f.pinned}));this.columnModel.applyColumnState({state:c},"alignedGridChanged"),this.logger.log(`onColumnEvent-> processing ${e.type} pinned = ${u.pinned}`)}break;case g.EVENT_COLUMN_RESIZED:const l=e,a={};o.forEach(u=>{this.logger.log(`onColumnEvent-> processing ${e.type} actualWidth = ${u.getActualWidth()}`),a[u.getId()]={key:u.getColId(),newWidth:u.getActualWidth()}}),null==(i=l.flexColumns)||i.forEach(u=>{a[u.getId()]&&delete a[u.getId()]}),this.columnModel.setColumnWidths(Object.values(a),!1,l.finished,"alignedGridChanged")}const n=this.ctrlsService.getGridBodyCtrl().isVerticalScrollShowing();this.getAlignedGridApis().forEach(l=>{l.setGridOption("alwaysShowVerticalScroll",n)})}};d([p("columnModel")],ri.prototype,"columnModel",2),d([p("ctrlsService")],ri.prototype,"ctrlsService",2),d([Se(0,Ue("loggerFactory"))],ri.prototype,"setBeans",1),d([T],ri.prototype,"init",1),ri=d([I("alignedGridsService")],ri);var ni=class extends b{constructor(){super(...arguments),this.selectedNodes=new Map,this.lastRowNode=null}init(){this.rowSelection=this.gos.get("rowSelection"),this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{this.groupSelectsChildren=this.gos.get("groupSelectsChildren"),this.rowSelection=this.gos.get("rowSelection"),this.deselectAllRowNodes({source:"api"})}),this.addManagedListener(this.eventService,g.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))}destroy(){super.destroy(),this.resetNodes(),this.lastRowNode=null}isMultiselect(){return"multiple"===this.rowSelection}setNodesSelected(e){var i;const{newValue:t,clearSelection:s,suppressFinishActions:o,rangeSelect:r,nodes:n,event:l,source:a="api"}=e;if(0===n.length)return 0;if(n.length>1&&!this.isMultiselect())return console.warn("AG Grid: cannot multi select while rowSelection='single'"),0;const u=this.groupSelectsChildren&&!0===e.groupSelectsFiltered,h=n.map(f=>f.footer?f.sibling:f);if(r){if(n.length>1)return console.warn("AG Grid: cannot range select while selecting multiple rows"),0;let f=null;if("checkboxSelected"===a&&!1===t&&this.lastRowNode&&(this.lastRowNode.id?f=this.lastRowNode:this.lastRowNode=null),null==f&&(f=this.getLastSelectedNode()),f){const m=h[0];if(m!==f&&this.isMultiselect())return this.selectRange(m,f,t,a)}}this.lastRowNode=t?null:h[0];let c=0;for(let f=0;f<h.length;f++){const m=h[f];u&&m.group||m.selectThisNode(t,l,a)&&c++,this.groupSelectsChildren&&null!=(i=m.childrenAfterGroup)&&i.length&&(c+=this.selectChildren(m,t,u,a))}return!o&&(t&&(s||!this.isMultiselect())&&(c+=this.clearOtherNodes(h[0],a)),c>0)&&(this.updateGroupsFromChildrenSelections(a),this.eventService.dispatchEvent({type:g.EVENT_SELECTION_CHANGED,source:a})),c}selectRange(e,i,t=!0,s){const o=this.rowModel.getNodesInRangeForSelection(e,i);let r=0;return o.forEach(l=>{l.group&&this.groupSelectsChildren||l.selectThisNode(t,void 0,s)&&r++}),this.updateGroupsFromChildrenSelections(s),this.eventService.dispatchEvent({type:g.EVENT_SELECTION_CHANGED,source:s}),r}selectChildren(e,i,t,s){const o=t?e.childrenAfterAggFilter:e.childrenAfterGroup;return _(o)?0:this.setNodesSelected({newValue:i,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:t,source:s,nodes:o})}getLastSelectedNode(){const e=Array.from(this.selectedNodes.keys());return 0==e.length?null:this.selectedNodes.get($(e))||null}getSelectedNodes(){const e=[];
1return this.selectedNodes.forEach(i=>{i&&e.push(i)}),e}getSelectedRows(){const e=[];return this.selectedNodes.forEach(i=>{i&&i.data&&e.push(i.data)}),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const i=new Map;this.selectedNodes.forEach((t,s)=>{t&&e(t)&&i.set(s,t)}),this.selectedNodes=i}updateGroupsFromChildrenSelections(e,i){if(!this.groupSelectsChildren||"clientSide"!==this.rowModel.getType())return!1;const s=this.rowModel.getRootNode();i||(i=new Ko(!0,s)).setInactive();let o=!1;return i.forEachChangedNodeDepthFirst(r=>{if(r!==s){const n=r.calculateSelectedFromChildren();o=r.selectThisNode(null!==n&&n,void 0,e)||o}}),o}clearOtherNodes(e,i){const t=new Map;let s=0;return this.selectedNodes.forEach(o=>{if(o&&o.id!==e.id){const r=this.selectedNodes.get(o.id);s+=r.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:i}),this.groupSelectsChildren&&o.parent&&t.set(o.parent.id,o.parent)}}),t.forEach(o=>{const r=o.calculateSelectedFromChildren();o.selectThisNode(null!==r&&r,void 0,i)}),s}onRowSelected(e){const i=e.node;this.groupSelectsChildren&&i.group||(i.isSelected()?this.selectedNodes.set(i.id,i):this.selectedNodes.delete(i.id))}syncInRowNode(e,i){this.syncInOldRowNode(e,i),this.syncInNewRowNode(e)}syncInOldRowNode(e,i){y(i)&&e.id!==i.id&&i&&this.selectedNodes.get(i.id)==e&&this.selectedNodes.set(i.id,i)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.setSelectedInitialValue(!0),this.selectedNodes.set(e.id,e)):e.setSelectedInitialValue(!1)}reset(e){const i=this.getSelectionCount();this.resetNodes(),i&&this.eventService.dispatchEvent({type:g.EVENT_SELECTION_CHANGED,source:e})}resetNodes(){var e;null==(e=this.selectedNodes)||e.clear()}getBestCostNodeSelection(){if("clientSide"!==this.rowModel.getType())return;const i=this.rowModel.getTopLevelNodes();if(null===i)return;const t=[];return function s(o){for(let r=0,n=o.length;r<n;r++){const l=o[r];l.isSelected()?t.push(l):l.group&&l.children&&s(l.children)}}(i),t}isEmpty(){let e=0;return this.selectedNodes.forEach(i=>{i&&e++}),0===e}deselectAllRowNodes(e){const i=l=>l.selectThisNode(!1,void 0,s),t="clientSide"===this.rowModel.getType(),{source:s,justFiltered:o,justCurrentPage:r}=e;if(r||o){if(!t)return void console.error("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'");this.getNodesToSelect(o,r).forEach(i)}else this.selectedNodes.forEach(l=>{l&&i(l)}),this.reset(s);t&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(s),this.eventService.dispatchEvent({type:g.EVENT_SELECTION_CHANGED,source:s})}getSelectedCounts(e,i){let t=0,s=0;return this.getNodesToSelect(e,i).forEach(r=>{this.groupSelectsChildren&&r.group||(r.isSelected()?t++:r.selectable&&s++)}),{selectedCount:t,notSelectedCount:s}}getSelectAllState(e,i){const{selectedCount:t,notSelectedCount:s}=this.getSelectedCounts(e,i);return(0!==t||0!==s)&&(t>0&&s>0?null:t>0)}hasNodesToSelect(e=!1,i=!1){return this.getNodesToSelect(e,i).filter(t=>t.selectable).length>0}getNodesToSelect(e=!1,i=!1){if("clientSide"!==this.rowModel.getType())throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const t=[];if(i)return this.paginationProxy.forEachNodeOnPage(o=>{if(o.group)if(o.expanded)this.groupSelectsChildren||t.push(o);else{const r=n=>{var l;t.push(n),null!=(l=n.childrenAfterFilter)&&l.length&&n.childrenAfterFilter.forEach(r)};r(o)}else t.push(o)}),t;const s=this.rowModel;return e?(s.forEachNodeAfterFilter(o=>{t.push(o)}),t):(s.forEachNode(o=>{t.push(o)}),t)}selectAllRowNodes(e){if("clientSide"!==this.rowModel.getType())throw new Error(`selectAll only available when rowModelType='clientSide', ie not ${this.rowModel.getType()}`);const{source:i,justFiltered:t,justCurrentPage:s}=e;this.getNodesToSelect(t,s).forEach(n=>n.selectThisNode(!0,void 0,i)),"clientSide"===this.rowModel.getType()&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections(i),this.eventService.dispatchEvent({type:g.EVENT_SELECTION_CHANGED,source:i})}getSelectionState(){const e=[];
1return this.selectedNodes.forEach(i=>{i?.id&&e.push(i.id)}),e.length?e:null}setSelectionState(e,i){if(!Array.isArray(e))return;const t=new Set(e),s=[];this.rowModel.forEachNode(o=>{t.has(o.id)&&s.push(o)}),this.setNodesSelected({newValue:!0,nodes:s,source:i})}};d([p("rowModel")],ni.prototype,"rowModel",2),d([p("paginationProxy")],ni.prototype,"paginationProxy",2),d([T],ni.prototype,"init",1),ni=d([I("selectionService")],ni);var li=class{constructor(e){this.viaApi=(i,...t)=>(O(`Since v31, 'columnApi.${i}' is deprecated and moved to 'api.${i}'.`),this.api[i](...t)),this.api=e}sizeColumnsToFit(e){this.viaApi("sizeColumnsToFit",e)}setColumnGroupOpened(e,i){this.viaApi("setColumnGroupOpened",e,i)}getColumnGroup(e,i){return this.viaApi("getColumnGroup",e,i)}getProvidedColumnGroup(e){return this.viaApi("getProvidedColumnGroup",e)}getDisplayNameForColumn(e,i){return this.viaApi("getDisplayNameForColumn",e,i)}getDisplayNameForColumnGroup(e,i){return this.viaApi("getDisplayNameForColumnGroup",e,i)}getColumn(e){return this.viaApi("getColumn",e)}getColumns(){return this.viaApi("getColumns")}applyColumnState(e){return this.viaApi("applyColumnState",e)}getColumnState(){return this.viaApi("getColumnState")}resetColumnState(){this.viaApi("resetColumnState")}getColumnGroupState(){return this.viaApi("getColumnGroupState")}setColumnGroupState(e){this.viaApi("setColumnGroupState",e)}resetColumnGroupState(){this.viaApi("resetColumnGroupState")}isPinning(){return this.viaApi("isPinning")}isPinningLeft(){return this.viaApi("isPinningLeft")}isPinningRight(){return this.viaApi("isPinningRight")}getDisplayedColAfter(e){return this.viaApi("getDisplayedColAfter",e)}getDisplayedColBefore(e){return this.viaApi("getDisplayedColBefore",e)}setColumnVisible(e,i){this.viaApi("setColumnVisible",e,i)}setColumnsVisible(e,i){this.viaApi("setColumnsVisible",e,i)}setColumnPinned(e,i){this.viaApi("setColumnPinned",e,i)}setColumnsPinned(e,i){this.viaApi("setColumnsPinned",e,i)}getAllGridColumns(){return this.viaApi("getAllGridColumns")}getDisplayedLeftColumns(){return this.viaApi("getDisplayedLeftColumns")}getDisplayedCenterColumns(){return this.viaApi("getDisplayedCenterColumns")}getDisplayedRightColumns(){return this.viaApi("getDisplayedRightColumns")}getAllDisplayedColumns(){return this.viaApi("getAllDisplayedColumns")}getAllDisplayedVirtualColumns(){return this.viaApi("getAllDisplayedVirtualColumns")}moveColumn(e,i){this.viaApi("moveColumn",e,i)}moveColumnByIndex(e,i){this.viaApi("moveColumnByIndex",e,i)}moveColumns(e,i){this.viaApi("moveColumns",e,i)}moveRowGroupColumn(e,i){this.viaApi("moveRowGroupColumn",e,i)}setColumnAggFunc(e,i){this.viaApi("setColumnAggFunc",e,i)}setColumnWidth(e,i,t=!0,s){this.viaApi("setColumnWidth",e,i,t,s)}setColumnWidths(e,i=!0,t){this.viaApi("setColumnWidths",e,i,t)}setPivotMode(e){this.viaApi("setPivotMode",e)}isPivotMode(){return this.viaApi("isPivotMode")}getPivotResultColumn(e,i){return this.viaApi("getPivotResultColumn",e,i)}setValueColumns(e){this.viaApi("setValueColumns",e)}getValueColumns(){return this.viaApi("getValueColumns")}removeValueColumn(e){this.viaApi("removeValueColumn",e)}removeValueColumns(e){this.viaApi("removeValueColumns",e)}addValueColumn(e){this.viaApi("addValueColumn",e)}addValueColumns(e){this.viaApi("addValueColumns",e)}setRowGroupColumns(e){this.viaApi("setRowGroupColumns",e)}removeRowGroupColumn(e){this.viaApi("removeRowGroupColumn",e)}removeRowGroupColumns(e){this.viaApi("removeRowGroupColumns",e)}addRowGroupColumn(e){this.viaApi("addRowGroupColumn",e)}addRowGroupColumns(e){this.viaApi("addRowGroupColumns",e)}getRowGroupColumns(){return this.viaApi("getRowGroupColumns")}setPivotColumns(e){this.viaApi("setPivotColumns",e)}removePivotColumn(e){this.viaApi("removePivotColumn",e)}removePivotColumns(e){this.viaApi("removePivotColumns",e)}addPivotColumn(e){this.viaApi("addPivotColumn",e)}addPivotColumns(e){this.viaApi("addPivotColumns",e)}getPivotColumns(){return this.viaApi("getPivotColumns")}getLeftDisplayedColumnGroups(){return this.viaApi("getLeftDisplayedColumnGroups")}getCenterDisplayedColumnGroups(){return this.viaApi("getCenterDisplayedColumnGroups")}getRightDisplayedColumnGroups(){return this.viaApi("getRightDisplayedColumnGroups")}getAllDisplayedColumnGroups(){return this.viaApi("getAllDisplayedColumnGroups")}autoSizeColumn(e,i){return this.viaApi("autoSizeColumn",e,i)}autoSizeColumns(e,i){this.viaApi("autoSizeColumns",e,i)}autoSizeAllColumns(e){this.viaApi("autoSizeAllColumns",e)}setPivotResultColumns(e){this.viaApi("setPivotResultColumns",e)}getPivotResultColumns(){return this.viaApi("getPivotResultColumns")}};d([p("gridApi")],li.prototype,"api",2),li=d([I("columnApi")],li);var Ot=class extends b{constructor(){super(...arguments),this.initialised=!1,this.isSsrm=!1}init(){this.isSsrm=this.gos.isRowModelType("serverSide"),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=t=>this.callColumnCellValueChangedHandler(t),i=this.gos.useAsyncEvents();this.eventService.addEventListener(g.EVENT_CELL_VALUE_CHANGED,e,i),this.addDestroyFunc(()=>this.eventService.removeEventListener(g.EVENT_CELL_VALUE_CHANGED,e,i)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValue(e,i,t=!1,s=!1){if(this.initialised||this.init(),!i)return;const o=e.getColDef(),r=o.field,n=e.getColId(),l=i.data;let a;const u=i.groupData&&void 0!==i.groupData[n],h=!s&&i.aggData&&void 0!==i.aggData[n],c=this.isSsrm&&s&&!!e.getColDef().aggFunc,f=this.isSsrm&&i.footer&&i.field&&(!0===e.getColDef().showRowGroup||e.getColDef().showRowGroup===i.field);if(t&&o.filterValueGetter?a=this.executeFilterValueGetter(o.filterValueGetter,l,e,i):this.isTreeData&&h?a=i.aggData[n]:this.isTreeData&&o.valueGetter?a=this.execute
1ValueGetter(o.valueGetter,l,e,i):this.isTreeData&&r&&l?a=vi(l,r,e.isFieldContainsDots()):u?a=i.groupData[n]:h?a=i.aggData[n]:o.valueGetter?a=this.executeValueGetter(o.valueGetter,l,e,i):f?a=vi(l,i.field,e.isFieldContainsDots()):r&&l&&!c&&(a=vi(l,r,e.isFieldContainsDots())),this.cellExpressions&&"string"==typeof a&&0===a.indexOf("=")){const m=a.substring(1);a=this.executeValueGetter(m,l,e,i)}if(null==a){const m=this.getOpenedGroup(i,e);if(null!=m)return m}return a}parseValue(e,i,t,s){const o=e.getColDef(),r=this.gos.addGridCommonParams({node:i,data:i?.data,oldValue:s,newValue:t,colDef:o,column:e}),n=o.valueParser;return y(n)?"function"==typeof n?n(r):this.expressionService.evaluate(n,r):t}formatValue(e,i,t,s,o=!0){let n,r=null;const l=e.getColDef();if(s?n=s:o&&(n=l.valueFormatter),n){const a=this.gos.addGridCommonParams({value:t,node:i,data:i?i.data:null,colDef:l,column:e});r="function"==typeof n?n(a):this.expressionService.evaluate(n,a)}else if(l.refData)return l.refData[t]||"";return null==r&&Array.isArray(t)&&(r=t.join(", ")),r}getOpenedGroup(e,i){if(!this.gos.get("showOpenedGroup")||!i.getColDef().showRowGroup)return;const s=i.getColDef().showRowGroup;let o=e.parent;for(;null!=o;){if(o.rowGroupColumn&&(!0===s||s===o.rowGroupColumn.getColId()))return o.key;o=o.parent}}setValue(e,i,t,s){const o=this.columnModel.getPrimaryColumn(i);if(!e||!o)return!1;_(e.data)&&(e.data={});const{field:r,valueSetter:n}=o.getColDef();if(_(r)&&_(n))return console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work"),!1;if(!this.dataTypeService.checkType(o,t))return console.warn("AG Grid: Data type of the new value does not match the cell data type of the column"),!1;const l=this.gos.addGridCommonParams({node:e,data:e.data,oldValue:this.getValue(o,e),newValue:t,colDef:o.getColDef(),column:o});let a;return l.newValue=t,a=y(n)?"function"==typeof n?n(l):this.expressionService.evaluate(n,l):this.setValueUsingField(e.data,r,t,o.isFieldContainsDots()),void 0===a&&(a=!0),!!a&&(e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),l.newValue=this.getValue(o,e),this.eventService.dispatchEvent({type:g.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:l.column,api:l.api,columnApi:l.columnApi,colDef:l.colDef,context:l.context,data:e.data,node:e,oldValue:l.oldValue,newValue:l.newValue,value:l.newValue,source:s}),!0)}callColumnCellValueChangedHandler(e){const i=e.colDef.onCellValueChanged;"function"==typeof i&&this.getFrameworkOverrides().wrapOutgoing(()=>{i({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,columnApi:e.columnApi,context:e.context})})}setValueUsingField(e,i,t,s){if(!i)return!1;let o=!1;if(s){const r=i.split(".");let n=e;for(;r.length>0&&n;){const l=r.shift();0===r.length?(o=n[l]===t,o||(n[l]=t)):n=n[l]}}else o=e[i]===t,o||(e[i]=t);return!o}executeFilterValueGetter(e,i,t,s){const o=this.gos.addGridCommonParams({data:i,node:s,column:t,colDef:t.getColDef(),getValue:this.getValueCallback.bind(this,s)});return"function"==typeof e?e(o):this.expressionService.evaluate(e,o)}executeValueGetter(e,i,t,s){const o=t.getColId(),r=this.valueCache.getValue(s,o);if(void 0!==r)return r;const n=this.gos.addGridCommonParams({data:i,node:s,column:t,colDef:t.getColDef(),getValue:this.getValueCallback.bind(this,s)});let l;return l="function"==typeof e?e(n):this.expressionService.evaluate(e,n),this.valueCache.setValue(s,o,l),l}getValueCallback(e,i){const t=this.columnModel.getPrimaryColumn(i);return t?this.getValue(t,e):null}getKeyForNode(e,i){const t=this.getValue(e,i),s=e.getColDef().keyCreator;let o=t;return s&&(o=s(this.gos.addGridCommonParams({value:t,colDef:e.getColDef(),column:e,node:i,data:i.data}))),"string"==typeof o||null==o||(o=String(o),"[object Object]"===o&&O("a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key")),o}};d([p("expressionService")],Ot.prototype,"expressionService",2),d([p("columnModel")],Ot.prototype,"columnModel",2),d([p("valueCache")],Ot.prototype,"valueCache",2),d([p("dataTypeService")],Ot.prototype,"dataTypeService",2),d([T],Ot.prototype,"init",1),Ot=d([I("valueService")],Ot);var Qo=class extends b{constructor(){super(...arguments),this.expressionToFunctionCache={}}setBeans(e){this.logger=e.create("ExpressionService")}evaluate(e,i){if("string"==typeof e)return this.evaluateExpression(e,i);console.error("AG Grid: value should be either a string or a function",e)}evaluateExpression(e,i){try{return this.createExpressionFunction(e)(i.value,i.context,i.oldValue,i.newValue,i.value,i.node,i.data,i.colDef,i.rowIndex,i.api,i.columnApi,i.getValue,i.column,i.columnGroup)}catch(t){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Param
1s =",i),console.log("Exception = "+t),null}}createExpressionFunction(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];const i=this.createFunctionBody(e),t=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",i);return this.expressionToFunctionCache[e]=t,t}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}};d([Se(0,Ue("loggerFactory"))],Qo.prototype,"setBeans",1),Qo=d([I("expressionService")],Qo);var Xo=class extends b{setBeans(e){this.logging=e.get("debug")}create(e){return new Un(e,this.isLogging.bind(this))}isLogging(){return this.logging}};d([Se(0,Ue("gridOptionsService"))],Xo.prototype,"setBeans",1),Xo=d([I("loggerFactory")],Xo);var Un=class{constructor(e,i){this.name=e,this.isLoggingFunc=i}isLogging(){return this.isLoggingFunc()}log(e){this.isLoggingFunc()&&console.log("AG Grid."+this.name+": "+e)}},ai=class extends b{setComp(e,i,t){this.view=e,this.eGridHostDiv=i,this.eGui=t,this.eGui.setAttribute("grid-id",this.context.getGridId()),this.dragAndDropService.addDropTarget({getContainer:()=>this.eGui,isInterestedIn:o=>1===o||0===o,getIconName:()=>ee.ICON_NOT_ALLOWED}),this.mouseEventService.stampTopLevelGridCompWithGridInstance(i),this.createManagedBean(new _o(this.view)),this.addRtlSupport();const s=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>s()),this.ctrlsService.register("gridCtrl",this)}isDetailGrid(){var e;const i=this.focusService.findTabbableParent(this.getGui());return(null==(e=i?.getAttribute("row-id"))?void 0:e.startsWith("detail"))||!1}showDropZones(){return j.__isRegistered("@ag-grid-enterprise/row-grouping",this.context.getGridId())}showSideBar(){return j.__isRegistered("@ag-grid-enterprise/side-bar",this.context.getGridId())}showStatusBar(){return j.__isRegistered("@ag-grid-enterprise/status-bar",this.context.getGridId())}showWatermark(){return j.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId())}onGridSizeChanged(){this.eventService.dispatchEvent({type:g.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}addRtlSupport(){const e=this.gos.get("enableRtl")?"ag-rtl":"ag-ltr";this.view.setRtlClass(e)}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const i=this.view.getFocusableContainers(),t=this.gos.getActiveDomElement(),o=i.findIndex(r=>r.contains(t))+(e?-1:1);return!(o<=0||o>=i.length)&&this.focusService.focusInto(i[o])}focusInnerElement(e){const i=this.view.getFocusableContainers(),t=this.columnModel.getAllDisplayedColumns();if(e){if(i.length>1)return this.focusService.focusInto($(i),!0);const s=$(t);if(this.focusService.focusGridView(s,!0))return!0}if(0===this.gos.get("headerHeight")||this.gos.get("suppressHeaderFocus")){if(this.focusService.focusGridView(t[0]))return!0;for(let s=1;s<i.length;s++)if(this.focusService.focusInto(i[s]))return!0;return!1}return this.focusService.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}};d([p("focusService")],ai.prototype,"focusService",2),d([p("resizeObserverService")],ai.prototype,"resizeObserverService",2),d([p("columnModel")],ai.prototype,"columnModel",2),d([p("ctrlsService")],ai.prototype,"ctrlsService",2),d([p("mouseEventService")],ai.prototype,"mouseEventService",2),d([p("dragAndDropService")],ai.prototype,"dragAndDropService",2);var di=class extends Ps{constructor(e){super(),this.eGridDiv=e}postConstruct(){this.logger=this.loggerFactory.create("GridComp");const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:t=>this.addCssClass(t),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:t=>{this.getGui().style.userSelect=t??"",this.getGui().style.webkitUserSelect=t??""},setCursor:t=>{this.getGui().style.cursor=t??""}};this.ctrl=this.createManagedBean(new ai);const i=this.createTemplate();
1this.setTemplate(i),this.ctrl.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:t=>this.ctrl.focusInnerElement(t),forceFocusOutWhenTabGuardsAreEmpty:!0})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),this.logger.log("Grid removed from DOM")})}updateLayoutClasses(e,i){const t=this.eRootWrapperBody.classList;t.toggle("ag-layout-auto-height",i.autoHeight),t.toggle("ag-layout-normal",i.normal),t.toggle("ag-layout-print",i.print),this.addOrRemoveCssClass("ag-layout-auto-height",i.autoHeight),this.addOrRemoveCssClass("ag-layout-normal",i.normal),this.addOrRemoveCssClass("ag-layout-print",i.print)}createTemplate(){return`<div class="ag-root-wrapper" role="presentation">\n ${this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":""}\n <div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">\n <ag-grid-body ref="gridBody"></ag-grid-body>\n ${this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':""}\n </div>\n ${this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':""}\n <ag-pagination></ag-pagination>\n ${this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":""}\n </div>`}getFocusableElement(){return this.eRootWrapperBody}getFocusableContainers(){const e=[this.gridBodyComp.getGui()];return this.sideBarComp&&e.push(this.sideBarComp.getGui()),e.filter(i=>Ie(i))}};d([p("loggerFactory")],di.prototype,"loggerFactory",2),d([F("gridBody")],di.prototype,"gridBodyComp",2),d([F("sideBar")],di.prototype,"sideBarComp",2),d([F("rootWrapperBody")],di.prototype,"eRootWrapperBody",2),d([T],di.prototype,"postConstruct",1);var Zo=(()=>{let e=class extends b{progressSort(i,t,s){const o=this.getNextSortDirection(i);this.setSortForColumn(i,o,t,s)}setSortForColumn(i,t,s,o){"asc"!==t&&"desc"!==t&&(t=null);let n=[i];if(this.gos.isColumnsSortingCoupledToGroup()&&i.getColDef().showRowGroup){const u=this.columnModel.getSourceColumnsForGroupColumn(i),h=u?.filter(c=>c.isSortable());h&&(n=[i,...h])}n.forEach(u=>u.setSort(t,o));const a=[];if(!s&&!this.gos.get("alwaysMultiSort")||this.gos.get("suppressMultiSort")){const u=this.clearSortBarTheseColumns(n,o);a.push(...u)}this.updateSortIndex(i),a.push(...n),this.dispatchSortChangedEvents(o,a)}updateSortIndex(i){const t=this.gos.isColumnsSortingCoupledToGroup(),s=this.columnModel.getGroupDisplayColumnForGroup(i.getId()),o=t&&s||i,r=this.getColumnsWithSortingOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(a=>a.setSortIndex(null));const n=r.filter(a=>!(t&&a.getColDef().showRowGroup||a===o));(o.getSort()?[...n,o]:n).forEach((a,u)=>{a.setSortIndex(u)})}onSortChanged(i,t){this.dispatchSortChangedEvents(i,t)}isSortActive(){const t=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(s=>!!s.getSort());return t&&t.length>0}dispatchSortChangedEvents(i,t){const s={type:g.EVENT_SORT_CHANGED,source:i};t&&(s.columns=t),this.eventService.dispatchEvent(s)}clearSortBarTheseColumns(i,t){const s=[];return this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach(o=>{i.includes(o)||(o.getSort()&&s.push(o),o.setSort(void 0,t))}),s}getNextSortDirection(i){let t;if(t=i.getColDef().sortingOrder?i.getColDef().sortingOrder:this.gos.get("sortingOrder")?this.gos.get("sortingOrder"):e.DEFAULT_SORTING_ORDER,!Array.isArray(t)||t.length<=0)return console.warn(`AG Grid: sortingOrder must be an array with at least one element, currently it's ${t}`),null;const s=t.indexOf(i.getSort());let n;return n=s<0||s==t.length-1?t[0]:t[s+1],e.DEFAULT_SORTING_ORDER.indexOf(n)<0?(console.warn("AG Grid: invalid sort type "+n),null):n}getIndexedSortMap(){let i=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter(n=>!!n.getSort());if(this.columnModel.isPivotMode()){const n=this.gos.isColumnsSortingCoupledToGroup();i=i.filter(l=>{const a=!!l.getAggFunc(),u=!l.isPrimary(),h=n?this.columnModel.getGroupDisplayColumnForGroup(l.getId()):l.getColDef().showRowGroup;return a||u||h})}const t=this.columnModel.getRowGroupColumns().filter(n=>!!n.getSort()),s={};
1i.forEach((n,l)=>s[n.getId()]=l),i.sort((n,l)=>{const a=n.getSortIndex(),u=l.getSortIndex();return null!=a&&null!=u?a-u:null==a&&null==u?s[n.getId()]>s[l.getId()]?1:-1:null==u?-1:1});const o=this.gos.isColumnsSortingCoupledToGroup()&&!!t.length;o&&(i=[...new Set(i.map(n=>{var l;return null!=(l=this.columnModel.getGroupDisplayColumnForGroup(n.getId()))?l:n}))]);const r=new Map;return i.forEach((n,l)=>r.set(n,l)),o&&t.forEach(n=>{const l=this.columnModel.getGroupDisplayColumnForGroup(n.getId());r.set(n,r.get(l))}),r}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([i,t],[s,o])=>t-o).map(([i])=>i)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(i=>i.getSort()).map(i=>({sort:i.getSort(),colId:i.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(i=>i.getSort()).map(i=>({sort:i.getSort(),column:i}))}canColumnDisplayMixedSort(i){const t=this.gos.isColumnsSortingCoupledToGroup(),s=!!i.getColDef().showRowGroup;return t&&s}getDisplaySortForColumn(i){const t=this.columnModel.getSourceColumnsForGroupColumn(i);if(!this.canColumnDisplayMixedSort(i)||!t?.length)return i.getSort();const o=null!=i.getColDef().field||i.getColDef().valueGetter?[i,...t]:t,r=o[0].getSort();return o.every(l=>l.getSort()==r)?r:"mixed"}getDisplaySortIndexForColumn(i){return this.getIndexedSortMap().get(i)}};return e.DEFAULT_SORTING_ORDER=["asc","desc",null],e})();d([p("columnModel")],Zo.prototype,"columnModel",2),Zo=d([I("sortController")],Zo);var ve=(()=>{let e=class extends b{static addKeyboardModeEvents(i){this.instanceCount>0||(i.addEventListener("keydown",e.toggleKeyboardMode),i.addEventListener("mousedown",e.toggleKeyboardMode))}static removeKeyboardModeEvents(i){this.instanceCount>0||(i.addEventListener("keydown",e.toggleKeyboardMode),i.addEventListener("mousedown",e.toggleKeyboardMode))}static toggleKeyboardMode(i){const s="keydown"===i.type;s&&(i.ctrlKey||i.metaKey||i.altKey)||e.keyboardModeActive!==s&&(e.keyboardModeActive=s)}static unregisterGridCompController(i){e.removeKeyboardModeEvents(i)}init(){const i=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,i),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,i),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,i),this.registerKeyboardFocusEvents(),this.ctrlsService.whenReady(t=>{this.gridCtrl=t.gridCtrl})}registerKeyboardFocusEvents(){const i=this.gos.getDocument();e.addKeyboardModeEvents(i),e.instanceCount++,this.addDestroyFunc(()=>{e.instanceCount--,e.unregisterGridCompController(i)})}onColumnEverythingChanged(){if(!this.focusedCellPosition)return;const i=this.focusedCellPosition.column,t=this.columnModel.getGridColumn(i.getId());i!==t&&this.clearFocusedCell()}isKeyboardMode(){return e.keyboardModeActive}getFocusCellToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),Xt.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(this.gos.getActiveDomElement(),Bo.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition}isDomDataMissingInHierarchy(i,t){let s=i;for(;s;){if(this.gos.getDomData(s,t))return!1;s=s.parentNode}return!0}getFocusedCell(){return this.focusedCellPosition}shouldRestoreFocus(i){return!!this.isCellRestoreFocused(i)&&(setTimeout(()=>{this.restoredFocusedCellPosition=null},0),!0)}isCellRestoreFocused(i){return null!=this.restoredFocusedCellPosition&&this.cellPositionUtils.equals(i,this.restoredFocusedCellPosition)}setRestoreFocusedCell(i){"react"===this.getFrameworkOverrides().renderingEngine&&(this.restoredFocusedCellPosition=i)}getFocusEventParams(){const{rowIndex:i,rowPinned:t,column:s}=this.focusedCellPosition,o={rowIndex:i,rowPinned:t,column:s,isFullWidthCell:!1},r=this.rowRenderer.getRowByPosition({rowIndex:i,rowPinned:t});return r&&(o.isFullWidthCell=r.isFullWidth()),o}clearFocusedCell(){if(this.restoredFocusedCellPosition=null,null==this.focusedCellPosition)return;const i=M({type:g.EVENT_CELL_FOCUS_CLEARED}
1,this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(i)}setFocusedCell(i){const{column:t,rowIndex:s,rowPinned:o,forceBrowserFocus:r=!1,preventScrollOnBrowserFocus:n=!1}=i,l=this.columnModel.getGridColumn(t);if(!l)return void(this.focusedCellPosition=null);this.focusedCellPosition=l?{rowIndex:s,rowPinned:Ze(o),column:l}:null;const a=x(M({type:g.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:r,preventScrollOnBrowserFocus:n,floating:null});this.eventService.dispatchEvent(a)}isCellFocused(i){return null!=this.focusedCellPosition&&this.cellPositionUtils.equals(i,this.focusedCellPosition)}isRowNodeFocused(i){return this.isRowFocused(i.rowIndex,i.rowPinned)}isHeaderWrapperFocused(i){if(null==this.focusedHeaderPosition)return!1;const t=i.getColumnGroupChild(),s=i.getRowIndex(),o=i.getPinned(),{column:r,headerRowIndex:n}=this.focusedHeaderPosition;return t===r&&s===n&&o==r.getPinned()}clearFocusedHeader(){this.focusedHeaderPosition=null}getFocusedHeader(){return this.focusedHeaderPosition}setFocusedHeader(i,t){this.focusedHeaderPosition={headerRowIndex:i,column:t}}focusHeaderPosition(i){if(this.gos.get("suppressHeaderFocus"))return!1;const{direction:t,fromTab:s,allowUserOverride:o,event:r,fromCell:n,rowWithoutSpanValue:l}=i;let{headerPosition:a}=i;if(n&&this.filterManager.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(a);if(o){const u=this.getFocusedHeader(),h=this.headerNavigationService.getHeaderRowCount();if(s){const c=this.gos.getCallback("tabToNextHeader");c&&(a=this.getHeaderPositionFromUserFunc({userFunc:c,direction:t,currentPosition:u,headerPosition:a,headerRowCount:h}))}else{const c=this.gos.getCallback("navigateToNextHeader");c&&r&&(a=c({key:r.key,previousHeaderPosition:u,nextHeaderPosition:a,headerRowCount:h,event:r}))}}return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:r,fromCell:n,rowWithoutSpanValue:l})}focusHeaderPositionFromUserFunc(i){if(this.gos.get("suppressHeaderFocus"))return!1;const{userFunc:t,headerPosition:s,direction:o,event:r}=i,n=this.getFocusedHeader(),l=this.headerNavigationService.getHeaderRowCount(),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:o,currentPosition:n,headerPosition:s,headerRowCount:l});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:o,event:r})}getHeaderPositionFromUserFunc(i){const{userFunc:t,direction:s,currentPosition:o,headerPosition:r,headerRowCount:n}=i,a=t({backwards:"Before"===s,previousHeaderPosition:o,nextHeaderPosition:r,headerRowCount:n});return!0===a||null===a?(null===a&&O("Returning `null` from tabToNextHeader is deprecated. Return `true` to stay on the current header, or `false` to let the browser handle the tab behaviour."),o):!1===a?null:a}focusProvidedHeaderPosition(i){const{headerPosition:t,direction:s,fromCell:o,rowWithoutSpanValue:r,event:n}=i;if(-1===t.headerRowIndex)return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView(t.column);this.headerNavigationService.scrollToColumn(t.column,s);const a=this.ctrlsService.getHeaderRowContainerCtrl(t.column.getPinned()).focusHeader(t.headerRowIndex,t.column,n);return a&&(null!=r||o)&&this.headerNavigationService.setCurrentHeaderRowWithoutSpan(r??-1),a}focusFirstHeader(){let i=this.columnModel.getAllDisplayedColumns()[0];if(!i)return!1;i.getParent()&&(i=this.columnModel.getColumnGroupAtLevel(i,0));const t=this.headerPositionUtils.getHeaderIndexToFocus(i,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(i){const t=this.headerNavigationService.getHeaderRowCount()-1,s=$(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:s},rowWithoutSpanValue:-1,event:i})}focusPreviousFromFirstCell(i){return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(i)}isAnyCellFocused(){return!!this.focusedCellPosition}isRowFocused(i,t){return null!=this.focusedCellPosition&&this.focusedCellPosition.rowIndex===i&&this.focusedCellPosition.rowPinned===Ze(t)}findFocusableElements(i,t,s=!1){let r=Jr;t&&(r+=", "+t),s&&(r+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(i.querySelectorAll(la)).filter(u=>Ie(u)),l=Array.prototype.slice.apply(i.querySelectorAll(r));return l.length?(h=l,n.filter(c=>-1===h.indexOf(c))):n;var h}focusInto(i,t=!1,s=!1){const o=this.findFocusableElements(i,null,s),r=t?$(o):o[0];return!!r&&(r.focus({preventScroll:!0}),!0)}findFocusableElementBeforeTabGuard(i,t){if(!t)return null;const s=this.findFocusableElements(i),o=s.indexOf(t);if(-1===o)return null;let r=-1;for(let n=o-1;n>=0;n--)if(s[n].classList.contains("ag-tab-guard-top")){r=n;break}return r<=0?null:s[r-1]}findNextFocusableElement(i=this.eGridDiv,t,s){const o=this.findFocusableElements(i,t?':not([tabindex="-1"])':null),r=this.gos.getActiveDomElement();let n;n=t?o.findIndex(a=>a.contains(r)):o.indexOf(r);const l=n+(s?-1:1);return l<0||l>=o.length?null:o[l]}isTargetUnderManagedComponent(i,t){if(!t)return!1;const s=i.querySelectorAll(`.${Pt.FOCUS_MANAGED_CLASS}`);if(!s.length)return!1;for(let o=0;o<s.length;o++)if(s[o].contains(t))return!0;return!1}findTabbableParent(i,t=5){let s=0;for(;i&&null===So(i)&&++s<=t;)i=i.parentElement;return null===So(i)?null:i}focusGridView(i,t){var s;if(this.gos.get("suppressCellFocus"))return t?this.gos.get("suppressHeaderFocus")?this.focusNextGridCoreContainer(!0,!0):this.focusLastHeader():this.focusNextGridCoreContainer(!1);const o=t?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!o)return!1;const{rowIndex:r,rowPinned:n}=o,l=this.getFocusedHeader();return!i&&l&&(i=l.column),!(null==r||!i||(this.navigationService.ensureCellVisible({rowIndex:r,column:i,rowPinned:n}),this.setFocusedCell({rowIndex:r,column:i,rowPinned:Ze(n),forceBrowserFocus:!0}),null==(s=this.rangeService)||s.setRangeToCell({rowIndex:r,rowPinned:n,column:i}),0))}focusNextGridCoreContainer(i,t=!1){return!(t||!this.gridCtrl.focusNextInnerContainer(i))||((t||!i&&!this.gridCtrl.isDetailGrid())&&this.gridCtrl.forceFocusOutOfContainer(i),!1)}focusAdvancedFilter(i){var t,s;return this.advancedFilterFocusColumn=i?.column,null!=(s=null==(t=this.advancedFilterService)?void 0:t.getCtrl().focusHeaderComp())&&s}focusNextFromAdvancedFilter(i,t){var s,o;const r=null!=(o=t?void 0:this.advancedFilterFocusColumn)?o:null==(s=this.columnModel.getAllDisplayedColumns())?void 0:s[0];return i?this.focusHeaderPosition({headerPosition:{column:r,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}}):this.focusGridView(r)}clearAdvancedFilterColumn(){this.advancedFilterFocusColumn=void 0}};return e.keyboardModeActive=!1,e.instanceCount=0,e})();d([p("eGridDiv")],ve.prototype,"eGridDiv",2),d([p("columnModel")],ve.prototype,"columnModel",2),d([p("headerNavigationService")],ve.prototype,"headerNavigationService",2),d([p("headerPositionUtils")],ve.prototype,"headerPositionUtils",2),d([p("rowRenderer")],ve.prototype,"rowRenderer",2),d([p("rowPositionUtils")],ve.prototype,"rowPositionUtils",2),d([p("cellPositionUtils")],ve.prototype,"cellPositionUtils",2),d([p("navigationService")],ve.prototype,"navigationService",2),d([p("ctrlsService")],ve.prototype,"ctrlsService",2),d([p("filterManager")],ve.prototype,"filterManager",2),d([q("rangeService")],ve.prototype,"rangeService",2),d([q("advancedFilterService")],ve.prototype,"advancedFilterService",2),d([T],ve.prototype,"init",1),ve=d([I("focusService")],ve);var zn=class extends b{setMouseOver(e){this.selectedColumns=e,this.eventService.dispatchEvent({type:g.EVENT_COLUMN_HOVER_CHANGED})}clearMouseOver(){this.selectedColumns=null,this.eventService.dispatchEvent({type:g.EVENT_COLUMN_HOVER_CHANGED})}isHovered(e){return!!this.selectedColumns&&this.selectedColumns.indexOf(e)>=0}};zn=d([I("columnHoverService")],zn);var Vs=class extends b{constructor(){super(...arguments),this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.ctrlsService.whenReady(e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){this.active||this.gos.get("suppressColumnMoveAnimation")||this.gos.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0)}finish(){this.active&&this.flush(()=>{this.active=!1})}executeNextVMTurn(e){this.active?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&this.gridBodyCtrl.setColumnMovingCss(!1)})}flush(e){if(0===this.executeNextFuncs.length&&0===this.executeLaterFuncs.length)return void e();const i=t=>{for(;t.length;){const s=t.pop();s&&s()}};this.getFrameworkOverrides().wrapIncoming(()=>{window.setTimeout(()=>i(this.executeNextFuncs),0),window.setTimeout(()=>{e(),i(this.executeLaterFuncs)},200)})}};d([p("ctrlsService")],Vs.prototype,"ctrlsService",2),d([T],Vs.prototype,"postConstruct",1),Vs=d([I("columnAnimationService")],Vs);var zi=class extends b{postConstruct(){this.ctrlsService.whenReady(e=>{this.centerRowsCtrl=e.center,this.addManagedListener(this.eventService,g.EVENT_BODY_HEIGHT_CHANGED,this.checkPageSize.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,this.checkPageSize.bind(this)),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||null==this.centerRowsCtrl}onPaginationAutoSizeChanged(){this.notActive()?this.paginationProxy.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;
1const e=this.centerRowsCtrl.getViewportSizeFeature().getBodyHeight();if(e>0){const i=()=>{const t=this.gos.getRowHeightAsNumber(),s=Math.floor(e/t);this.paginationProxy.setPageSize(s,"autoCalculated")};this.isBodyRendered?Ee(()=>i(),50)():(i(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};d([p("ctrlsService")],zi.prototype,"ctrlsService",2),d([p("paginationProxy")],zi.prototype,"paginationProxy",2),d([T],zi.prototype,"postConstruct",1),zi=d([I("paginationAutoPageSizeService")],zi);var Jo=class extends b{constructor(){super(...arguments),this.cacheVersion=0}init(){this.active=this.gos.get("valueCache"),this.neverExpires=this.gos.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,i,t){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[i]=t)}getValue(e,i){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[i]}};d([T],Jo.prototype,"init",1),Jo=d([I("valueCache")],Jo);var Ki=class extends b{init(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel),this.addManagedListener(this.eventService,g.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))}onCellValueChanged(e){"paste"!==e.source&&this.doChangeDetection(e.node,e.column)}doChangeDetection(e,i){if(this.gos.get("suppressChangeDetection"))return;const t=[e];if(this.clientSideRowModel&&!e.isRowPinned()){const s=this.gos.get("aggregateOnlyChangedColumns"),o=new Ko(s,this.clientSideRowModel.getRootNode());o.addParentNode(e.parent,[i]),this.clientSideRowModel.doAggregate(o),o.forEachChangedNodeDepthFirst(r=>{t.push(r)})}this.rowRenderer.refreshCells({rowNodes:t})}};d([p("rowModel")],Ki.prototype,"rowModel",2),d([p("rowRenderer")],Ki.prototype,"rowRenderer",2),d([T],Ki.prototype,"init",1),Ki=d([I("changeDetectionService")],Ki);var er=class extends b{adaptFunction(e,i){const t=this.componentMetadataProvider.retrieve(e);return t&&t.functionAdapter?t.functionAdapter(i):null}adaptCellRendererFunction(e){return class i{refresh(s){return!1}getGui(){return this.eGui}init(s){const o=e(s),r=typeof o;this.eGui="string"!==r&&"number"!==r&&"boolean"!==r?null!=o?o:Ge("<span></span>"):Ge("<span>"+o+"</span>")}}}doesImplementIComponent(e){return!!e&&e.prototype&&"getGui"in e.prototype}};d([p("componentMetadataProvider")],er.prototype,"componentMetadataProvider",2),er=d([I("agComponentUtils")],er);var Hs=class extends b{postConstruct(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","onParamsUpdated","refresh"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached","onParamsUpdated","refresh"]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["refresh"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","getState"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]},menuItem:{mandatoryMethodList:[],optionalMethodList:["setActive","select","setExpanded","configureDefaults"]}}}retrieve(e){return this.componentMetaData[e]}};d([p("agComponentUtils")],Hs.prototype,"agComponentUtils",2),d([T],Hs.prototype,"postConstruct",1),Hs=d([I("componentMetadataProvider")],Hs);var Fp={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:20,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:56,headerCellMinWidth:48,listItemHeight:32,rowHeight:48,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:32,headerCellMinWidth:24,listItemHeight:24,rowHeight:28,chartMenuPanelWidth:220}
1,"ag-theme-alpine":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:240},"ag-theme-quartz":{headerHeight:48,headerCellMinWidth:36,listItemHeight:24,rowHeight:42,chartMenuPanelWidth:260}},Sd={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]},ks=class extends b{constructor(){super(...arguments),this.calculatedSizes={},this.calculatedTheme=null}postConstruct(){var e;const i=null!=(e=this.getTheme().el)?e:this.eGridDiv;this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.mutationObserver=new MutationObserver(()=>{this.calculatedSizes={},this.calculatedTheme=null,this.calculatedTheme=this.getTheme(),this.fireGridStylesChangedEvent()}),this.mutationObserver.observe(i||this.eGridDiv,{attributes:!0,attributeFilter:["class"]})}fireGridStylesChangedEvent(){this.eventService.dispatchEvent({type:g.EVENT_GRID_STYLES_CHANGED})}getSassVariable(e){const{themeFamily:i,el:t}=this.getTheme();if(i&&0===i.indexOf("ag-theme"))return this.calculatedSizes||(this.calculatedSizes={}),this.calculatedSizes[i]||(this.calculatedSizes[i]={}),this.calculatedSizes[i][e]??(this.calculatedSizes[i][e]=this.calculateValueForSassProperty(e,i,t),this.calculatedSizes[i][e])}calculateValueForSassProperty(e,i,t){const s="ag-theme-"+(i.match("material")?"material":i.match("balham")?"balham":i.match("alpine")?"alpine":"custom"),o=Fp[s][e],r=this.gos.getDocument();if(t||(t=this.eGridDiv),!Sd[e])return o;const n=Sd[e],l=r.createElement("div"),a=Array.from(t.classList);l.classList.add(i,...a),l.style.position="absolute";const u=n.reduce((c,f)=>{const m=r.createElement("div");return m.style.position="static",m.classList.add(f),c.appendChild(m),m},l);let h=0;if(r.body){r.body.appendChild(l);const c=-1!==e.toLowerCase().indexOf("height")?"height":"width";h=parseInt(window.getComputedStyle(u)[c],10),r.body.removeChild(l)}return h||o}isThemeDark(){const{theme:e}=this.getTheme();return!!e&&e.indexOf("dark")>=0}chartMenuPanelWidth(){return this.getSassVariable("chartMenuPanelWidth")}getTheme(){if(this.calculatedTheme)return this.calculatedTheme;const e=/\bag-(material|(?:theme-([\w\-]*)))\b/g;let i=this.eGridDiv,t=null,s=[];for(;i;){if(t=e.exec(i.className),t){const r=i.className.match(e);r&&(s=r);break}i=i.parentElement||void 0}if(!t)return{allThemes:s};const o=t[0];return this.calculatedTheme={theme:o,el:i,themeFamily:o.replace(/-dark$/,""),allThemes:s},this.calculatedTheme}getFromTheme(e,i){var t;return null!=(t=this.getSassVariable(i))?t:e}getDefaultRowHeight(){return this.getFromTheme(25,"rowHeight")}getListItemHeight(){return this.getFromTheme(20,"listItemHeight")}refreshRowHeightVariable(){const e=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim(),i=this.gos.get("rowHeight");if(null==i||isNaN(i)||!isFinite(i))return null!==e&&this.eGridDiv.style.setProperty("--ag-line-height",null),-1;const t=`${i}px`;return e!=t?(this.eGridDiv.style.setProperty("--ag-line-height",t),i):""!=e?parseFloat(e):-1}getMinColWidth(){const e=this.getFromTheme(null,"headerCellMinWidth");return y(e)?Math.max(e,10):10}destroy(){this.calculatedSizes=null,this.mutationObserver&&this.mutationObserver.disconnect(),super.destroy()}};d([p("eGridDiv")],ks.prototype,"eGridDiv",2),d([T],ks.prototype,"postConstruct",1),ks=d([I("environment")],ks);var $i=class extends b{constructor(){super(...arguments),this.scrollY=0,this.uiBodyHeight=0}agWire(e){this.logger=e.create("RowContainerHeightService")}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.maxDivHeight=Zl(),this.logger.log("maxDivHeight = "+this.maxDivHeight)}isStretching(){return this.stretching}getDivStretchOffset(){return this.divStretchOffset}updateOffset(){if(!this.stretching)return;const i=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(i!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=i,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,i=e*this.pixelsToShave;this.logger.log(`Div Stretch Offset = ${i} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(i)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventService.dispatchEvent({type:g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const i="number"==typeof e?Math.floor(e):null;this.divStretchOffset!==i&&(this.divStretchOffset=i,this.eventService.dispatchEvent({type:g.EVENT_HEIGHT_SCALE_CHANGED}))}setModelHeight(e){this.modelHeight=e,this.stretching=null!=e&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getUiContainerHeight(){return this.uiContainerHeight}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const i=this.ctrlsService.getGridBodyCtrl().getScrollFeature
1().getVScrollPosition();return i.bottom-i.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const i=this.modelHeight-this.getUiBodyHeight();return this.maxScrollY*(e/i)}};d([p("ctrlsService")],$i.prototype,"ctrlsService",2),d([Se(0,Ue("loggerFactory"))],$i.prototype,"agWire",1),d([T],$i.prototype,"postConstruct",1),$i=d([I("rowContainerHeightService")],$i);var Yi=class extends b{init(){this.addManagedPropertyListener("isRowSelectable",()=>this.updateSelectable())}updateSelectableAfterGrouping(){this.updateSelectable(!0)}updateSelectable(e=!1){const i=!!this.gos.get("rowSelection"),t=this.gos.get("isRowSelectable");if(!i||!t)return;const s=this.gos.get("groupSelectsChildren"),o="clientSide"===this.rowModel.getType()&&s,r=[],n=l=>{if(e&&!l.group)return;if(o&&l.group){const u=l.childrenAfterGroup.some(h=>!0===h.selectable);return void l.setRowSelectable(u,!0)}const a=!t||t(l);l.setRowSelectable(a,!0),!a&&l.isSelected()&&r.push(l)};o?new Ko(!1,this.rowModel.getRootNode()).forEachChangedNodeDepthFirst(n,!0,!0):this.rowModel.forEachNode(n),r.length&&this.selectionService.setNodesSelected({nodes:r,newValue:!1,source:"selectableChanged"}),o&&this.selectionService instanceof ni&&this.selectionService.updateGroupsFromChildrenSelections("selectableChanged")}};d([p("rowModel")],Yi.prototype,"rowModel",2),d([p("selectionService")],Yi.prototype,"selectionService",2),d([T],Yi.prototype,"init",1),Yi=d([I("selectableService")],Yi);var xe=class extends V{constructor(){super(),this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate());const{btFirst:i,btPrevious:t,btNext:s,btLast:o}=this;this.activateTabIndex([i,t,s,o]),i.insertAdjacentElement("afterbegin",se(e?"last":"first",this.gos)),t.insertAdjacentElement("afterbegin",se(e?"next":"previous",this.gos)),s.insertAdjacentElement("afterbegin",se(e?"previous":"next",this.gos)),o.insertAdjacentElement("afterbegin",se(e?"first":"last",this.gos)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.onPaginationChanged()}onPaginationChanged(){const i=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(i),i&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach(e=>{const{el:i,fn:t}=e;this.addManagedListener(i,"click",t),this.addManagedListener(i,"keydown",s=>{(s.key===v.ENTER||s.key===v.SPACE)&&(s.preventDefault(),t())})}),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToFirstPage()}setCurrentPageLabel(){const e=this.paginationProxy.getTotalPages()>0,i=this.paginationProxy.getCurrentPage();this.lbCurrent.textContent=this.formatNumber(e?i+1:0)}formatNumber(e){const i=this.gos.getCallback("paginationNumberFormatter");if(i)return i({value:e});const t=this.localeService.getLocaleTextFunc();return Qr(e,t("thousandSeparator",","),t("decimalSeparator","."))}getTemplate(){const e=this.localeService.getLocaleTextFunc(),i=e("page","Page"),t=e("to","to"),s=e("of","of"),o=e("firstPage","First Page"),r=e("previousPage","Previous Page"),n=e("nextPage","Next Page"),l=e("lastPage","Last Page"),a=this.getCompId();return`<div class="ag-paging-panel ag-unselectable" id="ag-${a}">\n <ag-page-size-selector ref="pageSizeComp"></ag-page-size-selector>
1\n <span class="ag-paging-row-summary-panel" role="status">\n <span id="ag-${a}-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n <span id="ag-${a}-to">${t}</span>\n <span id="ag-${a}-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n <span id="ag-${a}-of">${s}</span>\n <span id="ag-${a}-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>\n </span>\n <span class="ag-paging-page-summary-panel" role="presentation">\n <div ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="${o}"></div>\n <div ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="${r}"></div>\n <span class="ag-paging-description" role="status">\n <span id="ag-${a}-start-page">${i}</span>\n <span id="ag-${a}-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>\n <span id="ag-${a}-of-page">${s}</span>\n <span id="ag-${a}-of-page-number" ref="lbTotal" class="ag-paging-number"></span>\n </span>\n <div ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="${n}"></div>\n <div ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="${l}"></div>\n </span>\n </div>`}onBtNext(){this.nextButtonDisabled||this.paginationProxy.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.paginationProxy.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.paginationProxy.goToLastPage()}enableOrDisableButtons(){const e=this.paginationProxy.getCurrentPage(),i=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();this.previousAndFirstButtonsDisabled=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const s=this.isZeroPagesToDisplay();this.nextButtonDisabled=e===t-1||s,this.lastButtonDisabled=!i||s||e===t-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,i){Gr(e,i),e.classList.toggle("ag-disabled",i)}updateRowLabels(){const e=this.paginationProxy.getCurrentPage(),i=this.paginationProxy.getPageSize(),t=this.paginationProxy.isLastPageFound(),s=this.paginationProxy.isLastPageFound()?this.paginationProxy.getMasterRowCount():null;let o,r;if(this.isZeroPagesToDisplay()?o=r=0:(o=i*e+1,r=o+i-1,t&&r>s&&(r=s)),this.lbFirstRowOnPage.textContent=this.formatNumber(o),this.rowNodeBlockLoader.isLoading()){const n=this.localeService.getLocaleTextFunc();this.lbLastRowOnPage.innerHTML=n("pageLastRowUnknown","?")}else this.lbLastRowOnPage.textContent=this.formatNumber(r)}isZeroPagesToDisplay(){const e=this.paginationProxy.isLastPageFound(),i=this.paginationProxy.getTotalPages();return e&&0===i}setTotalLabels(){const e=this.paginationProxy.isLastPageFound(),i=this.paginationProxy.getTotalPages(),t=e?this.paginationProxy.getMasterRowCount():null;if(1===t){const s=this.paginationProxy.getRow(0);if(s&&s.group&&!s.groupData&&!s.aggData)return void this.setTotalLabelsToZero()}if(e)this.lbTotal.textContent=this.formatNumber(i),this.lbRecordCount.textContent=this.formatNumber(t);else{const s=this.localeService.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=s,this.lbRecordCount.innerHTML=s}}setTotalLabelsToZero(){this.lbFirstRowOnPage.textContent=this.formatNumber(0),this.lbCurrent.textContent=this.formatNumber(0),this.lbLastRowOnPage.textContent=this.formatNumber(0),this.lbTotal.textContent=this.formatNumber(0),this.lbRecordCount.textContent=this.formatNumber(0)}};d([p("paginationProxy")],xe.prototype,"paginationProxy",2),d([p("rowNodeBlockLoader")],xe.prototype,"rowNodeBlockLoader",2),d([F("btFirst")],xe.prototype,"btFirst",2),d([F("btPrevious")],xe.prototype,"btPrevious",2),d([F("btNext")],xe.prototype,"btNext",2),d([F("btLast")],xe.prototype,"btLast",2),d([F("lbRecordCount")],xe.prototype,"lbRecordCount",2),d([F("lbFirstRowOnPage")],xe.prototype,"lbFirstRowOnPage",2),d([F("lbLastRowOnPage")],xe.prototype,"lbLastRowOnPage",2),d([F("lbCurrent")],xe.prototype,"lbCurrent",2),d([F("lbTotal")],xe.prototype,"lbTotal",2),d([F("pageSizeComp")],xe.prototype,"pageSizeComp",2),d([T],xe.prototype,"postConstruct",1);var tr=(()=>{let e=class uu extends V{constructor(){super(uu.TEMPLATE),this.inProgress=!1,this.destroyRequested=!1}updateLayoutClasses(t,s){const o=this.eOverlayWrapper.classList;o.toggle("ag-layout-auto-height",s.autoHeight),o.toggle("ag-layout-normal",s.normal),o.toggle("ag-layout-print",s.print)}postConstruct(){this.createManagedBean(new _o(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.overlayService.registerOverlayWrapperComp(this)}setWrapperTypeClass(t){const s=this.eOverlayWrapper.classList;this.activeOverlayWrapperCssClass&&s.toggle(this.activeOverlayWrapperCssClass,!1),this.activeOverlayWrapperCssClass=t,s.toggle(t,!0)}showOverlay(t,s,o){this.inProgress||(this.setWrapperTypeClass(s),this.destroyActiveOverlay(),this.inProgress=!0,t&&t.then(r=>{this.inProgress=!1,this.eOverlayWrapper.appendChild(r.getGui()),this.activeOverlay=r,this.updateListenerDestroyFunc=o,this.destroyRequested&&(this.destroyRequested=!1,this.destroyActiveOverlay())}),this.setDisplayed(!0,{skipAriaHidden:!0}))}destroyActiveOverlay(){var t;this.inProgress?this.destroyRequested=!0:this.activeOverlay&&(this.activeOverlay=this.getContext().destroyBean(this.activeOverlay),null==(t=this.updateListenerDestroyFunc)||t.call(this),ne(this.eOverlayWrapper))}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}destroy(){this.destroyActiveOverlay(),super.destroy()}};return e.TEMPLATE='\n <div class="ag-overlay" role="presentation">\n <div class="ag-overlay-panel" role="presentation">\n <div class="ag-overlay-wrapper" ref="eOverlayWrapper" role="presentation"></div>\n </div>\n </div>',e})();d([p("overlayService")],tr.prototype,"overlayService",2),d([F("eOverlayWrapper")],tr.prototype,"eOverlayWrapper",2),d([T],tr.prototype,"postConstruct",1);var Pp=tr,ji=class extends b{getFirstRow(){let i,e=0;return this.pinnedRowModel.getPinnedTopRowCount()?i="top":this.rowModel.getRowCount()?(i=null,e=this.paginationProxy.getPageFirstRow()):this.pinnedRowModel.getPinnedBottomRowCount()&&(i="bottom"),void 0===i?null:{rowIndex:e,rowPinned:i}}getLastRow(){let e,i=null;const t=this.pinnedRowModel.getPinnedBottomRowCount(),s=this.pinnedRowModel.getPinnedTopRowCount();return t?(i="bottom",e=t-1):this.rowModel.getRowCount()?(i=null,e=this.paginationProxy.getPageLastRow()):s&&(i="top",e=s-1),void 0===e?null:{rowIndex:e,rowPinned:i}}getRowNode(e){switch(e.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[e.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[e.rowIndex];default:return this.rowModel.getRow(e.rowIndex)}}sameRow(e,i){return!e&&!i||!(e&&!i||!e&&i)&&e.rowIndex===i.rowIndex&&e.rowPinned==i.rowPinned}before(e,i){switch(e.rowPinned){case"top":if("top"!==i.rowPinned)return!0;break;case"bottom":if("bottom"!==i.rowPinned)return!1;break;default:if(y(i.rowPinned))return"top"!==i.rowPinned}return e.rowIndex<i.rowIndex}};d([p("rowModel")],ji.prototype,"rowModel",2),d([p("pinnedRowModel")],ji.prototype,"pinnedRowModel",2),d([p("paginationProxy")],ji.prototype,"paginationProxy",2),ji=d([I("rowPositionUtils")],ji);var qn=class extends b{createId(e){const{rowIndex:i,rowPinned:t,column:s}=e;return this.createIdFromValues({rowIndex:i,column:s,rowPinned:t})}createIdFromValues(e){const{rowIndex:i,rowPinned:t,column:s}=e;return`${i}.${t??"null"}.${s.getId()}`}equals(e,i){return e.column===i.column&&e.rowPinned===i.rowPinned&&e.rowIndex===i.rowIndex}};qn=d([I("cellPositionUtils")],qn);var Bs=class{constructor(e){this.cellValueChanges=e}},Qn=class extends Bs{constructor(e,i,t,s){super(e),this.initialRange=i,this.finalRange=t,this.ranges=s}},Lp=(()=>{let e=class hu{constructor(t){this.actionStack=[],this.maxStackSize=t||hu.DEFAULT_STACK_SIZE,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(t){t.cellValueChanges&&t.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(t))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}};return e.DEFAULT_STACK_SIZE=10,e})(),Ed=Lp,ut=class extends b{constructor(){super(...arguments),this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.onCellValueChanged=e=>{const i={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},t=null!==this.activeCellEdit&&this.cellPositionUtils.equals(this.activeCellEdit,i),s=null!==this.activeRowEdit&&this.rowPositionUtils.sameRow(this.activeRowEdit,i);if(!(t||s||this.isPasting||this.isRangeInAction))return;const{rowPinned:r,rowIndex:n,column:l,oldValue:a,value:u}=e,h={rowPinned:r,rowIndex:n,columnId:l.getColId(),newValue:u,oldValue:a};this.cellValueChanges.push(h)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}init(){if(!this.gos.get("undoRedoCellEditing"))return;const e=this.gos.get("undoRedoCellEditingLimit");e<=0||(this.undoStack=new Ed(e),this.redoStack=new Ed(e),this.addRowEditingListeners(),this.addCellEditingListeners(),this.addPasteListeners(),this.addFillListeners(),this.addCellKeyListeners(),this.addManagedListener(this.eventService,g.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged),this.addManagedListener(this.eventService,g.EVENT_MODEL_UPDATED,i=>{i.keepUndoRedoStack||this.clearStacks()}),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PINNED,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,this.clearStacks),this.addManagedListener(this.eventService,g.EVENT_ROW_DRAG_END,this.clearStacks),this.ctrlsService.whenReady(i=>{this.gridBodyCtrl=i.gridBodyCtrl}))}getCurrentUndoStackSize(){return this.undoStack?this.undoStack.getCurrentStackSize():0}getCurrentRedoStackSize(){return this.redoStack?this.redoStack.getCurrentStackSize():0}undo(e){this.eventService.dispatchEvent({type:g.EVENT_UNDO_STARTED,source:e});const t=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo");this.eventService.dispatchEvent({type:g.EVENT_UNDO_ENDED,source:e,operationPerformed:t})}redo(e){this.eventService.dispatchEvent({type:g.EVENT_REDO_STARTED,source:e});const t=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo");this.eventService.dispatchEvent({type:g.EVENT_REDO_ENDED,source:e,operationPerformed:t})}undoRedo(e,i,t,s,o){if(!e)return!1;const r=e.pop();return!(!r||!r.cellValueChanges||(this.processAction(r,n=>n[s],o),r instanceof Qn?this.processRange(this.rangeService,r.ranges||[r[t]]):this.processCell(r.cellValueChanges),i.push(r),
10))}processAction(e,i,t){e.cellValueChanges.forEach(s=>{const{rowIndex:o,rowPinned:r,columnId:n}=s,a=this.rowPositionUtils.getRowNode({rowIndex:o,rowPinned:r});a.displayed&&a.setDataValue(n,i(s),t)})}processRange(e,i){let t;e.removeAllCellRanges(!0),i.forEach((s,o)=>{if(!s)return;const r=s.startRow,n=s.endRow;o===i.length-1&&(t={rowPinned:r.rowPinned,rowIndex:r.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(t)),e.addCellRange({rowStartIndex:r.rowIndex,rowStartPinned:r.rowPinned,rowEndIndex:n.rowIndex,rowEndPinned:n.rowPinned,columnStart:s.startColumn,columns:s.columns})})}processCell(e){const i=e[0],{rowIndex:t,rowPinned:s}=i,r=this.rowPositionUtils.getRowNode({rowIndex:t,rowPinned:s});this.setLastFocusedCell({rowPinned:i.rowPinned,rowIndex:r.rowIndex,columnId:i.columnId},this.rangeService)}setLastFocusedCell(e,i){const{rowIndex:t,columnId:s,rowPinned:o}=e,r=this.gridBodyCtrl.getScrollFeature(),n=this.columnModel.getGridColumn(s);if(!n)return;r.ensureIndexVisible(t),r.ensureColumnVisible(n);const l={rowIndex:t,column:n,rowPinned:o};this.focusService.setFocusedCell(x(M({},l),{forceBrowserFocus:!0})),i?.setRangeToCell(l)}addRowEditingListeners(){this.addManagedListener(this.eventService,g.EVENT_ROW_EDITING_STARTED,e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,g.EVENT_ROW_EDITING_STOPPED,()=>{const e=new Bs(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null})}addCellEditingListeners(){this.addManagedListener(this.eventService,g.EVENT_CELL_EDITING_STARTED,e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}}),this.addManagedListener(this.eventService,g.EVENT_CELL_EDITING_STOPPED,e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const t=new Bs(this.cellValueChanges);this.pushActionsToUndoStack(t)}})}addPasteListeners(){this.addManagedListener(this.eventService,g.EVENT_PASTE_START,()=>{this.isPasting=!0}),this.addManagedListener(this.eventService,g.EVENT_PASTE_END,()=>{const e=new Bs(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1})}addFillListeners(){this.addManagedListener(this.eventService,g.EVENT_FILL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,g.EVENT_FILL_END,e=>{const i=new Qn(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(i),this.isRangeInAction=!1})}addCellKeyListeners(){this.addManagedListener(this.eventService,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,()=>{this.isRangeInAction=!0}),this.addManagedListener(this.eventService,g.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,()=>{let e;e=this.rangeService&&this.gos.get("enableRangeSelection")?new Qn(this.cellValueChanges,void 0,void 0,[...this.rangeService.getCellRanges()]):new Bs(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1})}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}};d([p("focusService")],ut.prototype,"focusService",2),d([p("ctrlsService")],ut.prototype,"ctrlsService",2),d([p("cellPositionUtils")],ut.prototype,"cellPositionUtils",2),d([p("rowPositionUtils")],ut.prototype,"rowPositionUtils",2),d([p("columnModel")],ut.prototype,"columnModel",2),d([q("rangeService")],ut.prototype,"rangeService",2),d([T],ut.prototype,"init",1),ut=d([I("undoRedoService")],ut);var Ws=class extends b{findHeader(e,i){let t,s;if(e.column instanceof he?t=this.columnModel.getDisplayedGroupAtDirection(e.column,i):(s=`getDisplayedCol${i}`,t=this.columnModel[s](e.column)),!t)return;let{headerRowIndex:o}=e;if("filter"!==this.getHeaderRowType(o)){const l=[t];for(;t.getParent();)t=t.getParent(),l.push(t);t=l[l.length-1-o]}const{column:r,headerRowIndex:n}=this.getHeaderIndexToFocus(t,o);return{column:r,headerRowIndex:n}}getHeaderIndexToFocus(e,i){let t;if(e instanceof he&&this.isAnyChildSpanningHeaderHeight(e)&&e.isPadding()){const s=e;t=s.getLeafColumns()[0];let o=t;for(;o!==s;)i++,o=o.getParent()}return{column:t||e,headerRowIndex:i}}isAnyChildSpanningHeaderHeight(e){return!!e&&e.getLeafColumns().some(i=>i.isSpanHeaderHeight())}getColumnVisibleParent(e,i){const t=this.getHeaderRowType(i),o="column"===t;let r="filter"===t?e:e.getParent(),n=i-1,l=n;if(o&&this.isAnyChildSpanningHeaderHeight(e.getParent())){for(;r&&r.isPadding();)r=r.getParent(),n--;l=n,n<0&&(r=e,n=i,l=void 0)}return{column:r,headerRowIndex:n,headerRowIndexWithoutSpan:l}}getColumnVisibleChild(e,i,t="After"){let o=e,r=i+1,n=r;if("group"===this.getHeaderRowType(i)){const l=e.getDisplayedLeafColumns(),a="After"===t?l[0]:$(l),u=[];let h=a;for(;h.getParent()!==e;)h=h.getParent(),u.push(h);if(o=a,a.isSpanHeaderHeight())for(let c=u.length-1;c>=0;c--){const f=u[c];if(!f.isPadding()){o=f;break}r++}else o=$(u),o||(o=a)}return{column:o,headerRowIndex:r,headerRowIndexWithoutSpan:n}}getHeaderRowType(e){const i=this.ctrlsService.getHeaderRowContainerCtrl();if(i)return i.getRowType(e)}findColAtEdgeForHeaderRow(e,i){const t=this.columnModel.getAllDisplayedColumns(),s=t["start"===i?0:t.length-1];if(!s)return;const r=this.ctrlsService.getHeaderRowContainerCtrl(s.getPinned()).getRowType(e);return"group"==r?{headerRowIndex:e,column:this.columnModel.getColumnGroupAtLevel(s,e)}:{headerRowIndex:null==r?-1:e,column:s}}};d([p("columnModel")],Ws.prototype,"columnModel",2),d([p("ctrlsService")],Ws.prototype,"ctrlsService",2),Ws=d([I("headerPositionUtils")],Ws);var Xn=class{buildColumnDefs(e,i,t){const s=[],o={};return e.forEach(r=>{let l=!0,a=this.createDefFromColumn(r,i,t),u=r.getOriginalParent(),h=null;for(;u;){let c=null;if(u.isPadding()){u=u.getOriginalParent();continue}const f=o[u.getGroupId()];if(f){f.children.push(a),l=!1;break}if(c=this.createDefFromGroup(u),c&&(c.children=[a],o[c.groupId]=c,a=c,u=u.getOriginalParent()),null!=u&&h===u){l=!1;break}h=u}l&&s.push(a)}),s}createDefFromGroup(e){const i=lo(e.getColGroupDef(),["children"]);return i&&(i.groupId=e.getGroupId()),i}createDefFromColumn(e,i,t){const s=lo(e.getColDef());return s.colId=e.getColId(),s.width=e.getActualWidth(),s.rowGroup=e.isRowGroupActive(),s.rowGroupIndex=e.isRowGroupActive()?i.indexOf(e):null,s.pivot=e.isPivotActive(),s.pivotIndex=e.isPivotActive()?t.indexOf(e):null,s.aggFunc=e.isValueActive()?e.getAggFunc():null,s.hide=!e.isVisible()||void 0,s.pinned=e.isPinned()?e.getPinned():null,s.sort=e.getSort()?e.getSort():null,
1s.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,s}};Xn=d([I("columnDefFactory")],Xn);var Us=class{getInitialRowClasses(e){const i=[];return y(e.extraCssClass)&&i.push(e.extraCssClass),i.push("ag-row"),i.push(e.rowFocused?"ag-row-focus":"ag-row-no-focus"),e.fadeRowIn&&i.push("ag-opacity-zero"),i.push(e.rowIsEven?"ag-row-even":"ag-row-odd"),e.rowNode.isRowPinned()&&i.push("ag-row-pinned"),e.rowNode.isSelected()&&i.push("ag-row-selected"),e.rowNode.footer&&i.push("ag-row-footer"),i.push("ag-row-level-"+e.rowLevel),e.rowNode.stub&&i.push("ag-row-loading"),e.fullWidthRow&&i.push("ag-full-width-row"),e.expandable&&(i.push("ag-row-group"),i.push(e.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")),e.rowNode.dragging&&i.push("ag-row-dragging"),br(i,this.processClassesFromGridOptions(e.rowNode)),br(i,this.preProcessRowClassRules(e.rowNode)),i.push(e.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),e.firstRowOnPage&&i.push("ag-row-first"),e.lastRowOnPage&&i.push("ag-row-last"),e.fullWidthRow&&("left"===e.pinned&&i.push("ag-cell-last-left-pinned"),"right"===e.pinned&&i.push("ag-cell-first-right-pinned")),i}processClassesFromGridOptions(e){const i=[],t=r=>{"string"==typeof r?i.push(r):Array.isArray(r)&&r.forEach(n=>i.push(n))},s=this.gos.get("rowClass");if(s){if("function"==typeof s)return console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead"),[];t(s)}const o=this.gos.getCallback("getRowClass");return o&&t(o({data:e.data,node:e,rowIndex:e.rowIndex})),i}preProcessRowClassRules(e){const i=[];return this.processRowClassRules(e,t=>{i.push(t)},t=>{}),i}processRowClassRules(e,i,t){const s=this.gos.addGridCommonParams({data:e.data,node:e,rowIndex:e.rowIndex});this.stylingService.processClassRules(void 0,this.gos.get("rowClassRules"),s,i,t)}calculateRowLevel(e){return e.group?e.level:e.parent?e.parent.level+1:0}};d([p("stylingService")],Us.prototype,"stylingService",2),d([p("gridOptionsService")],Us.prototype,"gos",2),Us=d([I("rowCssClassCalculator")],Us);var qi=class extends b{init(){this.isAccentedSort=this.gos.get("accentedSort"),this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup(),this.addManagedPropertyListener("accentedSort",e=>this.isAccentedSort=e.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=this.gos.isColumnsSortingCoupledToGroup())}doFullSort(e,i){const s=e.map((o,r)=>({currentPos:r,rowNode:o}));return s.sort(this.compareRowNodes.bind(this,i)),s.map(o=>o.rowNode)}compareRowNodes(e,i,t){const s=i.rowNode,o=t.rowNode;for(let r=0,n=e.length;r<n;r++){const l=e[r],a="desc"===l.sort,u=this.getValue(s,l.column),h=this.getValue(o,l.column);let c;const f=this.getComparator(l,s);if(c=f?f(u,h,s,o,a):k.defaultComparator(u,h,this.isAccentedSort),!isNaN(c)&&0!==c)return"asc"===l.sort?c:-1*c}return i.currentPos-t.currentPos}getComparator(e,i){const t=e.column,s=t.getColDef().comparator;if(null!=s)return s;if(!t.getColDef().showRowGroup)return;const o=!i.group&&t.getColDef().field;if(!o)return;const r=this.columnModel.getPrimaryColumn(o);return r?r.getColDef().comparator:void 0}getValue(e,i){var t,s;if(!this.primaryColumnsSortGroups)return this.valueService.getValue(i,e,!1,!1);if(e.rowGroupColumn===i){if(this.gos.isGroupUseEntireRow(this.columnModel.isPivotActive())){const l=null==(t=e.allLeafChildren)?void 0:t[0];return l?this.valueService.getValue(i,l,!1,!1):void 0}const n=this.columnModel.getGroupDisplayColumnForGroup(i.getId());return n?null==(s=e.groupData)?void 0:s[n.getId()]:void 0}return e.group&&i.getColDef().showRowGroup?void 0:this.valueService.getValue(i,e,!1,!1)}};d([p("valueService")],qi.prototype,"valueService",2),d([p("columnModel")],qi.prototype,"columnModel",2),d([T],qi.prototype,"init",1),qi=d([I("rowNodeSorter")],qi);var ir=(()=>{let e=class extends b{constructor(){super(...arguments),this.params={},this.ready=!1,this.readyCallbacks=[]}checkReady(){const i=this.params;this.ready=null!=i.gridCtrl&&null!=i.gridBodyCtrl&&null!=i.center&&null!=i.left&&null!=i.right&&null!=i.bottomCenter&&null!=i.bottomLeft&&null!=i.bottomRight&&null!=i.topCenter&&null!=i.topLeft&&null!=i.topRight&&null!=i.stickyTopCenter&&null!=i.stickyTopLeft&&null!=i.stickyTopRight&&null!=i.stickyBottomCenter&&null!=i.stickyBottomLeft&&null!=i.stickyBottomRight&&null!=i.centerHeader&&null!=i.leftHeader&&null!=i.rightHeader&&null!=i.fakeHScrollComp&&null!=i.fakeVScrollComp&&null!=i.gridHeaderCtrl,this.ready&&(this.readyCallbacks.forEach(t=>t(i)),this.readyCallbacks.length=0)}whenReady(i){this.ready?i(this.params):this.readyCallbacks.push(i)}register(i,t){this.params[i]=t,this.checkReady()}registerHeaderContainer(i,t){switch(t){case"left":this.params.leftHeader=i;break;case"right":this.params.rightHeader=i;break;default:this.params.centerHeader=i}this.checkReady()}get(i){return this.params[i]}getParams(){return this.params}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){return[this.params.leftHeader,this.params.rightHeader,this.params.centerHeader]}getHeaderRowContainerCtrl(i){switch(i){case"left":return this.params.leftHeader;case"right":return this.params.rightHeader;default:return this.params.centerHeader}}};return e.NAME="ctrlsService",e})();ir=d([I(ir.NAME)],ir);var Zn=class extends b{constructor(){super(...arguments),this.registry={}}register(e){this.registry[e.controllerName]=e.controllerClass}getInstance(e){const i=this.registry[e];if(null!=i)return new i}};Zn=d([I("ctrlsFactory")],Zn);var ui=class extends V{constructor(e,i){super(e),this.direction=i,this.hideTimeout=null}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",Yr()||St())}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=qr(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles())
1)}addActiveListenerToggles(){const t=this.getGui();["mouseenter","mousedown","touchstart"].forEach(s=>this.addManagedListener(t,s,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0))),["mouseleave","touchend"].forEach(s=>this.addManagedListener(t,s,()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1)))}onScrollVisibilityChanged(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),this.animationFrameService.requestAnimationFrame(()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL,e=>{e.direction===this.direction&&(null!==this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=null),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))}),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL_END,()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=null},400)})}attemptSettingScrollPosition(e){const i=this.getViewport();Sr(()=>Ie(i),()=>this.setScrollPosition(e),100)}getViewport(){return this.eViewport}getContainer(){return this.eContainer}onScrollCallback(e){this.addManagedListener(this.getViewport(),"scroll",e)}};d([F("eViewport")],ui.prototype,"eViewport",2),d([F("eContainer")],ui.prototype,"eContainer",2),d([p("scrollVisibleService")],ui.prototype,"scrollVisibleService",2),d([p("ctrlsService")],ui.prototype,"ctrlsService",2),d([p("animationFrameService")],ui.prototype,"animationFrameService",2);var Qi=(()=>{let e=class cu extends ui{constructor(){super(cu.TEMPLATE,"horizontal")}postConstruct(){super.postConstruct();const t=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,t),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,t),this.addManagedListener(this.eventService,g.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedPropertyListener("domLayout",t),this.ctrlsService.register("fakeHScrollComp",this),this.createManagedBean(new Ni(s=>this.eContainer.style.width=`${s}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}onPinnedRowDataChanged(){this.refreshCompBottom()}refreshCompBottom(){if(!this.invisibleScrollbar)return;const t=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=`${t}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const t=this.scrollVisibleService.isVerticalScrollShowing();let s=this.columnModel.getDisplayedColumnsRightWidth();const o=!this.enableRtl&&t,r=this.gos.getScrollbarWidth();o&&(s+=r),Ye(this.eRightSpacer,s),this.eRightSpacer.classList.toggle("ag-scroller-corner",s<=r);let n=this.columnModel.getDisplayedColumnsLeftWidth();this.enableRtl&&t&&(n+=r),Ye(this.eLeftSpacer,n),this.eLeftSpacer.classList.toggle("ag-scroller-corner",n<=r)}setScrollVisible(){const t=this.scrollVisibleService.isHorizontalScrollShowing(),s=this.invisibleScrollbar,o=this.gos.get("suppressHorizontalScroll"),r=t&&this.gos.getScrollbarWidth()||0,l=o?0:0===r&&s?16:r;this.addOrRemoveCssClass("ag-scrollbar-invisible",s),zt(this.getGui(),l),zt(this.eViewport,l),zt(this.eContainer,l),this.setDisplayed(t,{skipAriaHidden:!0})}getScrollPosition(){return ms(this.getViewport(),this.enableRtl)}setScrollPosition(t){Ie(this.getViewport())||this.attemptSettingScrollPosition(t),Cs(this.getViewport(),t,this.enableRtl)}};return e.TEMPLATE='<div class="ag-body-horizontal-scroll" aria-hidden="true">\n <div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>\n <div class="ag-body-horizontal-scroll-viewport" ref="eViewport">\n <div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>\n </div>\n <div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>\n </div>',e})();d([F("eLeftSpacer")],Qi.prototype,"eLeftSpacer",2),d([F("eRightSpacer")],Qi.prototype,"eRightSpacer",2),d([p("columnModel")],Qi.prototype,"columnModel",2),d([p("pinnedRowModel")],Qi.prototype,"pinnedRowModel",2),d([T],Qi.prototype,"postConstruct",1);
1var Mp=Qi,zs=class extends b{postConstruct(){const e=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const e=this.gos.isDomLayout("print"),i=e?0:this.columnModel.getDisplayedColumnsLeftWidth(),t=e?0:this.columnModel.getDisplayedColumnsRightWidth();i!=this.leftWidth&&(this.leftWidth=i,this.eventService.dispatchEvent({type:g.EVENT_LEFT_PINNED_WIDTH_CHANGED})),t!=this.rightWidth&&(this.rightWidth=t,this.eventService.dispatchEvent({type:g.EVENT_RIGHT_PINNED_WIDTH_CHANGED}))}getPinnedRightWidth(){return this.rightWidth}getPinnedLeftWidth(){return this.leftWidth}};d([p("columnModel")],zs.prototype,"columnModel",2),d([T],zs.prototype,"postConstruct",1),zs=d([I("pinnedWidthService")],zs);var Xi=class extends b{constructor(){super(...arguments),this.events=[]}postConstruct(){"clientSide"==this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel)}dispatchExpanded(e,i){if(null==this.clientSideRowModel)return void this.eventService.dispatchEvent(e);this.events.push(e);const t=()=>{this.clientSideRowModel&&this.clientSideRowModel.onRowGroupOpened(),this.events.forEach(s=>this.eventService.dispatchEvent(s)),this.events=[]};i?t():(null==this.dispatchExpandedDebounced&&(this.dispatchExpandedDebounced=this.animationFrameService.debounce(t)),this.dispatchExpandedDebounced())}};d([p("animationFrameService")],Xi.prototype,"animationFrameService",2),d([p("rowModel")],Xi.prototype,"rowModel",2),d([T],Xi.prototype,"postConstruct",1),Xi=d([I("rowNodeEventThrottle")],Xi);var _t=(e,i)=>{var t;return"clientSide"===(null!=(t=i.rowModelType)?t:"clientSide")?{module:"@ag-grid-enterprise/row-grouping"}:null},Gp={enableRowGroup:_t,rowGroup:_t,rowGroupIndex:_t,enablePivot:_t,enableValue:_t,pivot:_t,pivotIndex:_t,aggFunc:_t,cellEditor:e=>"agRichSelect"===e.cellEditor||"agRichSelectCellEditor"===e.cellEditor?{module:"@ag-grid-enterprise/rich-select"}:null,menuTabs:e=>{var i;const t=["columnsMenuTab","generalMenuTab"];return null!=(i=e.menuTabs)&&i.some(s=>t.includes(s))?{module:"@ag-grid-enterprise/menu"}:null},columnsMenuParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},columnChooserParams:{module:["@ag-grid-enterprise/menu","@ag-grid-enterprise/column-tool-panel"]},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],dependencies:(e,{rowSelection:i})=>"multiple"===i?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:i})=>"multiple"===i?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],dependencies:(e,{rowSelection:i})=>"multiple"===i?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},children:()=>Zi},Zi={objectName:"colDef",allProperties:Object.keys({headerName:void 0,columnGroupShow:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnsMenuParams:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressCellFlash:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressMenu:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressS
1panHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0}),docsUrl:"column-properties/",deprecations:{columnsMenuParams:{version:"31.1",message:"Use `columnChooserParams` instead."},suppressMenu:{version:"31.1",message:"Use `suppressHeaderMenuButton` instead."},suppressCellFlash:{version:"31.2",message:"Use `enableCellChangeFlash={false}` in the ColDef"},dndSource:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."},dndSourceOnRowDrag:{version:"31.2",message:"This feature has been replaced by `Row Dragging to an External DropZone`."}},validations:Gp},_p={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!1,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"\t",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,suppressChartToolPanelsButton:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressAsyncEvents:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,enableCellChangeFlash:!1,cellFlashDelay:500,cellFlashDuration:500,cellFadeDelay:1e3,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupIncludeTotalFooter:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,suppressServerSideInfiniteScroll:!1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSideSortOnServer:!1,serverSideFilterOnServer:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,suppressGroupMaintainValueType:!1,functionsPassive:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1},Vp={sideBar:{module:"@ag-grid-enterprise/side-bar"},statusBar:{module:"@ag-grid-enterprise/status-bar"},enableCharts:{module:"@ag-grid-enterprise/charts"},getMainMenuItems:{module:"@ag-grid-enterprise/menu"},getContextMenuItems:{module:"@ag-grid-enterprise/menu"},allowContextMenuWithControlKey:{module:"@ag-grid-enterprise/menu"},enableAdvancedFilter:{module:"@ag-grid-enterprise/advanced-filter"},treeData:{supportedRowModels:["clientSide","serverSide"],module:"@ag-grid-enterprise/row-grouping",dependencies:e=>{var i;const t=null!=(i=e.rowModelType)?i:"clientSide";switch(t){case"clientSide":return e.getDataPath?null:`treeData requires 'getDataPath' in the ${t} row model.`;case"serverSide":return e.isServerSideGroup&&e.getServerSideGroupKey?null:`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${t} row model.`}return null}},masterDetail:{module:"@ag-grid-enterprise/master-detail"},enableRangeSelection:{module:"@ag-grid-enterprise/range-selection"},enableRangeHandle:{dependencies:{enableRangeSelection:[!0]}},enableFillHandle:{dependencies:{enableRangeSelection:[!0]}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupIncludeFooter:{supportedRowModels:["clientSide","serverSide"],dependencies:e=>{var i;switch(null!=(i=e.rowModelType)?i:"clientSide"){case"clientSide":return null;case"serverSide":return e.suppressServerSideInfiniteScroll?"groupIncludeFooter is not supported alongside suppressServerSideInfiniteScroll":null}return null}},groupIncludeTotalFooter:{supportedRowModels:["clientSide"]}
1,groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveLowestSingleChildren:[void 0,!1]}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:[void 0,!1],groupRemoveSingleChildren:[void 0,!1]}},groupSelectsChildren:{dependencies:{rowSelection:["multiple"]}},suppressParentsInRowNodes:{dependencies:{groupSelectsChildren:[void 0,!1]}},viewportDatasource:{supportedRowModels:["viewport"],module:"@ag-grid-enterprise/viewport-row-model"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"@ag-grid-enterprise/server-side-row-model"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"]},datasource:{supportedRowModels:["infinite"],module:"@ag-grid-community/infinite-row-model"},rowData:{supportedRowModels:["clientSide"],module:"@ag-grid-community/client-side-row-model"},columnDefs:()=>Zi,defaultColDef:()=>Zi,defaultColGroupDef:()=>Zi,autoGroupColumnDef:()=>Zi},Hp={objectName:"gridOptions",allProperties:[...hs.ALL_PROPERTIES,...Pr.EVENT_CALLBACKS],propertyExceptions:["api","columnApi"],docsUrl:"grid-options/",deprecations:{enableChartToolPanelsButton:{version:"29"},functionsPassive:{version:"29.2"},onColumnRowGroupChangeRequest:{version:"29.2"},onColumnPivotChangeRequest:{version:"29.2"},onColumnValueChangeRequest:{version:"29.2"},onColumnAggFuncChangeRequest:{version:"29.2"},serverSideFilterAllLevels:{version:"30",message:"All server-side group levels are now filtered by default. This can be toggled using `serverSideOnlyRefreshFilteredGroups`."},suppressAggAtRootLevel:{version:"30",message:"The root level aggregation is now suppressed by default. This can be toggled using `alwaysAggregateAtRootLevel`."},excludeHiddenColumnsFromQuickFilter:{version:"30",message:"Hidden columns are now excluded from the Quick Filter by default. This can be toggled using `includeHiddenColumnsInQuickFilter`."},enterMovesDown:{version:"30",renamed:"enterNavigatesVertically"},enterMovesDownAfterEdit:{version:"30",renamed:"enterNavigatesVerticallyAfterEdit"},suppressParentsInRowNodes:{version:"30.2",message:"Using suppressParentsInRowNodes is no longer recommended. To serialize nodes it is now recommended to instead remove the parent node reference before serialization."},advancedFilterModel:{version:"31",message:"Use `initialState.filter.advancedFilterModel` instead."},suppressAsyncEvents:{version:"31",message:"Events should be handled asynchronously."},cellFadeDelay:{version:"31.1",renamed:"cellFadeDuration"},cellFlashDelay:{version:"31.1",renamed:"cellFlashDuration"},suppressServerSideInfiniteScroll:{version:"31.1"},serverSideSortOnServer:{version:"31.1"},serverSideFilterOnServer:{version:"31.1"},enableCellChangeFlash:{version:"31.2",message:"Use `enableCellChangeFlash` in the `ColDef` or `defaultColDef` for all columns."},groupIncludeFooter:{version:"31.3",message:"Use `groupTotalRow` instead."},groupIncludeTotalFooter:{version:"31.3",message:"Use `grandTotalRow` instead."}},validations:Vp},Y=class{constructor(){this.destroyed=!1,this.domDataKey="__AG_"+Math.random().toString(),this.propertyEventService=new et,this.globalEventHandlerFactory=e=>(i,t)=>{if(this.destroyed)return;const s=go.has(i);if(s&&!e||!s&&e)return;const o=Pr.getCallbackForEvent(i),r=this.gridOptions[o];"function"==typeof r&&this.frameworkOverrides.wrapOutgoing(()=>{r(t)})}}get context(){return this.gridOptions.context}init(){this.columnApi=new li(this.api);const e=!this.get("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),e),this.eventService.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propertyEventService.setFrameworkOverrides(this.frameworkOverrides),this.getScrollbarWidth()}destroy(){this.destroyed=!0,this.columnApi=void 0}get(e){var i;return null!=(i=this.gridOptions[e])?i:_p[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return y(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(t=>{const s=t;return s.api=this.api,s.columnApi=this.columnApi,s.context=this.context,e(s)})}static toBoolean(e){return"boolean"==typeof e?e:"string"==typeof e&&("TRUE"===e.toUpperCase()||""==e)}static toNumber(e){if("number"==typeof e)return e;if("string"==typeof e){const i=parseInt(e);return isNaN(i)?void 0:i}}static toConstrainedNum(e,i){return t=>{const s=Y.toNumber(t);if(!(null==s||s<e||s>i))return s}}static getCoercedValue(e,i){const t=Y.PROPERTY_COERCIONS.get(e);return t?t(i):i}static getCoercedGridOptions(e){const i={};return Object.entries(e).forEach(([t,s])=>{const o=Y.getCoercedValue(t,s);i[t]=o}),i}updateGridOptions({options:e,force:i,source:t="api"}){const s={id:Y.changeSetId++,properties:[]},o=[];Object.entries(e).forEach(([r,n])=>{"api"===t&&_u[r]&&O(`${r} is an initial property and cannot be updated.`);const l=Y.getCoercedValue(r,n),u=this.gridOptions[r];(i||"object"==typeof l&&"api"===t||u!==l)&&(this.gridOptions[r]=l,o.push({type:r,currentValue:l,previousValue:u,changeSet:s,source:t}))}),this.validationService.processGridOptions(this.gridOptions),s.properties=o.map(r=>r.type),o.forEach(r=>{this.gridOptions.debug&&console.log(`AG Grid: Updated property ${r.type} from `,r.previousValue," to ",r.currentValue),this.propertyEventService.dispatchEvent(r)})}addEventListener(e,i){this.propertyEventService.addEventListener(e,i)}removeEventListener(e,i){this.propertyEventService.removeEventListener(e,i)}getScrollbarWidth(){if(null==this.scrollbarWidth){const i="number"==typeof this.gridOptions.scrollbarWidth&&this.gridOptions.scrollbarWidth>=0?this.gridOptions.scrollbarWidth:ta();null!=i&&(this.scrollbarWidth=i,this.eventService.dispatchEvent({type:g.EVENT_SCROLLBAR_WIDTH_CHANGED}))}return this.scrollbarWidth}isRowModelType(e){return this.gridOptions.rowModelType===e||"clientSide"===e&&_(this.gridOptions.rowModelType)}isDomLayout(e){var i;return(null!=(i=this.gridOptions.domLayout)?i:"normal")===e}isRowSelection(){return"single"===this.gridOptions.rowSelection||"multiple"===this.gridOptions.rowSelection}useAsyncEvents(){return!this.get("suppressAsyncEvents")}isGetRowHeightFunction(){return"function"==typeof this.gridOptions.getRowHeight}getRowHeightForNode(e,i=!1,t){if(null==t&&(t=this.environment.getDefaultRowHeight()),this.isGetRowHeightFunction()){if
1(i)return{height:t,estimated:!0};const o={node:e,data:e.data},r=this.getCallback("getRowHeight")(o);if(this.isNumeric(r))return 0===r&&O("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,r),estimated:!1}}return e.detail&&this.get("masterDetail")?this.getMasterDetailRowHeight():{height:this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:t,estimated:!1}}getMasterDetailRowHeight(){return this.get("detailRowAutoHeight")?{height:1,estimated:!1}:this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1}}getRowHeightAsNumber(){if(!this.gridOptions.rowHeight||_(this.gridOptions.rowHeight))return this.environment.getDefaultRowHeight();const e=this.environment.refreshRowHeightVariable();return-1!==e?e:(console.warn("AG Grid row height must be a number if not using standard row model"),this.environment.getDefaultRowHeight())}isNumeric(e){return!isNaN(e)&&"number"==typeof e&&isFinite(e)}getDomDataKey(){return this.domDataKey}getDomData(e,i){const t=e[this.getDomDataKey()];return t?t[i]:void 0}setDomData(e,i,t){const s=this.getDomDataKey();let o=e[s];_(o)&&(o={},e[s]=o),o[i]=t}getDocument(){let e=null;return this.gridOptions.getDocument&&y(this.gridOptions.getDocument)?e=this.gridOptions.getDocument():this.eGridDiv&&(e=this.eGridDiv.ownerDocument),e&&y(e)?e:document}getWindow(){return this.getDocument().defaultView||window}getRootNode(){return this.eGridDiv.getRootNode()}getActiveDomElement(){return this.getRootNode().activeElement}getAsyncTransactionWaitMillis(){return y(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:50}isAnimateRows(){return!this.get("ensureDomOrder")&&this.get("animateRows")}isGroupRowsSticky(){return!(this.get("paginateChildRows")||this.get("groupHideOpenParents")||this.isDomLayout("print"))}isColumnsSortingCoupledToGroup(){const e=this.gridOptions.autoGroupColumnDef;return!e?.comparator&&!this.get("treeData")}getGroupAggFiltering(){const e=this.gridOptions.groupAggFiltering;return"function"==typeof e?this.getCallback("groupAggFiltering"):!0===e?()=>!0:void 0}getGrandTotalRow(){return this.gridOptions.grandTotalRow||(this.gridOptions.groupIncludeTotalFooter?"bottom":void 0)}getGroupTotalRowCallback(){const e=this.get("groupTotalRow");if("function"==typeof e)return this.getCallback("groupTotalRow");if(e)return()=>e;const i=this.get("groupIncludeFooter");if("function"==typeof i){const t=this.getCallback("groupIncludeFooter");return s=>t(s)?"bottom":void 0}return()=>i?"bottom":void 0}isGroupMultiAutoColumn(){return this.gridOptions.groupDisplayType?"multipleColumns"===this.gridOptions.groupDisplayType:this.get("groupHideOpenParents")}isGroupUseEntireRow(e){return!e&&"groupRows"===this.gridOptions.groupDisplayType}getGridCommonParams(){return{api:this.api,columnApi:this.columnApi,context:this.context}}addGridCommonParams(e){const i=e;return i.api=this.api,i.columnApi=this.columnApi,i.context=this.context,i}};Y.PROPERTY_COERCIONS=new Map([...hs.BOOLEAN_PROPERTIES.map(e=>[e,Y.toBoolean]),...hs.NUMBER_PROPERTIES.map(e=>[e,Y.toNumber]),["groupAggFiltering",e=>"function"==typeof e?e:Y.toBoolean(e)],["pageSize",Y.toConstrainedNum(1,Number.MAX_VALUE)],["autoSizePadding",Y.toConstrainedNum(0,Number.MAX_VALUE)],["keepDetailRowsCount",Y.toConstrainedNum(1,Number.MAX_VALUE)],["rowBuffer",Y.toConstrainedNum(0,Number.MAX_VALUE)],["infiniteInitialRowCount",Y.toConstrainedNum(1,Number.MAX_VALUE)],["cacheOverflowSize",Y.toConstrainedNum(1,Number.MAX_VALUE)],["cacheBlockSize",Y.toConstrainedNum(1,Number.MAX_VALUE)],["serverSideInitialRowCount",Y.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelPageSize",Y.toConstrainedNum(1,Number.MAX_VALUE)],["viewportRowModelBufferSize",Y.toConstrainedNum(0,Number.MAX_VALUE)]]),Y.changeSetId=0,d([p("gridOptions")],Y.prototype,"gridOptions",2),d([p("eventService")],Y.prototype,"eventService",2),d([p("environment")],Y.prototype,"environment",2),d([p("frameworkOverrides")],Y.prototype,"frameworkOverrides",2),d([p("eGridDiv")],Y.prototype,"eGridDiv",2),d([p("val
1idationService")],Y.prototype,"validationService",2),d([p("gridApi")],Y.prototype,"api",2),d([T],Y.prototype,"init",1),d([ye],Y.prototype,"destroy",1),Y=d([I("gridOptionsService")],Y);var Jn=class extends b{getLocaleTextFunc(){const e=this.gos.getCallback("getLocaleText");if(e)return(t,s,o)=>e({key:t,defaultValue:s,variableValues:o});const i=this.gos.get("localeText");return(t,s,o)=>{let r=i&&i[t];if(r&&o&&o.length){let n=0;for(;!(n>=o.length||-1===r.indexOf("${variable}"));)r=r.replace("${variable}",o[n++])}return r??s}}};Jn=d([I("localeService")],Jn);var yd=(()=>{let e=class pu extends ui{constructor(){super(pu.TEMPLATE,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Ho(this.eContainer)),this.ctrlsService.register("fakeVScrollComp",this),this.addManagedListener(this.eventService,g.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onRowContainerHeightChanged.bind(this))}setScrollVisible(){const t=this.scrollVisibleService.isVerticalScrollShowing(),s=this.invisibleScrollbar,o=t&&this.gos.getScrollbarWidth()||0,r=0===o&&s?16:o;this.addOrRemoveCssClass("ag-scrollbar-invisible",s),Ye(this.getGui(),r),Ye(this.eViewport,r),Ye(this.eContainer,r),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(){const{ctrlsService:t}=this,o=t.getGridBodyCtrl().getBodyViewportElement(),r=this.getScrollPosition(),n=o.scrollTop;r!=n&&this.setScrollPosition(n,!0)}getScrollPosition(){return this.getViewport().scrollTop}setScrollPosition(t,s){!s&&!Ie(this.getViewport())&&this.attemptSettingScrollPosition(t),this.getViewport().scrollTop=t}};return e.TEMPLATE='<div class="ag-body-vertical-scroll" aria-hidden="true">\n <div class="ag-body-vertical-scroll-viewport" ref="eViewport">\n <div class="ag-body-vertical-scroll-container" ref="eContainer"></div>\n </div>\n </div>',e})();d([T],yd.prototype,"postConstruct",1);var kp=yd,Rd={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Dd=["january","february","march","april","may","june","july","august","september","october","november","december"],hi=class extends b{constructor(){super(...arguments),this.dataTypeDefinitions={},this.isWaitingForRowData=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}init(){this.groupHideOpenParents=this.gos.get("groupHideOpenParents"),this.addManagedPropertyListener("groupHideOpenParents",()=>{this.groupHideOpenParents=this.gos.get("groupHideOpenParents")}),this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.columnModel.recreateColumnDefs(yi(e.source))})}processDataTypeDefinitions(){var e;const i=this.getDefaultDataTypes();this.dataTypeDefinitions={},Object.entries(i).forEach(([s,o])=>{this.dataTypeDefinitions[s]=x(M({},o),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(o)})});const t=null!=(e=this.gos.get("dataTypeDefinitions"))?e:{};this.dataTypeMatchers={},Object.entries(t).forEach(([s,o])=>{const r=this.processDataTypeDefinition(o,t,[s],i);r&&(this.dataTypeDefinitions[s]=r,o.dataTypeMatcher&&(this.dataTypeMatchers[s]=o.dataTypeMatcher))}),this.checkObjectValueHandlers(i),["dateString","text","number","boolean","date"].forEach(s=>{const o=this.dataTypeMatchers[s];o&&delete this.dataTypeMatchers[s],this.dataTypeMatchers[s]=o??i[s].dataTypeMatcher})}mergeDataTypeDefinitions(e,i){const t=M(M({},e),i);return e.columnTypes&&i.columnTypes&&i.appendColumnTypes&&(t.columnTypes=[...this.convertColumnTypes(e.columnTypes),...this.convertColumnTypes(i.columnTypes)]),t}processDataTypeDefinition(e,i,t,s){let o;const r=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let n=s[r];const l=i[r];if(n&&l&&(n=l),!this.validateDataTypeDefinition(e,n,r))return;o=this.mergeDataTypeDefinitions(n,e)}else{if(t.includes(r))return void O('Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.');const n=i[r];if(!this.validateDataTypeDefinition(e,n,r))return;const l=this.processDataTypeDefinition(n,i,[...t,r],s);if(!l)return;o=this.mergeDataTypeDefinitions(l,e)}return x(M({},o),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(o)})}validateDataTypeDefinition(e,i,t){return i?i.baseDataType===e.baseDataType||(O('The "baseDataType" property of a data type definition must match that of its parent.'),!1):(O(`The data type definition ${t} does not exist.`),!1)}createGroupSafeValueFormatter(e){if(e.valueFormatter)return i=>{var t,s;if(null!=(t=i.node)&&t.group){const o=i.column.getAggFunc();if(o){if("first"===o||"last"===o)return e.valueFormatter(i);if("number"===e.baseDataType&&"count"!==o){if("number"==typeof i.value)return e.valueFormatter(i);if("object"==typeof i.value){if(!i.value)return;if("toNumber"in i.value)return e.valueFormatter(x(M({},i),{value:i.value.toNumber()}));if("value"in i.value)return e.valueFormatter(x(M({},i),{value:i.value.value}))}}}if(!this.gos.get("suppressGroupMaintainValueType"))return}else if(this.groupHideOpenParents&&i.column.isRowGroupActive()){if("string"!=typeof i.value||null!=(s=e.dataTypeMatcher)&&s.call(e,i.value))return e.valueFormatter(i);if(!this.gos.get("suppressGroupMaintainValueType"))return}return e.valueFormatter(i)}}updateColDefAndGetDataTypeDefinitionColumnType(e,i,t){let{cellDataType:s}=i;const{field:o}=i;if(void 0===s&&(s=e.cellDataType),(null==s||!0===s)&&(s=!!this.canInferCellDataType(e,i)&&this.inferCellDataType(o,t)),!s)return void(e.cellDataType=!1);const r=this.dataTypeDefinitions[s];if(r)return e.cellDataType=s,r.groupSafeValueFormatter&&(e.valueFormatter=r.groupSafeValueFormatter),r.valueParser&&(e.valueParser=r.valueParser),r.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,r,t),r.columnTypes;O(`Missing data type definition - "${s}"`)}updateColDefAndGetColumnType(e,i,t){var s,o;const r=this.updateColDefAndGetDataTypeDefinitionColumnType(e,i,t),n=null!=(o=null!=(s=i.type)?s:r)?o:e.type;return e.type=n,n?this.convertColumnTypes(n):void 0}
1addColumnListeners(e){if(!this.isWaitingForRowData)return;const i=this.columnStateUpdatesPendingInference[e.getColId()];if(!i)return;const t=s=>{i.add(s.key)};e.addEventListener(Z.EVENT_STATE_UPDATED,t),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.removeEventListener(Z.EVENT_STATE_UPDATED,t))}canInferCellDataType(e,i){var t;if("clientSide"!==this.rowModel.getType())return!1;const s={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(this.doColDefPropsPreventInference(i,s))return!1;const o=null===i.type?e.type:i.type;if(o){const r=null!=(t=this.gos.get("columnTypes"))?t:{};if(this.convertColumnTypes(o).some(l=>{const a=r[l.trim()];return a&&this.doColDefPropsPreventInference(a,s)}))return!1}return!this.doColDefPropsPreventInference(e,s)}doColDefPropsPreventInference(e,i){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([t,s])=>this.doesColDefPropPreventInference(e,i,t,s))}doesColDefPropPreventInference(e,i,t,s){if(!i[t])return!1;const o=e[t];return null===o?(i[t]=!1,!1):void 0===s?!!o:o===s}inferCellDataType(e,i){var t;if(!e)return;let s;const o=this.getInitialData();if(o){const n=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");s=vi(o,e,n)}else this.initWaitForRowData(i);if(null==s)return;const[r]=null!=(t=Object.entries(this.dataTypeMatchers).find(([n,l])=>l(s)))?t:["object"];return r}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const i=this.rowModel.getRootNode().allLeafChildren;if(i?.length)return i[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isWaitingForRowData)return;this.isWaitingForRowData=!0;const i=this.isColumnTypeOverrideInDataTypeDefinitions;i&&this.columnModel.queueResizeOperations();const t=this.addManagedListener(this.eventService,g.EVENT_ROW_DATA_UPDATE_STARTED,s=>{const{firstRowData:o}=s;o&&(t?.(),this.isWaitingForRowData=!1,this.processColumnsPendingInference(o,i),this.columnStateUpdatesPendingInference={},i&&this.columnModel.processResizeOperations(),this.eventService.dispatchEvent({type:g.EVENT_DATA_TYPES_INFERRED}))})}isPendingInference(){return this.isWaitingForRowData}processColumnsPendingInference(e,i){this.initialData=e;const t=[];this.columnStateUpdateListenerDestroyFuncs.forEach(r=>r()),this.columnStateUpdateListenerDestroyFuncs=[];const s={},o={};Object.entries(this.columnStateUpdatesPendingInference).forEach(([r,n])=>{const l=this.columnModel.getGridColumn(r);if(!l)return;const a=l.getColDef();if(!this.columnModel.resetColumnDefIntoColumn(l,"cellDataTypeInferred"))return;const u=l.getColDef();if(i&&u.type&&u.type!==a.type){const h=this.getUpdatedColumnState(l,n);h.rowGroup&&null==h.rowGroupIndex&&(s[r]=h),h.pivot&&null==h.pivotIndex&&(o[r]=h),t.push(h)}}),i&&t.push(...this.columnModel.generateColumnStateForRowGroupAndPivotIndexes(s,o)),t.length&&this.columnModel.applyColumnState({state:t},"cellDataTypeInferred"),this.initialData=null}getUpdatedColumnState(e,i){const t=this.columnModel.getColumnStateFromColDef(e);return i.forEach(s=>{delete t[s],"rowGroup"===s?delete t.rowGroupIndex:"pivot"===s&&delete t.pivotIndex}),t}checkObjectValueHandlers(e){const i=this.dataTypeDefinitions.object,t=e.object;this.hasObjectValueParser=i.valueParser!==t.valueParser,this.hasObjectValueFormatter=i.valueFormatter!==t.valueFormatter}convertColumnTypes(e){let i=[];return e instanceof Array?e.some(s=>"string"!=typeof s)?console.warn("if colDef.type is supplied an array it should be of type 'string[]'"):i=e:"string"==typeof e?i=e.split(","):console.warn("colDef.type should be of type 'string' | 'string[]'"),i}getDateStringTypeDefinition(e){var i;return e&&null!=(i=this.getDataTypeDefinition(e))?i:this.dataTypeDefinitions.dateString}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){const i=e.getColDef();if(i.cellDataType)return this.dataTypeDefinitions[i.cellDataType]}getBaseDataType(e){var i;return null==(i=this.getDataTypeDefinition(e))?void 0:i.baseDataType}checkType(e,i){var t;if(null==i)return!0;const s=null==(t=this.getDataTypeDefinition(e))?void 0:t.dataTypeMatcher;return!s||s(i)}validateColDef(e){"object"===e.cellDataType&&(e.valueFormatter===this.dataTypeDefinitions.object.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&O('Cell data type is "object" but no value formatter has been provided. Please either provide an object data type definition with a value formatter, or set "colDef.valueFormatter"'),e.editable&&e.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser&&O('Cell data type is "object" but no value parser has been provided. Please either provide an object data type definition with a value parser, or set "colDef.valueParser"'))}setColDefPropertiesForBaseDataType(e,i,t){const s=(l,a,u)=>{let h=l.getColDef().valueFormatter;return h===i.groupSafeValueFormatter&&(h=i.valueFormatter),this.valueService.formatValue(l,a,u,h)},o=j.__isRegistered("@ag-grid-enterprise/set-filter",this.context.getGridId()),r=this.localeService.getLocaleTextFunc(),n=l=>{const{filterParams:a}=e;e.filterParams="object"==typeof a?M(M({},a),l):l};switch(i.baseDataType){case"number":e.cellEditor="agNumberCellEditor",o&&n({comparator:(l,a)=>{const u=null==l?0:parseInt(l),h=null==a?0:parseInt(a);return u===h?0:u>h?1:-1}});break;case"boolean":e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.suppressKeyboardEvent=l=>!!l.colDef.editable&&l.event.key===v.SPACE,n(o?{valueFormatter:l=>y(l.value)?r(String(l.value),l.value?"True":"False"):r("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(l,a)=>a,numberOfInputs:0}
1,{displayKey:"false",displayName:"False",predicate:(l,a)=>!1===a,numberOfInputs:0}]});break;case"date":e.cellEditor="agDateCellEditor",e.keyCreator=l=>s(l.column,l.node,l.value),o&&n({valueFormatter:l=>{const a=s(l.column,l.node,l.value);return y(a)?a:r("blanks","(Blanks)")},treeList:!0,treeListFormatter:(l,a)=>{if(1===a&&null!=l){const u=Dd[Number(l)-1];return r(u,Rd[u])}return l??r("blanks","(Blanks)")}});break;case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=a=>s(a.column,a.node,a.value);const l=i.dateParser;n(o?{valueFormatter:a=>{const u=s(a.column,a.node,a.value);return y(u)?u:r("blanks","(Blanks)")},treeList:!0,treeListPathGetter:a=>{const u=l(a??void 0);return u?[String(u.getFullYear()),String(u.getMonth()+1),String(u.getDate())]:null},treeListFormatter:(a,u)=>{if(1===u&&null!=a){const h=Dd[Number(a)-1];return r(h,Rd[h])}return a??r("blanks","(Blanks)")}}:{comparator:(a,u)=>{const h=l(u);return null==u||h<a?-1:h>a?1:0}});break}case"object":e.cellEditorParams={useFormatter:!0},e.comparator=(l,a)=>{const u=this.columnModel.getPrimaryColumn(t),h=u?.getColDef();if(!u||!h)return 0;const c=null==l?"":s(u,null,l),f=null==a?"":s(u,null,a);return c===f?0:c>f?1:-1},e.keyCreator=l=>s(l.column,l.node,l.value),o?n({valueFormatter:l=>{const a=s(l.column,l.node,l.value);return y(a)?a:r("blanks","(Blanks)")}}):e.filterValueGetter=l=>s(l.column,l.node,this.valueService.getValue(l.column,l.node))}}getDefaultDataTypes(){const e=t=>!!t.match("^\\d{4}-\\d{2}-\\d{2}$"),i=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>{var s,o;return""===(null==(o=null==(s=t.newValue)?void 0:s.trim)?void 0:o.call(s))?null:Number(t.newValue)},valueFormatter:t=>null==t.value?"":"number"!=typeof t.value||isNaN(t.value)?i("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>"number"==typeof t},text:{baseDataType:"text",valueParser:t=>""===t.newValue?null:ls(t.newValue),dataTypeMatcher:t=>"string"==typeof t},boolean:{baseDataType:"boolean",valueParser:t=>{var s,o;return null==t.newValue?t.newValue:""===(null==(o=null==(s=t.newValue)?void 0:s.trim)?void 0:o.call(s))?null:"true"===String(t.newValue).toLowerCase()},valueFormatter:t=>null==t.value?"":String(t.value),dataTypeMatcher:t=>"boolean"==typeof t},date:{baseDataType:"date",valueParser:t=>Me(null==t.newValue?null:String(t.newValue)),valueFormatter:t=>{var s;return null==t.value?"":t.value instanceof Date&&!isNaN(t.value.getTime())?null!=(s=$e(t.value,!1))?s:"":i("invalidDate","Invalid Date")},dataTypeMatcher:t=>t instanceof Date},dateString:{baseDataType:"dateString",dateParser:t=>{var s;return null!=(s=Me(t))?s:void 0},dateFormatter:t=>{var s;return null!=(s=$e(t??null,!1))?s:void 0},valueParser:t=>e(String(t.newValue))?t.newValue:null,valueFormatter:t=>e(String(t.value))?t.value:"",dataTypeMatcher:t=>"string"==typeof t&&e(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>{var s;return null!=(s=ls(t.value))?s:""}}}}};d([p("rowModel")],hi.prototype,"rowModel",2),d([p("columnModel")],hi.prototype,"columnModel",2),d([p("valueService")],hi.prototype,"valueService",2),d([T],hi.prototype,"init",1),hi=d([I("dataTypeService")],hi);var ci=class extends b{constructor(){super(...arguments),this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.ctrlsService.whenReady(()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){this.columnModel.setColumnDefs(e??[],"gridInitializing"),this.rowModel.start()}gridReady(){this.dispatchGridReadyEvent();const e=j.__isRegistered("@ag-grid-enterprise/core",this.context.getGridId());new Un("AG Grid",()=>this.gos.get("debug")).log(`initialised successfully, enterprise = ${e}`)}dispatchGridReadyEvent(){this.eventService.dispatchEvent({type:g.EVENT_GRID_READY})}setColumnDefs(e){const i=this.gos.get("columnDefs");if(i){if(this.waitingForColumns)return this.waitingForColumns=!1,void this.setColumnsAndData(i);this.columnModel.setColumnDefs(i,yi(e.source))}}};d([p("ctrlsService")],ci.prototype,"ctrlsService",2),d([p("columnModel")],ci.prototype,"columnModel",2),d([p("rowModel")],ci.prototype,"rowModel",2),d([T],ci.prototype,"postConstruct",1),ci=d([I("syncService")],ci);var pi=class extends b{constructor(){super(...arguments),this.manuallyDisplayed=!1}postConstruct(){this.addManagedListener(this.eventService,g.EVENT_ROW_DATA_UPDATED,(
1)=>this.onRowDataUpdated()),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.onNewColumnsLoaded())}registerOverlayWrapperComp(e){this.overlayWrapperComp=e,(!this.gos.get("columnDefs")||this.gos.isRowModelType("clientSide")&&!this.gos.get("rowData"))&&this.showLoadingOverlay()}showLoadingOverlay(){if(this.gos.get("suppressLoadingOverlay"))return;const i=this.userComponentFactory.getLoadingOverlayCompDetails({});this.showOverlay(i,"ag-overlay-loading-wrapper","loadingOverlayComponentParams")}showNoRowsOverlay(){if(this.gos.get("suppressNoRowsOverlay"))return;const i=this.userComponentFactory.getNoRowsOverlayCompDetails({});this.showOverlay(i,"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams")}showOverlay(e,i,t){const s=e.newAgStackInstance(),o=this.addManagedPropertyListener(t,({currentValue:r})=>{s.then(n=>{n.refresh&&n.refresh(this.gos.addGridCommonParams(M({},r??{})))})});this.manuallyDisplayed=this.columnModel.isReady()&&!this.paginationProxy.isEmpty(),this.overlayWrapperComp.showOverlay(s,i,o)}hideOverlay(){this.manuallyDisplayed=!1,this.overlayWrapperComp.hideOverlay()}showOrHideOverlay(){const e=this.paginationProxy.isEmpty(),i=this.gos.get("suppressNoRowsOverlay");e&&!i?this.showNoRowsOverlay():this.hideOverlay()}onRowDataUpdated(){this.showOrHideOverlay()}onNewColumnsLoaded(){this.columnModel.isReady()&&!this.paginationProxy.isEmpty()&&!this.manuallyDisplayed&&this.hideOverlay()}};d([p("userComponentFactory")],pi.prototype,"userComponentFactory",2),d([p("paginationProxy")],pi.prototype,"paginationProxy",2),d([p("columnModel")],pi.prototype,"columnModel",2),d([T],pi.prototype,"postConstruct",1),pi=d([I("overlayService")],pi);var be=class extends b{constructor(){super(...arguments),this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Ee(()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=Ee(()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),0),this.onRowSelectedDebounced=Ee(()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){var e;this.isClientSideRowModel="clientSide"===this.rowModel.getType(),this.cachedState=null!=(e=this.gos.get("initialState"))?e:{},this.ctrlsService.whenReady(()=>this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnGridReady()));const i=this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,({source:o})=>{"gridInitializing"===o&&(i?.(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnColumnsInitialised()))}),t=this.addManagedListener(this.eventService,g.EVENT_ROW_COUNT_READY,()=>{t?.(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnRowCountReady())}),s=this.addManagedListener(this.eventService,g.EVENT_FIRST_DATA_RENDERED,()=>{s?.(),this.suppressEventsAndDispatchInitEvent(()=>this.setupStateOnFirstDataRendered())})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){this.updateCachedState("sideBar",this.getSideBarState()),this.addManagedListener(this.eventService,g.EVENT_TOOL_PANEL_VISIBLE_CHANGED,()=>this.updateCachedState("sideBar",this.getSideBarState())),this.addManagedListener(this.eventService,g.EVENT_SIDE_BAR_UPDATED,()=>this.updateCachedState("sideBar",this.getSideBarState()))}setupStateOnColumnsInitialised(){var e;const i=null!=(e=this.gos.get("initialState"))?e:{};this.setColumnState(i),this.setColumnGroupState(i),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState()),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,()=>this.updateColumnState(["aggregation"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_MOVED,()=>this.updateColumnState(["columnOrder"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PINNED,()=>this.updateColumnState(["columnPinning"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_RESIZED,()=>this.updateColumnState(["columnSizing"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VISIBLE,()=>this.updateColumnState(["columnVisibility"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,(
1)=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,()=>this.updateColumnState(["pivot"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,()=>this.updateColumnState(["rowGroup"])),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,()=>this.updateColumnState(["sort"])),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"])),this.addManagedListener(this.eventService,g.EVENT_COLUMN_GROUP_OPENED,()=>this.updateCachedState("columnGroup",this.getColumnGroupState()))}setupStateOnRowCountReady(){var e;const{filter:i,rowGroupExpansion:t,rowSelection:s,pagination:o}=null!=(e=this.gos.get("initialState"))?e:{},r=this.gos.get("advancedFilterModel");(i||r)&&this.setFilterState(i,r),t&&this.setRowGroupExpansionState(t),s&&this.setRowSelectionState(s),o&&this.setPaginationState(o),this.updateCachedState("filter",this.getFilterState()),this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowSelection",this.getRowSelectionState()),this.updateCachedState("pagination",this.getPaginationState()),this.addManagedListener(this.eventService,g.EVENT_FILTER_CHANGED,(
1)=>this.updateCachedState("filter",this.getFilterState())),this.addManagedListener(this.eventService,g.EVENT_ROW_GROUP_OPENED,()=>this.onRowGroupOpenedDebounced()),this.addManagedListener(this.eventService,g.EVENT_EXPAND_COLLAPSE_ALL,()=>this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())),this.addManagedListener(this.eventService,g.EVENT_SELECTION_CHANGED,()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()}),this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,n=>{(n.newPage||n.newPageSize)&&this.updateCachedState("pagination",this.getPaginationState())})}setupStateOnFirstDataRendered(){var e;const{scroll:i,rangeSelection:t,focusedCell:s,columnOrder:o}=null!=(e=this.gos.get("initialState"))?e:{};s&&this.setFocusedCellState(s),t&&this.setRangeSelectionState(t),i&&this.setScrollState(i),this.setColumnPivotState(!!o?.orderedColIds),this.updateCachedState("sideBar",this.getSideBarState()),this.updateCachedState("focusedCell",this.getFocusedCellState()),this.updateCachedState("rangeSelection",this.getRangeSelectionState()),this.updateCachedState("scroll",this.getScrollState()),this.addManagedListener(this.eventService,g.EVENT_CELL_FOCUSED,()=>this.updateCachedState("focusedCell",this.getFocusedCellState())),this.addManagedListener(this.eventService,g.EVENT_RANGE_SELECTION_CHANGED,r=>{r.finished&&this.updateCachedState("rangeSelection",this.getRangeSelectionState())}),this.addManagedListener(this.eventService,g.EVENT_BODY_SCROLL_END,()=>this.updateCachedState("scroll",this.getScrollState()))}getColumnState(){const e=this.columnModel.isPivotMode(),i=[],t=[],s=[],o=[],r=[],n=[],l=[],a=[],u=[],h=this.columnModel.getColumnState();for(let c=0;c<h.length;c++){const{colId:f,sort:m,sortIndex:C,rowGroup:w,rowGroupIndex:S,aggFunc:R,pivot:E,pivotIndex:A,pinned:P,hide:L,width:G,flex:N}=h[c];u.push(f),m&&(i[C??0]={colId:f,sort:m}),w&&(t[S??0]=f),"string"==typeof R&&s.push({colId:f,aggFunc:R}),E&&(o[A??0]=f),P&&("right"===P?n:r).push(f),L&&l.push(f),(N||G)&&a.push({colId:f,flex:N??void 0,width:G})}return{sort:i.length?{sortModel:i}:void 0,rowGroup:t.length?{groupColIds:t}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:o.length||e?{pivotMode:e,pivotColIds:o}:void 0,columnPinning:r.length||n.length?{leftColIds:r,rightColIds:n}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:a.length?{columnSizingModel:a}:void 0,columnOrder:u.length?{orderedColIds:u}:void 0}}setColumnState(e){const{sort:i,rowGroup:t,aggregation:s,pivot:o,columnPinning:r,columnVisibility:n,columnSizing:l,columnOrder:a}=e,u={},h=C=>{let w=u[C];return w||(w={colId:C},u[C]=w,w)};i&&i.sortModel.forEach(({colId:C,sort:w},S)=>{const R=h(C);R.sort=w,R.sortIndex=S}),t&&t.groupColIds.forEach((C,w)=>{const S=h(C);S.rowGroup=!0,S.rowGroupIndex=w}),s&&s.aggregationModel.forEach(({colId:C,aggFunc:w})=>{h(C).aggFunc=w}),o&&(o.pivotColIds.forEach((C,w)=>{const S=h(C);S.pivot=!0,S.pivotIndex=w}),this.gos.updateGridOptions({options:{pivotMode:o.pivotMode},source:"gridInitializing"})),r&&(r.leftColIds.forEach(C=>{h(C).pinned="left"}),r.rightColIds.forEach(C=>{h(C).pinned="right"})),n&&n.hiddenColIds.forEach(C=>{h(C).hide=!0}),l&&l.columnSizingModel.forEach(({colId:C,flex:w,width:S})=>{const R=h(C);R.flex=w??null,R.width=S});const c=a?.orderedColIds,f=!!c?.length,m=f?c.map(C=>h(C)):Object.values(u);m.length&&(this.columnStates=m,this.columnModel.applyColumnState({state:m,applyOrder:f,defaultState:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null}},"gridInitializing"))}setColumnPivotState(e){const i=this.columnStates;this.columnStates=void 0;const t=this.columnGroupStates;if(this.columnGroupStates=void 0,this.columnModel.isSecondaryColumnsPresent()){if(i){let s=[];for(const o of i)this.columnModel.getSecondaryColumn(o.colId)&&s.push(o);this.columnModel.applyColumnState({state:s,applyOrder:e},"gridInitializing")}t&&this.columnModel.setColumnGroupState(t,"gridInitializing")}}getColumnGroupState(){const e=this.columnModel.getColumnGroupState(),i=[];return e.forEach(({groupId:t,open:s})=>{s&&i.push(t)}),i.length?{openColumnGroupIds:i}:void 0}setColumnGroupState(e){var i;if(!e.hasOwnProperty("columnGroup"))return;const t=new Set(null==(i=e.columnGroup)?void 0:i.openColumnGroupIds),o=this.columnModel.getColumnGroupState().map(({groupId:r})=>{const n=t.has(r);return n&&t.delete(r),{groupId:r,open:n}});t.forEach(r=>{o.push({groupId:r,open:!0})}),o.length&&(this.columnGroupStates=o),this.columnModel.setColumnGroupState(o,"gridInitializing")}getFilterState(){var e;let i=this.filterManager.getFilterModel();i&&0===Object.keys(i).length&&(i=void 0);const t=null!=(e=this.filterManager.getAdvancedFilterModel())?e:void 0;return i||t?{filterModel:i,advancedFilterModel:t}:void 0}setFilterState(e,i){const{filterModel:t,advancedFilterModel:s}=e??{advancedFilterModel:i};t&&this.filterManager.setFilterModel(t,"columnFilter"),s&&this.filterManager.setAdvancedFilterModel(s)}getRangeSelectionState(){var e;const i=null==(e=this.rangeService)?void 0:e.getCellRanges().map(t=>{const{id:s,type:o,startRow:r,endRow:n,columns:l,startColumn:a}=t;return{id:s,type:o,startRow:r,endRow:n,colIds:l.map(u=>u.getColId()),startColId:a.getColId()}});return i?.length?{cellRanges:i}:void 0}setRangeSelectionState(e){if(!this.gos.get("enableRangeSelection")||!this.rangeService)return;const i=[];
1e.cellRanges.forEach(t=>{const s=[];if(t.colIds.forEach(r=>{const n=this.columnModel.getGridColumn(r);n&&s.push(n)}),!s.length)return;let o=this.columnModel.getGridColumn(t.startColId);if(!o){const r=this.columnModel.getAllDisplayedColumns(),n=new Set(s);o=r.find(l=>n.has(l))}i.push(x(M({},t),{columns:s,startColumn:o}))}),this.rangeService.setCellRanges(i)}getScrollState(){var e,i,t;if(!this.isClientSideRowModel)return;const s=null==(e=this.ctrlsService.getGridBodyCtrl())?void 0:e.getScrollFeature(),{left:o}=null!=(i=s?.getHScrollPosition())?i:{left:0},{top:r}=null!=(t=s?.getVScrollPosition())?t:{top:0};return r||o?{top:r,left:o}:void 0}setScrollState(e){var i;if(!this.isClientSideRowModel)return;const{top:t,left:s}=e;null==(i=this.ctrlsService.getGridBodyCtrl())||i.getScrollFeature().setScrollPosition(t,s)}getSideBarState(){var e,i;return null==(i=null==(e=this.sideBarService)?void 0:e.getSideBarComp())?void 0:i.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.focusService.getFocusedCell();if(e){const{column:i,rowIndex:t,rowPinned:s}=e;return{colId:i.getColId(),rowIndex:t,rowPinned:s}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{colId:i,rowIndex:t,rowPinned:s}=e;this.focusService.setFocusedCell({column:this.columnModel.getGridColumn(i),rowIndex:t,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const e=this.paginationProxy.getCurrentPage(),i=this.gos.get("paginationAutoPageSize")?void 0:this.paginationProxy.getPageSize();if(e||i)return{page:e,pageSize:i}}setPaginationState(e){e.pageSize&&!this.gos.get("paginationAutoPageSize")&&this.paginationProxy.setPageSize(e.pageSize,"initialState"),"number"==typeof e.page&&this.paginationProxy.setPage(e.page)}getRowSelectionState(){var e;const i=this.selectionService.getSelectionState();return i&&(Array.isArray(i)||!1!==i.selectAll&&!1!==i.selectAllChildren||null!=(e=i?.toggledNodes)&&e.length)?i:void 0}setRowSelectionState(e){this.selectionService.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){const e=this.expansionService.getExpandedRows();return e.length?{expandedRowGroupIds:e}:void 0}setRowGroupExpansionState(e){this.expansionService.expandRows(e.expandedRowGroupIds)}updateColumnState(e){const i=this.getColumnState();let t=!1;Object.entries(i).forEach(([s,o])=>{gr(o,this.cachedState[s])||(t=!0)}),this.cachedState=M(M({},this.cachedState),i),t&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,i){const t=this.cachedState[e];this.setCachedStateValue(e,i),gr(i,t)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,i){this.cachedState=x(M({},this.cachedState),{[e]:i})}refreshStaleState(){this.staleStateKeys.forEach(e=>{"rowSelection"===e&&this.setCachedStateValue(e,this.getRowSelectionState())}),this.staleStateKeys.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(i=>this.queuedUpdateSources.add(i)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){const e=Array.from(this.queuedUpdateSources);this.queuedUpdateSources.clear(),this.eventService.dispatchEvent({type:g.EVENT_STATE_UPDATED,sources:e,state:this.cachedState})}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0,this.columnAnimationService.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.columnAnimationService.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}};d([p("filterManager")],be.prototype,"filterManager",2),d([p("ctrlsService")],be.prototype,"ctrlsService",2),d([p("focusService")],be.prototype,"focusService",2),d([p("columnModel")],be.prototype,"columnModel",2),d([p("paginationProxy")],be.prototype,"paginationProxy",2),d([p("rowModel")],be.prototype,"rowModel",2),d([p("selectionService")],be.prototype,"selectionService",2),d([p("expansionService")],be.prototype,"expansionService",2),d([p("columnAnimationService")],be.prototype,"columnAnimationService",2),d([q("sideBarService")],be.prototype,"sideBarService",2),d([q("rangeService")],be.prototype,"rangeService",2),d([T],be.prototype,"postConstruct",1),be=d([I("stateService")],be);var Ks=class extends b{init(){this.processGridOptions(this.gridOptions)}processGridOptions(e){this.processOptions(e,Hp)}processColumnDefs(e){this.processOptions(e,Zi)}processOptions(e,i){const{validations:t,deprecations:s,allProperties:o,propertyExceptions:r,objectName:n,docsUrl:l}=i;o&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,[...r??[],...Object.keys(s)],o,n,l);const a=new Set;Object.keys(e).forEach(h=>{var c;const f=s[h];if(f)if("renamed"in f){const{renamed:A,version:P}=f;a.add(`As of v${P}, ${String(h)} is deprecated. Please use ${String(A)} instead.`),e[A]=e[h]}else{const{message:A,version:P}=f;a.add(`As of v${P}, ${String(h)} is deprecated. ${A??""}`)}const m=e[h];if(null==m||!1===m)return;const C=t[h];let w;if(!C)return;if("function"==typeof C){const A=C(e,this.gridOptions);if(!A)return;if("objectName"in A){const P=e[h];return Array.isArray(P)?void P.forEach(L=>{this.processOptions(L,A)}):void this.processOptions(e[h],A)}w=A}else w=C;const{module:S,dependencies:R,supportedRowModels:E}=w;
1if(E){const A=null!=(c=this.gridOptions.rowModelType)?c:"clientSide";if(!E.includes(A))return void a.add(`${String(h)} is not supported with the '${A}' row model.`)}if(S){const A=Array.isArray(S)?S:[S];let P=!0;if(A.forEach(L=>{j.__assertRegistered(L,String(h),this.context.getGridId())||(P=!1,a.add(`${String(h)} is only available when ${L} is loaded.`))}),!P)return}if(R){const A=this.checkForWarning(h,R,e);if(A)return void a.add(A)}}),a.size>0&&a.forEach(h=>{O(h)})}checkForWarning(e,i,t){if("function"==typeof i)return i(t,this.gridOptions);const o=Object.entries(i).find(([l,a])=>!a.includes(t[l]));if(!o)return null;const[r,n]=o;return n.length>1?`'${String(e)}' requires '${r}' to be one of [${n.join(", ")}].`:`'${String(e)}' requires '${r}' to be ${n[0]}.`}checkProperties(e,i,t,s,o){const n=fa(Object.getOwnPropertyNames(e),["__ob__","__v_skip","__metadata__",...i,...t],t);if(me(n,(l,a)=>{O(`invalid ${s} property '${l}' did you mean any of these: ${a.slice(0,8).join(", ")}`)}),Object.keys(n).length>0&&o){const l=this.getFrameworkOverrides().getDocLink(o);O(`to see all the valid ${s} properties please check: ${l}`)}}};d([p("gridOptions")],Ks.prototype,"gridOptions",2),d([T],Ks.prototype,"init",1),Ks=d([I("validationService")],Ks);var sr=class extends b{constructor(){super(...arguments),this.syncEventListeners=new Map,this.asyncEventListeners=new Map,this.syncGlobalEventListeners=new Set,this.globalEventListenerPairs=new Map}postConstruct(){this.frameworkEventWrappingService=new Er(this.getFrameworkOverrides())}addEventListener(e,i){const t=this.frameworkEventWrappingService.wrap(i),s=this.gos.useAsyncEvents()&&!go.has(e),o=s?this.asyncEventListeners:this.syncEventListeners;o.has(e)||o.set(e,new Set),o.get(e).add(t),this.eventService.addEventListener(e,t,s)}removeEventListener(e,i){var t;const s=this.frameworkEventWrappingService.unwrap(i),o=this.asyncEventListeners.get(e),r=!!o?.delete(s);r||null==(t=this.syncEventListeners.get(e))||t.delete(s),this.eventService.removeEventListener(e,s,r)}addGlobalListener(e){const i=this.frameworkEventWrappingService.wrapGlobal(e);if(this.gos.useAsyncEvents()){const s=(r,n)=>{go.has(r)&&i(r,n)},o=(r,n)=>{go.has(r)||i(r,n)};this.globalEventListenerPairs.set(e,{syncListener:s,asyncListener:o}),this.eventService.addGlobalListener(s,!1),this.eventService.addGlobalListener(o,!0)}else this.syncGlobalEventListeners.add(i),this.eventService.addGlobalListener(i,!1)}removeGlobalListener(e){const i=this.frameworkEventWrappingService.unwrapGlobal(e);if(this.globalEventListenerPairs.has(i)){const{syncListener:s,asyncListener:o}=this.globalEventListenerPairs.get(i);this.eventService.removeGlobalListener(s,!1),this.eventService.removeGlobalListener(o,!0),this.globalEventListenerPairs.delete(e)}else this.syncGlobalEventListeners.delete(i),this.eventService.removeGlobalListener(i,!1)}destroyEventListeners(e,i){e.forEach((t,s)=>{t.forEach(o=>this.eventService.removeEventListener(s,o,i)),t.clear()}),e.clear()}destroyGlobalListeners(e,i){e.forEach(t=>this.eventService.removeGlobalListener(t,i)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncEventListeners,!1),this.destroyEventListeners(this.asyncEventListeners,!0),this.destroyGlobalListeners(this.syncGlobalEventListeners,!1),this.globalEventListenerPairs.forEach(({syncListener:e,asyncListener:i})=>{this.eventService.removeGlobalListener(e,!1),this.eventService.removeGlobalListener(i,!0)}),this.globalEventListenerPairs.clear()}};d([T],sr.prototype,"postConstruct",1),sr=d([I("apiEventService")],sr);var el=class extends V{constructor(){super('<span class="ag-paging-page-size"></span>'),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const i=Number(e);isNaN(i)||i<1||i===this.paginationProxy.getPageSize()||(this.paginationProxy.setPageSize(i,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}init(){this.addManagedPropertyListener("paginationPageSizeSelector",()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedListener(this.eventService,g.EVENT_PAGINATION_CHANGED,e=>this.handlePaginationChanged(e))}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const i=this.paginationProxy.getPageSize();this.getPageSizeSelectorValues().includes(i)?this.selectPageSizeComp.setValue(i.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp&&this.appendChild(this.selectPageSizeComp))}reset(){ne(this.getGui()),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0)}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&!1!==this.gos.get("paginationPageSizeSelector")}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),i=this.paginationProxy.getPageSize(),t=!i||!e.includes(i);t&&(e.unshift(""),O("The paginationPageSize grid option is set to a value that is not in the list of page size options.\n Please make sure that the paginationPageSize grid option is set to one of the values in the \n paginationPageSizeSelector array, or set the paginationPageSizeSelector to false to hide the page size selector.")),this.selectPageSizeComp&&(this.destroyBean(this.selectPageSizeComp),this.selectPageSizeComp=void 0);const s=this.localeService.getLocaleTextFunc(),o=s("pageSizeSelectorLabel","Page Size:"),r=e.map(l=>({value:String(l),text:String(l)}
1)),n=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Po).addOptions(r).setValue(String(t?"":i)).setAriaLabel(n).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.hasEmptyOption=t}getPageSizeSelectorValues(){const i=this.gos.get("paginationPageSizeSelector");return Array.isArray(i)&&this.validateValues(i)?[...i].sort((t,s)=>t-s):[20,50,100]}validateValues(e){if(!e.length)return O("The paginationPageSizeSelector grid option is an empty array. This is most likely a mistake.\n If you want to hide the page size selector, please set the paginationPageSizeSelector to false."),!1;for(let i=0;i<e.length;i++){const t=e[i],o=t>0;if("number"!=typeof t)return O("The paginationPageSizeSelector grid option contains a non-numeric value.\n Please make sure that all values in the paginationPageSizeSelector array are numbers."),!1;if(!o)return O("The paginationPageSizeSelector grid option contains a negative number or zero.\n Please make sure that all values in the paginationPageSizeSelector array are positive."),!1}return!0}destroy(){this.toggleSelectDisplay(!1),super.destroy()}};d([p("paginationProxy")],el.prototype,"paginationProxy",2),d([T],el.prototype,"init",1);var $s=class extends b{constructor(){super(),this.descriptionContainer=null,this.announceValue=Ee(this.announceValue.bind(this),200)}postConstruct(){const e=this.gos.getDocument(),i=this.descriptionContainer=e.createElement("div");i.classList.add("ag-aria-description-container"),Ir(i,"polite"),Wl(i,"additions text"),Bl(i,!0),this.eGridDiv.appendChild(i)}announceValue(e){this.descriptionContainer&&(this.descriptionContainer.textContent="",setTimeout(()=>{this.isAlive()&&this.descriptionContainer&&(this.descriptionContainer.textContent=e)},50))}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(ne(e),e.parentElement&&e.parentElement.removeChild(e)),this.descriptionContainer=null,this.eGridDiv=null}};d([p("eGridDiv")],$s.prototype,"eGridDiv",2),d([T],$s.prototype,"postConstruct",1),$s=d([I("ariaAnnouncementService")],$s);var tl=(()=>{let e=class{};return e.gridOptions=void 0,e})();function Bp(e,i,t){if(!i)return Je("No gridOptions provided to createGrid"),{};const s=(new bd).create(e,i,o=>{const r=new di(e);o.createBean(r)},void 0,t);if(!Object.isFrozen(i)&&!t?.frameworkOverrides){const o="https://ag-grid.com/javascript-data-grid/grid-interface/#grid-api";Object.defineProperty(i,"api",{get:()=>{Je(`gridOptions.api is no longer supported. See ${o}.`)},configurable:!0}),Object.defineProperty(i,"columnApi",{get:()=>{Je(`gridOptions.columnApi is no longer supported and all methods moved to the grid api. See ${o}.`)},configurable:!0})}return s}var Wp=1,bd=class{create(e,i,t,s,o){var r;let n={};tl.gridOptions?(Pe(n,tl.gridOptions,!0,!0),n=M(M({},n),i)):n=i;const l=Y.getCoercedGridOptions(n),a=!!l.debug,u=null!=(r=l.gridId)?r:String(Wp++),h=this.getRegisteredModules(o,u),c=this.createBeansList(l.rowModelType,h,u),f=this.createProvidedBeans(e,l,o);if(!c)return void Je("Failed to create grid.");const m={providedBeanInstances:f,beanClasses:c,debug:a,gridId:u},C=new Un("Context",()=>m.debug),w=new yu(m,C),S=w.getBean("beans");return this.registerModuleUserComponents(S,h),this.registerStackComponents(S,h),this.registerControllers(S,h),t(w),S.syncService.start(),s&&s(w),w.getBean("gridApi")}registerControllers(e,i){i.forEach(t=>{t.controllers&&t.controllers.forEach(s=>e.ctrlsFactory.register(s))})}registerStackComponents(e,i){const t=this.createAgStackComponentsList(i);e.agStackComponentsRegistry.setupComponents(t)}getRegisteredModules(e,i){const t=e?e.modules:null,s=j.__getRegisteredModules(i),o=[],r={},n=(l,a,u)=>{var c;r[(c=a).moduleName]||(r[c.moduleName]=!0,o.push(c),j.__register(c,l,u)),a.dependantModules&&a.dependantModules.forEach(c=>n(l,c,u))};return t&&t.forEach(l=>n(!0,l,i)),s&&s.forEach(l=>n(!j.__isPackageBased(),l,void 0)),o}registerModuleUserComponents(e,i){this.extractModuleEntity(i,s=>s.userComponents?s.userComponents:[]).forEach(s=>{e.userComponentRegistry.registerDefaultComponent(s.componentName,s.componentClass)})}createProvidedBeans(e,i,t){let s=t?t.frameworkOverrides:null;_(s)&&(s=new Cd);const o={gridOptions:i,eGridDiv:e,globalEventListener:t?t.globalEventListener:null,globalSyncEventListener:t?t.globalSyncEventListener:null,frameworkOverrides:s};return t&&t.providedBeanInstances&&Object.assign(o,t.providedBeanInstances),o}createAgStackComponentsList(e){let i=[{componentName:"AgCheckbox",componentClass:Lo},{componentName:"AgRadioButton",componentClass:Ga},{componentName:"AgToggleButton",componentClass:cd},{componentName:"AgInputTextField",componentClass:$t},{componentName:"AgInputTextArea",componentClass:up},{componentName:"AgInputNumberField",componentClass:vn},{componentName:"AgInputDateField",componentClass:hp},{componentName:"AgInputRange",componentClass:cp},{componentName:"AgRichSelect",componentClass:Yo},{componentName:"AgSelect",componentClass:Po},{componentName:"AgSlider",componentClass:gp},{componentName:"AgGridBody",componentClass:nt},{componentName:"AgHeaderRoot",componentClass:sp},{componentName:"AgSortIndicator",componentClass:En},{componentName:"AgPagination",componentClass:xe},{componentName:"AgPageSizeSelector",componentClass:el},{componentName:"AgOverlayWrapper",componentClass:Pp}
1,{componentName:"AgGroupComponent",componentClass:fp},{componentName:"AgRowContainer",componentClass:Oi},{componentName:"AgFakeHorizontalScroll",componentClass:Mp},{componentName:"AgFakeVerticalScroll",componentClass:kp},{componentName:"AgAutocomplete",componentClass:Ep}];const t=this.extractModuleEntity(e,s=>s.agStackComponents?s.agStackComponents:[]);return i=i.concat(t),i}createBeansList(e="clientSide",i,t){const s=i.filter(a=>!a.rowModel||a.rowModel===e),o={clientSide:"@ag-grid-community/client-side-row-model",infinite:"@ag-grid-community/infinite-row-model",serverSide:"@ag-grid-enterprise/server-side-row-model",viewport:"@ag-grid-enterprise/viewport-row-model"};if(!o[e])return void Je("Could not find row model for rowModelType = "+e);if(!j.__assertRegistered(o[e],`rowModelType = '${e}'`,t))return;const r=[H,ji,qn,Ws,zi,W,xo,er,Hs,On,Mt,$i,Fs,Jn,Ks,Is,ys,Fr,et,Y,oi,ni,qe,pe,ti,Gs,We,Qo,ds,ri,Ce,Jo,Ot,Xo,si,Nt,ee,li,ve,Rt,ks,xt,$o,xi,Zo,zn,Vs,Yi,us,Ki,ki,ut,Lr,Xn,Us,Bi,qi,ir,zs,Xi,Zn,hi,It,ci,pi,be,Ls,sr,$s,Qe],n=this.extractModuleEntity(s,a=>a.beans?a.beans:[]);r.push(...n);const l=[];return r.forEach(a=>{l.indexOf(a)<0&&l.push(a)}),l}extractModuleEntity(e,i){return[].concat(...e.map(i))}},Up=class{wrap(e,i,t=[],s){const o=this.createWrapper(e,s);return i.forEach(r=>{this.createMethod(o,r,!0)}),t.forEach(r=>{this.createMethod(o,r,!1)}),o}unwrap(e){return e}createMethod(e,i,t){e.addMethod(i,this.createMethodProxy(e,i,t))}createMethodProxy(e,i,t){return function(){return e.hasMethod(i)?e.callMethod(i,arguments):(t&&console.warn("AG Grid: Framework component is missing the method "+i+"()"),null)}}},Ji=typeof global>"u"?{}:global;Ji.HTMLElement=typeof HTMLElement>"u"?{}:HTMLElement,Ji.HTMLButtonElement=typeof HTMLButtonElement>"u"?{}:HTMLButtonElement,Ji.HTMLSelectElement=typeof HTMLSelectElement>"u"?{}:HTMLSelectElement,Ji.HTMLInputElement=typeof HTMLInputElement>"u"?{}:HTMLInputElement,Ji.Node=typeof Node>"u"?{}:Node,Ji.MouseEvent=typeof MouseEvent>"u"?{}:MouseEvent;var Kp=(()=>{let e=class to{constructor(t,s,o,r,n,l){this.nextId=0,this.rowCountReady=!1,this.allNodesMap={},this.rootNode=t,this.gos=s,this.eventService=o,this.columnModel=r,this.beans=l,this.selectionService=n,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=to.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterAggFilter=[],this.rootNode.childrenAfterFilter=[]}getCopyOfNodesMap(){return k.cloneObject(this.allNodesMap)}getRowNode(t){return this.allNodesMap[t]}setRowData(t){if("string"==typeof t)return void console.warn("AG Grid: rowData must be an array.");this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t);const s=this.rootNode,o=this.rootNode.sibling;s.childrenAfterFilter=null,s.childrenAfterGroup=null,s.childrenAfterAggFilter=null,s.childrenAfterSort=null,s.childrenMapped=null,s.updateHasChildren(),this.nextId=0,this.allNodesMap={},t?s.allLeafChildren=t.map(r=>this.createNode(r,this.rootNode,to.TOP_LEVEL)):(s.allLeafChildren=[],s.childrenAfterGroup=[]),o&&(o.childrenAfterFilter=s.childrenAfterFilter,o.childrenAfterGroup=s.childrenAfterGroup,o.childrenAfterAggFilter=s.childrenAfterAggFilter,o.childrenAfterSort=s.childrenAfterSort,o.childrenMapped=s.childrenMapped,o.allLeafChildren=s.allLeafChildren)}updateRowData(t,s){this.rowCountReady=!0,this.dispatchRowDataUpdateStartedEvent(t.add);const o={remove:[],update:[],add:[]},r=[];return this.executeRemove(t,o,r),this.executeUpdate(t,o,r),this.executeAdd(t,o),this.updateSelection(r,"rowDataChanged"),s&&k.sortRowNodesByOrder(this.rootNode.allLeafChildren,s),o}isRowCountReady(){return this.rowCountReady}dispatchRowDataUpdateStartedEvent(t){this.eventService.dispatchEvent({type:g.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:t?.length?t[0]:null})}updateSelection(t,s){const o=t.length>0;o&&this.selectionService.setNodesSelected({newValue:!1,nodes:t,suppressFinishActions:!0,source:s}),this.selectionService.updateGroupsFromChildrenSelections(s),o&&this.eventService.dispatchEvent({type:g.EVENT_SELECTION_CHANGED,source:s})}executeAdd(t,s){var o;const{add:r,addIndex:n}=t;if(k.missingOrEmpty(r))return;const l=r.map(a=>this.createNode(a,this.rootNode,to.TOP_LEVEL));if("number"==typeof n&&n>=0){const{allLeafChildren:a}=this.rootNode,u=a.length;let h=n;if(this.gos.get("treeData")&&n>0&&u>0)for(let C=0;C<u;C++)if((null==(o=a[C])?void 0:o.rowIndex)==n-1){h=C+1;break}const f=a.slice(0,h),m=a.slice(h,a.length);this.rootNode.allLeafChildren=[...f,...l,...m]}else this.rootNode.allLeafChildren=[...this.rootNode.allLeafChildren,...l];this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren),s.add=l}executeRemove(t,s,o){const{remove:r}=t;if(k.missingOrEmpty(r))return;const n={};r.forEach(l=>{const a=this.lookupRowNode(l);a&&(a.isSelected()&&o.push(a),a.clearRowTopAndRowIndex(),n[a.id]=!0,delete this.allNodesMap[a.id],s.remove.push(a))}),this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter(l=>!n[l.id]),this.rootNode.sibling&&(this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren)}executeUpdate(t,s,o){const{update:r}=t;k.missingOrEmpty(r)||r.forEach(n=>{const l=this.lookupRowNode(n);l&&(l.updateData(n),!l.selectable&&l.isSelected()&&o.push(l),this.setMasterForRow(l,n,to.TOP_LEVEL,!1),s.update.push(l))})}lookupRowNode(t){const s=this.gos.getCallback("getRowId");let o;if(s){const r=s({data:t,level:0});if(o=this.allNodesMap[r],!o)return console.error(`AG Grid: could not find row id=${r}, data item was not found for this id`),null}else if(o=this.rootNode.allLeafChildren.find(r=>r.data===t),!o)return console.error("AG Grid: could not find data item as object was not found",t),console.error("Consider using getRowId to help the Grid find matching row data"),null;return o||null}createNode(t,s,o){const r=new B(this.beans);r.group=!1,this.setMasterForRow(r,t,o,!0);const n=this.gos.get("suppressParentsInRowNodes");return s&&!n&&(r.parent=s),r.level=o,r.setDataAndId(t,this.nextId.toString()),this.allNodesMap[r.id]&&console.warn(`AG Grid: duplicate node id '${r.id}' detected from getRowId callback, this could cause issues in your grid.`),this.allNodesMap[r.id]=r,this.nextId++,r}setMasterForRow(t,s,o,r){if(this.gos.get("treeData"))t.setMaster(!1),r&&(t.expanded=!1);else{if(this.gos.get("masterDetail")){const a=this.gos.get("isRowMaster");t.setMaster(!a||a(s))}else t.setMaster(!1);if(r){const a=this.columnModel.getRowGroupColumns();t.expanded=!!t.master&&this.isExpanded(o+(a?a.length:0))}}}isExpanded(t){const s=this.gos.get("groupDefaultExpanded");return-1===s||t<s}};return e.TOP_LEVEL=0,e.ROOT_NODE_ID="ROOT_NODE_ID",e})(),$p=Kp,Te=class extends b{constructor(){super(...arguments),this.onRowHeightChanged_debounced=k.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:"group"}),i=!this.gos.get("suppressAnimationFrame"),t=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:i});this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,t),this.addManagedListener(this.eventService,g.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:"pivot"})),this.addManagedListener(this.eventService,g.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_COLUMN_PIVOT_MODE_CHANGED,e),this.addManagedListener(this.eventService,g.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this)),this.addManagedListener(this.eventService,g.EVENT_GRID_READY,()=>this.onGridReady()),this.addPropertyListeners(),this.rootNode=new B(this.beans),this.nodeManager=new $p(this.rootNode,this.gos,this.eventService,this.columnModel,this.selectionService,this.beans)}addPropertyListeners(){const e=new Set(["treeData","masterDetail"]),i=new Set(["suppressParentsInRowNodes","groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType"]),t=new Set(["excludeChildrenWhenTreeDataFiltering"]),s=new Set(["removePivotHeaderRowWhenSingleValueColumn","pivotRowTotals","pivotColumnGroupTotals","suppressExpandablePivotGroups"]),o=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","groupIncludeTotalFooter","suppressAggFilteredOnly","grandTotalRow"]),r=new Set(["postSortRows","groupDisplayType","accentedSort"]),n=new Set([]),l=new Set(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter","groupTotalRow"]),a=[...e,...i,...t,...s,...s,...o,...r,...n,...l];this.addManagedPropertyListeners(a,u=>{var h;const c=null==(h=u.changeSet)?void 0:h.properties;if(!c)return;const f=m=>c.some(C=>m.has(C));f(e)?this.setRowData(this.rootNode.allLeafChildren.map(m=>m.data)):f(i)?this.refreshModel({step:"group"}):f(t)?this.refreshModel({step:"filter"}):f(s)?this.refreshModel({step:"pivot"}):f(o)?this.refreshModel({step:"aggregate"}):f(r)?this.refreshModel({step:"sort"}):f(n)?this.refreshModel({step:"filter_aggregates"}):f(l)&&this.refreshModel({step:"map"})}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.hasStarted=!0,this.shouldSkipSettingDataOnStart?this.dispatchUpdateEventsAndRefresh():this.setInitialData()}setInitialData(){const e=this.gos.get("rowData");e&&(this.shouldSkipSettingDataOnStart=!0,this.setRowData(e))}ensureRowHeightsValid(e,i,t,s){let o,r=!1;do{o=!1;const n=this.getRowIndexAtPixel(e),l=this.getRowIndexAtPixel(i),a=Math.max(n,t),u=Math.min(l,s);for(let h=a;h<=u;h++){const c=this.getRow(h);if(c.rowHeightEstimated){const f=this.gos.getRowHeightForNode(c);c.setRowHeight(f.height),o=!0,r=!0}}o&&this.setRowTopAndRowIndex()}while(o);return r}setRowTopAndRowIndex(){const e=this.environment.getDefaultRowHeight();let i=0;const t=new Set,s=this.gos.isDomLayout("normal");for(let o=0;o<this.rowsToDisplay.length;o++){const r=this.rowsToDisplay[o];if(null!=r.id&&t.add(r.id),null==r.rowHeight){const n=this.gos.getRowHeightForNode(r,s,e);r.setRowHeight(n.height,n.estimated)}r.setRowTop(i),r.setRowIndex(o),i+=r.rowHeight}return t}clearRowTopAndRowIndex(e,i){const t=e.isActive(),s=r=>{r&&null!=r.id&&!i.has(r.id)&&r.clearRowTopAndRowIndex()},o=r=>{s(r),s(r.detailNode),s(r.sibling),r.hasChildren()&&r.childrenAfterGroup&&(t&&-1!=r.level&&!r.expanded||r.childrenAfterGroup.forEach(o))};o(this.rootNode)}ensureRowsAtPixel(e,i,t=0){const s=this.getRowIndexAtPixel(i),o=this.getRow(s),r=!this.gos.get("suppressAnimationFrame");return o!==e[0]&&(e.forEach(n=>{k.removeFromArray(this.rootNode.allLeafChildren,n)}),e.forEach((n,l)=>{k.insertIntoArray(this.rootNode.allLeafChildren,n,Math.max(s+t,0)+l)}),this.refreshModel({step:"group",keepRenderedRows:!0,keepEditingRows:!0,animate:r}),!0)}highlightRowAtPixel(e,i){const t=null!=i?this.getRowIndexAtPixel(i):null,s=null!=t?this.getRow(t):null;if(!s||!e||s===e||null==i)return void(this.lastHighlightedRow&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null));const o=this.getHighlightPosition(i,s);this.lastHighlightedRow&&this.lastHighlightedRow!==s&&(this.lastHighlightedRow.setHighlighted(null),this.lastHighlightedRow=null),s.setHighlighted(o),this.lastHighlightedRow=s}getHighlightPosition(e,i){if(!i){const o=this.getRowIndexAtPixel(e);
1if(!(i=this.getRow(o||0)))return 1}const{rowTop:t,rowHeight:s}=i;return e-t<s/2?0:1}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 i=this.rootNode.childrenAfterAggFilter;return i?i.length:0}getTopLevelRowDisplayedIndex(e){if(this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode)return e;let t=this.rootNode.childrenAfterSort[e];if(this.gos.get("groupHideOpenParents"))for(;t.expanded&&t.childrenAfterSort&&t.childrenAfterSort.length>0;)t=t.childrenAfterSort[0];return t.rowIndex}getRowBounds(e){if(k.missing(this.rowsToDisplay))return null;const i=this.rowsToDisplay[e];return i?{rowTop:i.rowTop,rowHeight:i.rowHeight}:null}onRowGroupOpened(){const e=this.gos.isAnimateRows();this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const i=this.gos.isAnimateRows(),s=0===e.columns.length||e.columns.some(o=>o.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:s,keepRenderedRows:!0,animate:i})}onSortChanged(){const e=this.gos.isAnimateRows();this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e,keepEditingRows:!0})}getType(){return"clientSide"}onValueChanged(){this.columnModel.isPivotActive()?this.refreshModel({step:"pivot"}):this.refreshModel({step:"aggregate"})}createChangePath(e){const i=k.missingOrEmpty(e),t=new Ko(!1,this.rootNode);return(i||this.gos.get("treeData"))&&t.setInactive(),t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction")||null==e.rowNodeTransactions)return!1;const i=e.rowNodeTransactions.filter(s=>null!=s.add&&s.add.length>0||null!=s.remove&&s.remove.length>0);return null==i||0==i.length}buildRefreshModelParams(e){let i="group";const t={everything:"group",group:"group",filter:"filter",map:"map",aggregate:"aggregate",sort:"sort",pivot:"pivot"};if(k.exists(e)&&(i=t[e]),!k.missing(i))return{step:i,keepRenderedRows:!0,keepEditingRows:!0,animate:!this.gos.get("suppressAnimationFrame")};console.error(`AG Grid: invalid step ${e}, available steps are ${Object.keys(t).join(", ")}`)}refreshModel(e){if(!this.hasStarted||this.isRefreshingModel||this.columnModel.shouldRowModelIgnoreRefresh())return;let i="object"==typeof e&&"step"in e?e:this.buildRefreshModelParams(e);if(!i||this.isSuppressModelUpdateAfterUpdateTransaction(i))return;const t=this.createChangePath(i.rowNodeTransactions);switch(this.isRefreshingModel=!0,i.step){case"group":this.doRowGrouping(i.rowNodeTransactions,i.rowNodeOrder,t,!!i.afterColumnsChanged);case"filter":this.doFilter(t);case"pivot":this.doPivot(t);case"aggregate":this.doAggregate(t);case"filter_aggregates":this.doFilterAggregates(t);case"sort":this.doSort(i.rowNodeTransactions,t);case"map":this.doRowsToDisplay()}const s=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(t,s),this.isRefreshingModel=!1,this.eventService.dispatchEvent({type:g.EVENT_MODEL_UPDATED,animate:i.animate,keepRenderedRows:i.keepRenderedRows,newData:i.newData,newPage:!1,keepUndoRedoStack:i.keepUndoRedoStack})}isEmpty(){const e=k.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length;return k.missing(this.rootNode)||e||!this.columnModel.isReady()}isRowsToRender(){return k.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,i){let t=!i,s=!1;const o=[],r=this.gos.get("groupSelectsChildren");return this.forEachNodeAfterFilterAndSort(n=>{if(!s)if(t&&(n===i||n===e)&&(s=!0,n.group&&r))o.push(...n.allLeafChildren);else{if(!t){if(n!==i&&n!==e)return;t=!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 i=0,t=this.rowsToDisplay.length-1;if(e<=0)return 0;if(k.last(this.rowsToDisplay).rowTop<=e)return this.rowsToDisplay.length-1;let o=-1,r=-1;for(;;){const n=Math.floor((i+t)/2),l=this.rowsToDisplay[n];if(this.isRowInPixel(l,e)||(l.rowTop<e?i=n+1:l.rowTop>e&&(t=n-1),o===i&&r===t))return n;o=i,r=t}}isRowInPixel(e,i){return e.rowTop<=i&&e.rowTop+e.rowHeight>i}forEachLeafNode(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEac
1h((i,t)=>e(i,t))}forEachNode(e,i=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterGroup||[]],callback:e,recursionType:0,index:0,includeFooterNodes:i})}forEachNodeAfterFilter(e,i=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterAggFilter||[]],callback:e,recursionType:1,index:0,includeFooterNodes:i})}forEachNodeAfterFilterAndSort(e,i=!1){this.recursivelyWalkNodesAndCallback({nodes:[...this.rootNode.childrenAfterSort||[]],callback:e,recursionType:2,index:0,includeFooterNodes:i})}forEachPivotNode(e,i=!1){this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:e,recursionType:3,index:0,includeFooterNodes:i})}recursivelyWalkNodesAndCallback(e){const{nodes:i,callback:t,recursionType:s,includeFooterNodes:o}=e;let{index:r}=e;const n=l=>{var a;const u=null==(a=i[0])?void 0:a.parent;if(!u)return;const h=o&&this.gos.getGrandTotalRow(),c=this.gos.getGroupTotalRowCallback(),f=o&&c({node:u});u!==this.rootNode?f===l&&(u.createFooter(),t(u.sibling,r++)):h===l&&(u.createFooter(),t(u.sibling,r++))};n("top");for(let l=0;l<i.length;l++){const a=i[l];if(t(a,r++),a.hasChildren()&&!a.footer){let u=null;switch(s){case 0:u=a.childrenAfterGroup;break;case 1:u=a.childrenAfterAggFilter;break;case 2:u=a.childrenAfterSort;break;case 3:u=a.leafGroup?null:a.childrenAfterSort}u&&(r=this.recursivelyWalkNodesAndCallback({nodes:[...u],callback:t,recursionType:s,index:r,includeFooterNodes:o}))}}return n("bottom"),r}doAggregate(e){var i;null==(i=this.aggregationStage)||i.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 i=this.gos.get("treeData"),t=this.columnModel.isPivotActive(),s=n=>{n&&n.forEach(l=>{const a=()=>{l.expanded=e,s(l.childrenAfterGroup)};i?k.exists(l.childrenAfterGroup)&&a():t?!l.leafGroup&&a():l.group&&a()})};this.rootNode&&s(this.rootNode.childrenAfterGroup),this.refreshModel({step:"map"}),this.eventService.dispatchEvent({type:g.EVENT_EXPAND_COLLAPSE_ALL,source:e?"expandAll":"collapseAll"})}doSort(e,i){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:i})}doRowGrouping(e,i,t,s){this.groupStage?(this.groupStage.execute(e?{rowNode:this.rootNode,rowNodeTransactions:e,rowNodeOrder:i,changedPath:t}:{rowNode:this.rootNode,changedPath:t,afterColumnsChanged:s}),this.gos.get("groupSelectsChildren")&&this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",t)&&this.eventService.dispatchEvent({type:g.EVENT_SELECTION_CHANGED,source:"rowGroupChanged"})):(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.EVENT_ROW_COUNT_READY}))}doFilter(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})}doPivot(e){var i;null==(i=this.pivotStage)||i.execute({rowNode:this.rootNode,changedPath:e})}getCopyOfNodesMap(){return this.nodeManager.getCopyOfNodesMap()}getRowNode(e){if("string"==typeof e&&0==e.indexOf(B.ID_PREFIX_ROW_GROUP)){let t;return this.forEachNode(s=>{s.id===e&&(t=s)}),t}return this.nodeManager.getRowNode(e)}setRowData(e){this.selectionService.reset("rowDataChanged"),this.nodeManager.setRowData(e),this.hasStarted&&this.dispatchUpdateEventsAndRefresh()}dispatchUpdateEventsAndRefresh(){this.eventService.dispatchEvent({type:g.EVENT_ROW_DATA_UPDATED}),this.refreshModel({step:"group",newData:!0})}batchUpdateRowData(e,i){if(null==this.applyAsyncTransactionsTimeout){this.rowDataTransactionBatch=[];const t=this.gos.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.executeBatchUpdateRowData()},t)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:i})}flushAsyncTransactions(){null!=this.applyAsyncTransactionsTimeout&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache.onDataChanged();const e=[],i=[];let t=!1;this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEac
1h(s=>{const o=this.nodeManager.updateRowData(s.rowDataTransaction,void 0);i.push(o),s.callback&&e.push(s.callback.bind(null,o)),"number"==typeof s.rowDataTransaction.addIndex&&(t=!0)}),this.commonUpdateRowData(i,void 0,t),e.length>0&&window.setTimeout(()=>{e.forEach(s=>s())},0),i.length>0&&this.eventService.dispatchEvent({type:g.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:i}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e,i){this.valueCache.onDataChanged();const t=this.nodeManager.updateRowData(e,i);return this.commonUpdateRowData([t],i,"number"==typeof e.addIndex),t}createRowNodeOrder(){if(this.gos.get("suppressMaintainUnsortedOrder"))return;const i={};if(this.rootNode&&this.rootNode.allLeafChildren)for(let t=0;t<this.rootNode.allLeafChildren.length;t++)i[this.rootNode.allLeafChildren[t].id]=t;return i}commonUpdateRowData(e,i,t){if(!this.hasStarted)return;const s=!this.gos.get("suppressAnimationFrame");t&&(i=this.createRowNodeOrder()),this.eventService.dispatchEvent({type:g.EVENT_ROW_DATA_UPDATED}),this.refreshModel({step:"group",rowNodeTransactions:e,rowNodeOrder:i,keepRenderedRows:!0,keepEditingRows:!0,animate:s})}doRowsToDisplay(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})}onRowHeightChanged(){this.refreshModel({step:"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(i=>{i.setRowHeight(i.rowHeight,!0);const t=i.detailNode;t&&t.setRowHeight(t.rowHeight,!0),i.sibling&&i.sibling.setRowHeight(i.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(){this.columnModel.isAutoRowHeightActive()||this.resetRowHeights()}onGridReady(){this.hasStarted||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}};d([p("columnModel")],Te.prototype,"columnModel",2),d([p("selectionService")],Te.prototype,"selectionService",2),d([p("valueCache")],Te.prototype,"valueCache",2),d([p("beans")],Te.prototype,"beans",2),d([p("filterStage")],Te.prototype,"filterStage",2),d([p("sortStage")],Te.prototype,"sortStage",2),d([p("flattenStage")],Te.prototype,"flattenStage",2),d([q("groupStage")],Te.prototype,"groupStage",2),d([q("aggregationStage")],Te.prototype,"aggregationStage",2),d([q("pivotStage")],Te.prototype,"pivotStage",2),d([q("filterAggregatesStage")],Te.prototype,"filterAggregatesStage",2),d([T],Te.prototype,"init",1),Te=d([I("rowModel")],Te);var or=class extends b{execute(e){const{changedPath:i}=e;this.filterService.filter(i)}};d([p("filterService")],or.prototype,"filterService",2),or=d([I("filterStage")],or);var Ys=class extends b{execute(e){const i=this.sortController.getSortOptions(),t=k.exists(i)&&i.length>0,s=t&&k.exists(e.rowNodeTransactions)&&this.gos.get("deltaSort"),o=i.some(r=>this.gos.isColumnsSortingCoupledToGroup()?r.column.isPrimary()&&r.column.isRowGroupActive():!!r.column.getColDef().showRowGroup);this.sortService.sort(i,t,s,e.rowNodeTransactions,e.changedPath,o)}};d([p("sortService")],Ys.prototype,"sortService",2),d([p("sortController")],Ys.prototype,"sortController",2),Ys=d([I("sortStage")],Ys);var rr=class extends b{execute(e){const i=e.rowNode,t=[],s=this.beans.columnModel.isPivotMode(),o=s&&i.leafGroup,r=o?[i]:i.childrenAfterSort,n=this.getFlattenDetails();return this.recursivelyAddToRowsToDisplay(n,r,t,s,0),!o&&t.length>0&&n.grandTotalRow&&(i.createFooter(),this.addRowNodeToRowsToDisplay(n,i.sibling,t,0,"top"===n.grandTotalRow)),t}getFlattenDetails(){const e=this.gos.get("groupRemoveSingleChildren");return{groupRemoveLowestSingleChildren:!e&&this.gos.get("groupRemoveLowestSingleChildren"),groupRemoveSingleChildren:e,isGroupMultiAutoColumn:this.gos.isGroupMultiAutoColumn(),hideOpenParents:this.gos.get("groupHideOpenParents"),grandTotalRow:this.gos.getGrandTotalRow(),groupTotalRow:this.gos.getGroupTotalRowCallback()}}recursivelyAddToRowsToDisplay(e,i,t,s,o){if(!k.missingOrEmpty(i))for(let r=0;r<i.length;r++){const n=i[r],l=n.hasChildren(),u=e.groupRemoveSingleChildren&&l&&1===n.childrenAfterGroup.length,h=e.groupRemoveLowestSingleChildren&&l&&n.leafGroup&&1===n.childrenAfterGroup.length;if(!(s&&!l)&&!(e.hideOpenParents&&n.expanded&&!n.master&&(!s||!n.leafGroup))&&!u&&!h&&this.addRowNodeToRowsToDisplay(e,n,t,o),!s||!n.leafGroup)if(l){const C=u||h;if(n.expanded||C){const w=e.groupTotalRow({node:n});w||n.destroyFooter();const S=C?o:o+1;"top"===w&&(n.createFooter(),this.addRowNodeToRowsToDisplay(e,n.sibling,t,S)),this.recursivelyAddToRowsToDisplay(e,n.childrenAfterSort,t,s,S),"bottom"===w&&(n.createFooter(),this.addRowNodeToRowsToDisplay(e,n.sibling,t,S))}}else if(n.master&&n.expanded){const C=this.createDetailNode(n);this.addRowNodeToRowsToDisplay(e,C,t,o)}}}addRowNodeToRowsToDisplay(e,i,t,s,o){o?t.unshift(i):t.push(i),i.setUiLevel(e.isGroupMultiAutoColumn?0:s)}createDetailNode(e){if(k.exists(e.detailNode))return e.detailNode;const i=new B(this.beans);return i.detail=!0,i.selectable=!1,i.parent=e,k.exists(e.id)&&(i.id="detail_"+e.id),i.data=e.data,i.level=e.level+1,e.detailNode=i,i}};d([p("beans")],rr.prototype,"beans",2),rr=d([I("flattenStage")],rr);var js=class extends b{sort(e,i,t,s,o,r){const n=this.gos.get("groupMaintainOrder"),l=this.columnModel.getAllGridColumns().some(f=>f.isRowGroupActive());let a={};t&&s&&(a=this.calculateDirtyNodes(s));const u=this.columnModel.isPivotMode(),h=this.gos.getCallback("postSortRows");o&&o.forEachChangedNodeDepthFirst(f=>{var m;this.pullDownGroupDataForHideOpenParents(f.childrenAfterAggFilter,!0);const C=u&&f.leafGroup;if(n&&l&&!f.leafGroup&&!r){const S=null==(m=this.columnModel.getRowGroupColumns())?void 0:m[f.level+1],R=null===S?.getSort(),E=f.childrenAfterAggFilter.slice(0);if(f.childrenAfterSort&&!R){const A={};f.childrenAfterSort.forEach((P,L)=>{A[P.id]=L}),E.sort((P,L)=>{var G,N;return(null!=(G=A[P.id])?G:0)-(null!=(N=A[L.id])?N:0)})}f.childrenAfterSort=E}else f.childrenAfterSort=!i||C?f.childrenAfterAggFilter.slice(0):t?this.doDeltaSort(f,a,o,e):this.rowNodeSorter.doFullSort(f.childrenAfterAggFilter,e);f.sibling&&(f.sibling.childrenAfterSort=f.childrenAfterSort),this.updateChildIndexes(f),h&&h({nodes:f.childrenAfterSort})}),this.updateGroupDataForHideOpenParents(o)}calculateDirtyNodes(e){const i={},t=s=>
1{s&&s.forEach(o=>i[o.id]=!0)};return e&&e.forEach(s=>{t(s.add),t(s.update),t(s.remove)}),i}doDeltaSort(e,i,t,s){const o=e.childrenAfterAggFilter,r=e.childrenAfterSort;if(!r)return this.rowNodeSorter.doFullSort(o,s);const n={},l=[];o.forEach(c=>{i[c.id]||!t.canSkip(c)?l.push(c):n[c.id]=!0});const a=r.filter(c=>n[c.id]),u=(c,f)=>({currentPos:f,rowNode:c}),h=l.map(u).sort((c,f)=>this.rowNodeSorter.compareRowNodes(s,c,f));return this.mergeSortedArrays(s,h,a.map(u)).map(({rowNode:c})=>c)}mergeSortedArrays(e,i,t){const s=[];let o=0,r=0;for(;o<i.length&&r<t.length;)this.rowNodeSorter.compareRowNodes(e,i[o],t[r])<0?s.push(i[o++]):s.push(t[r++]);for(;o<i.length;)s.push(i[o++]);for(;r<t.length;)s.push(t[r++]);return s}updateChildIndexes(e){if(k.missing(e.childrenAfterSort))return;const i=e.childrenAfterSort;for(let t=0;t<i.length;t++){const s=i[t],r=t===e.childrenAfterSort.length-1;s.setFirstChild(0===t),s.setLastChild(r),s.setChildIndex(t)}}updateGroupDataForHideOpenParents(e){if(!this.gos.get("groupHideOpenParents"))return;if(this.gos.get("treeData"))return k.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 i=t=>{this.pullDownGroupDataForHideOpenParents(t.childrenAfterSort,!1),t.childrenAfterSort.forEach(s=>{s.hasChildren()&&i(s)})};e&&e.executeFromRootNode(t=>i(t))}pullDownGroupDataForHideOpenParents(e,i){!this.gos.get("groupHideOpenParents")||k.missing(e)||e.forEach(t=>{this.columnModel.getGroupDisplayColumns().forEach(o=>{const r=o.getColDef().showRowGroup;if("string"!=typeof r)return void console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");const l=this.columnModel.getPrimaryColumn(r);if(l!==t.rowGroupColumn)if(i)t.setGroupValue(o.getId(),void 0);else{const u=t.getFirstChildOfFirstChild(l);u&&t.setGroupValue(o.getId(),u.key)}})})}};d([p("columnModel")],js.prototype,"columnModel",2),d([p("rowNodeSorter")],js.prototype,"rowNodeSorter",2),js=d([I("sortService")],js);var nr=class extends b{filter(e){const i=this.filterManager.isChildFilterPresent();this.filterNodes(i,e)}filterNodes(e,i){const t=(s,o)=>{s.childrenAfterFilter=s.hasChildren()&&e&&!o?s.childrenAfterGroup.filter(r=>{const n=r.childrenAfterFilter&&r.childrenAfterFilter.length>0,l=r.data&&this.filterManager.doesRowPassFilter({rowNode:r});return n||l}):s.childrenAfterGroup,s.sibling&&(s.sibling.childrenAfterFilter=s.childrenAfterFilter)};if(this.doingTreeDataFiltering()){const s=(r,n)=>{if(r.childrenAfterGroup)for(let l=0;l<r.childrenAfterGroup.length;l++){const a=r.childrenAfterGroup[l],u=n||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?s(r.childrenAfterGroup[l],u):t(a,u)}t(r,n)};i.executeFromRootNode(r=>s(r,!1))}else i.forEachChangedNodeDepthFirst(o=>t(o,!1),!0)}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}};d([p("filterManager")],nr.prototype,"filterManager",2),nr=d([I("filterService")],nr);var gi=class extends b{postConstruct(){"clientSide"===this.rowModel.getType()&&(this.clientSideRowModel=this.rowModel,this.addManagedPropertyListener("rowData",()=>this.onRowDataUpdated()))}isActive(){const e=this.gos.exists("getRowId");return!this.gos.get("resetRowDataOnUpdate")&&e}setRowData(e){const i=this.createTransactionForRowData(e);if(!i)return;const[t,s]=i;this.clientSideRowModel.updateRowData(t,s)}createTransactionForRowData(e){if(k.missing(this.clientSideRowModel))return void console.error("AG Grid: ImmutableService only works with ClientSideRowModel");const i=this.gos.getCallback("getRowId");if(null==i)return void console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");const t={remove:[],update:[],add:[]},s=this.clientSideRowModel.getCopyOfNodesMap(),r=this.gos.get("suppressMaintainUnsortedOrder")?void 0:{};return k.exists(e)&&e.forEach((n,l)=>{const a=i({data:n,level:0}),u=s[a];r&&(r[a]=l),u?(u.data!==n&&t.update.push(n),s[a]=void 0):t.add.push(n)}
1),k.iterateObject(s,(n,l)=>{l&&t.remove.push(l.data)}),[t,r]}onRowDataUpdated(){const e=this.gos.get("rowData");e&&(this.isActive()?this.setRowData(e):(this.selectionService.reset("rowDataChanged"),this.clientSideRowModel.setRowData(e)))}};d([p("rowModel")],gi.prototype,"rowModel",2),d([p("rowRenderer")],gi.prototype,"rowRenderer",2),d([p("selectionService")],gi.prototype,"selectionService",2),d([T],gi.prototype,"postConstruct",1);var jp={version:"31.3.4",moduleName:"@ag-grid-community/client-side-row-model",rowModel:"clientSide",beans:[Te,or,Ys,rr,js,nr,gi=d([I("immutableService")],gi)]},qp=Object.defineProperty,Qp=Object.getOwnPropertyDescriptor,Ae=(e,i,t,s)=>{for(var n,o=s>1?void 0:s?Qp(i,t):i,r=e.length-1;r>=0;r--)(n=e[r])&&(o=(s?n(i,t,o):n(o))||o);return s&&o&&qp(i,t,o),o},qs=class extends _n{constructor(e,i,t){super(e),this.parentCache=i,this.params=t,this.startRow=e*t.blockSize,this.endRow=this.startRow+t.blockSize}postConstruct(){this.createRowNodes()}getBlockStateJson(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}}setDataAndId(e,i,t){k.exists(i)?e.setDataAndId(i,t.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();k.missing(this.params.datasource.getRows)?console.warn("AG Grid: datasource is missing getRows method"):window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}processServerFail(){}createLoadParams(){return{startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gos.getGridCommonParams().context}}forEachNode(e,i,t){this.rowNodes.forEach((s,o)=>{this.startRow+o<t&&e(s,i.next())})}getLastAccessed(){return this.lastAccessed}getRow(e,i=!1){return i||(this.lastAccessed=this.params.lastAccessedSequence.next()),this.rowNodes[e-this.startRow]}getStartRow(){return this.startRow}getEndRow(){return this.endRow}createRowNodes(){this.rowNodes=[];for(let e=0;e<this.params.blockSize;e++){const i=this.startRow+e,t=new B(this.beans);t.setRowHeight(this.params.rowHeight),t.uiLevel=0,t.setRowIndex(i),t.setRowTop(this.params.rowHeight*i),this.rowNodes.push(t)}}processServerResult(e){this.rowNodes.forEach((t,s)=>{const o=e.rowData?e.rowData[s]:void 0;!t.id&&t.alreadyRendered&&o&&(this.rowNodes[s]=new B(this.beans),this.rowNodes[s].setRowIndex(t.rowIndex),this.rowNodes[s].setRowTop(t.rowTop),this.rowNodes[s].setRowHeight(t.rowHeight),t.clearRowTopAndRowIndex()),this.setDataAndId(this.rowNodes[s],o,this.startRow+s)}),this.parentCache.pageLoaded(this,null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0)}destroyRowNodes(){this.rowNodes.forEach(e=>{e.clearRowTopAndRowIndex()})}};Ae([p("beans")],qs.prototype,"beans",2),Ae([T],qs.prototype,"postConstruct",1),Ae([ye],qs.prototype,"destroyRowNodes",1);var i,Qs=(()=>{let e=class gu extends b{constructor(t){super(),this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=t.initialRowCount,this.params=t}setBeans(t){this.logger=t.create("InfiniteCache")}getRow(t,s=!1){const o=Math.floor(t/this.params.blockSize);let r=this.blocks[o];if(!r){if(s)return;r=this.createBlock(o)}return r.getRow(t)}createBlock(t){const s=this.createBean(new qs(t,this,this.params));return this.blocks[s.getId()]=s,this.blockCount++,this.purgeBlocksIfNeeded(s),this.params.rowNodeBlockLoader.addBlock(s),s}refreshCache(){0!=this.blockCount?(this.getBlocksInOrder().forEach(s=>s.setStateWaitingToLoad()),this.params.rowNodeBlockLoader.checkBlockToLoad()):this.purgeCache()}destroyAllBlocks(){this.getBlocksInOrder().forEach(t=>this.destroyBlock(t))}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(t,s){this.isAlive()&&(this.logger.log(`onPageLoaded: page = ${t.getId()}, lastRow = ${s}`),this.checkRowCount(t,s),this.onCacheUpdated())}purgeBlocksIfNeeded(t){const s=this.getBlocksInOrder().filter(a=>a!=t);s.sort((a,u)=>u.getLastAccessed()-a.getLastAccessed());const r=this.params.maxBlocksInCache>0,n=r?this.params.maxBlocksInCache-1:null,l=gu.MAX_EMPTY_BLOCKS_TO_KEEP-1;
1s.forEach((a,u)=>{if(a.getState()===qs.STATE_WAITING_TO_LOAD&&u>=l||r&&u>=n){if(this.isBlockCurrentlyDisplayed(a)||this.isBlockFocused(a))return;this.removeBlockFromCache(a)}})}isBlockFocused(t){const s=this.focusService.getFocusCellToUseAfterRefresh();if(!s||null!=s.rowPinned)return!1;const o=t.getStartRow(),r=t.getEndRow();return s.rowIndex>=o&&s.rowIndex<r}isBlockCurrentlyDisplayed(t){const s=t.getStartRow(),o=t.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(s,o)}removeBlockFromCache(t){t&&this.destroyBlock(t)}checkRowCount(t,s){if("number"==typeof s&&s>=0)this.rowCount=s,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const r=(t.getId()+1)*this.params.blockSize+this.params.overflowSize;this.rowCount<r&&(this.rowCount=r)}}setRowCount(t,s){this.rowCount=t,k.exists(s)&&(this.lastRowIndexKnown=s),this.lastRowIndexKnown||this.rowCount%this.params.blockSize==0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(t){const s=new Fi;this.getBlocksInOrder().forEach(o=>o.forEachNode(t,s,this.rowCount))}getBlocksInOrder(){return k.getAllValuesInObject(this.blocks).sort((o,r)=>o.getId()-r.getId())}destroyBlock(t){delete this.blocks[t.getId()],this.destroyBean(t),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(t)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventService.dispatchEvent({type:g.EVENT_STORE_UPDATED}))}destroyAllBlocksPastVirtualRowCount(){const t=[];this.getBlocksInOrder().forEach(s=>{s.getId()*this.params.blockSize>=this.rowCount&&t.push(s)}),t.length>0&&t.forEach(s=>this.destroyBlock(s))}purgeCache(){this.getBlocksInOrder().forEach(t=>this.removeBlockFromCache(t)),this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(t,s){const o=[];let r=-1,n=!1;const l=new Fi;k.missing(t)&&(n=!0);let a=!1;return this.getBlocksInOrder().forEach(h=>{if(!a){if(n&&r+1!==h.getId())return void(a=!0);r=h.getId(),h.forEachNode(c=>{const f=c===t||c===s;(n||f)&&o.push(c),f&&(n=!n)},l,this.rowCount)}}),a||n?[]:o}};return e.MAX_EMPTY_BLOCKS_TO_KEEP=2,e})();Ae([p("rowRenderer")],Qs.prototype,"rowRenderer",2),Ae([p("focusService")],Qs.prototype,"focusService",2),Ae([(i=Ue("loggerFactory"),(t,s)=>i(t,s,0))],Qs.prototype,"setBeans",1),Ae([ye],Qs.prototype,"destroyAllBlocks",1);var Zp=Qs,ht=class extends b{getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(e,i,t,s){return!1}init(){this.gos.isRowModelType("infinite")&&(this.rowHeight=this.gos.getRowHeightAsNumber(),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache()),this.verifyProps())}verifyProps(){this.gos.exists("initialGroupOrderComparator")&&k.warnOnce("initialGroupOrderComparator cannot be used with Infinite Row Model as sorting is done on the server side")}start(){this.setDatasource(this.gos.get("datasource"))}destroyDatasource(){this.datasource&&(this.getContext().destroyBean(this.datasource),this.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedListener(this.eventService,g.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addManagedListener(this.eventService,g.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this)),this.addManagedListener(this.eventService,g.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this)),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=this.gos.getRowHeightAsNumber(),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onFilterChanged(){this.reset()}onSortChanged(){this.reset()}onColumnEverything(){let e;e=!this.cacheParams||this.isSortModelDifferent(),e&&this.reset()}isSortModelDifferent(){return!k.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(e,i){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,i):[]}reset(){this.datasource&&(null!=this.gos.getCallback("getRowId")||this.selectionService.reset("rowDataChanged"),this.resetCache())}createModelUpdatedEvent(){return{type:g.EVENT_MODEL_UPDATED,newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1}}resetCache(){this.destroyCache(),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.gos.get("infiniteInitialRowCount"),maxBlocksInCache:this.gos.get("maxBlocksInCache"),rowHeight:this.gos.getRowHeightAsNumber(),overflowSize:this.gos.get("cacheOverflowSize"),blockSize:this.gos.get("cacheBlockSize"),lastAccessedSequence:new Fi},this.infiniteCache=this.createBean(new Zp(this.cacheParams)),this.eventService.dispatchEventOnce({type:g.EVENT_ROW_COUNT_READY});const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}updateRowHeights(){this.forEachNode(i=>{i.setRowHeight(this.rowHeight),i.setRowTop(this.rowHeight*i.rowIndex)});const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}destroyCache(){this.infiniteCache&&(this.infiniteCache=this.destroyBean(this.infiniteCache))}
1onCacheUpdated(){const e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}getRow(e){if(this.infiniteCache&&!(e>=this.infiniteCache.getRowCount()))return this.infiniteCache.getRow(e)}getRowNode(e){let i;return this.forEachNode(t=>{t.id===e&&(i=t)}),i}forEachNode(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(0!==this.rowHeight){const i=Math.floor(e/this.rowHeight),t=this.getRowCount()-1;return i>t?t:i}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache&&this.infiniteCache.refreshCache()}purgeCache(){this.infiniteCache&&this.infiniteCache.purgeCache()}isLastRowIndexKnown(){return!!this.infiniteCache&&this.infiniteCache.isLastRowIndexKnown()}setRowCount(e,i){this.infiniteCache&&this.infiniteCache.setRowCount(e,i)}};Ae([p("filterManager")],ht.prototype,"filterManager",2),Ae([p("sortController")],ht.prototype,"sortController",2),Ae([p("selectionService")],ht.prototype,"selectionService",2),Ae([p("rowRenderer")],ht.prototype,"rowRenderer",2),Ae([p("rowNodeBlockLoader")],ht.prototype,"rowNodeBlockLoader",2),Ae([T],ht.prototype,"init",1),Ae([ye],ht.prototype,"destroyDatasource",1);var eg={version:"31.3.4",moduleName:"@ag-grid-community/infinite-row-model",rowModel:"infinite",beans:[ht=Ae([I("rowModel")],ht)]},Td=Object.defineProperty,ig=Object.getOwnPropertyDescriptor,Oe=(e,i,t,s)=>{for(var n,o=s>1?void 0:s?ig(i,t):i,r=e.length-1;r>=0;r--)(n=e[r])&&(o=(s?n(i,t,o):n(o))||o);return s&&o&&Td(i,t,o),o},ng=class{setBeans(e){this.beans=e}getFileName(e){const i=this.getDefaultFileExtension();return(null==e||!e.length)&&(e=this.getDefaultFileName()),-1===e.indexOf(".")?`${e}.${i}`:e}getData(e){const i=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(i,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},lg=class{constructor(e){this.groupColumns=[];const{columnModel:i,valueService:t,gos:s,processCellCallback:o,processHeaderCallback:r,processGroupHeaderCallback:n,processRowGroupCallback:l}=e;this.columnModel=i,this.valueService=t,this.gos=s,this.processCellCallback=o,this.processHeaderCallback=r,this.processGroupHeaderCallback=n,this.processRowGroupCallback=l}prepare(e){this.groupColumns=e.filter(i=>!!i.getColDef().showRowGroup)}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,i,t,s,o){const n=this.gos.get("groupHideOpenParents")&&!o.footer||!this.shouldRenderGroupSummaryCell(o,e,i)?this.valueService.getValue(e,o):this.createValueForGroupNode(e,o);return this.processCell({accumulatedRowIndex:t,rowNode:o,column:e,value:n,processCellCallback:this.processCellCallback,type:s})}shouldRenderGroupSummaryCell(e,i,t){var s;if(!e||!e.group)return!1;if(-1!==this.groupColumns.indexOf(i)){if(null!=(null==(s=e.groupData)?void 0:s[i.getId()])||this.gos.isRowModelType("serverSide")&&e.group)return!0;if(e.footer&&-1===e.level){const l=i.getColDef();return null==l||!0===l.showRowGroup||l.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId()}}const n=this.gos.isGroupUseEntireRow(this.columnModel.isPivotMode());return 0===t&&n}getHeaderName(e,i){return e?e(this.gos.addGridCommonParams({column:i})):this.columnModel.getDisplayNameForColumn(i,"csv",!0)}createValueForGroupNode(e,i){if(this.processRowGroupCallback)return this.processRowGroupCallback(this.gos.addGridCommonParams({column:e,node:i}));const t=this.gos.get("treeData"),s=this.gos.get("suppressGroupMaintainValueType"),o=a=>{var u,h;if(t||s)return a.key;const c=null==(u=a.groupData)?void 0:u[e.getId()];return c&&a.rowGroupColumn&&!1!==a.rowGroupColumn.getColDef().useValueFormatterForExport&&null!=(h=this.valueService.formatValue(a.rowGroupColumn,a,c))?h:c},r=i.footer,n=[o(i)];if(!this.gos.isGroupMultiAutoColumn())for(;i.parent;)n.push(o(i=i.parent));const l=n.reverse().join(" -> ");return r?`Total ${l}`:l}processCell(e){var i;const{accumulatedRowIndex:t,rowNode:s,column:o,value:r,processCellCallback:n,type:l}=e;return n?{value:null!=(i=n(this.gos.addGridCommonParams({accumulatedRowIndex:t,column:o,node:s,value:r,type:l,parseValue:a=>this.valueService.parseValue(o,s,a,this.valueService.getValue(o,s)),formatValue:a=>{var u;return null!=(u=this.valueService.formatValue(o,s,a))?u:a}})))?i:""}:!1!==o.getColDef().useValueFormatterForExport?{value:r??"",valueFormatted:this.valueService.formatValue(o,s,r)}:{value:r??""}}},ag=class{static download(e,i){const t=document.defaultView||window;if(!t)return void console.warn("AG Grid: There is no `window` associated with the current `document`");const s=document.createElement("a"),o=t.URL.createObjectURL(i);s.setAttribute("href",o),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:t})),document.body.removeChild(s),t.setTimeout(()=>
1{t.URL.revokeObjectURL(o)},0)}},dg=class extends lg{constructor(e){super(e),this.isFirstLine=!0,this.result="";const{suppressQuotes:i,columnSeparator:t}=e;this.suppressQuotes=i,this.columnSeparator=t}addCustomContent(e){e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach(i=>{this.beginNewLine(),i.forEach((t,s)=>{0!==s&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t.data.value||""),t.mergeAcross&&this.appendEmptyCells(t.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,i,t,s){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(i),this.appendEmptyCells(s)}appendEmptyCells(e){for(let i=1;i<=e;i++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,i){0!=i&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,i,t){var s;0!=i&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue(e,i,i,"csv",t);this.result+=this.putInQuotes(null!=(s=o.valueFormatted)?s:o.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(null==e)return'""';let i;return"string"==typeof e?i=e:"function"==typeof e.toString?i=e.toString():(console.warn("AG Grid: unknown value type during csv conversion"),i=""),'"'+i.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1}},Vt=class extends ng{postConstruct(){this.setBeans({gridSerializer:this.gridSerializer,gos:this.gos})}getMergedParams(e){const i=this.gos.get("defaultCsvExportParams");return Object.assign({},i,e)}export(e){if(this.isExportSuppressed())return void console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration.");const i=this.getMergedParams(e),t=this.getData(i),s=new Blob(["\ufeff",t],{type:"text/plain"}),o="function"==typeof i.fileName?i.fileName(this.gos.getGridCommonParams()):i.fileName;ag.download(this.getFileName(o),s)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,i=!1){const t=i?Object.assign({},e):this.getMergedParams(e);return this.getData(t)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{columnModel:i,valueService:t,gos:s}=this,{processCellCallback:o,processHeaderCallback:r,processGroupHeaderCallback:n,processRowGroupCallback:l,suppressQuotes:a,columnSeparator:u}=e;return new dg({columnModel:i,valueService:t,gos:s,processCellCallback:o||void 0,processHeaderCallback:r||void 0,processGroupHeaderCallback:n||void 0,processRowGroupCallback:l||void 0,suppressQuotes:a||!1,columnSeparator:u||","})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};Oe([p("columnModel")],Vt.prototype,"columnModel",2),Oe([p("valueService")],Vt.prototype,"valueService",2),Oe([p("gridSerializer")],Vt.prototype,"gridSerializer",2),Oe([p("gridOptionsService")],Vt.prototype,"gos",2),Oe([T],Vt.prototype,"postConstruct",1),Vt=Oe([I("csvCreator")],Vt);var ct=class extends b{serialize(e,i={}){const{allColumns:t,columnKeys:s,skipRowGroups:o}=i,r=this.getColumnsToExport(t,o,s);return k.compose(this.prepareSession(r),this.prependContent(i),this.exportColumnGroups(i,r),this.exportHeaders(i,r),this.processPinnedTopRows(i,r),this.processRows(i,r),this.processPinnedBottomRows(i,r),this.appendContent(i))(e).parse()}processRow(e,i,t,s){const o=i.shouldRowBeSkipped||(()=>!1),r=this.gos.get("groupRemoveSingleChildren"),n=this.gos.get("groupRemoveLowestSingleChildren"),a=null!=i.rowPositions||!!i.onlySelected,u=this.gos.get("groupHideOpenParents")&&!a,h=this.columnModel.isPivotMode()?s.leafGroup:!s.group,c=!!s.footer;if(!h&&!c&&(i.skipRowGroups||1===s.allChildrenCount&&(r||n&&s.leafGroup)||u)||i.onlySelected&&!s.isSelected()||i.skipPinnedTop&&"top"===s.rowPinned||i.skipPinnedBottom&&"bottom"===s.rowPinned||-1===s.level&&!h&&!c||o(this.gos.addGridCommonParams({node:s})))return;const R=e.onNewBodyRow(s);if(t.forEach((E,A)=>{R.onColumn(E,A,s)}),i.getCustomContentBelowRow){const E=i.getCustomContentBelowRow(this.gos.addGridCommonParams({node:s}));E&&e.addCustomContent(E)}}appendContent(e){return i=>{const t=e.appendContent;return t&&i.addCustomContent(t),i}}prependContent(e){return i=>{const t=e.prependContent;return t&&i.addCustomContent(t),i}}prepareSession(e){return i=>(i.prepare(e),i)}
1exportColumnGroups(e,i){return t=>{if(!e.skipColumnGroupHeaders){const s=new Ml,o=this.displayedGroupCreator.createDisplayedGroups(i,s,null);this.recursivelyAddHeaderGroups(o,t,e.processGroupHeaderCallback)}return t}}exportHeaders(e,i){return t=>{if(!e.skipColumnHeaders){const s=t.onNewHeaderRow();i.forEach((o,r)=>{s.onColumn(o,r,void 0)})}return t}}processPinnedTopRows(e,i){return t=>{const s=this.processRow.bind(this,t,e,i);return e.rowPositions?e.rowPositions.filter(o=>"top"===o.rowPinned).sort((o,r)=>o.rowIndex-r.rowIndex).map(o=>this.pinnedRowModel.getPinnedTopRow(o.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedTopRow(s),t}}processRows(e,i){return t=>{const s=this.rowModel,o=s.getType(),r="clientSide"===o,n="serverSide"===o,l=!r&&e.onlySelected,a=this.processRow.bind(this,t,e,i),{exportedRows:u="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(h=>null==h.rowPinned).sort((h,c)=>h.rowIndex-c.rowIndex).map(h=>s.getRow(h.rowIndex)).forEach(a);else if(this.columnModel.isPivotMode())r?s.forEachPivotNode(a,!0):n?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);else if(e.onlySelectedAllPages||l){const h=this.selectionService.getSelectedNodes();this.replicateSortedOrder(h),h.forEach(a)}else"all"===u?s.forEachNode(a):r||n?s.forEachNodeAfterFilterAndSort(a,!0):s.forEachNode(a);return t}}replicateSortedOrder(e){const i=this.sortController.getSortOptions(),t=(s,o)=>{var r,n,l,a;return null!=s.rowIndex&&null!=o.rowIndex?s.rowIndex-o.rowIndex:s.level===o.level?(null==(r=s.parent)?void 0:r.id)===(null==(n=o.parent)?void 0:n.id)?this.rowNodeSorter.compareRowNodes(i,{rowNode:s,currentPos:null!=(l=s.rowIndex)?l:-1},{rowNode:o,currentPos:null!=(a=o.rowIndex)?a:-1}):t(s.parent,o.parent):s.level>o.level?t(s.parent,o):t(s,o.parent)};e.sort(t)}processPinnedBottomRows(e,i){return t=>{const s=this.processRow.bind(this,t,e,i);return e.rowPositions?e.rowPositions.filter(o=>"bottom"===o.rowPinned).sort((o,r)=>o.rowIndex-r.rowIndex).map(o=>this.pinnedRowModel.getPinnedBottomRow(o.rowIndex)).forEach(s):this.pinnedRowModel.forEachPinnedBottomRow(s),t}}getColumnsToExport(e=!1,i=!1,t){const s=this.columnModel.isPivotMode();if(t&&t.length)return this.columnModel.getGridColumns(t);const o=this.gos.get("treeData");let r=[];return r=e&&!s?this.columnModel.getAllGridColumns():this.columnModel.getAllDisplayedColumns(),i&&!o&&(r=r.filter(n=>n.getColId()!==Ei)),r}recursivelyAddHeaderGroups(e,i,t){const s=[];e.forEach(o=>
1{o.getChildren&&o.getChildren().forEach(n=>s.push(n))}),e.length>0&&e[0]instanceof he&&this.doAddHeaderHeader(i,e,t),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,i,t)}doAddHeaderHeader(e,i,t){const s=e.onNewHeaderGroupingRow();let o=0;i.forEach(r=>{const n=r;let l;l=t?t(this.gos.addGridCommonParams({columnGroup:n})):this.columnModel.getDisplayNameForColumnGroup(n,"header");const a=n.getLeafColumns().reduce((u,h,c,f)=>{let m=k.last(u);return"open"===h.getColumnGroupShow()?(!m||null!=m[1])&&(m=[c],u.push(m)):m&&null==m[1]&&(m[1]=c-1),c===f.length-1&&m&&null==m[1]&&(m[1]=c),u},[]);s.onColumn(n,l||"",o++,n.getLeafColumns().length-1,a)})}};Oe([p("displayedGroupCreator")],ct.prototype,"displayedGroupCreator",2),Oe([p("columnModel")],ct.prototype,"columnModel",2),Oe([p("rowModel")],ct.prototype,"rowModel",2),Oe([p("pinnedRowModel")],ct.prototype,"pinnedRowModel",2),Oe([p("selectionService")],ct.prototype,"selectionService",2),Oe([p("rowNodeSorter")],ct.prototype,"rowNodeSorter",2),Oe([p("sortController")],ct.prototype,"sortController",2);var cg={version:"31.3.4",moduleName:"@ag-grid-community/csv-export",beans:[Vt,ct=Oe([I("gridSerializer")],ct)]};new Uint32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);j.__registerModules([jp,eg,cg],!1,void 0)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.