65 lines
1.3 MiB
Executable File
65 lines
1.3 MiB
Executable File
var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var i in t)__defProp(e,i,{get:t[i],enumerable:!0})},__copyProps=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of __getOwnPropNames(t))!__hasOwnProp.call(e,s)&&s!==i&&__defProp(e,s,{get:()=>t[s],enumerable:!(o=__getOwnPropDesc(t,s))||o.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),main_exports={};__export(main_exports,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>ALWAYS_SYNC_GLOBAL_EVENTS,AgAbstractCellEditor:()=>AgAbstractCellEditor,AgAbstractInputField:()=>AgAbstractInputField,AgAbstractLabel:()=>AgAbstractLabel,AgCheckbox:()=>AgCheckbox,AgCheckboxSelector:()=>AgCheckboxSelector,AgColumn:()=>AgColumn,AgColumnGroup:()=>AgColumnGroup,AgContentEditableField:()=>AgContentEditableField,AgContentEditableFieldSelector:()=>AgContentEditableFieldSelector,AgFilterButtonSelector:()=>AgFilterButtonSelector,AgInputDateField:()=>AgInputDateField,AgInputNumberField:()=>AgInputNumberField,AgInputNumberFieldSelector:()=>AgInputNumberFieldSelector,AgInputTextArea:()=>AgInputTextArea,AgInputTextField:()=>AgInputTextField,AgInputTextFieldSelector:()=>AgInputTextFieldSelector,AgPickerField:()=>AgPickerField,AgPopupComponent:()=>AgPopupComponent,AgPromise:()=>AgPromise,AgProvidedColumnGroup:()=>AgProvidedColumnGroup,AgRadioButton:()=>AgRadioButton,AgRadioButtonSelector:()=>AgRadioButtonSelector,AgSelect:()=>AgSelect,AgSelectSelector:()=>AgSelectSelector,AgToggleButton:()=>AgToggleButton,AgToggleButtonSelector:()=>AgToggleButtonSelector,AlignedGridsModule:()=>AlignedGridsModule,AllCommunityModule:()=>AllCommunityModule,AutoScrollService:()=>AutoScrollService,BaseColsService:()=>BaseColsService,BaseComponentWrapper:()=>BaseComponentWrapper,BaseCreator:()=>BaseCreator,BaseGridSerializingSession:()=>BaseGridSerializingSession,BaseSelectionService:()=>BaseSelectionService,BeanStub:()=>BeanStub,BigIntFilterModule:()=>BigIntFilterModule,CellApiModule:()=>CellApiModule,CellRangeType:()=>CellRangeType,CellSpanModule:()=>CellSpanModule,CellStyleModule:()=>CellStyleModule,ChangedPath:()=>ChangedPath,CheckboxEditorModule:()=>CheckboxEditorModule,ClientSideRowModelApiModule:()=>ClientSideRowModelApiModule,ClientSideRowModelModule:()=>ClientSideRowModelModule,ColumnApiModule:()=>ColumnApiModule,ColumnAutoSizeModule:()=>ColumnAutoSizeModule,ColumnHoverModule:()=>ColumnHoverModule,ColumnKeyCreator:()=>ColumnKeyCreator,Component:()=>Component,CssClassManager:()=>CssClassManager,CsvExportModule:()=>CsvExportModule,CustomEditorModule:()=>CustomEditorModule,CustomFilterModule:()=>CustomFilterModule,DateEditorModule:()=>DateEditorModule,DateFilterModule:()=>DateFilterModule,Direction:()=>Direction,DragAndDropModule:()=>DragAndDropModule,DragSourceType:()=>DragSourceType,EventApiModule:()=>EventApiModule,ExternalFilterModule:()=>ExternalFilterModule,FakeHScrollComp:()=>FakeHScrollComp,FakeVScrollComp:()=>FakeVScrollComp,FilterButtonComp:()=>FilterButtonComp,FilterComp:()=>FilterComp,FilterWrapperComp:()=>FilterWrapperComp,GROUP_AUTO_COLUMN_ID:()=>GROUP_AUTO_COLUMN_ID,GROUP_HIERARCHY_COLUMN_ID_PREFIX:()=>GROUP_HIERARCHY_COLUMN_ID_PREFIX,GridBodyCtrl:()=>GridBodyCtrl,GridCoreCreator:()=>GridCoreCreator,GridCtrl:()=>GridCtrl,GridHeaderCtrl:()=>GridHeaderCtrl,GridStateModule:()=>GridStateModule,GroupInstanceIdCreator:()=>GroupInstanceIdCreator,HeaderRowContainerCtrl:()=>HeaderRowContainerCtrl,HighlightChangesModule:()=>HighlightChangesModule,InfiniteRowModelModule:()=>InfiniteRowModelModule,KeyCode:()=>KeyCode,LargeTextEditorModule:()=>LargeTextEditorModule,LocalEventService:()=>LocalEventService,LocaleModule:()=>LocaleModule,LocaleService:()=>LocaleService,ManagedFocusFeature:()=>ManagedFocusFeature,ModuleRegistry:()=>ModuleRegistry,NumberEditorModule:()=>NumberEditorModule,NumberFilterModule:()=>NumberFilterModule,PaginationModule:()=>PaginationModule,PinnedRowModel:()=>PinnedRowModel,PinnedRowModule:()=>PinnedRowModule,PositionableFeature:()=>PositionableFeature,ProvidedFilter:()=>ProvidedFilter,QuickFilterModule:()=>QuickFilterModule,ROW_NUMBERS_COLUMN_ID:()=>ROW_NUMBERS_COLUMN_ID,RefPlaceholder:()=>RefPlaceholder,RenderApiModule:()=>RenderApiModule,RowApiModule:()=>RowApiModule,RowAutoHeightModule:()=>RowAutoHeightModule,RowContainerCtrl:()=>RowContainerCtrl,RowDragModule:()=>RowDragModule,RowNode:()=>RowNode,RowSelectionModule:()=>RowSelectionModule,RowStyleModule:()=>RowStyleModule,SELECTION_COLUMN_ID:()=>SELECTION_COLUMN_ID,STRUCTURED_SCHEMA_FEATURES:()=>STRUCTURED_SCHEMA_FEATURES,ScrollApiModule:()=>ScrollApiModule,SelectEditorModule:()=>SelectEditorModule,ServerSideTransactionResultStatus:()=>ServerSideTransactionResultStatus,TabGuardClassNames:()=>TabGuardClassNames,TabGuardComp:()=>TabGuardComp,TabGuardCtrl:()=>TabGuardCtrl,TabGuardFeature:()=>TabGuardFeature,TextEditorModule:()=>TextEditorModule,TextFilterModule:()=>TextFilterModule,TooltipModule:()=>TooltipModule,TouchListener:()=>TouchListener,UndoRedoEditModule:()=>UndoRedoEditModule,ValidationModule:()=>ValidationModule,ValueCacheModule:()=>ValueCacheModule,VanillaFrameworkOverrides:()=>VanillaFrameworkOverrides,_AgBeanStub:()=>AgBeanStub,_AgComponentStub:()=>AgComponentStub,_AgContext:()=>AgContext,_AgPositionableFeature:()=>AgPositionableFeature,_AgTabGuardComp:()=>AgTabGuardComp,_AgTabGuardFeature:()=>AgTabGuardFeature,_AgTooltipComponent:()=>AgTooltipComponent,_AgTooltipFeature:()=>AgTooltipFeature,_BOOLEAN_MIXED_GRID_OPTIONS:()=>_BOOLEAN_MIXED_GRID_OPTIONS,_BaseDragAndDropService:()=>BaseDragAndDropService,_BaseDragService:()=>BaseDragService,_BaseEnvironment:()=>BaseEnvironment,_BaseEventService:()=>BaseEventService,_BasePopupService:()=>BasePopupService,_BaseRegistry:()=>BaseRegistry,_BaseTooltipStateManager:()=>BaseTooltipStateManager,_ChangedRowNodes:()=>ChangedRowNodes,_ColumnFilterModule:()=>ColumnFilterModule,_ColumnGroupModule:()=>ColumnGroupModule,_ColumnMoveModule:()=>ColumnMoveModule,_CsrmSsrmSharedApiModule:()=>CsrmSsrmSharedApiModule,_DragModule:()=>DragModule,_EditCoreModule:()=>EditCoreModule,_EmptyArray:()=>_EmptyArray,_EmptyBean:()=>EmptyBean,_FOCUS_MANAGED_CLASS:()=>FOCUS_MANAGED_CLASS,_FilterCoreModule:()=>FilterCoreModule,_FilterValueModule:()=>FilterValueModule,_GET_ALL_EVENTS:()=>_GET_ALL_EVENTS,_GET_ALL_GRID_OPTIONS:()=>_GET_ALL_GRID_OPTIONS,_HeaderComp:()=>HeaderComp,_HorizontalResizeModule:()=>HorizontalResizeModule,_KeyboardNavigationModule:()=>KeyboardNavigationModule,_MONTHS:()=>MONTHS,_PUBLIC_EVENTS:()=>_PUBLIC_EVENTS,_PUBLIC_EVENT_HANDLERS_MAP:()=>_PUBLIC_EVENT_HANDLERS_MAP,_PopupModule:()=>PopupModule,_ROW_ID_PREFIX_BOTTOM_PINNED:()=>ROW_ID_PREFIX_BOTTOM_PINNED,_ROW_ID_PREFIX_ROW_GROUP:()=>ROW_ID_PREFIX_ROW_GROUP,_ROW_ID_PREFIX_TOP_PINNED:()=>ROW_ID_PREFIX_TOP_PINNED,_RowModelSharedApiModule:()=>RowModelSharedApiModule,_STOP_PROPAGATION_CALLBACKS:()=>STOP_PROPAGATION_CALLBACKS,_SharedDragAndDropModule:()=>SharedDragAndDropModule,_SharedExportModule:()=>SharedExportModule,_SharedMenuModule:()=>SharedMenuModule,_SharedRowSelectionModule:()=>SharedRowSelectionModule,_SortModule:()=>SortModule,_SsrmInfiniteSharedApiModule:()=>SsrmInfiniteSharedApiModule,_addAdditionalCss:()=>_addAdditionalCss,_addColumnDefaultAndTypes:()=>_addColumnDefaultAndTypes,_addFocusableContainerListener:()=>_addFocusableContainerListener,_addGridCommonParams:()=>_addGridCommonParams,_anchorElementToMouseMoveEvent:()=>_anchorElementToMouseMoveEvent,_applyColumnState:()=>_applyColumnState,_areCellsEqual:()=>_areCellsEqual,_areColIdsEqual:()=>_areColIdsEqual,_areEqual:()=>_areEqual,_areSortDefsEqual:()=>_areSortDefsEqual,_asThemeImpl:()=>_asThemeImpl,_attemptToRestoreCellFocus:()=>_attemptToRestoreCellFocus,_batchCall:()=>_batchCall,_camelCaseToHumanText:()=>_camelCaseToHumanText,_canSkipShowingRowGroup:()=>_canSkipShowingRowGroup,_clearElement:()=>_clearElement,_columnsMatch:()=>_columnsMatch,_combineAttributesAndGridOptions:()=>_combineAttributesAndGridOptions,_convertColumnEventSourceType:()=>_convertColumnEventSourceType,_coreThemeDefaults:()=>coreDefaults,_createAgElement:()=>_createAgElement,_createCellId:()=>_createCellId,_createColumnTree:()=>_createColumnTree,_createColumnTreeWithIds:()=>_createColumnTreeWithIds,_createElement:()=>_createElement,_createGlobalRowEvent:()=>_createGlobalRowEvent,_createIcon:()=>_createIcon,_createIconNoSpan:()=>_createIconNoSpan,_createRowNodeSibling:()=>_createRowNodeSibling,_createSharedTheme:()=>createSharedTheme,_csrmFirstLeaf:()=>_csrmFirstLeaf,_csrmReorderAllLeafs:()=>_csrmReorderAllLeafs,_debounce:()=>_debounce,_defaultComparator:()=>_defaultComparator,_destroyColumnTree:()=>_destroyColumnTree,_doOnce:()=>_doOnce,_downloadFile:()=>_downloadFile,_errMsg:()=>_errMsg,_error:()=>_error,_escapeString:()=>_escapeString,_exists:()=>_exists,_findEnterpriseCoreModule:()=>_findEnterpriseCoreModule,_findFocusableElements:()=>_findFocusableElements,_findNextFocusableElement:()=>_findNextFocusableElement,_findTabbableParent:()=>_findTabbableParent,_flatten:()=>_flatten,_focusGridInnerElement:()=>_focusGridInnerElement,_focusInto:()=>_focusInto,_focusNextGridCoreContainer:()=>_focusNextGridCoreContainer,_formatNumberCommas:()=>_formatNumberCommas,_fuzzySuggestions:()=>_fuzzySuggestions,_getAbsoluteHeight:()=>_getAbsoluteHeight,_getAbsoluteRowIndex:()=>_getAbsoluteRowIndex,_getAbsoluteWidth:()=>_getAbsoluteWidth,_getActiveDomElement:()=>_getActiveDomElement,_getAriaPosInSet:()=>_getAriaPosInSet,_getCallbackForEvent:()=>_getCallbackForEvent,_getCellByPosition:()=>_getCellByPosition,_getCellCtrlForEventTarget:()=>_getCellCtrlForEventTarget,_getCellPositionForEvent:()=>_getCellPositionForEvent,_getCellRendererDetails:()=>_getCellRendererDetails,_getCheckboxLocation:()=>_getCheckboxLocation,_getCheckboxes:()=>_getCheckboxes,_getClientSideRowModel:()=>_getClientSideRowModel,_getColumnState:()=>_getColumnState,_getColumnStateFromColDef:()=>_getColumnStateFromColDef,_getColumnsFromTree:()=>_getColumnsFromTree,_getDateParts:()=>_getDateParts,_getDefaultFloatingFilterType:()=>_getDefaultFloatingFilterType,_getDefaultSimpleFilter:()=>_getDefaultSimpleFilter,_getDisplaySortForColumn:()=>_getDisplaySortForColumn,_getDocument:()=>_getDocument,_getEditorRendererDetails:()=>_getEditorRendererDetails,_getEnableColumnSelection:()=>_getEnableColumnSelection,_getFillHandle:()=>_getFillHandle,_getFilterDetails:()=>_getFilterDetails,_getFilterModel:()=>_getFilterModel,_getFilterParamsForDataType:()=>_getFilterParamsForDataType,_getFirstRow:()=>_getFirstRow,_getFloatingFilterCompDetails:()=>_getFloatingFilterCompDetails,_getFloatingFiltersHeight:()=>getFloatingFiltersHeight,_getGlobalGridOption:()=>_getGlobalGridOption,_getGrandTotalRow:()=>_getGrandTotalRow,_getGridOption:()=>_getGridOption,_getGridRegisteredModules:()=>_getGridRegisteredModules,_getGroupAggFiltering:()=>_getGroupAggFiltering,_getGroupSelection:()=>_getGroupSelection,_getGroupSelectsDescendants:()=>_getGroupSelectsDescendants,_getGroupTotalRowCallback:()=>_getGroupTotalRowCallback,_getHeaderCheckbox:()=>_getHeaderCheckbox,_getHeaderClassesFromColDef:()=>_getHeaderClassesFromColDef,_getHeaderRowCount:()=>getHeaderRowCount,_getInnerCellRendererDetails:()=>_getInnerCellRendererDetails,_getInnerHeight:()=>_getInnerHeight,_getInnerWidth:()=>_getInnerWidth,_getIsRowSelectable:()=>_getIsRowSelectable,_getLastRow:()=>_getLastRow,_getLocaleTextFromFunc:()=>_getLocaleTextFromFunc,_getLocaleTextFromMap:()=>_getLocaleTextFromMap,_getLocaleTextFunc:()=>_getLocaleTextFunc,_getMaxConcurrentDatasourceRequests:()=>_getMaxConcurrentDatasourceRequests,_getNormalisedMousePosition:()=>_getNormalisedMousePosition,_getPageBody:()=>_getPageBody,_getParamType:()=>getParamType,_getRootNode:()=>_getRootNode,_getRowAbove:()=>_getRowAbove,_getRowBelow:()=>_getRowBelow,_getRowContainerClass:()=>_getRowContainerClass,_getRowContainerOptions:()=>_getRowContainerOptions,_getRowCtrlForEventTarget:()=>_getRowCtrlForEventTarget,_getRowHeightAsNumber:()=>_getRowHeightAsNumber,_getRowHeightForNode:()=>_getRowHeightForNode,_getRowIdCallback:()=>_getRowIdCallback,_getRowNode:()=>_getRowNode,_getRowSelectionMode:()=>_getRowSelectionMode,_getRowSpanContainerClass:()=>_getRowSpanContainerClass,_getRowViewportClass:()=>_getRowViewportClass,_getServerSideRowModel:()=>_getServerSideRowModel,_getShouldDisplayTooltip:()=>_getShouldDisplayTooltip,_getSortDefFromColDef:()=>_getSortDefFromColDef,_getSortDefFromInput:()=>_getSortDefFromInput,_getSuppressMultiRanges:()=>_getSuppressMultiRanges,_getToolPanelClassesFromColDef:()=>_getToolPanelClassesFromColDef,_getViewportRowModel:()=>_getViewportRowModel,_getWindow:()=>_getWindow,_gridThemeLogger:()=>gridThemeLogger,_interpretAsRightClick:()=>_interpretAsRightClick,_isAnimateRows:()=>_isAnimateRows,_isBrowserFirefox:()=>_isBrowserFirefox,_isBrowserSafari:()=>_isBrowserSafari,_isCellSelectionEnabled:()=>_isCellSelectionEnabled,_isClientSideRowModel:()=>_isClientSideRowModel,_isColumnMenuAnchoringEnabled:()=>_isColumnMenuAnchoringEnabled,_isColumnsSortingCoupledToGroup:()=>_isColumnsSortingCoupledToGroup,_isComponent:()=>_isComponent,_isDomLayout:()=>_isDomLayout,_isElementInEventPath:()=>_isElementInEventPath,_isElementOverflowingCallback:()=>_isElementOverflowingCallback,_isEventFromPrintableCharacter:()=>_isEventFromPrintableCharacter,_isExpressionString:()=>_isExpressionString,_isFocusableFormField:()=>_isFocusableFormField,_isFullWidthGroupRow:()=>_isFullWidthGroupRow,_isGetRowHeightFunction:()=>_isGetRowHeightFunction,_isGroupMultiAutoColumn:()=>_isGroupMultiAutoColumn,_isGroupRowsSticky:()=>_isGroupRowsSticky,_isGroupUseEntireRow:()=>_isGroupUseEntireRow,_isIOSUserAgent:()=>_isIOSUserAgent,_isKeyboardMode:()=>_isKeyboardMode,_isLegacyMenuEnabled:()=>_isLegacyMenuEnabled,_isMultiRowSelection:()=>_isMultiRowSelection,_isNodeOrElement:()=>_isNodeOrElement,_isNothingFocused:()=>_isNothingFocused,_isPromise:()=>_isPromise,_isRowBefore:()=>_isRowBefore,_isRowNumbers:()=>_isRowNumbers,_isRowSelection:()=>_isRowSelection,_isSameRow:()=>_isSameRow,_isServerSideRowModel:()=>_isServerSideRowModel,_isSetFilterByDefault:()=>_isSetFilterByDefault,_isShowTooltipWhenTruncated:()=>_isShowTooltipWhenTruncated,_isSortDirectionValid:()=>_isSortDirectionValid,_isSortTypeValid:()=>_isSortTypeValid,_isStopPropagationForAgGrid:()=>_isStopPropagationForAgGrid,_isUseApplyButton:()=>_isUseApplyButton,_isUsingNewCellSelectionAPI:()=>_isUsingNewCellSelectionAPI,_isUsingNewRowSelectionAPI:()=>_isUsingNewRowSelectionAPI,_isVisible:()=>_isVisible,_jsonEquals:()=>_jsonEquals,_last:()=>_last,_loadTemplate:()=>_loadTemplate,_logPreInitWarn:()=>_logPreInitWarn,_makeNull:()=>_makeNull,_mergeDeep:()=>_mergeDeep,_missing:()=>_missing,_normalizeSortDirection:()=>_normalizeSortDirection,_normalizeSortType:()=>_normalizeSortType,_observeResize:()=>_observeResize,_paramToVariableName:()=>paramToVariableName,_paramValueToCss:()=>paramValueToCss,_parseBigIntOrNull:()=>_parseBigIntOrNull,_parseDateTimeFromString:()=>_parseDateTimeFromString,_placeCaretAtEnd:()=>_placeCaretAtEnd,_preInitErrMsg:()=>_preInitErrMsg,_prevOrNextDisplayedRow:()=>_prevOrNextDisplayedRow,_processOnChange:()=>_processOnChange,_radioCssClass:()=>_radioCssClass,_refreshFilterUi:()=>_refreshFilterUi,_refreshHandlerAndUi:()=>_refreshHandlerAndUi,_registerModule:()=>_registerModule,_removeAllFromArray:()=>_removeAllFromArray,_removeAriaExpanded:()=>_removeAriaExpanded,_removeAriaSort:()=>_removeAriaSort,_removeFromArray:()=>_removeFromArray,_removeFromParent:()=>_removeFromParent,_requestAnimationFrame:()=>_requestAnimationFrame,_resetColumnState:()=>_resetColumnState,_selectAllCells:()=>_selectAllCells,_serialiseDate:()=>_serialiseDate,_setAriaActiveDescendant:()=>_setAriaActiveDescendant,_setAriaChecked:()=>_setAriaChecked,_setAriaColCount:()=>_setAriaColCount,_setAriaColIndex:()=>_setAriaColIndex,_setAriaColSpan:()=>_setAriaColSpan,_setAriaControls:()=>_setAriaControls,_setAriaControlsAndLabel:()=>_setAriaControlsAndLabel,_setAriaDescribedBy:()=>_setAriaDescribedBy,_setAriaDisabled:()=>_setAriaDisabled,_setAriaExpanded:()=>_setAriaExpanded,_setAriaHasPopup:()=>_setAriaHasPopup,_setAriaHidden:()=>_setAriaHidden,_setAriaInvalid:()=>_setAriaInvalid,_setAriaLabel:()=>_setAriaLabel,_setAriaLabelledBy:()=>_setAriaLabelledBy,_setAriaLevel:()=>_setAriaLevel,_setAriaOrientation:()=>_setAriaOrientation,_setAriaPosInSet:()=>_setAriaPosInSet,_setAriaRole:()=>_setAriaRole,_setAriaRowCount:()=>_setAriaRowCount,_setAriaRowIndex:()=>_setAriaRowIndex,_setAriaSelected:()=>_setAriaSelected,_setAriaSetSize:()=>_setAriaSetSize,_setAriaSort:()=>_setAriaSort,_setColMenuVisible:()=>_setColMenuVisible,_setDisabled:()=>_setDisabled,_setDisplayed:()=>_setDisplayed,_setFixedWidth:()=>_setFixedWidth,_setUmd:()=>_setUmd,_setVisible:()=>_setVisible,_sharedThemeDefaults:()=>sharedDefaults,_shouldUpdateColVisibilityAfterGroup:()=>_shouldUpdateColVisibilityAfterGroup,_stopPropagationForAgGrid:()=>_stopPropagationForAgGrid,_suppressCellMouseEvent:()=>_suppressCellMouseEvent,_themeAlpineParams:()=>themeAlpineParams,_themeBalhamParams:()=>themeBalhamParams,_themeMaterialParams:()=>themeMaterialParams,_themeQuartzParams:()=>themeQuartzParams,_toString:()=>_toString,_toStringOrNull:()=>_toStringOrNull,_translate:()=>_translate,_translateForFilter:()=>translateForFilter,_unwrapUserComp:()=>_unwrapUserComp,_updateColsMap:()=>_updateColsMap,_updateColumnState:()=>_updateColumnState,_updateFilterModel:()=>_updateFilterModel,_waitUntil:()=>_waitUntil,_warn:()=>_warn,_warnOnce:()=>_warnOnce,agTestIdFor:()=>agTestIdFor,buttonStyleAlpine:()=>buttonStyleAlpine,buttonStyleBalham:()=>buttonStyleBalham,buttonStyleBase:()=>buttonStyleBase,buttonStyleQuartz:()=>buttonStyleQuartz,checkboxStyleDefault:()=>checkboxStyleDefault,colorSchemeDark:()=>colorSchemeDark,colorSchemeDarkBlue:()=>colorSchemeDarkBlue,colorSchemeDarkWarm:()=>colorSchemeDarkWarm,colorSchemeLight:()=>colorSchemeLight,colorSchemeLightCold:()=>colorSchemeLightCold,colorSchemeLightWarm:()=>colorSchemeLightWarm,colorSchemeVariable:()=>colorSchemeVariable,columnDropStyleBordered:()=>columnDropStyleBordered,columnDropStylePlain:()=>columnDropStylePlain,convertColumnGroupState:()=>convertColumnGroupState,convertColumnState:()=>convertColumnState,createGrid:()=>createGrid,createPart:()=>createPart,createTheme:()=>createTheme,getGridApi:()=>getGridApi,getGridElement:()=>getGridElement,iconOverrides:()=>iconOverrides,iconSetAlpine:()=>iconSetAlpine,iconSetBalham:()=>iconSetBalham,iconSetMaterial:()=>iconSetMaterial,iconSetQuartz:()=>iconSetQuartz,iconSetQuartzBold:()=>iconSetQuartzBold,iconSetQuartzLight:()=>iconSetQuartzLight,iconSetQuartzRegular:()=>iconSetQuartzRegular,inputStyleBase:()=>inputStyleBase,inputStyleBordered:()=>inputStyleBordered,inputStyleUnderlined:()=>inputStyleUnderlined,isColumn:()=>isColumn,isColumnGroup:()=>isColumnGroup,isColumnGroupAutoCol:()=>isColumnGroupAutoCol,isColumnSelectionCol:()=>isColumnSelectionCol,isCombinedFilterModel:()=>isCombinedFilterModel,isProvidedColumnGroup:()=>isProvidedColumnGroup,isRowNumberCol:()=>isRowNumberCol,isSpecialCol:()=>isSpecialCol,onRowHeightChanged:()=>onRowHeightChanged,provideGlobalGridOptions:()=>provideGlobalGridOptions,resetRowHeights:()=>resetRowHeights,setupAgTestIds:()=>setupAgTestIds,styleMaterial:()=>styleMaterial,tabStyleAlpine:()=>tabStyleAlpine,tabStyleBase:()=>tabStyleBase,tabStyleMaterial:()=>tabStyleMaterial,tabStyleQuartz:()=>tabStyleQuartz,tabStyleRolodex:()=>tabStyleRolodex,themeAlpine:()=>themeAlpine,themeBalham:()=>themeBalham,themeMaterial:()=>themeMaterial,themeQuartz:()=>themeQuartz,wrapAgTestIdFor:()=>wrapAgTestIdFor}),module.exports=__toCommonJS(main_exports);var _EmptyArray=Object.freeze([]);function _last(e){if(e?.length)return e[e.length-1]}function _areEqual(e,t,i){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const o=e.length;if(o!==t.length)return!1;for(let s=0;s<o;s++)if(e[s]!==t[s]&&!i?.(e[s],t[s]))return!1;return!0}function _forAll(e,t){if(e){for(const i of e)if(t(i))return!0}}function _removeFromArray(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function _removeAllFromArray(e,t){let i=0,o=0;for(;i<e.length;i++)t.includes(e[i])||(e[o]=e[i],o++);for(;o<e.length;)e.pop()}function _moveInArray(e,t,i){for(let o=0;o<t.length;o++)_removeFromArray(e,t[o]);for(let o=t.length-1;o>=0;o--)e.splice(i,0,t[o])}function _flatten(e){return[].concat.apply([],e)}var _makeNull=e=>e==null||e===""?null:e;function _exists(e){return e!=null&&e!==""}function _missing(e){return!_exists(e)}var _toStringOrNull=e=>e!=null&&typeof e.toString=="function"?e.toString():null,_jsonEquals=(e,t)=>{const i=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return i===o},_defaultComparator=(e,t,i=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e=="object"&&e.toNumber&&(e=e.toNumber()),typeof t=="object"&&t.toNumber&&(t=t.toNumber()),!i||typeof e!="string"?e>t?1:e<t?-1:0:e.localeCompare(t)),LocalEventService=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const o=t?this.allAsyncListeners:this.allSyncListeners;let s=o.get(e);return!s&&i&&(s=new Set,o.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const o=this.getListeners(e,i,!1);o&&(o.delete(t),o.size===0&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const l=e.event;l instanceof Event&&(e.eventPath=l.composedPath())}const{frameworkOverrides:o}=this,s=l=>{const a=o?()=>o.wrapIncoming(l):l;t?this.dispatchAsync(a):a()},n=this.getListeners(i,t,!1);if((n?.size??0)>0){const l=new Set(n);for(const a of l)n?.has(a)&&s(()=>a(e))}const r=this.getGlobalListeners(t);if(r.size>0){const l=new Set(r);for(const a of l)s(()=>a(i,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},i=this.frameworkOverrides;i?i.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}},reUnescapedHtml=/[&<>"']/g,HTML_ESCAPES={"&":"&","<":"<",">":">",'"':""","'":"'"};function _toString(e){return e?.toString().toString()??null}function _escapeString(e){return _toString(e)?.replace(reUnescapedHtml,t=>HTML_ESCAPES[t])??null}function _isExpressionString(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function _camelCaseToHumanText(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,i=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(i,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" ")}function _getRootNode(e){return e.eRootDiv.getRootNode()}function _getActiveDomElement(e){return _getRootNode(e).activeElement}function _getDocument(e){const{gos:t,eRootDiv:i}=e;let o=null;const s=t.get("getDocument");return s&&_exists(s)?o=s():i&&(o=i.ownerDocument),o&&_exists(o)?o:document}function _isNothingFocused(e){const t=_getActiveDomElement(e);return t===null||t===_getDocument(e).body}function _getWindow(e){return _getDocument(e).defaultView||window}function _getPageBody(e){let t=null,i=null;try{t=_getDocument(e).fullscreenElement}catch{}finally{t||(t=_getRootNode(e));const o=t.querySelector("body");o?i=o:t instanceof ShadowRoot?i=t:t instanceof Document?i=t?.documentElement:i=t}return i}function _getBodyWidth(e){return _getPageBody(e)?.clientWidth??(window.innerWidth||-1)}function _getBodyHeight(e){return _getPageBody(e)?.clientHeight??(window.innerHeight||-1)}function _toggleAriaAttribute(e,t,i){i==null||typeof i=="string"&&i==""?_removeAriaAttribute(e,t):_setAriaAttribute(e,t,i)}function _setAriaAttribute(e,t,i){e.setAttribute(_ariaAttributeName(t),i.toString())}function _removeAriaAttribute(e,t){e.removeAttribute(_ariaAttributeName(t))}function _ariaAttributeName(e){return`aria-${e}`}function _setAriaRole(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function _getAriaSortState(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function _getAriaPosInSet(e){return Number.parseInt(e.getAttribute("aria-posinset"),10)}function _getAriaLabel(e){return e.getAttribute("aria-label")}function _setAriaLabel(e,t){_toggleAriaAttribute(e,"label",t)}function _setAriaLabelledBy(e,t){_toggleAriaAttribute(e,"labelledby",t)}function _setAriaDescribedBy(e,t){_toggleAriaAttribute(e,"describedby",t)}function _setAriaLive(e,t){_toggleAriaAttribute(e,"live",t)}function _setAriaAtomic(e,t){_toggleAriaAttribute(e,"atomic",t)}function _setAriaRelevant(e,t){_toggleAriaAttribute(e,"relevant",t)}function _setAriaInvalid(e,t){_toggleAriaAttribute(e,"invalid",t)}function _setAriaLevel(e,t){_toggleAriaAttribute(e,"level",t)}function _setAriaDisabled(e,t){_toggleAriaAttribute(e,"disabled",t)}function _setAriaHidden(e,t){_toggleAriaAttribute(e,"hidden",t)}function _setAriaActiveDescendant(e,t){_toggleAriaAttribute(e,"activedescendant",t)}function _setAriaExpanded(e,t){_setAriaAttribute(e,"expanded",t)}function _removeAriaExpanded(e){_removeAriaAttribute(e,"expanded")}function _setAriaSetSize(e,t){_setAriaAttribute(e,"setsize",t)}function _setAriaPosInSet(e,t){_setAriaAttribute(e,"posinset",t)}function _setAriaMultiSelectable(e,t){_setAriaAttribute(e,"multiselectable",t)}function _setAriaRowCount(e,t){_setAriaAttribute(e,"rowcount",t)}function _setAriaRowIndex(e,t){_setAriaAttribute(e,"rowindex",t)}function _setAriaRowSpan(e,t){_setAriaAttribute(e,"rowspan",t)}function _setAriaColCount(e,t){_setAriaAttribute(e,"colcount",t)}function _setAriaColIndex(e,t){_setAriaAttribute(e,"colindex",t)}function _setAriaColSpan(e,t){_setAriaAttribute(e,"colspan",t)}function _setAriaSort(e,t){_setAriaAttribute(e,"sort",t)}function _removeAriaSort(e){_removeAriaAttribute(e,"sort")}function _setAriaSelected(e,t){_toggleAriaAttribute(e,"selected",t)}function _setAriaChecked(e,t){_setAriaAttribute(e,"checked",t===void 0?"mixed":t)}function _setAriaControls(e,t){_toggleAriaAttribute(e,"controls",t)}function _setAriaControlsAndLabel(e,t){_setAriaControls(e,t.id),_setAriaLabelledBy(t,e.id)}function _setAriaOwns(e,t){_toggleAriaAttribute(e,"owns",t)}function _setAriaHasPopup(e,t){_toggleAriaAttribute(e,"haspopup",t===!1?null:t)}function _getAriaCheckboxStateName(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function _setAriaOrientation(e,t){t?_setAriaAttribute(e,"orientation",t):_removeAriaAttribute(e,"orientation")}function _radioCssClass(e,t,i){const o=e.parentElement;let s=o&&o.firstChild;for(;s;)t&&s.classList.toggle(t,s===e),i&&s.classList.toggle(i,s!==e),s=s.nextSibling}var FOCUSABLE_SELECTOR="[tabindex], input, select, button, textarea, [href]",FOCUSABLE_EXCLUDE="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function _isFocusableFormField(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(FOCUSABLE_EXCLUDE)?!1:_isVisible(e)}function _setDisplayed(e,t,i={}){const{skipAriaHidden:o}=i;e.classList.toggle("ag-hidden",!t),o||_setAriaHidden(e,!t)}function _setVisible(e,t,i={}){const{skipAriaHidden:o}=i;e.classList.toggle("ag-invisible",!t),o||_setAriaHidden(e,!t)}function _setDisabled(e,t){const i="disabled",o=t?n=>n.setAttribute(i,""):n=>n.removeAttribute(i);o(e);const s=e.querySelectorAll("input")??[];for(const n of s)o(n)}function _isElementChildOfClass(e,t,i){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++o>i)break}else if(e===i)break}return!1}function _getElementSize(e){const{height:t,width:i,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:n,borderLeftWidth:r,paddingTop:l,paddingRight:a,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:h,marginBottom:g,marginLeft:p,boxSizing:f}=window.getComputedStyle(e),m=Number.parseFloat;return{height:m(t||"0"),width:m(i||"0"),borderTopWidth:m(o||"0"),borderRightWidth:m(s||"0"),borderBottomWidth:m(n||"0"),borderLeftWidth:m(r||"0"),paddingTop:m(l||"0"),paddingRight:m(a||"0"),paddingBottom:m(d||"0"),paddingLeft:m(c||"0"),marginTop:m(u||"0"),marginRight:m(h||"0"),marginBottom:m(g||"0"),marginLeft:m(p||"0"),boxSizing:f}}function _getInnerHeight(e){const t=_getElementSize(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function _getInnerWidth(e){const t=_getElementSize(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function _getAbsoluteHeight(e){const{height:t,marginBottom:i,marginTop:o}=_getElementSize(e);return Math.floor(t+i+o)}function _getAbsoluteWidth(e){const{width:t,marginLeft:i,marginRight:o}=_getElementSize(e);return Math.floor(t+i+o)}function _getElementRectWithOffset(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:n}=_getElementSize(e);return{top:t.top+(i||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(n||0)}}function _getScrollLeft(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i)),i}function _setScrollLeft(e,t,i){i&&(t*=-1),e.scrollLeft=t}function _clearElement(e){for(;e?.firstChild;)e.firstChild.remove()}function _removeFromParent(e){e?.parentNode&&e.remove()}function _isInDOM(e){return!!e.offsetParent}function _isVisible(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!_isInDOM(e)||window.getComputedStyle(e).visibility!=="visible")}function _loadTemplate(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function _ensureDomOrder(e,t,i){i&&i.nextSibling===t||(e.firstChild?i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.prepend(t):e.appendChild(t))}function _setDomChildOrder(e,t){for(let i=0;i<t.length;i++){const o=t[i],s=e.children[i];s!==o&&e.insertBefore(o,s)}}function _camelCaseToHyphenated(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function _addStylesToElement(e,t){if(t)for(const i of Object.keys(t)){const o=t[i];if(!i?.length||o==null)continue;const s=_camelCaseToHyphenated(i),n=o.toString(),r=n.replace(/\s*!important/g,""),l=r.length!=n.length?"important":void 0;e.style.setProperty(s,r,l)}}function _isElementOverflowingCallback(e){return()=>{const t=e();return t?_isHorizontalScrollShowing(t)||_isVerticalScrollShowing(t):!0}}function _isHorizontalScrollShowing(e){return e.clientWidth<e.scrollWidth}function _isVerticalScrollShowing(e){return e.clientHeight<e.scrollHeight}function _setElementWidth(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):_setFixedWidth(e,t)}function _setFixedWidth(e,t){t=_formatSize(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function _setFixedHeight(e,t){t=_formatSize(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function _formatSize(e){return typeof e=="number"?`${e}px`:e}function _isNodeOrElement(e){return e instanceof Node||e instanceof HTMLElement}function _addOrRemoveAttribute(e,t,i){i==null||i===""?e.removeAttribute(t):e.setAttribute(t,i.toString())}function _placeCaretAtEnd(e,t){if(!t.isContentEditable)return;const i=_getWindow(e).getSelection();if(!i)return;const o=_getDocument(e).createRange();o.selectNodeContents(t),o.collapse(!1),i.removeAllRanges(),i.addRange(o)}function _observeResize(e,t,i){const s=_getWindow(e).ResizeObserver,n=s?new s(i):null;return n?.observe(t),()=>n?.disconnect()}function _requestAnimationFrame(e,t){const i=_getWindow(e);i.requestAnimationFrame?i.requestAnimationFrame(t):i.webkitRequestAnimationFrame?i.webkitRequestAnimationFrame(t):i.setTimeout(t,0)}var DataRefAttribute="data-ref",whitespaceNode;function getWhitespaceNode(){return whitespaceNode??(whitespaceNode=document.createTextNode(" ")),whitespaceNode.cloneNode()}function _createAgElement(e){const{attrs:t,children:i,cls:o,ref:s,role:n,tag:r}=e,l=document.createElement(r);if(o&&(l.className=o),s&&l.setAttribute(DataRefAttribute,s),n&&l.setAttribute("role",n),t)for(const a of Object.keys(t))l.setAttribute(a,t[a]);if(i)if(typeof i=="string")l.textContent=i;else{let a=!0;for(const d of i)d&&(typeof d=="string"?(l.appendChild(document.createTextNode(d)),a=!1):typeof d=="function"?l.appendChild(d()):(a&&(l.appendChild(getWhitespaceNode()),a=!1),l.append(_createAgElement(d)),l.appendChild(getWhitespaceNode())))}return l}var PASSIVE_EVENTS=["touchstart","touchend","touchmove","touchcancel","scroll"],NON_PASSIVE_EVENTS=["wheel"],supports={},_isEventSupported=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof supports[i]=="boolean")return supports[i];const o=document.createElement(e[i]||"div");return i="on"+i,supports[i]=i in o}})();function _isElementInEventPath(e,t){return!t||!e?!1:_getEventPath(t).indexOf(e)>=0}function _createEventPath(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function _getEventPath(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():_createEventPath(t)}function _addSafePassiveEventListener(e,t,i){const o=getPassiveStateForEvent(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,i,s)}var getPassiveStateForEvent=e=>{const t=PASSIVE_EVENTS.includes(e),i=NON_PASSIVE_EVENTS.includes(e);if(t)return!0;if(i)return!1};function _areEventsNear(e,t,i){if(i===0)return!1;const o=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(o,s)<=i}var _getFirstActiveTouch=(e,t)=>{const i=e.identifier;for(let o=0,s=t.length;o<s;++o){const n=t[o];if(n.identifier===i)return n}return null};function _isEventFromThisInstance(e,t){return e.gos.isElementInThisInstance(t.target)}function _anchorElementToMouseMoveEvent(e,t,i){const s=e.getBoundingClientRect().height,n=_getBodyWidth(i)-2,r=_getBodyHeight(i)-2;if(!e.offsetParent)return;const a=_getElementRectWithOffset(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-a.top-s/2,h=c-a.left-10;const g=_getDocument(i),p=g.defaultView||window,f=p.pageYOffset||g.documentElement.scrollTop,m=p.pageXOffset||g.documentElement.scrollLeft;n>0&&h+e.clientWidth>n+m&&(h=n+m-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+f&&(u=r+f-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}var addTempEventHandlers=(e,...t)=>{for(const i of t){const[o,s,n,r]=i;o.addEventListener(s,n,r),e.push(i)}},clearTempEventHandlers=e=>{if(e){for(const[t,i,o,s]of e)t.removeEventListener(i,o,s);e.length=0}},preventEventDefault=e=>{e.cancelable&&e.preventDefault()};function defaultLocaleTextFunc(e,t){return t}function _getLocaleTextFunc(e){return e?.getLocaleTextFunc()??defaultLocaleTextFunc}function _translate(e,t,i,o){const s=t[i];return e.getLocaleTextFunc()(i,typeof s=="function"?s(o):s,o)}function _getLocaleTextFromFunc(e){return(t,i,o)=>e({key:t,defaultValue:i,variableValues:o})}function _getLocaleTextFromMap(e){return(t,i,o)=>{let s=e?.[t];if(s&&o?.length){let n=0;for(;!(n>=o.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",o[n++])}return s??i}}var AgBeanStub=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,i){this.localEventService||(this.localEventService=new LocalEventService),this.localEventService.addEventListener(e,t,i)}removeEventListener(e,t,i){this.localEventService?.removeEventListener(e,t,i)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const i=[];for(const o of Object.keys(t)){const s=t[o];s&&i.push(this._setupListener(e,o,s))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;let o;if(isAgEventEmitter(e))e.__addEventListener(t,i),o=()=>(e.__removeEventListener(t,i),null);else{const s=isEventService(e);e instanceof HTMLElement?_addSafePassiveEventListener(e,t,i):s?e.addListener(t,i):e.addEventListener(t,i),o=s?()=>(e.removeListener(t,i),null):()=>(e.removeEventListener(t,i),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}setupPropertyListener(e,t){const{gos:i}=this;i.addPropertyEventListener(e,t);const o=()=>(i.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,o=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=s.changeSet.id}const n={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(n)};for(const s of e)this.setupPropertyListener(s,o)}getLocaleTextFunc(){return _getLocaleTextFunc(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function isAgEventEmitter(e){return e.__addEventListener!==void 0}function isEventService(e){return e.eventServiceType==="global"}var BeanStub=class extends AgBeanStub{},doOnceSet=new Set,_doOnce=(e,t)=>{doOnceSet.has(t)||(doOnceSet.add(t),e())};_doOnce._set=doOnceSet;var batchedCallsSetTimeout={pending:!1,funcs:[]},batchedCallsRaf={pending:!1,funcs:[]};function _batchCall(e,t="setTimeout",i){const o=t==="raf"?batchedCallsRaf:batchedCallsSetTimeout;if(o.funcs.push(e),o.pending)return;o.pending=!0;const s=()=>{const n=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const r of n)r()};t==="raf"?_requestAnimationFrame(i,s):window.setTimeout(s,0)}function _debounce(e,t,i){let o;return function(...s){const n=this;return window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(n,s)},i),o}}function _throttle(e,t){let i=0;return function(...o){const s=this,n=Date.now();n-i<t||(i=n,e.apply(s,o))}}function _waitUntil(e,t,i,o=100){const s=Date.now();let n=null,r=!1;const l=()=>{n!=null&&(window.clearInterval(n),n=null)};e.addDestroyFunc(l);const a=()=>{const d=Date.now()-s>o;(t()||d)&&(i(),r=!0,l())};a(),r||(n=window.setInterval(a,10))}var SKIP_JS_BUILTINS=new Set(["__proto__","constructor","prototype"]);function _iterateObject(e,t){if(e!=null){if(Array.isArray(e)){for(let i=0;i<e.length;i++)t(i.toString(),e[i]);return}for(const i of Object.keys(e).filter(o=>!SKIP_JS_BUILTINS.has(o)))t(i,e[i])}}function _mergeDeep(e,t,i=!0,o=!1){_exists(t)&&_iterateObject(t,(s,n)=>{let r=e[s];r!==n&&(o&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[s]=r),_isNonNullObject(n)&&_isNonNullObject(r)&&!Array.isArray(r)?_mergeDeep(r,n,i,o):(i||n!==void 0)&&(e[s]=n))})}function _isNonNullObject(e){return typeof e=="object"&&e!==null}var _GlobalGridOptions=class k{static applyGlobalGridOptions(t){if(!k.gridOptions)return{...t};let i={};return _mergeDeep(i,k.gridOptions,!0,!0),k.mergeStrategy==="deep"?_mergeDeep(i,t,!0,!0):i={...i,...t},k.gridOptions.context&&(i.context=k.gridOptions.context),t.context&&(k.mergeStrategy==="deep"&&i.context&&_mergeDeep(t.context,i.context,!0,!0),i.context=t.context),i}static applyGlobalGridOption(t,i){if(k.mergeStrategy==="deep"){const o=_getGlobalGridOption(t);if(o&&typeof o=="object"&&typeof i=="object")return k.applyGlobalGridOptions({[t]:i})[t]}return i}};_GlobalGridOptions.gridOptions=void 0,_GlobalGridOptions.mergeStrategy="shallow";var GlobalGridOptions=_GlobalGridOptions;function provideGlobalGridOptions(e,t="shallow"){GlobalGridOptions.gridOptions=e,GlobalGridOptions.mergeStrategy=t}function _getGlobalGridOption(e){return GlobalGridOptions.gridOptions?.[e]}var GRID_OPTION_DEFAULTS={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!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,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!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,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,refreshAfterGroupEdit:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!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,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!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,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,enableFilterHandlers:!1},BASE_URL="https://www.ag-grid.com";function _logIfDebug(e,t,...i){e.get("debug")&&console.log("AG Grid: "+t,...i)}function _warnOnce(e,...t){_doOnce(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function _errorOnce(e,...t){_doOnce(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var allRegisteredModules=new Set,globalModulesMap={},gridModulesMap={},currentModuleVersion,userHasRegistered=!1,areGridScopedModules=!1,isUmd=!1;function isValidModuleVersion(e){const[t,i]=e.version.split(".")||[],[o,s]=currentModuleVersion.split(".")||[];return t===o&&i===s}function runVersionChecks(e){currentModuleVersion||(currentModuleVersion=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;e.version?isValidModuleVersion(e)||_errorOnce(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${currentModuleVersion}.`)):_errorOnce(t(`'${e.moduleName}' is incompatible.`));const i=e.validate?.();i&&!i.isValid&&_errorOnce(`${i.message}`)}function _registerModule(e,t,i=!1){i||(userHasRegistered=!0),runVersionChecks(e);const o=e.rowModels??["all"];allRegisteredModules.add(e);let s;t!==void 0?(areGridScopedModules=!0,gridModulesMap[t]===void 0&&(gridModulesMap[t]={}),s=gridModulesMap[t]):s=globalModulesMap;for(const n of o)s[n]===void 0&&(s[n]={}),s[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)_registerModule(n,t,i)}function _unRegisterGridModules(e){delete gridModulesMap[e]}function _isModuleRegistered(e,t,i){const o=s=>!!globalModulesMap[s]?.[e]||!!gridModulesMap[t]?.[s]?.[e];return o(i)||o("all")}function _areModulesGridScoped(){return areGridScopedModules}function _getRegisteredModules(e,t){const i=gridModulesMap[e]??{};return[...Object.values(globalModulesMap.all??{}),...Object.values(i.all??{}),...Object.values(globalModulesMap[t]??{}),...Object.values(i[t]??{})]}function _getAllRegisteredModules(){return new Set(allRegisteredModules)}function _getGridRegisteredModules(e,t){const i=gridModulesMap[e]??{};return[...Object.values(i.all??{}),...Object.values(i[t]??{})]}function _hasUserRegistered(){return userHasRegistered}function _isUmd(){return isUmd}function _setUmd(){isUmd=!0}var ModuleRegistry=class{static register(e){_registerModule(e,void 0)}static registerModules(e){for(const t of e)_registerModule(t,void 0)}};function _findEnterpriseCoreModule(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const i=_findEnterpriseCoreModule(t.dependsOn);if(i)return i}}}var VERSION="35.1.0",MAX_URL_LENGTH=2e3,MIN_PARAM_LENGTH=100,VERSION_PARAM_NAME="_version_",getConsoleMessage=null,baseDocLink=`${BASE_URL}/javascript-data-grid`;function provideValidationServiceLogger(e){getConsoleMessage=e}function setValidationDocLink(e){baseDocLink=e}function getErrorParts(e,t,i){return getConsoleMessage?.(e,t)??[minifiedLog(e,t,i)]}function getMsgOrDefault(e,t,i,o,s){e(`${o?"warning":"error"} #${t}`,...getErrorParts(t,i,s))}function stringifyObject(e){if(!e)return String(e);const t={};for(const i of Object.keys(e))typeof e[i]!="object"&&typeof e[i]!="function"&&(t[i]=e[i]);return JSON.stringify(t)}function stringifyValue(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=stringifyObject(e)),t}function toStringWithNullUndefined(e){return e===void 0?"undefined":e===null?"null":e}function getParamsUrl(e,t){return`${e}?${t.toString()}`}function truncateUrl(e,t,i){const o=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let s=getParamsUrl(e,t);for(const[n,r]of o){if(n===VERSION_PARAM_NAME)continue;const l=s.length-i;if(l<=0)break;const a="...",d=l+a.length,c=r.length-d>MIN_PARAM_LENGTH?r.slice(0,r.length-d)+a:r.slice(0,MIN_PARAM_LENGTH)+a;t.set(n,c),s=getParamsUrl(e,t)}return s}function getErrorLink(e,t){const i=new URLSearchParams;if(i.append(VERSION_PARAM_NAME,VERSION),t)for(const n of Object.keys(t))i.append(n,stringifyValue(t[n]));const o=`${baseDocLink}/errors/${e}`,s=getParamsUrl(o,i);return s.length<=MAX_URL_LENGTH?s:truncateUrl(o,i,MAX_URL_LENGTH)}var minifiedLog=(e,t,i)=>{const o=getErrorLink(e,t),s=`${i?i+`
|
|
`:""}Visit ${o}`;return _isUmd()?s:`${s}${i?"":`
|
|
Alternatively register the ValidationModule to see the full message in the console.`}`};function _warn(...e){getMsgOrDefault(_warnOnce,e[0],e[1],!0)}function _error(...e){getMsgOrDefault(_errorOnce,e[0],e[1],!1)}function _logPreInitErr(e,t,i){getMsgOrDefault(_errorOnce,e,t,!1,i)}function _logPreInitWarn(e,t,i){getMsgOrDefault(_warnOnce,e,t,!0,i)}function getErrMsg(e,t){const i=t[0];return`error #${i} `+getErrorParts(i,t[1],e).join(" ")}function _errMsg(...e){return getErrMsg(void 0,e)}function _preInitErrMsg(...e){return getErrMsg(`
|
|
`,e)}function isRowModelType(e,t){return e.get("rowModelType")===t}function _isClientSideRowModel(e,t){return isRowModelType(e,"clientSide")}function _isServerSideRowModel(e,t){return isRowModelType(e,"serverSide")}function _isDomLayout(e,t){return e.get("domLayout")===t}function _isRowSelection(e){return _getRowSelectionMode(e)!==void 0}function _isGetRowHeightFunction(e){return typeof e.get("getRowHeight")=="function"}function _shouldMaintainColumnOrder(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function _isRowNumbers({gos:e,formula:t}){const i=e.get("rowNumbers");return i||!!t?.active&&i!==!1}function _getRowHeightForNode(e,t,i=!1,o){const{gos:s,environment:n}=e;if(o==null&&(o=n.getDefaultRowHeight()),_isGetRowHeightFunction(s)){if(i)return{height:o,estimated:!0};const a={node:t,data:t.data},d=s.getCallback("getRowHeight")(a);if(isNumeric(d))return d===0&&_warn(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&s.get("masterDetail"))return getMasterDetailRowHeight(s);const r=s.get("rowHeight");return{height:r&&isNumeric(r)?r:o,estimated:!1}}function getMasterDetailRowHeight(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return isNumeric(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function _getRowHeightAsNumber(e){const{environment:t,gos:i}=e,o=i.get("rowHeight");if(!o||_missing(o))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(_warn(24),t.getDefaultRowHeight())}function isNumeric(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function _getDomData(e,t,i){const o=t[e.getDomDataKey()];return o?o[i]:void 0}function _setDomData(e,t,i,o){const s=e.getDomDataKey();let n=t[s];_missing(n)&&(n={},t[s]=n),n[i]=o}function _isAnimateRows(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function _isGroupRowsSticky(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||_isDomLayout(e,"print"))}function _isColumnsSortingCoupledToGroup(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function _getGroupAggFiltering(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function _getGrandTotalRow(e){return e.get("grandTotalRow")}function _getGroupTotalRowCallback(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function _isGroupMultiAutoColumn(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function _isGroupUseEntireRow(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function _isFullWidthGroupRow(e,t,i){return!!t.group&&!t.footer&&_isGroupUseEntireRow(e,i)}function _getRowIdCallback(e){const t=e.getCallback("getRowId");return t===void 0?t:i=>{let o=t(i);return typeof o!="string"&&(_doOnce(()=>_warn(25,{id:o}),"getRowIdString"),o=String(o)),o}}function _canSkipShowingRowGroup(e,t){const i=e.get("groupHideParentOfSingleChild");return!!(i===!0||i==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function _getMaxConcurrentDatasourceRequests(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function _shouldUpdateColVisibilityAfterGroup(e,t){const i=e.get("suppressGroupChangesColumnVisibility");if(i===!0||t&&i==="suppressHideOnGroup"||!t&&i==="suppressShowOnUngroup")return!1;const o=e.get("suppressRowGroupHidesColumns");if(t&&o===!0)return!1;const s=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&s===!0)}function _getCheckboxes(e){return e?.checkboxes??!0}function _getHeaderCheckbox(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function _getCheckboxLocation(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function _getHideDisabledCheckboxes(e){return e?.hideDisabledCheckboxes??!1}function _isUsingNewRowSelectionAPI(e){return typeof e.get("rowSelection")!="string"}function _isUsingNewCellSelectionAPI(e){return e.get("cellSelection")!==void 0}function _getSuppressMultiRanges(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t?.suppressMultiRanges??!1:!1:e.get("suppressMultiRangeSelection")}function _isCellSelectionEnabled(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function _getFillHandle(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"&&t.handle?.mode==="fill"?t.handle:void 0:{mode:"fill",setFillValue:e.get("fillOperation"),direction:e.get("fillHandleDirection"),suppressClearOnFillReduction:e.get("suppressClearOnFillReduction")}}function _getEnableColumnSelection(e){const t=e.get("cellSelection")??!1;return(typeof t=="object"&&t.enableColumnSelection)??!1}function _getEnableClickSelection(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return i&&o?!1:i?"enableDeselection":o?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function _getEnableSelection(e){const t=_getEnableClickSelection(e);return t===!0||t==="enableSelection"}function _getEnableDeselection(e){const t=_getEnableClickSelection(e);return t===!0||t==="enableDeselection"}function _getIsRowSelectable(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function _getRowSelectionMode(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function _isMultiRowSelection(e){return _getRowSelectionMode(e)==="multiRow"}function _getEnableSelectionWithoutKeys(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function _getGroupSelection(e){const t=e.get("rowSelection");if(typeof t=="string"){const i=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return i&&o?"filteredDescendants":i?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function _getSelectAll(e,t=!0){const i=e.get("rowSelection");return typeof i!="object"?t?"all":void 0:i.mode==="multiRow"?i.selectAll:"all"}function _getCtrlASelectsRows(e){const t=e.get("rowSelection");return typeof t=="string"?!1:t?.mode==="multiRow"?t.ctrlASelectsRows??!1:!1}function _getGroupSelectsDescendants(e){const t=_getGroupSelection(e);return t==="descendants"||t==="filteredDescendants"}function _getMasterSelects(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function _isSetFilterByDefault(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function _isLegacyMenuEnabled(e){return e.get("columnMenu")==="legacy"}function _isColumnMenuAnchoringEnabled(e){return!_isLegacyMenuEnabled(e)}function _getCallbackForEvent(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function _combineAttributesAndGridOptions(e,t,i){typeof e!="object"&&(e={});const o={...e};for(const s of i){const n=t[s];typeof n<"u"&&(o[s]=n)}return o}function _processOnChange(e,t){if(!e)return;const i={};let o=!1;for(const r of Object.keys(e))i[r]=e[r],o=!0;if(!o)return;const s={type:"gridOptionsChanged",options:i};t.dispatchEvent(s);const n={type:"componentStateChanged",...i};t.dispatchEvent(n)}function _addGridCommonParams(e,t){return e.addCommon(t)}function _getGridOption(e,t){return e[t]??e.gridOptions?.[t]??_getGlobalGridOption(t)??GRID_OPTION_DEFAULTS[t]}function _interpretAsRightClick({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var COL_DEF_DEFAULTS={resizable:!0,sortable:!0},instanceIdSequence=0;function getNextColInstanceId(){return instanceIdSequence++}function isColumn(e){return e instanceof AgColumn}var DEFAULT_SORTING_ORDER=["asc","desc",null],DEFAULT_ABSOLUTE_SORTING_ORDER=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],AgColumn=class extends BeanStub{constructor(e,t,i,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=o,this.isColumn=!0,this.instanceId=getNextColInstanceId(),this.autoHeaderHeight=null,this.sortDef=_getSortDefFromInput(),this._wasSortExplicitlyRemoved=!1,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.formulaRef=null,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new LocalEventService,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=_escapeString(i)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:i,colFlex:o}}=this;t?.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,i?.initCol(this),o?.initCol(this)}setColDef(e,t,i){const o=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),o&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",i)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.initState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:i}}=this,o=e.get("suppressFieldDotNotation");this.fieldContainsDots=_exists(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=_exists(i)&&i.includes(".")&&!o}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:i=>{const o=e.recreateColDef(this.colDef);this.setColDef(o,o,i.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){const t=e.width??e.initialWidth??200;return Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const i=this.frameworkEventListenerService?.wrap(e,t)??t;this.colEventSvc.addEventListener(e,i)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return _addGridCommonParams(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??COL_DEF_DEFAULTS[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const i=this.createColumnFunctionCallbackParams(e);return t(i)}return!1}createColumnEvent(e,t){return _addGridCommonParams(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sortDef.direction}getSortDef(){return this.sortDef.direction?this.sortDef:null}getColDefAllowedSortTypes(){const e=[],{sort:t,initialSort:i}=this.colDef,o=t===null?t:_normalizeSortType(t?.type),s=i===null?i:_normalizeSortType(i?.type);return o&&e.push(o),s&&e.push(s),e}getSortingOrder(){const e=this.getColDefAllowedSortTypes().includes("absolute")?DEFAULT_ABSOLUTE_SORTING_ORDER:DEFAULT_SORTING_ORDER;return(this.colDef.sortingOrder??this.gos.get("sortingOrder")??e).map(t=>_getSortDefFromInput(t))}getAvailableSortTypes(){const e=this.getSortingOrder().reduce((t,i)=>(i.direction&&t.push(i.type),t),this.getColDefAllowedSortTypes());return new Set(e)}get wasSortExplicitlyRemoved(){return this._wasSortExplicitlyRemoved}setSortDef(e,t=!1){t||(this._wasSortExplicitlyRemoved=!e.direction),this.sortDef=e}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.getSort()==="asc"}isSortDescending(){return this.getSort()==="desc"}isSortNone(){return _missing(this.getSort())}isSorting(){return _exists(this.getSort())}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return _warn(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const i=e===!0;this.visible!==i&&(this.visible=i,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e?.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e?.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return _addGridCommonParams(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(_missing(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(_missing(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}isAllowFormula(){return this.colDef.allowFormula===!0}dispatchColEvent(e,t,i){const o=this.createColumnEvent(e,t);i&&_mergeDeep(o,i),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function _getSortDefFromInput(e){return _isSortDefValid(e)?{direction:e.direction,type:e.type}:{direction:_normalizeSortDirection(e),type:_normalizeSortType(e)}}function _isSortDirectionValid(e){return e==="asc"||e==="desc"||e===null}function _isSortTypeValid(e){return e==="default"||e==="absolute"}function _isSortDefValid(e){if(!e||typeof e!="object")return!1;const t=e;return _isSortTypeValid(t.type)&&_isSortDirectionValid(t.direction)}function _areSortDefsEqual(e,t){return e?t?e.type===t.type&&e.direction===t.direction:e?e.direction===null:!0:t?t.direction===null:!0}function _normalizeSortDirection(e){return _isSortDirectionValid(e)?e:null}function _normalizeSortType(e){return _isSortTypeValid(e)?e:"default"}function _getDisplaySortForColumn(e,t){const i=t.sortSvc.getDisplaySortForColumn(e),o=_normalizeSortType(i?.type),s=_normalizeSortDirection(i?.direction),n=e.getAvailableSortTypes(),r=n.has("default"),l=n.has("absolute");return{isDefaultSortAllowed:r,isAbsoluteSortAllowed:l,isAbsoluteSort:o==="absolute",isDefaultSort:o==="default",isAscending:s==="asc",isDescending:s==="desc",direction:s}}function isProvidedColumnGroup(e){return e instanceof AgProvidedColumnGroup}var AgProvidedColumnGroup=class extends BeanStub{constructor(e,t,i,o){super(),this.colGroupDef=e,this.groupId=t,this.padding=i,this.level=o,this.isColumn=!1,this.expandable=!1,this.instanceId=getNextColInstanceId(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)isColumn(t)?e(t):isProvidedColumnGroup(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)isColumn(t)?e.push(t):isProvidedColumnGroup(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const o=this.findChildrenRemovingPadding();for(let n=0,r=o.length;n<r;n++){const l=o[n];if(!l.isVisible())continue;const a=l.getColumnGroupShow();a==="open"?(e=!0,i=!0):a==="closed"?(t=!0,i=!0):(e=!0,t=!0)}const s=e&&t&&i;this.expandable!==s&&(this.expandable=s,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=i=>{for(const o of i)isProvidedColumnGroup(o)&&o.isPadding()?t(o.children):e.push(o)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},DefaultColumnTypes={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function createMergedColGroupDef(e,t,i){const o={},s=e.gos;return Object.assign(o,s.get("defaultColGroupDef")),Object.assign(o,t),s.validateColDef(o,i),o}var ColumnKeyCreator=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=_toStringOrNull(e);let i=0;for(;;){let o=e??t;if(o?i!==0&&(o+="_"+i):o=i,!this.existingKeys[o]){const s=String(o);return e&&i>0&&_warn(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}i++}}},GROUP_AUTO_COLUMN_ID="ag-Grid-AutoColumn",SELECTION_COLUMN_ID="ag-Grid-SelectionColumn",ROW_NUMBERS_COLUMN_ID="ag-Grid-RowNumbersColumn",GROUP_HIERARCHY_COLUMN_ID_PREFIX="ag-Grid-HierarchyColumn";function _getColumnsFromTree(e){const t=[],i=o=>{for(let s=0;s<o.length;s++){const n=o[s];isColumn(n)?t.push(n):isProvidedColumnGroup(n)&&i(n.getChildren())}};return i(e),t}function getWidthOfColsInList(e){return e.reduce((t,i)=>t+i.getActualWidth(),0)}function _destroyColumnTree(e,t,i){const o={};if(!t)return;depthFirstOriginalTreeSearch(null,t,n=>{o[n.getInstanceId()]=n}),i&&depthFirstOriginalTreeSearch(null,i,n=>{o[n.getInstanceId()]=null});const s=Object.values(o).filter(n=>n!=null);e.context.destroyBeans(s)}function isColumnGroupAutoCol(e){return e.getId().startsWith(GROUP_AUTO_COLUMN_ID)}function isColumnSelectionCol(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(SELECTION_COLUMN_ID)??!1}function isRowNumberCol(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(ROW_NUMBERS_COLUMN_ID)??!1}function isSpecialCol(e){return isColumnSelectionCol(e)||isRowNumberCol(e)}function convertColumnTypes(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function _areColIdsEqual(e,t){return _areEqual(e,t,(i,o)=>i.getColId()===o.getColId())}function _updateColsMap(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function _convertColumnEventSourceType(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function _columnsMatch(e,t){return e===t||e.colId==t||e.getColDef()===t}var getValueFactory=(e,t)=>(i,o)=>{const s={value1:void 0,value2:void 0};let n=!1;return e&&(e[i]!==void 0&&(s.value1=e[i],n=!0),_exists(o)&&e[o]!==void 0&&(s.value2=e[o],n=!0)),!n&&t&&(t[i]!==void 0&&(s.value1=t[i]),_exists(o)&&t[o]!==void 0&&(s.value2=t[o])),s};function _getColumnStateFromColDef(e,t){const i={...e,sort:void 0,colId:t},o=_getSortDefFromColDef(e);return o&&(i.sort=o.direction,i.sortType=o.type),i}function _getSortDefFromColDef(e){const{sort:t,initialSort:i}=e,o=_isSortDefValid(t)||_isSortDirectionValid(t),s=_isSortDefValid(i)||_isSortDirectionValid(i);return o?_getSortDefFromInput(t):s?_getSortDefFromInput(i):null}var depthFirstCallback=(e,t)=>{isProvidedColumnGroup(e)&&e.setupExpandable(),e.originalParent=t};function _createColumnTreeWithIds(e,t=null,i,o,s){const{existingCols:n,existingGroups:r}=extractExistingTreeData(o),l=new Map(n.map(f=>[f.getId(),f])),a=new Map(r.map(f=>[f.getId(),f]));let d=0;const c=(f,m)=>{if(d=Math.max(d,m),isColumnGroupDef(f)){if(!e.colGroupSvc)return null;const S=f.groupId,b=a.get(S),y=createMergedColGroupDef(e,f,S),R=new AgProvidedColumnGroup(y,S,!1,m);return e.context.createBean(R),b&&R.setExpanded(b.isExpanded()),R.setChildren(f.children.map(E=>c(E,m+1))),R}const C=f.colId;let v=l.get(C);const w=_addColumnDefaultAndTypes(e,f,v?.getColId()??C);return v?(v.setColDef(w,f,s),_updateColumnState(e,v,w,s)):(v=new AgColumn(w,f,C,i),e.context.createBean(v)),e.dataTypeSvc?.addColumnListeners(v),v},u=t?.map(f=>c(f,0))??[];let h=0;const g={getUniqueKey:(f,m)=>String(++h)},p=e.colGroupSvc?e.colGroupSvc.balanceColumnTree(u,0,d,g):u;return depthFirstOriginalTreeSearch(null,p,depthFirstCallback),{columnTree:p,treeDepth:d}}function _createColumnTree(e,t=null,i,o,s){const n=new ColumnKeyCreator,{existingCols:r,existingGroups:l,existingColKeys:a}=extractExistingTreeData(o);n.addExistingKeys(a);const d=_recursivelyCreateColumns(e,t,0,i,r,n,l,s),{colGroupSvc:c}=e,u=c?.findMaxDepth(d,0)??0,h=c?c.balanceColumnTree(d,0,u,n):d;return depthFirstOriginalTreeSearch(null,h,depthFirstCallback),{columnTree:h,treeDepth:u}}function extractExistingTreeData(e){const t=[],i=[],o=[];return e&&depthFirstOriginalTreeSearch(null,e,s=>{if(isProvidedColumnGroup(s)){const n=s;i.push(n)}else{const n=s;o.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:i,existingColKeys:o}}function _recursivelyCreateColumns(e,t,i,o,s,n,r,l){if(!t)return[];const{colGroupSvc:a}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){const u=t[c];a&&isColumnGroupDef(u)?d[c]=a.createProvidedColumnGroup(o,u,i,s,n,r,l):d[c]=createColumn(e,o,u,s,n,l)}return d}function createColumn(e,t,i,o,s,n){const r=findExistingColumn(i,o);r&&o?.splice(r.idx,1);let l=r?.column;if(l){const a=_addColumnDefaultAndTypes(e,i,l.getColId());l.setColDef(a,i,n),_updateColumnState(e,l,a,n)}else{const a=s.getUniqueKey(i.colId,i.field),d=_addColumnDefaultAndTypes(e,i,a);l=new AgColumn(d,i,a,t),e.context.createBean(l)}return e.dataTypeSvc?.addColumnListeners(l),l}function updateSomeColumnState(e,t,i,o,s,n,r,l){const{sortSvc:a,pinnedCols:d,colFlex:c}=e;i!==void 0&&t.setVisible(!i,l),a&&(a.updateColSort(t,o,l),s!==void 0&&a.setColSortIndex(t,s)),n!==void 0&&d?.setColPinned(t,n),r!==void 0&&c?.setColFlex(t,r)}function _updateColumnState(e,t,i,o){updateSomeColumnState(e,t,i.hide,i.sort,i.sortIndex,i.pinned,i.flex,o);const s=t.getFlex();if(!(s!=null&&s>0))if(i.width!=null)t.setActualWidth(i.width,o);else{const n=t.getActualWidth();t.setActualWidth(n,o)}}function findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){const o=t[i].getUserProvidedColDef();if(!o)continue;if(e.colId!=null){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(e.field!=null){if(o.field===e.field)return{idx:i,column:t[i]};continue}if(o===e)return{idx:i,column:t[i]}}}function _addColumnDefaultAndTypes(e,t,i,o){const{gos:s,dataTypeSvc:n}=e,r={},l=s.get("defaultColDef");_mergeDeep(r,l,!1,!0);const a=updateColDefAndGetColumnType(e,r,t,i);a&&assignColumnTypes(e,a,r);const d=r.cellDataType;_mergeDeep(r,t,!1,!0),d!==void 0&&(r.cellDataType=d);const c=s.get("autoGroupColumnDef"),u=_isColumnsSortingCoupledToGroup(s);return t.rowGroup&&c&&u&&_mergeDeep(r,{sort:c.sort,initialSort:c.initialSort},!1,!0),n?.postProcess(r),n?.validateColDef(r),s.validateColDef(r,i,o),r}function updateColDefAndGetColumnType(e,t,i,o){const s=e.dataTypeSvc?.updateColDefAndGetColumnType(t,i,o),n=i.type??s??t.type;return t.type=n,n?convertColumnTypes(n):void 0}function assignColumnTypes(e,t,i){if(!t.length)return;const o=Object.assign({},DefaultColumnTypes),s=e.gos.get("columnTypes")||{};for(const n of Object.keys(s)){const r=s[n];n in o?_warn(34,{key:n}):(r.type&&_warn(35),o[n]=r)}for(const n of t){const r=o[n.trim()];r?_mergeDeep(i,r,!1,!0):_warn(36,{t:n})}}function isColumnGroupDef(e){return e.children!==void 0}function depthFirstOriginalTreeSearch(e,t,i){if(t)for(let o=0;o<t.length;o++){const s=t[o];isProvidedColumnGroup(s)&&depthFirstOriginalTreeSearch(s,s.getChildren(),i),i(s,e)}}function placeLockedColumns(e,t){const i=[],o=[],s=[];return e.forEach(r=>{const l=r.getColDef().lockPosition;l==="right"?s.push(r):l==="left"||l===!0?i.push(r):o.push(r)}),t.get("enableRtl")?[...s,...o,...i]:[...i,...o,...s]}function doesMovePassMarryChildren(e,t){let i=!0;return depthFirstOriginalTreeSearch(null,t,o=>{if(!isProvidedColumnGroup(o))return;const s=o;if(!s.getColGroupDef()?.marryChildren)return;const l=[];for(const h of s.getLeafColumns()){const g=e.indexOf(h);l.push(g)}const a=Math.max.apply(Math,l),d=Math.min.apply(Math,l),c=a-d,u=s.getLeafColumns().length-1;c>u&&(i=!1)}),i}function getCommonValue(e,t){if(!e||e.length==0)return;const i=t(e[0]);for(let o=1;o<e.length;o++)if(i!==t(e[o]))return;return i}function dispatchColumnPinnedEvent(e,t,i){if(!t.length)return;const o=t.length===1?t[0]:null,s=getCommonValue(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:o,source:i})}function dispatchColumnVisibleEvent(e,t,i){if(!t.length)return;const o=t.length===1?t[0]:null,s=getCommonValue(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:o,source:i})}function dispatchColumnChangedEvent(e,t,i,o){e.dispatchEvent({type:t,columns:i,column:i&&i.length==1?i[0]:null,source:o})}function dispatchColumnResizedEvent(e,t,i,o,s=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:i,source:o})}function _applyColumnState(e,t,i){const{colModel:o,rowGroupColsSvc:s,pivotColsSvc:n,autoColSvc:r,selectionColSvc:l,colAnimation:a,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:g,gos:p}=e,f=o.getColDefCols()??[],m=l?.getColumns();if(!f.length&&!m?.length)return!1;if(t?.state&&!t.state.forEach)return _warn(32),!1;const C=(b,y,R,E,F)=>{if(!b)return;const P=getValueFactory(y,t.defaultState),x=P("flex").value1,M=P("sort").value1,D=P("sortType").value1,T=_isSortDirectionValid(M)||_isSortTypeValid(D),A=_normalizeSortType(D),G=_normalizeSortDirection(M),N=T?{type:A,direction:G}:void 0;if(updateSomeColumnState(e,b,P("hide").value1,N,P("sortIndex").value1,P("pinned").value1,x,i),x==null){const L=P("width").value1;if(L!=null){const B=b.getColDef().minWidth??u.getDefaultColumnMinWidth();B!=null&&L>=B&&b.setActualWidth(L,i)}}F||!b.isPrimary()||(h?.syncColumnWithState(b,i,P),s?.syncColumnWithState(b,i,P,R),n?.syncColumnWithState(b,i,P,E))},v=(b,y,R)=>{const E=_compareColumnStatesAndDispatchEvents(e,i),F=y.slice(),P={},x={},M=[],D=[],T=[];let A=0;const G=s?.columns.slice()??[],N=n?.columns.slice()??[];for(const I of b){const O=I.colId;if(O.startsWith(GROUP_AUTO_COLUMN_ID)){M.push(I),T.push(I);continue}if(isColumnSelectionCol(O)){D.push(I),T.push(I);continue}const H=R(O);H?(C(H,I,P,x,!1),_removeFromArray(F,H)):(T.push(I),A+=1)}const L=I=>C(I,null,P,x,!1);F.forEach(L),s?.sortColumns(comparatorByIndex.bind(s,P,G)),n?.sortColumns(comparatorByIndex.bind(n,x,N)),o.refreshCols(!1,i);const B=(I,O,z=[])=>{for(const H of O){const W=I(H.colId);_removeFromArray(z,W),C(W,H,null,null,!0)}z.forEach(L)};return B(I=>r?.getColumn(I)??null,M,r?.getColumns()?.slice()),B(I=>l?.getColumn(I)??null,D,l?.getColumns()?.slice()),orderLiveColsLikeState(t,o,p),d.refresh(i),g.dispatchEvent({type:"columnEverythingChanged",source:i}),E(),{unmatchedAndAutoStates:T,unmatchedCount:A}};a?.start();let{unmatchedAndAutoStates:w,unmatchedCount:S}=v(t.state||[],f,b=>o.getColDefCol(b));if(w.length>0||_exists(t.defaultState)){const b=c?.getPivotResultCols()?.list??[];S=v(w,b,y=>c?.getPivotResultCol(y)??null).unmatchedCount}return a?.finish(),S===0}function _resetColumnState(e,t){const{colModel:i,autoColSvc:o,selectionColSvc:s,eventSvc:n,gos:r}=e,l=i.getColDefCols();if(!l?.length)return;const a=i.getColDefColTree(),d=_getColumnsFromTree(a),c=[];let u=1e3,h=1e3;const g=v=>{const w=getColumnStateFromColDef(v);_missing(w.rowGroupIndex)&&w.rowGroup&&(w.rowGroupIndex=u++),_missing(w.pivotIndex)&&w.pivot&&(w.pivotIndex=h++),c.push(w)};o?.getColumns()?.forEach(g),s?.getColumns()?.forEach(g),d?.forEach(g),_applyColumnState(e,{state:c},t);const p=o?.getColumns()??[],C=[...s?.getColumns()??[],...p,...l].map(v=>({colId:v.colId}));_applyColumnState(e,{state:C,applyOrder:!0},t),n.dispatchEvent(_addGridCommonParams(r,{type:"columnsReset",source:t}))}function _compareColumnStatesAndDispatchEvents(e,t){const{rowGroupColsSvc:i,pivotColsSvc:o,valueColsSvc:s,colModel:n,sortSvc:r,eventSvc:l}=e,a={rowGroupColumns:i?.columns.slice()??[],pivotColumns:o?.columns.slice()??[],valueColumns:s?.columns.slice()??[]},d=_getColumnState(e),c={};for(const u of d)c[u.colId]=u;return()=>{const u=(y,R,E,F)=>{const P=R.map(F),x=E.map(F);if(_areEqual(P,x))return;const D=new Set(R);for(const A of E)D.delete(A)||D.add(A);const T=[...D];l.dispatchEvent({type:y,columns:T,column:T.length===1?T[0]:null,source:t})},h=y=>{const R=[];return n.forAllCols(E=>{const F=c[E.getColId()];F&&y(F,E)&&R.push(E)}),R},g=y=>y.getColId();u("columnRowGroupChanged",a.rowGroupColumns,i?.columns??[],g),u("columnPivotChanged",a.pivotColumns,o?.columns??[],g);const f=h((y,R)=>{const E=y.aggFunc!=null,F=E!=R.isValueActive(),P=E&&y.aggFunc!=R.getAggFunc();return F||P});f.length>0&&dispatchColumnChangedEvent(l,"columnValueChanged",f,t),dispatchColumnResizedEvent(l,h((y,R)=>y.width!=R.getActualWidth()),!0,t),dispatchColumnPinnedEvent(l,h((y,R)=>y.pinned!=R.getPinned()),t),dispatchColumnVisibleEvent(l,h((y,R)=>y.hide==R.isVisible()),t);const S=h((y,R)=>!_areSortDefsEqual(R.getSortDef(),{type:_normalizeSortType(y.sortType),direction:_normalizeSortDirection(y.sort)})||y.sortIndex!=R.getSortIndex());S.length>0&&r?.dispatchSortChangedEvents(t,S);const b=_getColumnState(e);normaliseColumnMovedEventForColumnState(d,b,t,n,l)}}function _getColumnState(e){const{colModel:t,rowGroupColsSvc:i,pivotColsSvc:o}=e,s=t.getColDefCols();if(_missing(s)||!t.isAlive())return[];const n=i?.columns,r=o?.columns,l=[],a=c=>{const u=c.isRowGroupActive()&&n?n.indexOf(c):null,h=c.isPivotActive()&&r?r.indexOf(c):null,g=c.isValueActive()?c.getAggFunc():null,p=c.getSortIndex()!=null?c.getSortIndex():null;l.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:c.getSort(),sortType:c.getSortDef()?.type,sortIndex:p,aggFunc:g,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>a(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return l.sort((c,u)=>{const h=d.has(c.colId)?d.get(c.colId):-1,g=d.has(u.colId)?d.get(u.colId):-1;return h-g}),l}function getColumnStateFromColDef(e){const t=(m,C)=>m??C??null,i=e.getColDef(),o=_getSortDefFromInput(t(i.sort,i.initialSort)),s=o.direction,n=o.type,r=t(i.sortIndex,i.initialSortIndex),l=t(i.hide,i.initialHide),a=t(i.pinned,i.initialPinned),d=t(i.width,i.initialWidth),c=t(i.flex,i.initialFlex);let u=t(i.rowGroupIndex,i.initialRowGroupIndex),h=t(i.rowGroup,i.initialRowGroup);u==null&&!h&&(u=null,h=null);let g=t(i.pivotIndex,i.initialPivotIndex),p=t(i.pivot,i.initialPivot);g==null&&!p&&(g=null,p=null);const f=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortType:n,sortIndex:r,hide:l,pinned:a,width:d,flex:c,rowGroup:h,rowGroupIndex:u,pivot:p,pivotIndex:g,aggFunc:f}}function orderLiveColsLikeState(e,t,i){if(!e.applyOrder||!e.state)return;const o=[];for(const s of e.state)s.colId!=null&&o.push(s.colId);sortColsLikeKeys(t.cols,o,t,i)}function sortColsLikeKeys(e,t,i,o){if(e==null)return;let s=[];const n={};for(const l of t){if(n[l])continue;const a=e.map[l];a&&(s.push(a),n[l]=!0)}let r=0;for(const l of e.list){const a=l.getColId();if(n[a]!=null)continue;a.startsWith(GROUP_AUTO_COLUMN_ID)?s.splice(r++,0,l):s.push(l)}if(s=placeLockedColumns(s,o),!doesMovePassMarryChildren(s,i.getColTree())){_warn(39);return}e.list=s}function normaliseColumnMovedEventForColumnState(e,t,i,o,s){const n={};for(const c of t)n[c.colId]=c;const r={};for(const c of e)n[c.colId]&&(r[c.colId]=!0);const l=e.filter(c=>r[c.colId]),a=t.filter(c=>r[c.colId]),d=[];a.forEach((c,u)=>{const h=l?.[u];if(h&&h.colId!==c.colId){const g=o.getCol(h.colId);g&&d.push(g)}}),d.length&&s.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:i})}var comparatorByIndex=(e,t,i,o)=>{const s=e[i.getId()],n=e[o.getId()],r=s!=null,l=n!=null;if(r&&l)return s-n;if(r)return-1;if(l)return 1;const a=t.indexOf(i),d=t.indexOf(o),c=a>=0,u=d>=0;return c&&u?a-d:c?-1:1};function createUniqueColumnGroupId(e,t){return e+"_"+t}function isColumnGroup(e){return e instanceof AgColumnGroup}var AgColumnGroup=class extends BeanStub{constructor(e,t,i,o){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=i,this.pinned=o,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=_escapeString(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return createUniqueColumnGroupId(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){for(const e of this.displayedChildren)isColumnGroup(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=_last(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;for(const t of this.displayedChildren??[])e+=t.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(const t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(const t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}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(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){for(const t of this.displayedChildren??[])isColumn(t)?e.push(t):isColumnGroup(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])isColumn(t)?e.push(t):isColumnGroup(t)&&t.addLeafColumns(e)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e?.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e?.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}for(const i of this.children??[]){if(isColumnGroup(i)&&!i.displayedChildren?.length)continue;switch(i.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(i);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i);break}}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},KeyCode={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},A_KEYCODE=65,C_KEYCODE=67,V_KEYCODE=86,D_KEYCODE=68,Z_KEYCODE=90,Y_KEYCODE=89;function _normaliseQwertyAzerty(e){const{keyCode:t}=e;let i;switch(t){case A_KEYCODE:i=KeyCode.A;break;case C_KEYCODE:i=KeyCode.C;break;case V_KEYCODE:i=KeyCode.V;break;case D_KEYCODE:i=KeyCode.D;break;case Z_KEYCODE:i=KeyCode.Z;break;case Y_KEYCODE:i=KeyCode.Y;break;default:i=e.code}return i}function _isPromise(e){return typeof e.then=="function"}function _wrapInterval(e,t){return new AgPromise(i=>{i(window.setInterval(e,t))})}var AgPromise=class V{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(i=>this.onDone(i),i=>this.onReject(i))}static all(t){return t.length?new V(i=>{let o=t.length;const s=new Array(o);t.forEach((n,r)=>{n.then(l=>{s[r]=l,o--,o===0&&i(s)})})}):V.resolve()}static resolve(t=null){return new V(i=>i(t))}then(t){return new V(i=>{this.status===1?i(t(this.resolution)):this.waiters.push(o=>i(t(o)))})}onDone(t){this.status=1,this.resolution=t;for(const i of this.waiters)i(t)}onReject(t){}},RefPlaceholder=null;function _isComponent(e){return typeof e?.getGui=="function"}function _createElement(e){return _createAgElement(e)}function _createIcon(e,t,i){const o=_createIconNoSpan(e,t,i);if(o){const{className:n}=o;if(typeof n=="string"&&n.includes("ag-icon")||typeof n=="object"&&n["ag-icon"])return o}const s=_createElement({tag:"span"});return s.appendChild(o),s}function _createIconNoSpan(e,t,i){let o=null;e==="smallDown"?_warn(262):e==="smallLeft"?_warn(263):e==="smallRight"&&_warn(264);const s=i?.getColDef().icons;if(s&&(o=s[e]),t.gos&&!o){const n=t.gos.get("icons");n&&(o=n[e])}if(o){let n;if(typeof o=="function")n=o();else if(typeof o=="string")n=o;else{_warn(38,{iconName:e});return}if(typeof n=="string")return _loadTemplate(n);if(_isNodeOrElement(n))return n;_warn(133,{iconName:e});return}else{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),_createElement({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var CssClassManager=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(!e)return;if(e.includes(" ")){const o=(e||"").split(" ");if(o.length>1){for(const s of o)this.toggleCss(s,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}},compIdSequence=0,AgComponentStub=class extends AgBeanStub{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=compIdSequence++,this.cssManager=new CssClassManager(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(i=>[i.selector,i])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui()),this.addGlobalCss()}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(DataRefAttribute):null}applyElementsToComponent(e,t,i,o=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===RefPlaceholder)this[t]=o??e;else{const n=i?.[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const i=[];for(const o of e.childNodes??[])i.push(o);for(const o of i){if(!(o instanceof HTMLElement))continue;const s=this.createComponentFromElement(o,n=>{const r=n.getGui();if(r)for(const l of o.attributes??[])r.setAttribute(l.name,l.value)},t);if(s){if(s.addItems&&o.children.length){this.createChildComponentsFromTags(o,t);const n=Array.prototype.slice.call(o.children);s.addItems(n)}this.swapComponentForNode(s,e,o)}else o.childNodes&&this.createChildComponentsFromTags(o,t)}}createComponentFromElement(e,t,i){const o=e.nodeName,s=this.getDataRefAttribute(e),n=o.indexOf("AG-")===0,r=n?this.componentSelectors.get(o):null;let l=null;if(r){const a=i&&s?i[s]:void 0;l=new r.component(a),l.setParentComponent(this),this.createBean(l,null,t)}else if(n)throw new Error(`selector: ${o}`);return this.applyElementsToComponent(e,s,i,l),l}swapComponentForNode(e,t,i){const o=e.getGui();t.replaceChild(o,i),t.insertBefore(document.createComment(i.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){const i=t??this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const o of e)o.setAttribute("tabindex",i.toString())}setTemplate(e,t,i){let o;typeof e=="string"||e==null?o=_loadTemplate(e):o=_createAgElement(e),this.setTemplateFromElement(o,t,i)}setTemplateFromElement(e,t,i,o=!1){if(this.eGui=e,this.suppressDataRefValidation=o,t)for(let s=0;s<t.length;s++){const n=t[s];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,i)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let i=t;return e==null?null:(i||(i=this.eGui),_isNodeOrElement(e)?{element:e,parent:i}:{element:e.getGui(),parent:i})}prependChild(e,t){const{element:i,parent:o}=this.getContainerAndElement(e,t)||{};!i||!o||o.prepend(i)}appendChild(e,t){const{element:i,parent:o}=this.getContainerAndElement(e,t)||{};!i||!o||o.appendChild(i)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:i}=t;_setVisible(this.eGui,e,{skipAriaHidden:i})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:i}=t;_setDisplayed(this.eGui,e,{skipAriaHidden:i});const o={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(o)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,i){this.eGui.addEventListener(e,t,i),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css===globalCssAdded?(this.css=[e],this.addGlobalCss()):(this.css||(this.css=[]),this.css.push(e))}addGlobalCss(){if(Array.isArray(this.css)){const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(const t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}this.css=globalCssAdded}},globalCssAdded=Symbol(),Component=class extends AgComponentStub{},dragAndDropImageComponentCSS=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}",DragAndDropElement={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},DragAndDropImageComponent=class extends Component{constructor(){super(),this.dragSource=null,this.eIcon=RefPlaceholder,this.eLabel=RefPlaceholder,this.eGhost=RefPlaceholder,this.registerCSS(dragAndDropImageComponentCSS)}postConstruct(){const e=t=>_createIcon(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(DragAndDropElement),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:i,eIcon:o,dragSource:s,dropIconMap:n,gos:r}=this;_clearElement(o);let l=null;e||(e=s?.getDefaultIconName?s.getDefaultIconName():"notAllowed"),l=n[e],i.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),o.classList.toggle("ag-shake-left-to-right",t),!(l===n.hide&&r.get("suppressDragLeaveHidesColumns"))&&l&&o.appendChild(l)}setLabel(e){this.eLabel.textContent=e}},BaseDragAndDropService=class extends AgBeanStub{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.externalDropZoneCount=0,this.lastDropTarget=null}addDragSource(e,t=!1){const i={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:o=>this.onDragStart(e,o),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(i),this.beans.dragSvc.addDragSource(i)}setDragImageCompIcon(e,t=!1){const i=this.dragImageComp;i&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,i.setIcon(e,t))}removeDragSource(e){const{dragSourceAndParamsList:t,beans:i}=this;for(let o=0,s=t.length;o<s;o++)if(t[o].dragSource===e){const n=t[o];i.dragSvc?.removeDragSource(n),t.splice(o,1);break}}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:i}=this,o=i.dragSvc;for(const s of e)o?.removeDragSource(s);e.length=0,t.length=0,this.externalDropZoneCount=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){const e=this.lastMouseEvent;e&&this.onDragging(e,!0)}onDragStart(e,t){this.lastMouseEvent=t,this.dragSource=e,this.dragItem=e.getDragItem();const i=e.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=t.clientX-i.left,this.dragInitialSourcePointerOffsetY=t.clientY-i.top,e.onDragStarted?.(),this.createAndUpdateDragImageComp(e)}onDragStop(e){const{dragSource:t,lastDropTarget:i}=this;if(t?.onDragStopped?.(),i){const o=this.dropTargetEvent(i,e,!1);i.onDragStop?.(o)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t,lastMouseEvent:i}=this;if(e?.onDragCancelled?.(),t&&i){const o=this.dropTargetEvent(t,i,!1);t.onDragCancel?.(o)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);const i=this.findCurrentDropTarget(e),{lastDropTarget:o,dragSource:s,dragItem:n}=this;let r=!1;if(i!==o){if(r=!0,o){const l=this.dropTargetEvent(o,e,t);o.onDragLeave?.(l)}if(o!==null&&!i?this.handleExit(s,n):o===null&&i&&this.handleEnter(s,n),i){const l=this.dropTargetEvent(i,e,t);i.onDragEnter?.(l)}this.lastDropTarget=i}else if(i){const l=this.dropTargetEvent(i,e,t);i.onDragging?.(l),l?.changed&&(r=!0)}this.lastMouseEvent=e,r&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(e){const t=e.getContainer(),i=e.getSecondaryContainers?.(),o=i?.length;if(!o)return[[t]];const s=new Array(o+1);s[0]=[t];for(let n=0;n<o;++n)s[n+1]=i[n];return s}isMouseOnDropTarget(e,t){const i=this.getAllContainersFromDropTarget(t);let o=!1;const s=(l,a)=>{for(const d of a){const{width:c,height:u,left:h,right:g,top:p,bottom:f}=d.getBoundingClientRect();if(c===0||u===0)return!1;const m=l.clientX>=h&&l.clientX<g,C=l.clientY>=p&&l.clientY<f;if(!m||!C)return!1}return!0};for(const l of i)if(s(e,l)){o=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:o&&t.isInterestedIn(r,n)}findCurrentDropTarget(e){const t=[],i=this.dropTargets;for(let r=0,l=i.length;r<l;++r){const a=i[r];this.isMouseOnDropTarget(e,a)&&t.push(a)}const o=t.length;if(o===0)return null;if(o===1)return t[0];const n=_getRootNode(this.beans).elementsFromPoint(e.clientX,e.clientY);for(let r=0,l=n.length;r<l;++r){const a=n[r];for(let d=0,c=t.length;d<c;d++){const u=t[d],h=this.getAllContainersFromDropTarget(u);let g=!1;for(let p=0,f=h.length;p<f&&!g;p++){const m=h[p];for(let C=0,v=m.length;C<v;C++)if(m[C]===a){g=!0;break}}if(g)return u}}return null}addDropTarget(e){this.dropTargets.push(e),e.external&&this.externalDropZoneCount++}removeDropTarget(e){const t=e.getContainer(),i=this.dropTargets;let o=0;for(let s=0,n=i.length;s<n;++s){const r=i[s];if(r.getContainer()===t){r.external&&--this.externalDropZoneCount;continue}o!==s&&(i[o]=r),++o}i.length=o}hasExternalDropZones(){return this.externalDropZoneCount>0}findExternalZone(e){const t=this.dropTargets;for(let i=0,o=t.length;i<o;++i){const s=t[i];if(s.external&&s.getContainer()===e)return s}return null}dropTargetEvent(e,t,i){const{dragSource:o,dragItem:s,lastDraggingEvent:n,lastMouseEvent:r,dragInitialSourcePointerOffsetX:l,dragInitialSourcePointerOffsetY:a}=this,d=e.getContainer(),c=d.getBoundingClientRect(),{clientX:u,clientY:h}=t,g=u-(r?.clientX||0),p=h-(r?.clientY||0),f=this.createEvent({event:t,x:u-c.left,y:h-c.top,vDirection:p>0?"down":p<0?"up":null,hDirection:g<0?"left":g>0?"right":null,initialSourcePointerOffsetX:l,initialSourcePointerOffsetY:a,dragSource:o,fromNudge:i,dragItem:s,dropZoneTarget:d,dropTarget:n?.dropTarget??null,changed:!!n?.changed});return this.lastDraggingEvent=f,f}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&_anchorElementToMouseMoveEvent(t,e,this.beans)}removeDragImageComp(e){this.dragImageComp===e&&(this.dragImageComp=null),e&&(e.getGui()?.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){const t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t?.then(i=>{const o=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!o||!this.isAlive()){this.destroyBean(i);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const s=this.dragImageComp;s!==i&&(this.dragImageComp=i,this.removeDragImageComp(s)),i&&(this.appendDragImageComp(i),this.updateDragImageComp(),this.positionDragImageComp(o))})}appendDragImageComp(e){const t=e.getGui(),i=t.style;i.position="absolute",i.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(i.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),i.top="20px",i.left="20px";const o=_getPageBody(this.beans);o?o.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:i,lastDraggingEvent:o,dragImageLastLabel:s}=this;if(!e)return;this.setDragImageCompIcon(i?.getIconName?.(o)??null);let n=t?.dragItemName;typeof n=="function"&&(n=n(o)),n||(n=""),s!==n&&(this.dragImageLastLabel=n,e.setLabel(n))}};function isColumnFilterComp(e){return typeof e=="object"&&!!e.component}function doesImplementIComponent(e){return e?e.prototype&&"getGui"in e.prototype:!1}function _getUserCompKeys(e,t,i,o){const{name:s}=i;let n,r,l,a,d,c;if(t){const u=t,h=u[s+"Selector"],g=h?h(o):null,p=f=>{typeof f=="string"?n=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?l=f:r=f)};g?(p(g.component),a=g.params,d=g.popup,c=g.popupPosition):p(u[s])}return{compName:n,jsComp:r,fwComp:l,paramsFromSelector:a,popupFromSelector:d,popupPositionFromSelector:c}}var UserComponentFactory=class extends BeanStub{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,i,o=!1){return this.getCompDetails(this.gridOptions,e,t,i,o)}getCompDetails(e,t,i,o,s=!1){const{name:n,cellRenderer:r}=t;let{compName:l,jsComp:a,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=_getUserCompKeys(this.beans.frameworkOverrides,e,t,o),g,p;const f=w=>{const S=this.registry.getUserComponent(n,w);S&&(a=S.componentFromFramework?void 0:S.component,d=S.componentFromFramework?S.component:void 0,g=S.params,p=S.processParams)};if(l!=null&&f(l),a==null&&d==null&&i!=null&&f(i),a&&r&&!doesImplementIComponent(a)&&(a=this.agCompUtils?.adaptFunction(t,a)),!a&&!d){const{validation:w}=this.beans;s&&(l!==i||!i)?l?w?.isProvidedUserComp(l)||_error(50,{compName:l}):i?w||_error(260,{...this.gos.getModuleErrorParams(),propName:n,compName:i}):_error(216,{name:n}):i&&!w&&_error(146,{comp:i});return}const m=this.mergeParams(e,t,o,c,g,p),C=a==null,v=a??d;return{componentFromFramework:C,componentClass:v,params:m,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(v,C,m,t)}}newAgStackInstance(e,t,i,o){const s=!t;let n;s?n=new e:n=this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o),this.createBean(n);const r=n.init?.(i);return r==null?AgPromise.resolve(n):r.then(()=>n)}mergeParams(e,t,i,o=null,s,n){const r={...i,...s},a=e?.[t.name+"Params"];if(typeof a=="function"){const d=a(i);_mergeDeep(r,d)}else typeof a=="object"&&_mergeDeep(r,a);return _mergeDeep(r,o),n?n(r):r}},DateComponent={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},DragAndDropImageComponent2={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},HeaderComponent={name:"headerComponent",optionalMethods:["refresh"]},InnerHeaderComponent={name:"innerHeaderComponent"},InnerHeaderGroupComponent={name:"innerHeaderGroupComponent"},HeaderGroupComponent={name:"headerGroupComponent"},InnerCellRendererComponent={name:"innerRenderer",cellRenderer:!0,optionalMethods:["afterGuiAttached"]},CellRendererComponent={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},EditorRendererComponent={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"]},LoadingCellRendererComponent={name:"loadingCellRenderer",cellRenderer:!0},CellEditorComponent={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},TooltipComponent={name:"tooltipComponent"},FilterComponent={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},FloatingFilterComponent={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},FullWidth={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},FullWidthLoading={name:"loadingCellRenderer",cellRenderer:!0},FullWidthGroup={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},FullWidthDetail={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function _getDragAndDropImageCompDetails(e,t){return e.getCompDetailsFromGridOptions(DragAndDropImageComponent2,"agDragAndDropImage",t,!0)}function _getInnerCellRendererDetails(e,t,i){return e.getCompDetails(t,InnerCellRendererComponent,void 0,i)}function _getHeaderCompDetails(e,t,i){return e.getCompDetails(t,HeaderComponent,"agColumnHeader",i)}function _getInnerHeaderCompDetails(e,t,i){return e.getCompDetails(t,InnerHeaderComponent,void 0,i)}function _getHeaderGroupCompDetails(e,t){const i=t.columnGroup.getColGroupDef();return e.getCompDetails(i,HeaderGroupComponent,"agColumnGroupHeader",t)}function _getInnerHeaderGroupCompDetails(e,t,i){return e.getCompDetails(t,InnerHeaderGroupComponent,void 0,i)}function _getFullWidthCellRendererDetails(e,t){return e.getCompDetailsFromGridOptions(FullWidth,void 0,t,!0)}function _getFullWidthLoadingCellRendererDetails(e,t){return e.getCompDetailsFromGridOptions(FullWidthLoading,"agLoadingCellRenderer",t,!0)}function _getFullWidthGroupCellRendererDetails(e,t){return e.getCompDetailsFromGridOptions(FullWidthGroup,"agGroupRowRenderer",t,!0)}function _getFullWidthDetailCellRendererDetails(e,t){return e.getCompDetailsFromGridOptions(FullWidthDetail,"agDetailCellRenderer",t,!0)}function _getCellRendererDetails(e,t,i){return e.getCompDetails(t,CellRendererComponent,void 0,i)}function _getEditorRendererDetails(e,t,i){return e.getCompDetails(t,EditorRendererComponent,void 0,i)}function _getLoadingCellRendererDetails(e,t,i){return e.getCompDetails(t,LoadingCellRendererComponent,"agSkeletonCellRenderer",i,!0)}function _getCellEditorDetails(e,t,i){return e.getCompDetails(t,CellEditorComponent,"agCellEditor",i,!0)}function _getFilterDetails(e,t,i,o){const s=t.filter;return isColumnFilterComp(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,FilterComponent,o,i,!0)}function _getDateCompDetails(e,t,i){return e.getCompDetails(t,DateComponent,"agDateInput",i,!0)}function _getTooltipCompDetails(e,t){return e.getCompDetails(t.colDef,TooltipComponent,"agTooltipComponent",t,!0)}function _getFloatingFilterCompDetails(e,t,i,o){return e.getCompDetails(t,FloatingFilterComponent,o,i)}function _getFilterCompKeys(e,t){return _getUserCompKeys(e,t,FilterComponent)}function _mergeFilterParamsWithApplicationProvidedParams(e,t,i){return e.mergeParams(t,FilterComponent,i)}var DragSourceType=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(DragSourceType||{}),DragAndDropService=class extends BaseDragAndDropService{createEvent(e){return _addGridCommonParams(this.gos,e)}createDragImageComp(e){const{gos:t,beans:i}=this;return _getDragAndDropImageCompDetails(i.userCompFactory,_addGridCommonParams(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){_warn(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const i={getContainer:e,isInterestedIn:o=>o===1||o===0,getIconName:()=>"notAllowed"};this.addDropTarget(i),t.addDestroyFunc(()=>this.removeDropTarget(i))}};function getElement(e){return{tag:"div",cls:e}}var FilterButtonComp=class extends Component{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(getElement(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const i=this.buttons;if(this.buttons=e,i===e)return;const o=this.getGui();_clearElement(o);let s;this.destroyListeners();const n=document.createDocumentFragment(),r=this.className,l=({type:d,label:c})=>{const u=C=>{this.dispatchLocalEvent({type:d,event:C})};["apply","clear","reset","cancel"].includes(d)||_warn(75);const h=d==="apply",p=_createElement({tag:"button",attrs:{type:h&&t?"submit":"button"},ref:`${d}FilterButton`,cls:`ag-button ag-standard-button ${r}-button${h?" "+r+"-apply-button":""}`,children:c});this.activateTabIndex([p]),h&&(s=p);const f=C=>{C.key===KeyCode.ENTER&&(C.preventDefault(),u(C))},m=this.listeners;p.addEventListener("click",u),m.push(()=>p.removeEventListener("click",u)),p.addEventListener("keydown",f),m.push(()=>p.removeEventListener("keydown",f)),n.append(p)};for(const d of e)l(d);this.eApply=s;const a=this.validationTooltipFeature;s&&!a?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!s&&a&&(this.validationTooltipFeature=this.destroyBean(a)),o.append(n)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const i=this.eApply;i&&(_setDisabled(i,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},AgFilterButtonSelector={selector:"AG-FILTER-BUTTON",component:FilterButtonComp},FILTER_LOCALE_TEXT={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",bigintFilter:"BigInt 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",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",last7Days:"Last 7 Days",lastWeek:"Last Week",thisWeek:"This Week",nextWeek:"Next Week",last30Days:"Last 30 Days",lastMonth:"Last Month",thisMonth:"This Month",nextMonth:"Next Month",last90Days:"Last 90 Days",lastQuarter:"Last Quarter",thisQuarter:"This Quarter",nextQuarter:"Next Quarter",lastYear:"Last Year",thisYear:"This Year",yearToDate:"Year To Date",nextYear:"Next Year",last6Months:"Last 6 Months",last12Months:"Last 12 Months",last24Months:"Last 24 Months",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`,minDateValidation:e=>`Date must be after ${e[0]}`,maxDateValidation:e=>`Date must be before ${e[0]}`,strictMinValueValidation:e=>`Must be greater than ${e[0]}`,strictMaxValueValidation:e=>`Must be less than ${e[0]}`};function translateForFilter(e,t,i){return _translate(e,FILTER_LOCALE_TEXT,t,i)}function getDebounceMs(e,t){const{debounceMs:i}=e;return _isUseApplyButton(e)?(i!=null&&_warn(71),0):i??t}function _isUseApplyButton(e){return(e.buttons?.indexOf("apply")??-1)>=0}function getPlaceholderText(e,t,i,o){let s=translateForFilter(e,i);if(typeof t=="function"){const n=translateForFilter(e,o);s=t({filterOptionKey:o,filterOption:n,placeholder:s})}else typeof t=="string"&&(s=t);return s}var FilterWrapperComp=class extends Component{constructor(e,t,i,o,s,n){super(),this.column=e,this.wrapper=t,this.eventParent=i,this.updateModel=o,this.isGlobalButtons=s,this.enableGlobalButtonCheck=n,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,i=t,o=i.useForm,s=o?"form":"div";this.setTemplate({tag:s,cls:"ag-filter-wrapper"}),o&&this.addManagedElementListeners(this.getGui(),{submit:n=>{n?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=i,this.resetButtonsPanel(i),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:n,params:r})=>{n===this.column&&this.resetButtonsPanel(r,this.params)},filterStateChanged:({column:n,state:r})=>{n===this.column&&this.eButtons?.updateValidity(r.valid!==!1)},filterAction:({column:n,action:r,event:l})=>{n===this.column&&this.afterAction(r,l)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:n})=>{if(n!==this.isGlobalButtons){this.isGlobalButtons=n;const r=this.params;this.resetButtonsPanel(r,r,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,i){const{buttons:o,readOnly:s}=t??{},{buttons:n,readOnly:r,useForm:l}=e;if(!i&&s===r&&_jsonEquals(o,n))return;const a=n&&n.length>0&&!e.readOnly&&!this.isGlobalButtons;let d=this.eButtons;if(a){const c=n.map(u=>{const h=`${u}Filter`;return{type:u,label:translateForFilter(this,h)}});if(this.applyActive=_isUseApplyButton(this.params),!d){d=this.createBean(new FilterButtonComp),this.appendChild(d.getGui());const u=this.column,h=g=>({event:p})=>{this.updateModel(u,g,{fromButtons:!0}),this.afterAction(g,p)};d?.addManagedListeners(d,{apply:h("apply"),clear:h("clear"),reset:h("reset"),cancel:h("cancel")}),this.eButtons=d}d.updateButtons(c,l)}else this.applyActive=!1,d&&(_removeFromParent(d.getGui()),this.eButtons=this.destroyBean(d))}close(e){const t=this.hidePopup;if(!t)return;const i=e,o=i?.key;let s;(o===KeyCode.ENTER||o===KeyCode.SPACE)&&(s={keyboardEvent:i}),t(s),this.hidePopup=null}afterAction(e,t){const{params:i,applyActive:o}=this,s=i?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),s&&o&&this.close(t);break}case"reset":{s&&o&&this.close();break}case"cancel":{s&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===KeyCode.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},legacyFilterCSS=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",FilterElement={tag:"div",cls:"ag-filter"},FilterComp=class extends Component{constructor(e,t,i){super(FilterElement),this.column=e,this.source=t,this.enableGlobalButtonCheck=i,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??AgPromise.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:i,beans:{colFilter:o}}=this,s=o.getFilterUiForDisplay(t)??null;this.wrapper=s,s?.then(n=>{if(!n)return;const{isHandler:r,comp:l}=n;let a;if(r){const d=!!this.enableGlobalButtonCheck,c=this.createBean(new FilterWrapperComp(t,n,o,o.updateModel.bind(o),d&&o.isGlobalButtons,d));this.comp=c,a=c.getGui()}else this.registerCSS(legacyFilterCSS),a=l.getGui(),_exists(a)||_warn(69,{guiFromFilter:a});this.appendChild(a),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:i,eGui:this.getGui()}):l.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:i}=e;(t==="api"||t==="paramsUpdated")&&i.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(_clearElement(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}};function isCombinedFilterModel(e){return!!e.operator}var RESIZE_CONTAINER_STYLE="ag-resizer-wrapper",makeDiv=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),RESIZE_TEMPLATE={tag:"div",cls:RESIZE_CONTAINER_STYLE,children:[makeDiv("eTopLeft","topLeft"),makeDiv("eTop","top"),makeDiv("eTopRight","topRight"),makeDiv("eRight","right"),makeDiv("eBottomRight","bottomRight"),makeDiv("eBottom","bottom"),makeDiv("eBottomLeft","bottomLeft"),makeDiv("eLeft","left")]},AgPositionableFeature=class extends AgBeanStub{constructor(e,t){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={popup:!1,...t}}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){const{clientHeight:t,clientWidth:i}=this.offsetParent,o=i/2-this.getWidth()/2,s=t/2-this.getHeight()/2;this.offsetElement(o,s,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:i,minWidth:o,width:s,minHeight:n,height:r,x:l,y:a}=this.config;this.offsetParent||this.setOffsetParent();let d=0,c=0;const u=_isVisible(this.element);if(u){const h=this.findBoundaryElement(),g=window.getComputedStyle(h);if(g.minWidth!=null){const p=h.offsetWidth-this.element.offsetWidth;c=Number.parseInt(g.minWidth,10)-p}if(g.minHeight!=null){const p=h.offsetHeight-this.element.offsetHeight;d=Number.parseInt(g.minHeight,10)-p}}if(this.minHeight=n||d,this.minWidth=o||c,s&&this.setWidth(s),r&&this.setHeight(r),(!s||!r)&&this.refreshSize(),t)this.center(e);else if(l||a)this.offsetElement(l,a,e);else if(u&&i){let h=this.boundaryEl,g=!0;if(h||(h=this.findBoundaryElement(),g=!1),h){const p=Number.parseFloat(h.style.top),f=Number.parseFloat(h.style.left);g?this.offsetElement(Number.isNaN(f)?0:f,Number.isNaN(p)?0:p,e):this.setPosition(f,p)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const i=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(i),this.moveElementDragListener=i):(this.dragSvc?.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}for(const t of Object.keys(e)){const i=!!e[t],o=this.getResizerElement(t),s={dragStartPixels:0,eElement:o,onDragStart:n=>this.onResizeStart(n,t),onDragging:this.onResize.bind(this),onDragStop:n=>this.onResizeEnd(n,t)};(i||!this.isAlive()&&!i)&&(i?(this.dragSvc?.addDragSource(s),this.resizeListeners.push(s),o.style.pointerEvents="all"):o.style.pointerEvents="none",this.resizable[t]=i)}}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:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,i=this.element;let o=!1;if(typeof e=="string"&&e.includes("%"))_setFixedHeight(i,e),e=_getAbsoluteHeight(i),o=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const s=this.getAvailableHeight();s&&e>s&&(e=s)}this.getHeight()!==e&&(o?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?_setFixedHeight(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:Number.parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:i}=this.offsetParent;if(!i)return null;const o=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:o.top,r=e?0:s.top;let l=0;if(t){const d=this.element.parentElement;if(d){const{bottom:c}=d.getBoundingClientRect();l=c-o.bottom}}return i+r-n-l}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:i}=this.config;let o=!1;if(typeof e=="string"&&e.includes("%"))_setFixedWidth(t,e),e=_getAbsoluteWidth(t),o=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:s}=this.offsetParent,n=i?this.position.x:this.element.getBoundingClientRect().left;s&&e+n>s&&(e=s-n)}this.getWidth()!==e&&(o?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?_setFixedWidth(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,i){const{forcePopupParentAsOffsetParent:o}=this.config,s=o?this.boundaryEl:this.element;s&&(this.popupSvc?.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:i}),this.setPosition(Number.parseFloat(s.style.left),Number.parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const i=this.getAvailableHeight();this.element.style.setProperty("max-height",`${i}px`)};e&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=_observeResize(this.beans,this.popupSvc?.getPopupParent(),t)):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:i,isTop:o,anywhereWithin:s,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,l=t.clientY-this.dragStartPosition.y,a=this.shouldSkipX(t,!!i,!!s,r)?0:r,d=this.shouldSkipY(t,!!o,n,l)?0:l;return{movementX:a,movementY:d}}shouldSkipX(e,t,i,o){const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:s.left;let a=l<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return a?!0:(t?a=o<0&&e.clientX>l+n.left||o>0&&e.clientX<l+n.left:i?a=o<0&&e.clientX>r.right||o>0&&e.clientX<l+n.left:a=o<0&&e.clientX>r.right||o>0&&e.clientX<r.right,a)}shouldSkipY(e,t,i=0,o){const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.y:s.top;let a=l<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return a?!0:(t?a=o<0&&e.clientY>l+n.top+i||o>0&&e.clientY<l+n.top:a=o<0&&e.clientY>r.bottom||o>0&&e.clientY<r.bottom,a)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(_createAgElement(RESIZE_TEMPLATE)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${RESIZE_CONTAINER_STYLE}`)?.remove(),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:i,forcePopupParentAsOffsetParent:o}=this.config;!i&&!o&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(i=>!i.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,i=0;for(const o of e){const s=!!o.style.flex&&o.style.flex!=="0 0 auto";if(o===this.element)continue;let n=this.minHeight||0,r=this.minWidth||0;if(s){const l=window.getComputedStyle(o);l.minHeight&&(n=Number.parseInt(l.minHeight,10)),l.minWidth&&(r=Number.parseInt(l.minWidth,10))}else n=o.offsetHeight,r=o.offsetWidth;t+=n,i+=r}return{height:t,width:i}}applySizeToSiblings(e){let t=null;const i=this.getSiblings();if(i){for(let o=0;o<i.length;o++){const s=i[o];s!==t&&(e?s.style.height=`${s.offsetHeight}px`:s.style.width=`${s.offsetWidth}px`,s.style.flex="0 0 auto",s===this.element&&(t=i[o+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:i}=this.config,{isTop:o,isRight:s,isBottom:n,isLeft:r}=this.currentResizer,l=s||r,a=n||o,{movementX:d,movementY:c}=this.calculateMouseMovement({e,isLeft:r,isTop:o}),u=this.position.x,h=this.position.y;let g=0,p=0;if(l&&d){const f=r?-1:1,m=this.getWidth(),C=m+d*f;let v=!1;r&&(g=m-C,(u+g<=0||C<=this.minWidth)&&(v=!0,g=0)),v||this.setWidth(C)}if(a&&c){const f=o?-1:1,m=this.getHeight(),C=m+c*f;let v=!1;o?(p=m-C,(h+p<=0||C<=this.minHeight)&&(v=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&m<C&&this.getMinSizeOfSiblings().height+C>this.element.parentElement.offsetHeight&&(v=!0),v||this.setHeight(C)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&g||p)&&this.offsetElement(u+g,h+p)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({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:t,y:i}=this.position;let o;this.config.calculateTopBuffer&&(o=this.config.calculateTopBuffer());const{movementX:s,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:o});this.offsetElement(t+s,i+n),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},PositionableFeature=class extends AgPositionableFeature{},isSafari,isFirefox,isMacOs,isIOS,invisibleScrollbar,browserScrollbarWidth,maxDivHeight;function _isBrowserSafari(){return isSafari===void 0&&(isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),isSafari}function _isBrowserFirefox(){return isFirefox===void 0&&(isFirefox=/(firefox)/i.test(navigator.userAgent)),isFirefox}function _isMacOsUserAgent(){return isMacOs===void 0&&(isMacOs=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),isMacOs}function _isIOSUserAgent(){return isIOS===void 0&&(isIOS=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),isIOS}function _getTabIndex(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!_isBrowserFirefox())?null:t.toString()}function _getMaxDivHeight(){if(maxDivHeight!==void 0)return maxDivHeight;if(!document.body)return-1;let e=1e6;const t=_isBrowserFirefox()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const o=e*2;if(i.style.height=o+"px",o>t||i.clientHeight!==o)break;e=o}return i.remove(),maxDivHeight=e,e}function _getScrollbarWidth(){return browserScrollbarWidth==null&&initScrollbarWidthAndVisibility(),browserScrollbarWidth}function initScrollbarWidthAndVisibility(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.remove(),i!=null&&(browserScrollbarWidth=i,invisibleScrollbar=i===0)}function _isInvisibleScrollbar(){return invisibleScrollbar==null&&initScrollbarWidthAndVisibility(),invisibleScrollbar}var keyboardModeActive=!1,instanceCount=0;function addKeyboardModeEvents(e){instanceCount>0||(e.addEventListener("keydown",toggleKeyboardMode),e.addEventListener("mousedown",toggleKeyboardMode))}function removeKeyboardModeEvents(e){instanceCount>0||(e.removeEventListener("keydown",toggleKeyboardMode),e.removeEventListener("mousedown",toggleKeyboardMode))}function toggleKeyboardMode(e){const t=keyboardModeActive,i=e.type==="keydown";i&&(e.ctrlKey||e.metaKey||e.altKey)||t!==i&&(keyboardModeActive=i)}function _registerKeyboardFocusEvents(e){const t=_getDocument(e);return addKeyboardModeEvents(t),instanceCount++,()=>{instanceCount--,removeKeyboardModeEvents(t)}}function _isKeyboardMode(){return keyboardModeActive}function _findFocusableElements(e,t,i=!1){const o=FOCUSABLE_SELECTOR;let s=FOCUSABLE_EXCLUDE;t&&(s+=", "+t),i&&(s+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(o)).filter(a=>_isVisible(a)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?((a,d)=>a.filter(c=>d.indexOf(c)===-1))(n,r):n}function _focusInto(e,t=!1,i=!1,o=!1){const s=_findFocusableElements(e,o?".ag-tab-guard":null,i),n=t?_last(s):s[0];return n?(n.focus({preventScroll:!0}),!0):!1}function _findNextFocusableElement(e,t,i,o){const s=_findFocusableElements(t,i?':not([tabindex="-1"])':null),n=_getActiveDomElement(e);let r;i?r=s.findIndex(a=>a.contains(n)):r=s.indexOf(n);const l=r+(o?-1:1);return l<0||l>=s.length?null:s[l]}function _findTabbableParent(e,t=5){let i=0;for(;e&&_getTabIndex(e)===null&&++i<=t;)e=e.parentElement;return _getTabIndex(e)===null?null:e}var FOCUS_MANAGED_CLASS="ag-focus-managed",AgManagedFocusFeature=class extends AgBeanStub{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},i={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=i,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:o=>{if(o.defaultPrevented)return;const s=_findNextFocusableElement(this.beans,this.eFocusable,!1,o.shiftKey);s&&(s.focus(),o.preventDefault())},...i}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:i}}=this;e.classList.add(FOCUS_MANAGED_CLASS),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),i&&this.addManagedElementListeners(e,{focusout:i})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||this.stopPropagationCallbacks.isStopPropagation(t))return;const{callbacks:i}=this;if(i.shouldStopEventPropagation(t)){this.stopPropagationCallbacks.stopPropagation(t);return}t.key===KeyCode.TAB?i.onTabKeyDown(t):i.handleKeyDown&&i.handleKeyDown(t)}})}},AG_GRID_STOP_PROPAGATION="__ag_Grid_Stop_Propagation";function _stopPropagationForAgGrid(e){e[AG_GRID_STOP_PROPAGATION]=!0}function _isStopPropagationForAgGrid(e){return e[AG_GRID_STOP_PROPAGATION]===!0}var STOP_PROPAGATION_CALLBACKS={isStopPropagation:_isStopPropagationForAgGrid,stopPropagation:_stopPropagationForAgGrid},ManagedFocusFeature=class extends AgManagedFocusFeature{constructor(e,t){super(e,STOP_PROPAGATION_CALLBACKS,t)}},ProvidedFilter=class extends Component{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new ManagedFocusFeature(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new PositionableFeature(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){const t=e,i=this.params;this.params=t;const{source:o,state:s,additionalEventAttributes:n}=t;o==="colDef"&&this.updateParams(t,i);const r=this.state;this.state=s;const l=n?.fromAction;return(l&&l!=="apply"||s.model!==r.model||!this.areStatesEqual(s.state,r.state))&&this.setModelIntoUi(s.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=_isUseApplyButton(e),this.setupApplyDebounced()}doesFilterPass(e){_warn(283);const{getHandler:t,model:i,column:o}=this.params;return t().doesFilterPass({...e,model:i,handlerParams:this.beans.colFilter.getHandlerParams(o)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return _warn(284),this.params.model!=null}setupApplyDebounced(){const e=getDebounceMs(this.params,this.defaultDebounceMs),t=_debounce(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return _warn(285),this.params.model}setModel(e){_warn(286);const{beans:t,params:i}=this;return t.colFilter.setModelForColumnLegacy(i.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:{valid:i=!0,model:o}}=this;if(!i)return!1;const s=!this.areModelsEqual(t.model,o);return s&&t.onAction("apply",e),s}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const i=this.getModelFromUi(),o={model:i,state:this.getState(),valid:this.canApply(i)};this.state=o;const{params:s,gos:n,eventSvc:r,applyActive:l}=this;s.onStateChange(o),s.onUiChange(this.getUiChangeEventParams()),n.get("enableFilterHandlers")||r.dispatchEvent({type:"filterModified",column:s.column,filterInstance:this}),o.valid&&(e??(e=l?void 0:"debounce"),e==="immediately"?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):e==="debounce"&&this.applyDebounced())}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:i}=this;if(!t)return;const o=e==="floatingFilter"||e==="columnFilter";o?(t.restoreLastSize(),t.setResizable(i.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(o)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return translateForFilter(this,e,t)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}},STRUCTURED_SCHEMA_FEATURES=["aggregation","filter","sort","pivot","columnVisibility","columnSizing","rowGroup"];function _createCellId(e){const{rowIndex:t,rowPinned:i,column:o}=e;return`${t}.${i??"null"}.${o.getId()}`}function _areCellsEqual(e,t){const i=e.column===t.column,o=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return i&&o&&s}function _isRowBefore(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(_exists(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function _isSameRow(e,t){return!e&&!t?!0:!e||!t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function _getFirstRow(e){let t=0,i;const{pinnedRowModel:o,rowModel:s,pageBounds:n}=e;return o?.getPinnedTopRowCount()?i="top":s.getRowCount()?(i=null,t=n.getFirstRow()):o?.getPinnedBottomRowCount()&&(i="bottom"),i===void 0?null:{rowIndex:t,rowPinned:i}}function _getLastRow(e){let t,i=null;const{pinnedRowModel:o,pageBounds:s}=e,n=o?.getPinnedBottomRowCount(),r=o?.getPinnedTopRowCount();return n?(i="bottom",t=n-1):e.rowModel.getRowCount()?t=s.getLastRow():r&&(i="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:i}}function _getRowNode(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function _getCellByPosition(e,t){const i=e.spannedRowRenderer?.getCellByPosition(t);if(i)return i;const o=e.rowRenderer.getRowByPosition(t);return o?o.getCellCtrl(t.column):null}function _getRowById(e,t,i){const{rowModel:o,pinnedRowModel:s}=e;let n;return n??(n=o?.getRowNode(t)),i?n??(n=s?.getPinnedRowById(t,i)):(n??(n=s?.getPinnedRowById(t,"top")),n??(n=s?.getPinnedRowById(t,"bottom"))),n}function _getRowAbove(e,t,i=!1){const{rowIndex:o,rowPinned:s}=t,{pageBounds:n,pinnedRowModel:r,rowModel:l}=e;if(o===0)return s==="top"?null:s==="bottom"&&l.isRowsToRender()?{rowIndex:n.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(i){const a=s?void 0:l.getRow(o);return getNextStickyPosition(e,a,!0)??{rowIndex:o-1,rowPinned:s}}return{rowIndex:o-1,rowPinned:s}}function _getAbsoluteRowIndex(e,t){const{pinnedRowModel:i,rowModel:o}=e,s=i?.getPinnedTopRowCount()??0,n=o.getRowCount(),{rowPinned:r,rowIndex:l}=t;return r==="top"?l:r==="bottom"?s+n+l:s+l}function _getRowBelow(e,t,i=!1){const{rowIndex:o,rowPinned:s}=t,{pageBounds:n,pinnedRowModel:r,rowModel:l}=e;if(isLastRowInContainer(e,t))return s==="bottom"?null:s==="top"&&l.isRowsToRender()?{rowIndex:n.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(i){const a=s?void 0:l.getRow(o);return getNextStickyPosition(e,a)??{rowIndex:o+1,rowPinned:s}}return{rowIndex:o+1,rowPinned:s}}function getNextStickyPosition(e,t,i=!1){const{gos:o,rowRenderer:s}=e;if(!t?.sticky||!_isGroupRowsSticky(o))return;const n=s.getStickyTopRowCtrls(),r=s.getStickyBottomRowCtrls(),l=!r.some(u=>u.rowNode.rowIndex===t.rowIndex),a=l?n:r,d=(i?-1:1)*(l?-1:1);let c;for(let u=0;u<a.length;u++)if(a[u].rowNode.rowIndex===t.rowIndex){c=a[u+d];break}return c?{rowIndex:c.rowNode.rowIndex,rowPinned:null}:void 0}function isLastRowInContainer(e,t){const{rowPinned:i,rowIndex:o}=t,{pinnedRowModel:s,pageBounds:n}=e;return i==="top"?(s?.getPinnedTopRowCount()??0)-1<=o:i==="bottom"?(s?.getPinnedBottomRowCount()??0)-1<=o:n.getLastRow()<=o}function _addFocusableContainerListener(e,t,i){t.addManagedElementListeners(i,{keydown:o=>{if(!o.defaultPrevented&&o.key===KeyCode.TAB){const s=o.shiftKey;_findNextFocusableElement(e,i,!1,s)||_focusNextGridCoreContainer(e,s)&&o.preventDefault()}}})}function _focusGridInnerElement(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function _isHeaderFocusSuppressed(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.exclusive}function _isCellFocusSuppressed(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.exclusive}function _focusNextGridCoreContainer(e,t,i=!1){const o=e.ctrlsSvc.get("gridCtrl");return!i&&o.focusNextInnerContainer(t)?!0:((i||!t&&!o.isDetailGrid())&&o.forceFocusOutOfContainer(t),!1)}function _attemptToRestoreCellFocus(e,t){const i=e.focusSvc,o=i.getFocusedCell();if(o&&t&&_areCellsEqual(o,t)){const{rowIndex:s,rowPinned:n,column:r}=t;_isNothingFocused(e)&&i.setFocusedCell({rowIndex:s,column:r,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!_isKeyboardMode()})}}function getHeaderRowCount(e){return e.cols?e.cols.treeDepth+1:-1}function getFocusHeaderRowCount(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function getGroupRowsHeight(e){const t=[],i=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const o of i){if(!o)continue;const s=o.getGroupRowCount()||0;for(let n=0;n<s;n++){const r=o.getGroupRowCtrlAtIndex(n),l=t[n];if(r){const a=getColumnGroupHeaderRowHeight(e,r);(l==null||a>l)&&(t[n]=a)}}}return t}function getColumnGroupHeaderRowHeight(e,t){let o=e.colModel.isPivotMode()?getPivotGroupHeaderHeight(e):getGroupHeaderHeight(e);const s=t.getHeaderCellCtrls();for(const n of s){const{column:r}=n,l=r.getAutoHeaderHeight();l!=null&&l>o&&r.isAutoHeaderHeight()&&(o=l)}return o}function getColumnHeaderRowHeight(e){let i=e.colModel.isPivotMode()?getPivotHeaderHeight(e):getHeaderHeight(e);return e.colModel.forAllCols(o=>{const s=o.getAutoHeaderHeight();s!=null&&s>i&&o.isAutoHeaderHeight()&&(i=s)}),i}function getHeaderHeight(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function getFloatingFiltersHeight(e){return e.gos.get("floatingFiltersHeight")??getHeaderHeight(e)}function getGroupHeaderHeight(e){return e.gos.get("groupHeaderHeight")??getHeaderHeight(e)}function getPivotHeaderHeight(e){return e.gos.get("pivotHeaderHeight")??getHeaderHeight(e)}function getPivotGroupHeaderHeight(e){return e.gos.get("pivotGroupHeaderHeight")??getGroupHeaderHeight(e)}function isHeaderPositionEqual(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}var GridHeaderCtrl=class extends BeanStub{setComp(e,t,i){this.comp=e,this.eGui=t;const{beans:o}=this,{headerNavigation:s,touchSvc:n,ctrlsSvc:r}=o;s&&this.createManagedBean(new ManagedFocusFeature(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,o),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,o)}),this.onPivotModeChanged(o),this.setupHeaderHeight();const l=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:l}),n?.mockHeaderContextMenu(this,l),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>_requestAnimationFrame(this.beans,()=>e()),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const i=getGroupRowsHeight(e).reduce((r,l)=>r+l,0),o=getColumnHeaderRowHeight(e);e.filterManager?.hasFloatingFilters()&&(t+=getFloatingFiltersHeight(e)),t+=i,t+=o;const s=e.environment.getHeaderRowBorderWidth(),n=t+s;if(this.headerHeightWithBorder!==n){this.headerHeightWithBorder=n;const r=`${n}px`;this.comp.setHeightAndMinHeight(r)}this.headerHeight!==t&&(this.headerHeight=t,this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const i=e.visibleCols.allCols.some(o=>o.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",i)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),i=e.shiftKey,o=i!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:n,focusSvc:r}=s;(n.navigateHorizontally(o,!0,e)||!i&&r.focusOverlay(!1)||_focusNextGridCoreContainer(s,i,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:i}=this.beans;switch(e.key){case KeyCode.LEFT:t="LEFT";case KeyCode.RIGHT:{_exists(t)||(t="RIGHT"),i.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case KeyCode.UP:t="UP";case KeyCode.DOWN:{_exists(t)||(t="DOWN"),i.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:i,beans:o}=this;!t&&i.contains(_getActiveDomElement(o))||i.contains(t)||(o.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,i){const{menuSvc:o,ctrlsSvc:s}=this.beans;if(!e&&!i||!o?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===s.getHeaderRowContainerCtrl()?.eViewport)&&o.showHeaderContextMenu(void 0,e,i)}},AbstractHeaderCellComp=class extends Component{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},HeaderCellElement={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},HeaderCellComp=class extends AbstractHeaderCellComp{constructor(e){super(HeaderCellElement,e),this.eResize=RefPlaceholder,this.eHeaderCompWrapper=RefPlaceholder,this.headerCompVersion=0}postConstruct(){const e=this.getGui(),t=()=>{const o=this.ctrl.getSelectAllGui();o&&(this.eResize.insertAdjacentElement("afterend",o),this.addDestroyFunc(()=>o.remove()))},i={setWidth:o=>e.style.width=o,toggleCss:(o,s)=>this.toggleCss(o,s),setUserStyles:o=>_addStylesToElement(e,o),setAriaSort:o=>o?_setAriaSort(e,o):_removeAriaSort(e),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:t,removeSelectAllGui:()=>this.ctrl.getSelectAllGui()?.remove()};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),t()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.headerCompGui?.remove(),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(i=>this.afterCompCreated(t,i))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},HeaderGroupCellCompElement={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},HeaderGroupCellComp=class extends AbstractHeaderCellComp{constructor(e){super(HeaderGroupCellCompElement,e),this.eResize=RefPlaceholder,this.eHeaderCompWrapper=RefPlaceholder}postConstruct(){const e=this.getGui(),t=(o,s)=>s!=null?e.setAttribute(o,s):e.removeAttribute(o),i={toggleCss:(o,s)=>this.toggleCss(o,s),setUserStyles:o=>_addStylesToElement(e,o),setHeaderWrapperHidden:o=>{o?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:o=>{o!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${o}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",o!=null)},setResizableDisplayed:o=>_setDisplayed(this.eResize,o),setWidth:o=>e.style.width=o,setAriaExpanded:o=>t("aria-expanded",o),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(i,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}const i=this.getGui(),o=e.getGui();this.eHeaderCompWrapper.appendChild(o),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}},HeaderFilterCellCompElement={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},HeaderFilterCellComp=class extends AbstractHeaderCellComp{constructor(e){super(HeaderFilterCellCompElement,e),this.eFloatingFilterBody=RefPlaceholder,this.eButtonWrapper=RefPlaceholder,this.eButtonShowMainFilter=RefPlaceholder}postConstruct(){const e=this.getGui(),t={toggleCss:(i,o)=>this.toggleCss(i,o),setUserStyles:i=>_addStylesToElement(e,i),addOrRemoveBodyCssClass:(i,o)=>this.eFloatingFilterBody.classList.toggle(i,o),setButtonWrapperDisplayed:i=>_setDisplayed(this.eButtonWrapper,i),setCompDetails:i=>this.setCompDetails(i),getFloatingFilterComp:()=>this.compPromise,setWidth:i=>e.style.width=i,setMenuIcon:i=>this.eButtonShowMainFilter.appendChild(i)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp?.getGui().remove(),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp)}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached?.()}}},HeaderRowComp=class extends Component{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),_setAriaRowIndex(this.getGui(),this.ctrl.getAriaRowIndex());const t={setHeight:i=>this.getGui().style.height=i,setTop:i=>this.getGui().style.top=i,setHeaderCtrls:(i,o)=>this.setHeaderCtrls(i,o),setWidth:i=>this.getGui().style.width=i,setRowIndex:i=>_setAriaRowIndex(this.getGui(),i)};this.ctrl.setComp(t,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const i=this.headerComps;this.headerComps={};for(const o of e){const s=o.instanceId;let n=i[s];delete i[s],n==null&&(n=this.createHeaderComp(o),this.getGui().appendChild(n.getGui())),this.headerComps[s]=n}if(Object.values(i).forEach(o=>{o.getGui().remove(),this.destroyBean(o)}),t){const o=Object.values(this.headerComps);o.sort((n,r)=>{const l=n.getCtrl().column.getLeft(),a=r.getCtrl().column.getLeft();return l-a});const s=o.map(n=>n.getGui());_setDomChildOrder(this.getGui(),s)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new HeaderGroupCellComp(e);break;case"filter":t=new HeaderFilterCellComp(e);break;default:t=new HeaderCellComp(e);break}return this.createBean(t),t.setParentComponent(this),t}},CenterWidthFeature=class extends BeanStub{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=_isDomLayout(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:i}=this.beans,o=t.bodyWidth,s=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=o+s+n:(r=o,this.addSpacer&&(this.gos.get("enableRtl")?s:n)===0&&i.verticalScrollShowing&&(r+=i.getScrollbarWidth())),this.callback(r)}},EmptyBean=class extends BeanStub{};function setupCompBean(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var SetLeftFeature=class extends BeanStub{constructor(e,t,i,o){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=o,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=i}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?_last(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,i=e.get("suppressColumnMoveAnimation"),o=_exists(this.columnOrGroup.getOldLeft());t?.isActive()&&o&&!i?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),i=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=i,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===i&&this.setLeft(i)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:i,visibleCols:o}=this.beans;if(!_isDomLayout(i,"print")||e.getPinned()==="left")return t;const n=o.getColsLeftWidth();if(e.getPinned()==="right"){const r=o.bodyWidth;return n+r+t}return n+t}setLeft(e){if(_exists(e)&&(this.eCell.style.left=`${e}px`),isColumnGroup(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&_setAriaColSpan(this.ariaEl,t.length)}}},CSS_FIRST_COLUMN="ag-column-first",CSS_LAST_COLUMN="ag-column-last";function _getHeaderClassesFromColDef(e,t,i,o){return _missing(e)?[]:getColumnClassesFromCollDef(e.headerClass,e,t,i,o)}function _getToolPanelClassesFromColDef(e,t,i,o){return _missing(e)?[]:getColumnClassesFromCollDef(e.toolPanelClass,e,t,i,o)}function refreshFirstAndLastStyles(e,t,i){e.toggleCss(CSS_FIRST_COLUMN,i.isColAtEdge(t,"first")),e.toggleCss(CSS_LAST_COLUMN,i.isColAtEdge(t,"last"))}function getClassParams(e,t,i,o){return _addGridCommonParams(t,{colDef:e,column:i,columnGroup:o})}function getColumnClassesFromCollDef(e,t,i,o,s){if(_missing(e))return[];let n;if(typeof e=="function"){const r=getClassParams(t,i,o,s);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}var instanceIdSequence2=0,DOM_DATA_KEY_HEADER_CTRL="headerCtrl",AbstractHeaderCellCtrl=class extends BeanStub{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+"-"+instanceIdSequence2++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,i,o,s){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,i,o,s),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:i}=this.beans.focusSvc.focusedHeader,o=i.getDefinition(),s=o?.suppressHeaderKeyboardEvent;if(!_exists(s))return!1;const n=_addGridCommonParams(this.gos,{colDef:o,column:i,headerRowIndex:t,event:e});return!!s(n)}getWrapperHasFocus(){return _getActiveDomElement(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let i;if(typeof t=="function"){const o=this.getHeaderClassParams();i=t(o)}else i=t;i&&this.comp.setUserStyles(i)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:i,compBean:o}=e,{beans:s}=this,n=u=>{if(!this.isAlive()||!o.isAlive())return;const{paddingTop:h,paddingBottom:g,borderBottomWidth:p,borderTopWidth:f}=_getElementSize(this.eGui),m=h+g+p+f,v=t.offsetHeight+m;if(u<5){const S=!_getDocument(s)?.contains(t),b=v==0;if(S||b){_batchCall(()=>n(u+1),"raf",s);return}}this.setColHeaderHeight(this.column,v)};let r=!1,l;const a=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),n(0),l=_observeResize(this.beans,t,()=>n(0))},c=()=>{r=!1,l&&l(),this.comp.toggleCss("ag-header-cell-auto-height",!1),l=void 0};a(),o.addDestroyFunc(()=>c()),o.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),o.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),i&&i(a)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:i,eGui:o}=this;!e||!t||!o||(refreshFirstAndLastStyles(e,t,i.visibleCols),_setAriaColIndex(o,i.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=_isHeaderFocusSuppressed(this.beans);this.eGui&&_addOrRemoveAttribute(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=_getActiveDomElement(this.beans),i=e.key===KeyCode.LEFT||e.key===KeyCode.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey)return;if((this.isResizing||i)&&(e.preventDefault(),e.stopImmediatePropagation()),(e.ctrlKey||e.metaKey)&&_normaliseQwertyAzerty(e)===KeyCode.C)return this.beans.clipboardSvc?.copyToClipboard();if(!i)return;const n=e.key===KeyCode.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const r=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(r,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(n)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:i}=this.beans;return i?i.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:i}=this;let o=e.key===KeyCode.LEFT!==t.get("enableRtl");const s=i.getPinned(),n=t.get("enableRtl");return s&&n!==(s==="right")&&(o=!o),(o?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case KeyCode.PAGE_DOWN:case KeyCode.PAGE_UP:case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=DOM_DATA_KEY_HEADER_CTRL,{eGui:i,gos:o}=this;_setDomData(o,i,t,this),e.addDestroyFunc(()=>_setDomData(o,i,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus()):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,i){const o=e??t,{menuSvc:s,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&o.preventDefault(),s?.isHeaderContextMenuEnabled(i)&&s.showHeaderContextMenu(i,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",i)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:i}=this;e.isColumn?i.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):i.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},HeaderCellCtrl=class extends AbstractHeaderCellCtrl{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,i,o,s){this.comp=e;const{rowCtrl:n,column:r,beans:l}=this,{colResize:a,context:d,colHover:c,rangeSvc:u}=l,h=setupCompBean(this,d,s);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:o,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),a?this.resizeFeature=h.createManagedBean(a.createResizeFeature(n.pinned,r,i,e,this)):_setDisplayed(i,!1),c?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new SetLeftFeature(r,t,l)),h.createManagedBean(new ManagedFocusFeature(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.colDef;return _addGridCommonParams(t.gos,{colDef:i,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return _getHeaderCompDetails(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:i,gos:o}=this.beans;return _addGridCommonParams(o,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!i&&(!this.openFilterEnabled||_isLegacyMenuEnabled(this.gos)),showColumnMenu:(n,r)=>{e?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t?.setSortForColumn(this.column,_getSortDefFromInput(n),!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{const i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===KeyCode.SPACE?this.selectAllFeature?.onSpaceKeyDown(e):e.key===KeyCode.ENTER?this.onEnterKeyDown(e):e.key===KeyCode.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){const{column:t,gos:i,sortable:o,beans:s}=this;let n=!1;(e.ctrlKey||e.metaKey)&&(n=this.showMenuOnKeyPress(e,!0)),n||(!e.altKey&&_getEnableColumnSelection(i)?s.rangeSvc?.handleColumnSelection(t,e):o&&s.sortSvc?.progressSort(t,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const i=this.comp.getUserCompInstance();return isHeaderComp(i)&&i.onMenuKeyboardShortcut(t)?(e.preventDefault(),!0):!1}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),_isKeyboardMode()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),i=_getHeaderClassesFromColDef(t,this.gos,this.column,null),o=this.userHeaderClasses;this.userHeaderClasses=new Set(i);for(const s of i)o.has(s)?o.delete(s):this.comp.toggleCss(s,!0);for(const s of o)this.comp.toggleCss(s,!1)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(const e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.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}setupWidth(e){const t=()=>{const i=this.column.getActualWidth();this.comp.setWidth(`${i}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const i=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",i),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,i=e===1;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",i)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:o}=this,s=getGroupRowsHeight(this.beans),n=s.reduce((h,g)=>h+g,0)===0;if(i.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),i.toggleCss("ag-header-span-height",!1),i.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:l}=this.column.getColumnGroupPaddingInfo();i.toggleCss("ag-header-span-height",r>0);const a=getColumnHeaderRowHeight(o);if(r===0){i.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${a}px`);return}i.toggleCss("ag-header-span-total",l);const d=(this.column.getFirstRealParent()?.getLevel()??-1)+1,c=s.length-d;let u=0;for(let h=0;h<c;h++)u+=s[s.length-1-h];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${a+u}px`)}refreshAriaSort(){let e=null;const{beans:t,column:i,comp:o,sortable:s}=this;if(s){const n=this.getLocaleTextFunc(),r=t.sortSvc?.getDisplaySortForColumn(i)??null;o.setAriaSort(_getAriaSortState(r)),e=n("ariaSortableColumn","Press ENTER to sort")}else o.setAriaSort();this.setAriaDescriptionProperty("sort",e)}refreshAriaMenu(){let e=null;this.menuEnabled&&(e=this.getLocaleTextFunc()("ariaMenuColumn","Press ALT DOWN to open column menu")),this.setAriaDescriptionProperty("menu",e)}refreshAriaFilterButton(){let e=null;const{openFilterEnabled:t,gos:i}=this;t&&!_isLegacyMenuEnabled(i)&&(e=this.getLocaleTextFunc()("ariaFilterColumn","Press CTRL ENTER to open filter")),this.setAriaDescriptionProperty("filterButton",e)}refreshAriaFiltered(){let e=null;this.column.isFilterActive()&&(e=this.getLocaleTextFunc()("ariaColumnFiltered","Column Filtered")),this.setAriaDescriptionProperty("filter",e)}refreshAriaCellSelection(){let e=null;const{gos:t,column:i,beans:o}=this;if(_getEnableColumnSelection(t)){const n=this.getLocaleTextFunc(),r=o.rangeSvc?.isColumnInAnyRange(i);e=n("ariaColumnCellSelection",`Press CTRL+SPACE to ${r?"de":""}select all visible cells in this column`)}this.setAriaDescriptionProperty("cellSelection",e)}setAriaDescriptionProperty(e,t){const i=this.ariaDescriptionProperties;t!=null?i.set(e,t):i.delete(e)}announceAriaDescription(){const{beans:e,eGui:t,ariaDescriptionProperties:i}=this;if(!t.contains(_getActiveDomElement(e)))return;const o=Array.from(i.keys()).sort((s,n)=>s==="filter"?-1:n.charCodeAt(0)-s.charCodeAt(0)).map(s=>i.get(s)).join(". ");e.ariaAnnounce?.announceValue(o,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),i=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},o=s=>this.handleContextMenuMouseEvent(s,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:i,contextmenu:o})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return isHeaderComp(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function isHeaderComp(e){return typeof e?.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var instanceIdSequence3=0,HeaderRowCtrl=class extends BeanStub{constructor(e,t,i){super(),this.rowIndex=e,this.pinned=t,this.type=i,this.instanceId=instanceIdSequence3++,this.comp=null,this.allCtrls=[];let o="ag-header-row-column";i==="group"?o="ag-header-row-group":i==="filter"&&(o="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${o}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=_isDomLayout(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,i=!0){this.comp=e,t=setupCompBean(this,this.beans.context,t),i&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),i=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:i,virtualColumnsChanged:o=>this.onVirtualColumnsChanged(o.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",i),e.addManagedPropertyListener("ensureDomOrder",o=>this.isEnsureDomOrder=o.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=_isDomLayout(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=getGroupRowsHeight(this.beans);for(let s=0;s<t.length;s++){if(s===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[s]};e+=t[s]}const i=getColumnHeaderRowHeight(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:i};e+=i;const o=getFloatingFiltersHeight(this.beans);return{topOffset:e,rowHeight:o}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;const t=this.getUpdatedHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const o of t)this.recycleAndCreateHeaderCtrls(o,this.ctrlsById,e);const i=o=>{const{focusSvc:s,visibleCols:n}=this.beans;return s.isHeaderWrapperFocused(o)?n.isVisible(o.column):!1};if(e)for(const[o,s]of e)i(s)?this.ctrlsById.set(o,s):this.destroyBean(s);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,i){if(e.isEmptyGroup())return;const o=e.getUniqueId();let s;if(i&&(s=i.get(o),i.delete(o)),s&&s.column!=e&&(this.destroyBean(s),s=void 0),s==null)switch(this.type){case"filter":{s=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":s=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:s=this.createBean(new HeaderCellCtrl(e,this));break}t.set(o,s)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];for(const t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const i=this.allCtrls.find(s=>s.column==e);return i?i.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},HeaderRowContainerCtrl=class extends BeanStub{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:i,ctrlsSvc:o,colModel:s,colMoves:n}=this.beans;this.setupCenterWidth(),i?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});const l=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;o.register(l,this),s.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,filterManager:i,visibleCols:o}=this.beans;let s=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=o.headerGroupRowCount;s=u,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let g=u;g<h;g++)this.destroyBean(this.groupsRowCtrls[g]);this.groupsRowCtrls.length=u;return}for(let g=h;g<u;g++){const p=this.createBean(new HeaderRowCtrl(g,this.pinned,"group"));this.groupsRowCtrls.push(p)}}},l=()=>{const u=s++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new HeaderRowCtrl(u,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},a=()=>{this.includeFloatingFilter=!!i?.hasFloatingFilters()&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}e||u();const h=s++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new HeaderRowCtrl(h,this.pinned,"filter"))},d=this.getAllCtrls();r(),l(),a();const c=this.getAllCtrls();this.comp.setCtrls(c),this.restoreFocusOnHeader(t,n),d.length!==c.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=i=>i?.getHeaderCellCtrls().find(o=>o.column===e);if(isColumn(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let i=0;i<this.groupsRowCtrls.length;i++){const o=t(this.groupsRowCtrls[i]);if(o)return o}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,i){const s=this.getAllCtrls()[e];return s?s.focusHeader(t,i):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const i=e?.createBodyDropTarget(this.pinned,t);i&&this.createManagedBean(i)}restoreFocusOnHeader(e,t){if(!t)return;const{column:i}=t;i.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t,scroll:!1})}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new CenterWidthFeature(e=>this.comp.setCenterWidth(`${e}px`),!0))}},AgPopupComponent=class extends AgComponentStub{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e?.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},AgAbstractCellEditor=class extends AgPopupComponent{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.eEditor.destroy(),this.errorMessages=null,super.destroy()}};function expireValueCache(e){e.valueCache?.expire()}function getCellValue(e,t){const{colKey:i,rowNode:o,useFormatter:s,from:n="edit"}=t,r=e.colModel.getColDefCol(i)??e.colModel.getCol(i);if(!r)return null;const l=e.valueSvc.getValueForDisplay({column:r,node:o,includeValueFormatted:s,from:n});return s?l.valueFormatted??_toString(l.value):l.value}var OverlayComponent=class extends Component{constructor(){super()}},ExportingOverlayElement={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},ExportingOverlayComponent=class extends OverlayComponent{constructor(){super(...arguments),this.eExportingIcon=RefPlaceholder,this.eExportingText=RefPlaceholder}init(e){const{beans:t}=this;this.setTemplate(ExportingOverlayElement);const i=_createIconNoSpan("overlayExporting",t,null);i&&this.eExportingIcon.appendChild(i);const o=e.exporting?.overlayText??this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}},LoadingOverlayElement={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},LoadingOverlayComponent=class extends OverlayComponent{constructor(){super(...arguments),this.eLoadingIcon=RefPlaceholder,this.eLoadingText=RefPlaceholder}init(e){const{beans:t,gos:i}=this,o=_makeNull(i.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(o??LoadingOverlayElement),!o){const s=_createIconNoSpan("overlayLoading",t,null);s&&this.eLoadingIcon.appendChild(s);const n=e.loading?.overlayText??this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=n,t.ariaAnnounce.announceValue(n,"overlay")}}},NoMatchingRowsOverlayElement={tag:"span",cls:"ag-overlay-no-matching-rows-center"},NoMatchingRowsOverlayComponent=class extends OverlayComponent{init(e){const{beans:t}=this;this.setTemplate(NoMatchingRowsOverlayElement);const i=e.noMatchingRows?.overlayText??this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}},NoRowsOverlayElement={tag:"span",cls:"ag-overlay-no-rows-center"},NoRowsOverlayComponent=class extends OverlayComponent{init(e){const{beans:t,gos:i}=this,o=_makeNull(i.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(o??NoRowsOverlayElement),!o){const s=e.noRows?.overlayText??this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=s,t.ariaAnnounce.announceValue(s,"overlay")}}},agAbstractLabelCSS=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-label-align-right){.ag-label,.ag-wrapper{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column}:where(.ag-label-align-top){.ag-label,.ag-wrapper{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",AgAbstractLabel=class extends AgComponentStub{constructor(e,t,i){super(t,i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(agAbstractLabelCSS)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:i,labelAlignment:o,disabled:s,labelEllipsis:n}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),i!=null&&this.setLabelWidth(i),n!=null&&this.setLabelEllipsis(n),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;_clearElement(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(_setDisplayed(t,!1),_setAriaRole(t,"presentation")):(_setDisplayed(t,!0),_setAriaRole(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const i=this.getGui().classList;return i.toggle("ag-label-align-left",e==="left"),i.toggle("ag-label-align-right",e==="right"),i.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(_setElementWidth(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return _setDisabled(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},AgAbstractField=class extends AgAbstractLabel{constructor(e,t,i,o){super(e,t,i),this.className=o}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:i,ariaLabel:o}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),i!=null&&this.onValueChange(i),o!=null&&this.setAriaLabel(o),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),i=this.getLabel();i==null||i==""||_getAriaLabel(e)!==null?_setAriaLabelledBy(e,""):_setAriaLabelledBy(e,t??"")}setAriaLabel(e){return _setAriaLabel(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return _setFixedWidth(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function buildTemplate(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var AgAbstractInputField=class extends AgAbstractField{constructor(e,t,i="text",o="input"){super(e,e?.template??buildTemplate(o),[],t),this.inputType=i,this.displayFieldTag=o,this.eLabel=RefPlaceholder,this.eWrapper=RefPlaceholder,this.eInput=RefPlaceholder}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:i,className:o}=this;e.classList.add(`${o}-label`),t.classList.add(`${o}-input-wrapper`),i.classList.add(`${o}-input`),this.addCss("ag-input-field"),i.id=i.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:n,inputPlaceholder:r,autoComplete:l,tabIndex:a}=this.config;s!=null&&this.setInputName(s),n!=null&&this.setInputWidth(n),r!=null&&this.setInputPlaceholder(r),l!=null&&this.setAutoComplete(l),this.addInputListeners(),this.activateTabIndex([i],a)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,_addOrRemoveAttribute(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return _setElementWidth(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return _addOrRemoveAttribute(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return _setAriaLabel(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return _setDisabled(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)_addOrRemoveAttribute(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";_addOrRemoveAttribute(this.eInput,"autocomplete",t)}return this}},AgCheckbox=class extends AgAbstractInputField{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t,name:i}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t),i!=null&&this.setName(i)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!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(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const i=this.eInput;i.checked=e,i.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:i});const o=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:o.id,name:o.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},AgCheckboxSelector={selector:"AG-CHECKBOX",component:AgCheckbox},checkboxCellRendererCSS=".ag-checkbox-cell{height:100%}",CheckboxCellRendererElement={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},CheckboxCellRenderer=class extends Component{constructor(){super(CheckboxCellRendererElement,[AgCheckboxSelector]),this.eCheckbox=RefPlaceholder,this.registerCSS(checkboxCellRendererCSS)}init(e){this.refresh(e);const{eCheckbox:t,beans:i}=this,o=t.getInputElement();o.setAttribute("tabindex","-1"),_setAriaLive(o,"polite"),this.addManagedListeners(o,{click:s=>{if(_stopPropagationForAgGrid(s),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:s=>{_stopPropagationForAgGrid(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(s.key===KeyCode.SPACE&&!t.isDisabled()){e.eGridCell===_getActiveDomElement(i)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),s.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,i=!0;const{value:o,column:s,node:n}=e;if(n.group&&s)if(typeof o=="boolean")t=o;else{const u=s.getColId();u.startsWith(GROUP_AUTO_COLUMN_ID)?t=o==null||o===""?void 0:o==="true":n.aggData&&n.aggData[u]!==void 0||n.sourceRowIndex>=0?t=o??void 0:i=!1}else t=o??void 0;const{eCheckbox:r}=this;if(!i){r.setDisplayed(!1);return}r.setValue(t);const l=e.disabled??!s?.isCellEditable(n);r.setDisabled(l);const a=this.getLocaleTextFunc(),d=_getAriaCheckboxStateName(a,t),c=l?d:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){const{params:t}=this,{column:i,node:o,value:s}=t,{editSvc:n}=this.beans;if(!i)return;const r={rowNode:o,column:i};n?.dispatchCellEvent(r,null,"cellEditingStarted",{value:s});const l=o.setDataValue(i,e,"ui");n?.dispatchCellEvent(r,null,"cellEditingStopped",{oldValue:s,newValue:e,valueChanged:l}),l||this.updateCheckbox(t)}};function _getClientSideRowModel(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function _getInfiniteRowModel(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function _getServerSideRowModel(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}function _getViewportRowModel(e){const t=e.rowModel;return t.getType()==="viewport"?t:void 0}var ROW_ID_PREFIX_ROW_GROUP="row-group-",ROW_ID_PREFIX_TOP_PINNED="t-",ROW_ID_PREFIX_BOTTOM_PINNED="b-",OBJECT_ID_SEQUENCE=0,RowNode=class{constructor(e){this.id=void 0,this.destroyed=!1,this._groupData=void 0,this.master=!1,this.detail=void 0,this.rowIndex=null,this.field=null,this.rowGroupColumn=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=OBJECT_ID_SEQUENCE++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){const e=this._groupData;return e!==void 0?e:this.footer?this.sibling?.groupData:this.beans.groupStage?.loadGroupData(this)??null}set groupData(e){this._groupData=e}get allLeafChildren(){const e=this._leafs;return e===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:i,eventSvc:o}=this.beans,s=this.data;this.data=e,i?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,s,t);if(this.__localEventService?.dispatchEvent(n),this.sibling){this.sibling.data=e;const l=this.sibling.createDataChangedEvent(e,s,t);this.sibling.__localEventService?.dispatchEvent(l)}o.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(e,s,t)),o.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,i){return{type:"dataChanged",node:this,oldData:t,newData:e,update:i}}getRowIndexString(){return this.rowIndex==null?(_error(13),null):this.rowPinned==="top"?ROW_ID_PREFIX_TOP_PINNED+this.rowIndex:this.rowPinned==="bottom"?ROW_ID_PREFIX_BOTTOM_PINNED+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:i}=this.beans,o=i?.createDaemonNode?.(this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),i&&(i.updateRowSelectable(this),i.syncInRowNode(this,o));const n=this.createDataChangedEvent(e,s,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=_getRowIdCallback(this.beans.gos);if(t)if(this.data){const i=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:i.length>0?i:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(ROW_ID_PREFIX_ROW_GROUP)&&_error(14,{groupPrefix:ROW_ID_PREFIX_ROW_GROUP})}else this.id=void 0;else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=e!==null;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,i){this.beans.expansionSvc?.setExpanded(this,e,t,i)}setDataValue(e,t,i){const{colModel:o,valueSvc:s,gos:n,editSvc:r}=this.beans;if(e==null)return!1;let l=o.getCol(e)??o.getColDefCol(e);if(!l)return!1;if(!this.group){const c=l.getColDef();c.pivotValueColumn&&(l=c.pivotValueColumn)}const a=s.getValueForDisplay({column:l,node:this,from:"data"}).value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:c},data:u,rowIndex:h,rowPinned:g}=this;return c.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:g,column:l,colDef:l.colDef,data:u,node:this,oldValue:a,newValue:t,value:t,source:i}),!1}if(r&&!r.committing){const c=r.setDataValue({rowNode:this,column:l},t,i);if(c!=null)return c}const d=s.setValue(this,l,t,i);return this.dispatchCellChangedEvent(l,t,a),d&&this.pinnedSibling?.dispatchCellChangedEvent(l,t,a),d}getDataValue(e){const{colModel:t,valueSvc:i,formula:o}=this.beans;if(e==null)return;const s=t.getCol(e)??t.getColDefCol(e);if(!s)return;let n=i.getValue(s,this,"data");return o&&s.isAllowFormula()&&o.isFormula(n)&&(n=o.resolveValue(s,this)),n}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,i){const o={type:"cellChanged",node:this,column:e,newValue:t,oldValue:i};this.__localEventService?.dispatchEvent(o)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let i=0,o=t.length;i<o;++i)t[i].depthFirstSearch(e);e(this)}getAggregatedChildren(e){const t=this.beans;return t.aggStage?.getAggregatedChildren(this,t.colModel.getCol(e))??[]}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,i="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:i})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){(this.__localEventService??(this.__localEventService=new LocalEventService)).addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e);const i=this.__localEventService??(this.__localEventService=new LocalEventService);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,i);const o=this.frameworkEventListenerService?.wrap(e,t)??t;i.addEventListener(e,o)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,i)}removeLocalListener(e,t){const i=this.__localEventService;i&&(i.removeEventListener(e,t),i.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(_warn(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t?.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){const e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}_destroy(e){if(this.destroyed)return!1;this.destroyed=!0;const t=this.pinnedSibling;if(t?.rowPinned&&!this.rowPinned&&this.beans.pinnedRowModel?.pinRow(t,null),e?this.clearRowTopAndRowIndex():(this.setRowTop(null),this.setRowIndex(null)),!this.footer){const i=this.detailNode;i&&i._destroy(e);const o=this.sibling;o&&o._destroy(e)}return!0}};function _createGlobalRowEvent(e,t,i){return _addGridCommonParams(t,{type:i,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var IGNORED_SIBLING_PROPERTIES=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_groupData","_leafs","childStore","groupValue","oldRowTop","sticky","treeNodeFlags","treeParent"]),_createRowNodeSibling=(e,t)=>{const i=new RowNode(t);for(const o of Object.keys(e))IGNORED_SIBLING_PROPERTIES.has(o)||(i[o]=e[o]);return i.oldRowTop=null,i},_prevOrNextDisplayedRow=(e,t,i)=>{if(!i)return;let o=i.rowIndex;if(o==null)return;o+=t;const s=e.getRowCount();for(;o>=0&&o<s;){const n=e.getRow(o);if(!n||!n.footer&&!n.detail)return n;o+=t}},PinnedRows=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){const{all:t,visible:i,order:o}=this;t.has(e)||(t.add(e),i.add(e),o.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),_removeFromArray(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(const t of this.visible)if(t.id==e)return t}clear(){const{all:e,visible:t,order:i,queued:o}=this;e.clear(),o.clear(),t.clear(),i.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:i}=this.beans,o=e?.getSortOptions()??[],s=this.order,n=_removeGrandTotalRow(s);if(s.sort((l,a)=>t?.compareRowNodes(o,l,a)||(l.pinnedSibling?.rowIndex??0)-(a.pinnedSibling?.rowIndex??0)),!n)return;const r=_getGrandTotalRow(i);r==="bottom"||r==="pinnedBottom"?this.order.push(n):this.order.unshift(n)}hide(e){const{all:t,visible:i}=this,o=i.size;return t.forEach(s=>e(s)?i.delete(s):i.add(s)),this.order=Array.from(i),this.sort(),o!=i.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function _isDisplayedAfterFilterCSRM(e){if(e.level===-1)return!0;const t=e.parent;return t?.childrenAfterSort?.some(i=>i==e)?_isDisplayedAfterFilterCSRM(t):!1}function _shouldHidePinnedRows(e,t){const{gos:i,rowModel:o,filterManager:s}=e;return _isServerSideRowModel(i,o)?!o.getRowNode(t.id):s?.isAnyFilterPresent()?!_isDisplayedAfterFilterCSRM(t):i.get("pivotMode")?!t.group:!1}function _isNodeGrandTotal(e){return!!e.footer&&e.level===-1}function _isPinnedNodeGrandTotal(e){return!!e.pinnedSibling&&_isNodeGrandTotal(e.pinnedSibling)}function _removeGrandTotalRow(e){const t=e.findIndex(_isPinnedNodeGrandTotal);if(t>-1)return e.splice(t,1)?.[0]}var ManualPinnedRowModel=class extends BeanStub{constructor(){super(...arguments),this.csrm=null}postConstruct(){const{gos:e,beans:t}=this;this.top=new PinnedRows(t,"top"),this.bottom=new PinnedRows(t,"bottom"),this.csrm=_getClientSideRowModel(t)??null;const i=s=>_shouldHidePinnedRows(t,s.pinnedSibling),o=()=>{const s=e.get("isRowPinned");s&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,s(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:s})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let n=!1;this.forContainers(l=>{n||(n=l.hide(i))});const r=this.refreshRowPositions();(!s||r||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(removeGroupRows),this.refreshRowPositions()},rowNodeDataChanged:({node:s})=>{(e.get("isRowPinnable")?.(s)??!0)||this.pinRow(s,null)},firstDataRendered:o}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(s=>s.hide(i)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:s})=>{this._grandTotalPinned=s==="pinnedBottom"?"bottom":s==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",o)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const i=[];t.forEach(o=>i.push(o)),i.forEach(o=>this.pinRow(o,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,i){if(t!=null&&e.destroyed)return;if(e.footer){const r=e.level;if(r>-1)return;if(r===-1){this._grandTotalPinned=t,this.csrm?.reMapRows();return}}const o=e.rowPinned??e.pinnedSibling?.rowPinned;if(o!=null&&t!=null&&t!=o){const r=e.rowPinned?e:e.pinnedSibling,l=e.rowPinned?e.pinnedSibling:e;this.pinRow(r,null,i),this.pinRow(l,t,i);return}const n=i&&getSpannedRows(this.beans,e,i);if(n){n.forEach(r=>this.pinRow(r,t));return}if(t==null){const r=e.rowPinned?e:e.pinnedSibling,l=this.findPinnedRowNode(r);if(!l)return;l.delete(r);const a=r.pinnedSibling;_destroyRowNodeSibling(r),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(a)}else{const r=_createPinnedSibling(this.beans,e,t),l=this.getContainer(t);l.add(r),_shouldHidePinnedRows(this.beans,e)&&l.hide(a=>_shouldHidePinnedRows(this.beans,a.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const i=o=>{if(o.rowHeightEstimated){const s=_getRowHeightForNode(this.beans,o);o.setRowTop(t),o.setRowHeight(s.height),t+=s.height,e=!0}};return this.bottom.forEach(i),t=0,this.top.forEach(i),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return getTotalHeight(this.top)}getPinnedBottomTotalHeight(){return getTotalHeight(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const e=t=>{const i=[];return this.forEachPinnedRow(t,o=>{const s=o.pinnedSibling?.id;s!=null&&i.push(s)}),i};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,i)=>{for(const o of e[i]){const s=this.beans.rowModel.getRowNode(o);s?this.pinRow(s,i):t.queue(o)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const i=new Set;e.forEachQueued(o=>{const s=this.beans.rowModel.getRowNode(o);s&&i.add(s)});for(const o of i)e.unqueue(o.id),this.pinRow(o,t)})}pinGrandTotalRow(){const{csrm:e,beans:t,_grandTotalPinned:i}=this;if(!e)return;const o=e.rootNode?.sibling;if(!o)return;const s=o.pinnedSibling,n=s&&this.findPinnedRowNode(s);if(i){if(n&&n.floating!==i&&(_destroyRowNodeSibling(s),n.delete(s)),!n||n.floating!==i){const r=_createPinnedSibling(t,o,i);this.getContainer(i).add(r)}}else{if(!n)return;_destroyRowNodeSibling(s),n.delete(s)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(i=>i.setRowHeight(i.rowHeight,!0)))}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){const t=o=>refreshRowPositions(this.beans,o);if(e)return t(this.getContainer(e));let i=!1;return this.forContainers(o=>{const s=t(o);i||(i=s)}),i}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function refreshRowPositions(e,t){let i=0,o=!1;return t.forEach((s,n)=>{if(o||(o=s.rowTop!==i),s.setRowTop(i),s.rowHeightEstimated||s.rowHeight==null){const r=_getRowHeightForNode(e,s).height;o||(o=s.rowHeight!==r),s.setRowHeight(r)}s.setRowIndex(n),i+=s.rowHeight}),o}function _createPinnedSibling(e,t,i){if(t.pinnedSibling)return t.pinnedSibling;const o=_createRowNodeSibling(t,e);o.setRowTop(null),o.setRowIndex(null),o.rowPinned=i;const s=i==="top"?ROW_ID_PREFIX_TOP_PINNED:ROW_ID_PREFIX_BOTTOM_PINNED;return o.id=`${s}${i}-${t.id}`,o.pinnedSibling=t,t.pinnedSibling=o,o}function _destroyRowNodeSibling(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function removeGroupRows(e){const t=new Set;e.forEach(i=>{i.group&&t.add(i)}),t.forEach(i=>e.delete(i))}function getSpannedRows(e,t,i){const{rowSpanSvc:o}=e,s=(i&&o?.isCellSpanning(i,t))??!1;if(i&&s)return o?.getCellSpan(i,t)?.spannedNodes}function getTotalHeight(e){const t=e.size();if(t===0)return 0;const i=e.getByIndex(t-1);return i===void 0?0:i.rowTop+i.rowHeight}var StaticPinnedRowModel=class extends BeanStub{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=i=>{i.setRowHeight(i.rowHeight,!0)};forEach(this.pinnedBottomRows,t),forEach(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const i=o=>{if(o.rowHeightEstimated){const s=_getRowHeightForNode(this.beans,o);o.setRowTop(t),o.setRowHeight(s.height),t+=s.height,e=!0}};return forEach(this.pinnedBottomRows,i),t=0,forEach(this.pinnedTopRows,i),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const i=this.getCache(t);if(e===void 0){i.order.length=0,i.cache={};return}const o=_getRowIdCallback(this.gos),s=t==="top"?ROW_ID_PREFIX_TOP_PINNED:ROW_ID_PREFIX_BOTTOM_PINNED,n=new Set(i.order),r=[],l=new Set;let a=0,d=-1;for(const c of e){const u=o?.({data:c,level:0,rowPinned:t})??s+this.nextId++;if(l.has(u)){_warn(96,{id:u,data:c});continue}d++,l.add(u),r.push(u);const h=getById(i,u);if(h!==void 0)h.data!==c&&h.updateData(c),a+=this.setRowTopAndRowIndex(h,a,d),n.delete(u);else{const g=new RowNode(this.beans);g.id=u,g.data=c,g.rowPinned=t,a+=this.setRowTopAndRowIndex(g,a,d),i.cache[u]=g,i.order.push(u)}}for(const c of n)getById(i,c)?.clearRowTopAndRowIndex(),delete i.cache[c];i.order=r}setRowTopAndRowIndex(e,t,i){return e.setRowTop(t),e.setRowHeight(_getRowHeightForNode(this.beans,e).height),e.setRowIndex(i),e.rowHeight}getPinnedTopTotalHeight(){return getTotalHeight2(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return getTotalHeight2(this.pinnedBottomRows)}getPinnedTopRowCount(){return getSize(this.pinnedTopRows)}getPinnedBottomRowCount(){return getSize(this.pinnedBottomRows)}getPinnedTopRow(e){return getByIndex(this.pinnedTopRows,e)}getPinnedBottomRow(e){return getByIndex(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return getById(this.getCache(t),e)}forEachPinnedRow(e,t){return forEach(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function getTotalHeight2(e){const t=getSize(e);if(t===0)return 0;const i=getByIndex(e,t-1);return i===void 0?0:i.rowTop+i.rowHeight}function getById(e,t){return e.cache[t]}function getByIndex(e,t){return getById(e,e.order[t])}function forEach(e,t){e.order.forEach((i,o)=>{const s=getById(e,i);s&&t(s,o)})}function getSize(e){return e.order.length}var PinnedRowModel=class extends BeanStub{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const i=e.get("enableRowPinning"),o=_getGrandTotalRow(e),n=!!i||(o==="pinnedBottom"||o==="pinnedTop"),r=n?this.inner instanceof StaticPinnedRowModel:this.inner instanceof ManualPinnedRowModel;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(n?new ManualPinnedRowModel:new StaticPinnedRowModel))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,i){return this.inner.pinRow(e,t,i)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}},ServerSideTransactionResultStatus=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(ServerSideTransactionResultStatus||{}),DOUBLE_TAP_MILLISECONDS=500,LONG_PRESS_MILLISECONDS=550,handledTouchEvents,addHandledTouchEvent=e=>{if(!handledTouchEvents)handledTouchEvents=new WeakSet;else if(handledTouchEvents.has(e))return!1;return handledTouchEvents.add(e),!0},TouchListener=class{constructor(e,t=!1){this.eElement=e,this.preventClick=t,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,t){let i=this.eventSvc;if(!i){if(i===null)return;this.eventSvc=i=new LocalEventService;const o=this.onTouchStart.bind(this);this.startListener=o,this.eElement.addEventListener("touchstart",o,{passive:!0})}i.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!addHandledTouchEvent(e))return;const t=e.touches[0];this.touchStart=t;const i=this.handlers;if(!i.length){const o=this.eElement,s=o.ownerDocument,n=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),l=this.onTouchCancel.bind(this),a={passive:!0},d={passive:!1};addTempEventHandlers(i,[o,"touchmove",n,a],[s,"touchcancel",l,a],[s,"touchend",r,d],[s,"contextmenu",preventEventDefault,d])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,this.eventSvc?.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},LONG_PRESS_MILLISECONDS)}onTouchMove(e){const{moved:t,touchStart:i}=this;if(!t&&i){const o=_getFirstActiveTouch(i,e.touches);o&&!_areEventsNear(o,i,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;!t||!_getFirstActiveTouch(t,e.changedTouches)||(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&preventEventDefault(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!_getFirstActiveTouch(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const i=this.lastTapTime;i&&t-i>DOUBLE_TAP_MILLISECONDS&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),clearTempEventHandlers(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){const e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}},CellRangeType=(e=>(e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION",e))(CellRangeType||{}),contextId=1,AgContext=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=contextId++,e?.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];for(const t of e.beanClasses){const i=new t;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(i)}for(const t of e.derivedBeans??[]){const{beanName:i,bean:o}=t(this);this.beans[i]=o,this.createdBeans.push(o)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){const i=this.beans;for(const o of e)o.preWireBeans?.(i),o.wireBeans?.(i);for(const o of e)o.preConstruct?.();t&&e.forEach(t);for(const o of e)o.postConstruct?.()}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],this.destroyCallback?.()}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}};function createGridApi(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var orderedCoreBeans=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],beanNamePosition=Object.fromEntries(orderedCoreBeans.map((e,t)=>[e,t]));function gridBeanInitComparator(e,t){const i=(e.beanName?beanNamePosition[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,o=(t.beanName?beanNamePosition[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return i-o}function gridBeanDestroyComparator(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}var PinnedLeftElement={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},PinnedRightElement={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},CenterElement={tag:"div",cls:"ag-header-viewport",role:"rowgroup",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"presentation"}]},HeaderRowContainerComp=class extends Component{constructor(e){super(),this.eCenterContainer=RefPlaceholder,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:i=>this.setDisplayed(i),setCtrls:i=>this.setCtrls(i),setCenterWidth:i=>this.eCenterContainer.style.width=i,setViewportScrollLeft:i=>this.getGui().scrollLeft=i,setPinnedContainerWidth:i=>{const o=this.getGui();o.style.width=i,o.style.maxWidth=i,o.style.minWidth=i}};this.createManagedBean(new HeaderRowContainerCtrl(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",i=e?PinnedLeftElement:t?PinnedRightElement:CenterElement;this.setTemplate(i),this.eRowContainer=this.eCenterContainer!==RefPlaceholder?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),e.getGui().remove()}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let i;const o=s=>{const n=s.getGui();n.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(n),i&&_ensureDomOrder(this.eRowContainer,n,i),i=n};for(const s of e){const n=s.instanceId,r=t[n];delete t[n];const l=r||this.createBean(new HeaderRowComp(s));this.headerRowComps[n]=l,this.rowCompsList.push(l),o(l)}for(const s of Object.values(t))this.destroyRowComp(s)}},GridHeaderElement={tag:"div",cls:"ag-header",role:"presentation"},GridHeaderComp=class extends Component{constructor(){super(GridHeaderElement)}postConstruct(){const e={toggleCss:(o,s)=>this.toggleCss(o,s),setHeightAndMinHeight:o=>{this.getGui().style.height=o,this.getGui().style.minHeight=o}};this.createManagedBean(new GridHeaderCtrl).setComp(e,this.getGui(),this.getFocusableElement());const i=o=>{this.createManagedBean(o),this.appendChild(o)};i(new HeaderRowContainerComp("left")),i(new HeaderRowContainerComp(null)),i(new HeaderRowContainerComp("right"))}},GridHeaderSelector={selector:"AG-HEADER-ROOT",component:GridHeaderComp},LayoutCssClasses={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},LayoutFeature=class extends BeanStub{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},i=t.autoHeight?LayoutCssClasses.AUTO_HEIGHT:t.print?LayoutCssClasses.PRINT:LayoutCssClasses.NORMAL;this.view.updateLayoutClasses(i,t)}},AbstractFakeScrollComp=class extends Component{constructor(e,t){super(),this.direction=t,this.eViewport=RefPlaceholder,this.eContainer=RefPlaceholder,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",_isMacOsUserAgent()||_isIOSUserAgent())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=_isInvisibleScrollbar(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),i=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:i,touchend:i})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),_requestAnimationFrame(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;_waitUntil(this,()=>_isVisible(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},FakeHScrollElement={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},FakeHScrollComp=class extends AbstractFakeScrollComp{constructor(){super(FakeHScrollElement,"horizontal"),this.eLeftSpacer=RefPlaceholder,this.eRightSpacer=RefPlaceholder,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new CenterWidthFeature(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const i=!this.enableRtl&&e,o=this.scrollVisibleSvc.getScrollbarWidth();i&&(t+=o),_setFixedWidth(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=o);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=o),_setFixedWidth(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=o)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),o=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=i?0:o===0&&t?16:o,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),_setFixedHeight(this.getGui(),n),_setFixedHeight(this.eViewport,n),_setFixedHeight(this.eContainer,n),n||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return _getScrollLeft(this.eViewport,this.enableRtl)}setScrollPosition(e){_isVisible(this.eViewport)||this.attemptSettingScrollPosition(e),_setScrollLeft(this.eViewport,e,this.enableRtl)}},FakeHScrollSelector={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:FakeHScrollComp},SetHeightFeature=class extends BeanStub{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,i=t!=null?`${t}px`:"";this.eContainer.style.height=i,this.eViewport&&(this.eViewport.style.height=i)}},FakeVScrollElement={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},FakeVScrollComp=class extends AbstractFakeScrollComp{constructor(){super(FakeVScrollElement,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new SetHeightFeature(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,i=this.invisibleScrollbar,o=t&&e.getScrollbarWidth()||0,s=o===0&&i?16:o;this.toggleCss("ag-scrollbar-invisible",i),_setFixedWidth(this.getGui(),s),_setFixedWidth(this.eViewport,s),_setFixedWidth(this.eContainer,s),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const i=e.getGridBodyCtrl().eBodyViewport,o=this.getScrollPosition(),s=i.scrollTop;o!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!_isVisible(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},FakeVScrollSelector={selector:"AG-FAKE-VERTICAL-SCROLL",component:FakeVScrollComp},Direction=(e=>(e[e.Vertical=0]="Vertical",e[e.Horizontal=1]="Horizontal",e))(Direction||{}),VIEWPORT="Viewport",FAKE_V_SCROLLBAR="fakeVScrollComp",HORIZONTAL_SOURCES=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],SCROLL_DEBOUNCE_TIMEOUT=100,SCROLL_END_TIMEOUT=150,GridBodyScrollFeature=class extends BeanStub{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=_debounce(this,()=>this.lastScrollSource[1]=null,SCROLL_END_TIMEOUT),this.resetLastVScrollDebounced=_debounce(this,()=>this.lastScrollSource[0]=null,SCROLL_END_TIMEOUT)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,i=>{this.centerRowsCtrl=i.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,VIEWPORT)});for(const e of HORIZONTAL_SOURCES){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),i=t?_debounce(this,this.onVScroll.bind(this,VIEWPORT),SCROLL_DEBOUNCE_TIMEOUT):this.onVScroll.bind(this,VIEWPORT),o=t?_debounce(this,this.onVScroll.bind(this,FAKE_V_SCROLLBAR),SCROLL_DEBOUNCE_TIMEOUT):this.onVScroll.bind(this,FAKE_V_SCROLLBAR);this.addManagedElementListeners(this.eBodyViewport,{scroll:i}),this.registerScrollPartner(e,o)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...HORIZONTAL_SOURCES,VIEWPORT]){if(this.lastScrollSource[1]===t)continue;const i=this.getViewportForSource(t);_setScrollLeft(i,e,this.enableRtl)}}getViewportForSource(e){return e===VIEWPORT?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:i}=t;if(this.shouldBlockScrollUpdate(1,i,!0))return;const o=_getScrollLeft(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(o),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===VIEWPORT?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:i}=this;i?.setScrollTop(t),this.nextScrollTop=t,e===VIEWPORT?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,i?.active?i.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},SCROLL_END_TIMEOUT)}shouldBlockScrollUpdate(e,t,i=!1){return i&&!_isIOSUserAgent()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=_getInnerHeight(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>i}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){const e=this.scrollLeft;let t=!1;for(const i of HORIZONTAL_SOURCES)if(this.getViewportForSource(i).scrollLeft!==e){t=!0;break}t&&this.onHScroll(VIEWPORT)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const o=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:o:e=Math.min(Math.max(e,0),o)),_setScrollLeft(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:i,lastScrollTop:o}=this;return{top:o,bottom:o+i}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}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.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:i}=this.beans,o=i.getRowCount();let s=-1;for(let n=0;n<o;n++){const r=i.getRow(n);if(typeof e=="function"){if(r&&e(r)){s=n;break}}else if(e===r||e===r.data){s=n;break}}s>=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t,i=0){if(_isDomLayout(this.gos,"print"))return;const{rowModel:o}=this.beans,s=o.getRowCount();if(typeof e!="number"||e<0||e>=s){_warn(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:l,rowRenderer:a}=this.beans;n.wrapIncoming(()=>{const d=this.ctrlsSvc.getGridBodyCtrl(),c=o.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:p,stickyBottomHeight:f}=d,m=c.rowTop,C=c.rowHeight,v=r.getPixelOffset(),w=c.rowTop-v,S=w+c.rowHeight,b=this.getVScrollPosition(),y=l.divStretchOffset,R=b.top+y,E=b.bottom+y,F=E-R,P=l.getScrollPositionForPixel(w),x=l.getScrollPositionForPixel(S-F),M=Math.min((P+x)/2,w),D=R+p>w,T=E-f<S;let A=null;t==="top"?A=P-p:t==="bottom"?A=x+f:t==="middle"?A=M:D?A=P-p:T&&(x-P>F?A=P-p:A=x+f),A!==null&&(this.setVerticalScrollPosition(A),a.redraw({afterScroll:!0})),u=m!==c.rowTop||C!==c.rowHeight,h=p!==d.stickyTopHeight||f!==d.stickyBottomHeight,g++}while((u||h)&&g<10);if(this.animationFrameSvc?.flushAllFrames(),i<10&&(c?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const p=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const f=this.getVScrollPosition().top;p!==f&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=o.getRowCount())&&this.ensureIndexVisible(e,t,i+1)}})}})}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:i,frameworkOverrides:o}=this.beans,s=i.getCol(e);if(!s||s.isPinned()||!this.visibleCols.isColDisplayed(s))return;const n=this.getPositionedHorizontalScroll(s,t);o.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:i,columnAfterEnd:o}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let l=(r?i:o)||s,a=r?o:i;t!=="auto"&&(l=t==="start",a=t==="end");const d=t==="middle";if(l||a||d){const{colLeft:c,colMiddle:u,colRight:h}=this.getColumnBounds(e);return d?u-n/2:l?r?h:c:r?c-n:h-n}return null}isColumnOutsideViewport(e){const{start:t,end:i}=this.getViewportBounds(),{colLeft:o,colRight:s}=this.getColumnBounds(e),n=this.enableRtl,r=n?t>s:i<s,l=n?i<o:t>o;return{columnBeforeStart:r,columnAfterEnd:l}}getColumnBounds(e){const t=this.enableRtl,i=this.visibleCols.bodyWidth,o=e.getActualWidth(),s=e.getLeft(),n=t?-1:1,r=t?i-s:s,l=r+o*n,a=r+o/2*n;return{colLeft:r,colMiddle:a,colRight:l}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),i=t,o=e+t;return{start:i,end:o,width:e}}},AXES={horizontal:{overflow:e=>e.scrollWidth-e.clientWidth,scrollSize:e=>e.scrollWidth,clientSize:e=>e.clientWidth,opposite:"vertical"},vertical:{overflow:e=>e.scrollHeight-e.clientHeight,scrollSize:e=>e.scrollHeight,clientSize:e=>e.clientHeight,opposite:"horizontal"}};function _shouldShowHorizontalScroll(e,t,i=_getScrollbarWidth()||0,o,s){return shouldShowScroll(e,t,"horizontal",i,o,s)}function _shouldShowVerticalScroll(e,t,i=_getScrollbarWidth()||0,o,s){return shouldShowScroll(e,t,"vertical",i,o,s)}function shouldShowScroll(e,t,i,o,s,n){const r=AXES[i],l=AXES[r.opposite],a=s?_isVisible(s):!0,d=n?_isVisible(n):!0,c=r.overflow(e);if(c<=0)return!1;if(!t||o===0)return!0;const u=l.overflow(t);if(u<=0)return!0;if(c<=o){if(a&&d&&isScrollbarCausedByOppositeAxis({candidateOverflow:u,candidateScrollSize:l.scrollSize(t),candidateClientSize:l.clientSize(t),scrollbarWidth:o}))return!1;const h=r.clientSize(e)+o;return r.scrollSize(e)<=h}return!0}function isScrollbarCausedByOppositeAxis({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:i,scrollbarWidth:o}){if(e<=0||e>o)return!1;const s=i+o;return t>i&&t<=s}var ViewportSizeFeature=class extends BeanStub{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:i}=this,o=()=>{_requestAnimationFrame(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(o),i.registerBodyViewportResizeListener(o)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const i=this.centerContainerCtrl.getCenterWidth();i!==this.centerWidth&&(this.centerWidth=i,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=_getInnerHeight(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const{centerContainerCtrl:e,beans:t}=this,i=e.getCenterWidth(),o=e.getViewportScrollLeft();t.colViewport.setScrollPosition(i,o)}};function _isEventFromPrintableCharacter(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function _suppressCellMouseEvent(e,t,i,o){const s=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return suppressMouseEvent(e,t,i,o,s)}function _suppressFullWidthMouseEvent(e,t,i,o){const s=t?.suppressMouseEventHandling;return suppressMouseEvent(e,void 0,i,o,s)}function suppressMouseEvent(e,t,i,o,s){return s?s(_addGridCommonParams(e,{column:t,node:i,event:o})):!1}function _getCtrlForEventTarget(e,t,i){let o=t;for(;o;){const s=_getDomData(e,o,i);if(s)return s;o=o.parentElement}return null}var DOM_DATA_KEY_CELL_CTRL="cellCtrl";function _getCellCtrlForEventTarget(e,t){return _getCtrlForEventTarget(e,t,DOM_DATA_KEY_CELL_CTRL)}var DOM_DATA_KEY_ROW_CTRL="renderedRow";function _getRowCtrlForEventTarget(e,t){return _getCtrlForEventTarget(e,t,DOM_DATA_KEY_ROW_CTRL)}function _isUserSuppressingKeyboardEvent(e,t,i,o,s){const n=o?o.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=_addGridCommonParams(e,{event:t,editing:s,column:o,node:i,data:i.data,colDef:o.getColDef()});return!!(n&&n(r))}function _selectAllCells(e){const{pinnedRowModel:t,rowModel:i,rangeSvc:o,visibleCols:s}=e;if(!o||s.allCols.length===0)return;const n=t?.isEmpty("top")??!0,r=t?.isEmpty("bottom")??!0,l=n?null:"top";let a,d;r?(a=null,d=i.getRowCount()-1):(a="bottom",d=t?.getPinnedBottomRowCount()??-1),o.setCellRange({rowStartIndex:0,rowStartPinned:l,rowEndIndex:d,rowEndPinned:a})}var RowContainerEventsFeature=class extends BeanStub{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){let e="mousedown";_isEventSupported("pointerdown")?e="pointerdown":_isEventSupported("touchstart")&&(e="touchstart");const t=["dblclick","contextmenu","mouseover","mouseout","click",e];for(const i of t){const o=this.processMouseEvent.bind(this,i);this.addManagedElementListeners(this.element,{[i]:o})}}processMouseEvent(e,t){if(!_isEventFromThisInstance(this.beans,t)||_isStopPropagationForAgGrid(t))return;const{cellCtrl:i,rowCtrl:o}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(i?.column&&i.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,o,i)):(i&&i.onMouseEvent(e,t),o&&o.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:_getCellCtrlForEventTarget(t,e),rowCtrl:_getRowCtrlForEventTarget(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:i,rowCtrl:o}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):o?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(o,e,t))}processCellKeyboardEvent(e,t,i){const o=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!_isUserSuppressingKeyboardEvent(this.gos,i,e.rowNode,e.column,o)&&t==="keydown"&&(!o&&this.beans.navigation?.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,o),_isEventFromPrintableCharacter(i)&&e.processCharacter(i)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,i){const{rowNode:o}=e,{focusSvc:s,navigation:n}=this.beans,l=s.getFocusedCell()?.column;if(!_isUserSuppressingKeyboardEvent(this.gos,i,o,l,!1)){const d=i.key;if(t==="keydown")switch(d){case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:case KeyCode.PAGE_UP:case KeyCode.PAGE_DOWN:n?.handlePageScrollingKey(i,!0);break;case KeyCode.LEFT:case KeyCode.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case KeyCode.UP:case KeyCode.DOWN:e.onKeyboardNavigate(i);break;case KeyCode.TAB:e.onTabKeyDown(i);break;default:}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",i))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!_isEventFromThisInstance(this.beans,e))return;const i=_normaliseQwertyAzerty(e),{clipboardSvc:o,undoRedo:s}=this.beans;if(i===KeyCode.A)return this.onCtrlAndA(e);if(i===KeyCode.C)return this.onCtrlAndC(o,e);if(i===KeyCode.D)return this.onCtrlAndD(o,e);if(i===KeyCode.V)return this.onCtrlAndV(o,e);if(i===KeyCode.X)return this.onCtrlAndX(o,e);if(i===KeyCode.Y)return this.onCtrlAndY(s);if(i===KeyCode.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:i,selectionSvc:o},gos:s}=this;i&&_isCellSelectionEnabled(s)&&!_getCtrlASelectsRows(s)&&t.isRowsToRender()?_selectAllCells(this.beans):o&&o.selectAllRowNodes({source:"keyboardSelectAll",selectAll:_getSelectAll(s)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},getTopRowCtrls=e=>e.topRowCtrls,getStickyTopRowCtrls=e=>e.getStickyTopRowCtrls(),getStickyBottomRowCtrls=e=>e.getStickyBottomRowCtrls(),getBottomRowCtrls=e=>e.bottomRowCtrls,getCentreRowCtrls=e=>e.allRowCtrls,getSpannedTopRowCtrls=e=>e.getCtrls("top"),getSpannedCenterRowCtrls=e=>e.getCtrls("center"),getSpannedBottomRowCtrls=e=>e.getCtrls("bottom"),ContainerCssClasses={center:{type:"center",name:"center-cols",getRowCtrls:getCentreRowCtrls,getSpannedRowCtrls:getSpannedCenterRowCtrls},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:getCentreRowCtrls,getSpannedRowCtrls:getSpannedCenterRowCtrls},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:getCentreRowCtrls,getSpannedRowCtrls:getSpannedCenterRowCtrls},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:getCentreRowCtrls},topCenter:{type:"center",name:"floating-top",getRowCtrls:getTopRowCtrls,getSpannedRowCtrls:getSpannedTopRowCtrls},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:getTopRowCtrls,getSpannedRowCtrls:getSpannedTopRowCtrls},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:getTopRowCtrls,getSpannedRowCtrls:getSpannedTopRowCtrls},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:getTopRowCtrls},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:getStickyTopRowCtrls},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:getStickyTopRowCtrls},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:getStickyTopRowCtrls},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:getStickyTopRowCtrls},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:getStickyBottomRowCtrls},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:getStickyBottomRowCtrls},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:getStickyBottomRowCtrls},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:getStickyBottomRowCtrls},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:getBottomRowCtrls,getSpannedRowCtrls:getSpannedBottomRowCtrls},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:getBottomRowCtrls,getSpannedRowCtrls:getSpannedBottomRowCtrls},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:getBottomRowCtrls,getSpannedRowCtrls:getSpannedBottomRowCtrls},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:getBottomRowCtrls}};function _getRowViewportClass(e){return`ag-${_getRowContainerOptions(e).name}-viewport`}function _getRowContainerClass(e){const t=_getRowContainerOptions(e);return t.container??`ag-${t.name}-container`}function _getRowSpanContainerClass(e){return`ag-${_getRowContainerOptions(e).name}-spanned-cells-container`}function _getRowContainerOptions(e){return ContainerCssClasses[e]}var allTopNoFW=["topCenter","topLeft","topRight"],allBottomNoFW=["bottomCenter","bottomLeft","bottomRight"],allMiddleNoFW=["center","left","right"],allMiddle=["center","left","right","fullWidth"],allCenter=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],allLeft=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],allRight=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],allStickyTopNoFW=["stickyTopCenter","stickyTopLeft","stickyTopRight"],allStickyBottomNoFW=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],allStickyContainers=[...allStickyTopNoFW,"stickyTopFullWidth",...allStickyBottomNoFW,"stickyBottomFullWidth"],allNoFW=[...allTopNoFW,...allBottomNoFW,...allMiddleNoFW,...allStickyTopNoFW,...allStickyBottomNoFW],RowContainerCtrl=class extends BeanStub{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=_getRowContainerOptions(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new ViewportSizeFeature(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,i,o){this.comp=e,this.eContainer=t,this.eSpannedContainer=i,this.eViewport=o,this.createManagedBean(new RowContainerEventsFeature(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(allLeft,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(allRight,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(allMiddle,()=>this.createManagedBean(new SetHeightFeature(this.eContainer,this.name==="center"?o:void 0))),n&&this.forContainers(allNoFW,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(allCenter,()=>this.createManagedBean(new CenterWidthFeature(l=>this.comp.setContainerWidth(`${l}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,i=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i,displayedColumnsWidthChanged:i,displayedRowsChanged:o=>this.onDisplayedRowsChanged(o.afterScroll)}),i(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const o=this.options.getSpannedRowCtrls(e);o&&this.comp.setSpannedRowCtrls(o,!1)}})}listenOnDomOrder(){if(allStickyContainers.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const i=this.gos.get("ensureDomOrder"),o=_isDomLayout(this.gos,"print");this.comp.setDomOrder(i||o)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=i=>{e.dragging&&i.cancelable&&i.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,i,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return _getInnerWidth(this.eViewport)}getCenterViewportScrollLeft(){return _getScrollLeft(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=_observeResize(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return _isInDOM(this.eViewport)}getViewportScrollLeft(){return _getScrollLeft(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){const{beans:e,gos:t,eViewport:i}=this,o=t.get("alwaysShowHorizontalScroll"),{ctrlsSvc:s}=e,n=s.getGridBodyCtrl()?.eBodyViewport,r=s.get("fakeHScrollComp")?.getGui(),l=s.get("fakeVScrollComp")?.getGui();return o||_shouldShowHorizontalScroll(i,n,void 0,r,l)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){_setScrollLeft(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const i=_isDomLayout(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||i,n=t.filter(r=>{const l=r.isFullWidth();return this.options.fullWidth?!s&&l:s||!l});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},CSS_CLASS_FORCE_VERTICAL_SCROLL="ag-force-vertical-scroll",CSS_CLASS_CELL_SELECTABLE="ag-selectable",CSS_CLASS_COLUMN_MOVING="ag-column-moving",GridBodyCtrl=class extends BeanStub{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,i,o,s,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=o,this.eBottom=s,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=i.querySelector(`.${_getRowViewportClass("center")}`),this.eFullWidthContainer=i.querySelector(`.${_getRowContainerClass("fullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",l=>this.setCellTextSelection(l.currentValue)),this.createManagedBean(new LayoutFeature(this.comp)),this.scrollFeature=this.createManagedBean(new GridBodyScrollFeature(i)),this.beans.rowDragSvc?.setupRowDrag(i,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([o,i,s,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(o),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),i=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:i,rowResizeEnded:i}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const i=t&&e.getScrollbarWidth()||0,o=_isInvisibleScrollbar()?16:0,s=`calc(100% + ${i+o}px)`;_requestAnimationFrame(this.beans,()=>this.comp.setBodyViewportWidth(s)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t,gos:i}=this;let o=i.get("treeData");if(!o){const s=t.isPivotMode();o=(e?e.columns.length:0)>=(s?2:1)}this.comp.setGridRootRole(o?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:i=>{const{target:o}=i,s=_isElementChildOfClass(o,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:i=>{const{target:o,relatedTarget:s}=i,n=t.contains(s),r=_isElementChildOfClass(s,"ag-root",t);_isElementChildOfClass(o,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(CSS_CLASS_COLUMN_MOVING,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(CSS_CLASS_CELL_SELECTABLE,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,i=t.isLastRowIndexKnown()?t.getRowCount():-1,o=i===-1?-1:e+i;this.comp.setRowCount(o)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const{gos:e,comp:t,ctrlsSvc:i}=this,o=e.get("alwaysShowVerticalScroll"),s=o?CSS_CLASS_FORCE_VERTICAL_SCROLL:null,n=_isDomLayout(e,"normal");t.setAlwaysVerticalScrollClass(s,o);const r=i.get("center")?.eViewport,l=i.get("fakeHScrollComp")?.getGui(),a=i.get("fakeVScrollComp")?.getGui();return o||n&&_shouldShowVerticalScroll(this.eBodyViewport,r,void 0,a,l)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let i=t.sizesMeasured;const o=()=>{const s=i&&_isAnimateRows(this.gos)&&!e.stretching,n=s?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,s)};o(),this.addManagedEventListeners({heightScaleChanged:o}),this.addManagedPropertyListener("animateRows",o),this.addManagedEventListeners({stylesChanged:()=>{!i&&t.sizesMeasured&&(i=!0,o())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:i,eTop:o,eBottom:s,beans:{popupSvc:n,touchSvc:r}}=this,l=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:l}),r?.mockBodyContextMenu(this,l),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const a=this.onStickyWheel.bind(this);for(const c of[t,i,o,s])this.addManagedElementListeners(c,{wheel:a});const d=this.onHorizontalWheel.bind(this);for(const c of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(c).eContainer,{wheel:d});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:i,shiftKey:o}=e;(o||Math.abs(t)>Math.abs(i))&&_isEventFromThisInstance(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:i,shiftKey:o}=e;(o||Math.abs(t)>Math.abs(i))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:i}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||i})}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();const{target:o}=e||t;(o===this.eBodyViewport||o===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e,beans:{environment:t}}=this,i=e?.getPinnedTopTotalHeight(),o=e?.getPinnedBottomTotalHeight(),s=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=s-n,l=i?r+i:0,a=o?r+o:0;this.comp.setTopHeight(l),this.comp.setBottomHeight(a),this.comp.setTopInvisible(l<=0),this.comp.setBottomInvisible(a<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),i=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let o=0;t>0&&(o+=t),i>0&&(o+=i),o>0&&(o+=1),this.comp.setStickyTopTop(`${o}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:i}=this,o=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=o+n;i.setStickyBottomBottom(`${r}px`)}},CellComp=class extends Component{constructor(e,t,i,o,s){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.gos=e.gos,this.column=t.column,this.rowNode=t.rowNode,this.eRow=o;const n=_createElement({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=n;let r;t.isCellSpanning()?(r=_createElement({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(n),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssManager=new CssClassManager(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const l={toggleCss:(a,d)=>this.cellCssManager.toggleCss(a,d),setUserStyles:a=>_addStylesToElement(n,a),getFocusableElement:()=>n,setIncludeSelection:a=>this.includeSelection=a,setIncludeRowDrag:a=>this.includeRowDrag=a,setIncludeDndSource:a=>this.includeDndSource=a,setRenderDetails:(a,d,c)=>this.setRenderDetails(a,d,c),setEditDetails:(a,d,c)=>this.setEditDetails(a,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(a,d)=>this.refreshEditStyles(a,d)};t.setComp(l,n,r,this.eCellWrapper,i,s,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const s=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(i||s)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)),this.rowDraggingComp?.refreshVisibility()}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()}removeControls(){const e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,o=i&&this.eCellWrapper==null;o&&(this.eCellWrapper=_createElement({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!i&&this.eCellWrapper!=null;s&&(_removeFromParent(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!i);const n=!e&&i,r=n&&this.eCellValue==null;if(r){const d=this.cellCtrl.getCellValueClass();this.eCellValue=_createElement({tag:"span",cls:d,role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue)}const l=!n&&this.eCellValue!=null;l&&(_removeFromParent(this.eCellValue),this.eCellValue=void 0);const a=o||s||r||l;return a&&this.removeControls(),!e&&t&&this.addControls(),a}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:i,includeRowDrag:o,includeDndSource:s,includeSelection:n}=this,r=l=>{l&&t.insertBefore(l.getGui(),i)};o&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),r(this.rowDraggingComp)),s&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),r(this.dndSourceComp)),n&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),r(this.checkboxSelectionComp))}createCellEditorInstance(e,t,i){const o=this.editorVersion,s=e.newAgStackInstance(),{params:n}=e;s.then(l=>this.afterCellEditorCreated(o,l,n,t,i)),_missing(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();_clearElement(t);const i=_toString(e);i!=null&&(t.textContent=i)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),_removeFromParent(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains(_getActiveDomElement(this.beans))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),_removeFromParent(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(this.cellRenderer?.refresh==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){const t=this.rendererVersion,i=n=>r=>{if(this.rendererVersion!==t||!this.isAlive())return;const a=n.newAgStackInstance(),d=this.afterCellRendererCreated.bind(this,t,n.componentClass);a?.then(d)},{animationFrameSvc:o}=this.beans;let s;if(o?.active&&this.firstRender?s=(n,r=!1)=>{o.createTask(i(n),this.rowNode.rowIndex,"p2",n.componentFromFramework,r)}:s=n=>i(n)(),e.params?.deferRender&&!this.cellCtrl.rowNode.group){const{loadingComp:n,onReady:r}=this.cellCtrl.getDeferLoadingCellRenderer();n&&(s(n),r.then(()=>s(e,!0)))}else s(e)}afterCellRendererCreated(e,t,i){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(i);return}this.cellRenderer=i,this.cellRendererClass=t;const s=i.getGui();if(this.cellRendererGui=s,s!=null){const n=this.getParentOfValue();_clearElement(n),n.appendChild(s)}}afterCellEditorCreated(e,t,i,o,s){const n=e!==this.editorVersion,{context:r}=this.beans;if(n){r.destroyBean(t);return}if(t.isCancelBeforeStart?.()){r.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){_warn(97,{colId:this.column.getId()}),r.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const a=o||t.isPopup?.();a?this.addPopupCellEditor(i,s):this.addInCellEditor(),this.refreshEditStyles(!0,a),t.afterGuiAttached?.(),this.cellCtrl.enableEditorTooltipFeature(t),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssManager:i}=this;i.toggleCss("ag-cell-inline-editing",e&&!t),i.toggleCss("ag-cell-popup-editing",e&&!!t),i.toggleCss("ag-cell-not-inline-editing",!e||!!t)}addInCellEditor(){const{eCell:e}=this;e.contains(_getActiveDomElement(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),_clearElement(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){const{gos:i,context:o,popupSvc:s,editSvc:n}=this.beans;i.get("editType")==="fullRow"&&_warn(98);const r=this.cellEditorPopupWrapper=o.createBean(n.createPopupEditorWrapper(e)),{cellEditor:l,cellEditorGui:a,eCell:d,rowNode:c,column:u,cellCtrl:h}=this,g=r.getGui();a&&g.appendChild(a);const p=i.get("stopEditingWhenCellsLoseFocus"),f=t??l.getPopupPosition?.()??"over",m=i.get("enableRtl"),C={ePopup:g,additionalParams:{column:u,rowNode:c},type:"popupCellEditor",eventSource:d,position:f,alignSide:m?"right":"left",keepWithinBounds:!0},v=s.positionPopupByComponent.bind(s,C),w=s.addPopup({modal:p,eChild:g,closeOnEsc:!0,closedCallback:()=>{h.onPopupEditorClosed()},anchorToElement:d,positionCallback:v,ariaOwns:d});w&&(this.hideEditorPopup=w.hideFunc)}detach(){this.getGui().remove()}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},RowComp=class extends Component{constructor(e,t,i){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const o=_createElement({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(o,i),this.setTemplateFromElement(o);const s=o.style;this.domOrder=this.rowCtrl.getDomOrder();const n={setDomOrder:r=>this.domOrder=r,setCellCtrls:r=>this.setCellCtrls(r),showFullWidth:r=>this.showFullWidth(r),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,getFullWidthCellRendererParams:()=>this.fullWidthCellRendererParams,toggleCss:(r,l)=>this.toggleCss(r,l),setUserStyles:r=>_addStylesToElement(o,r),setTop:r=>s.top=r,setTransform:r=>s.transform=r,setRowIndex:r=>o.setAttribute("row-index",r),setRowId:r=>o.setAttribute("row-id",r),setRowBusinessKey:r=>o.setAttribute("row-business-key",r),refreshFullWidth:r=>{const l=r();return this.fullWidthCellRendererParams=l,this.fullWidthCellRenderer?.refresh?.(l)??!1}};e.setComp(n,this.getGui(),i,void 0),this.addDestroyFunc(()=>{e.unsetComp(i)})}setInitialStyle(e,t){const i=this.rowCtrl.getInitialTransform(t);if(i)e.style.setProperty("transform",i);else{const o=this.rowCtrl.getInitialRowTop(t);o&&e.style.setProperty("top",o)}}showFullWidth(e){const t=o=>{if(this.isAlive()){const s=o.getGui();this.getGui().appendChild(s),this.rowCtrl.setupDetailRowAutoHeight(s),this.setFullWidthRowComp(o,e.params)}else this.beans.context.destroyBean(o)};e.newAgStackInstance().then(t)}setCellCtrls(e){const t=new Map(this.cellComps);for(const i of e){const o=i.instanceId;this.cellComps.has(o)?t.delete(o):this.newCellComp(i)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];for(const i of e){const o=this.cellComps.get(i.instanceId);o&&t.push(o.getGui())}_setDomChildOrder(this.getGui(),t)}newCellComp(e){const t=this.beans.editSvc?.isEditing(e,{withOpenEditor:!0})??!1,i=new CellComp(this.beans,e,this.rowCtrl.printLayout,this.getGui(),t);this.cellComps.set(e.instanceId,i),this.getGui().appendChild(i.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e,t){this.fullWidthCellRenderer=e,this.fullWidthCellRendererParams=t,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer),this.fullWidthCellRendererParams=void 0})}destroyCells(e){for(const t of e.values()){if(!t)continue;const i=t.cellCtrl.instanceId;this.cellComps.get(i)===t&&(t.detach(),t.destroy(),this.cellComps.delete(i))}}};function getElementParams(e,t,i){const o=!!i.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,s={tag:"div",ref:"eContainer",cls:_getRowContainerClass(e),role:"rowgroup"};if(t.type==="center"||o){const n={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${_getRowSpanContainerClass(e)}`,role:"presentation"};return s.role="presentation",{tag:"div",ref:"eViewport",cls:`ag-viewport ${_getRowViewportClass(e)}`,role:"rowgroup",children:[s,o?n:null]}}return s}var RowContainerComp=class extends Component{constructor(e){super(),this.eViewport=RefPlaceholder,this.eContainer=RefPlaceholder,this.eSpannedContainer=RefPlaceholder,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e?.name,this.options=_getRowContainerOptions(this.name)}postConstruct(){this.setTemplate(getElementParams(this.name,this.options,this.beans));const e={setHorizontalScroll:i=>this.eViewport.scrollLeft=i,setViewportHeight:i=>this.eViewport.style.height=i,setRowCtrls:({rowCtrls:i})=>this.setRowCtrls(i),setSpannedRowCtrls:i=>this.setRowCtrls(i,!0),setDomOrder:i=>{this.domOrder=i},setContainerWidth:i=>{this.eContainer.style.width=i,this.eSpannedContainer&&(this.eSpannedContainer.style.width=i)},setOffsetTop:i=>{const o=`translateY(${i})`;this.eContainer.style.transform=o,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=o)}};this.createManagedBean(new RowContainerCtrl(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){const{beans:i,options:o}=this,s=t?this.eSpannedContainer:this.eContainer,n=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},r={};t?this.rowCompsWithSpan=r:this.rowCompsNoSpan=r,this.lastPlacedElement=null;const l=[];for(const a of e){const d=a.instanceId,c=n[d];let u;if(c)u=c,delete n[d];else{if(!a.rowNode.displayed)continue;u=new RowComp(a,i,o.type)}r[d]=u,l.push([u,!c])}this.removeOldRows(Object.values(n)),this.addRowNodes(l,s)}addRowNodes(e,t){const{domOrder:i}=this;for(const[o,s]of e){const n=o.getGui();i?this.ensureDomOrder(n,t):s&&t.appendChild(n)}}removeOldRows(e){for(const t of e)t.getGui().remove(),t.destroy()}ensureDomOrder(e,t){_ensureDomOrder(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},RowContainerSelector={selector:"AG-ROW-CONTAINER",component:RowContainerComp};function makeRowContainers(e,t){return t.map(i=>{const o=`e${i[0].toUpperCase()+i.substring(1)}RowContainer`;return e[o]={name:i},{tag:"ag-row-container",ref:o,attrs:{name:i}}})}function getGridBodyTemplate(e){const t={},i={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:makeRowContainers(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:makeRowContainers(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:makeRowContainers(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:makeRowContainers(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:makeRowContainers(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:i}}var GridBodyComp=class extends Component{constructor(){super(...arguments),this.eGridRoot=RefPlaceholder,this.eBodyViewport=RefPlaceholder,this.eStickyTop=RefPlaceholder,this.eStickyBottom=RefPlaceholder,this.eTop=RefPlaceholder,this.eBottom=RefPlaceholder,this.eBody=RefPlaceholder}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,i=e?.getOverlayWrapperSelector(),{paramsMap:o,elementParams:s}=getGridBodyTemplate(!!i);this.setTemplate(s,[...i?[i]:[],FakeHScrollSelector,FakeVScrollSelector,GridHeaderSelector,RowContainerSelector],o);const n=(l,a)=>{const d=`${l}px`;a.style.minHeight=d,a.style.height=d},r={setRowAnimationCssOnBodyViewport:(l,a)=>this.setRowAnimationCssOnBodyViewport(l,a),setColumnCount:l=>_setAriaColCount(this.getGui(),l),setRowCount:l=>_setAriaRowCount(this.getGui(),l),setTopHeight:l=>n(l,this.eTop),setBottomHeight:l=>n(l,this.eBottom),setTopInvisible:l=>this.eTop.classList.toggle("ag-invisible",l),setBottomInvisible:l=>this.eBottom.classList.toggle("ag-invisible",l),setStickyTopHeight:l=>this.eStickyTop.style.height=l,setStickyTopTop:l=>this.eStickyTop.style.top=l,setStickyTopWidth:l=>this.eStickyTop.style.width=l,setStickyBottomHeight:l=>{this.eStickyBottom.style.height=l,this.eStickyBottom.classList.toggle("ag-invisible",l==="0px")},setStickyBottomBottom:l=>this.eStickyBottom.style.bottom=l,setStickyBottomWidth:l=>this.eStickyBottom.style.width=l,setColumnMovingCss:(l,a)=>this.toggleCss(l,a),updateLayoutClasses:(l,a)=>{const d=[this.eBodyViewport.classList,this.eBody.classList];for(const c of d)c.toggle(LayoutCssClasses.AUTO_HEIGHT,a.autoHeight),c.toggle(LayoutCssClasses.NORMAL,a.normal),c.toggle(LayoutCssClasses.PRINT,a.print);this.toggleCss(LayoutCssClasses.AUTO_HEIGHT,a.autoHeight),this.toggleCss(LayoutCssClasses.NORMAL,a.normal),this.toggleCss(LayoutCssClasses.PRINT,a.print)},setAlwaysVerticalScrollClass:(l,a)=>this.eBodyViewport.classList.toggle(CSS_CLASS_FORCE_VERTICAL_SCROLL,a),registerBodyViewportResizeListener:l=>{const a=_observeResize(this.beans,this.eBodyViewport,l);this.addDestroyFunc(()=>a())},setPinnedTopBottomOverflowY:l=>this.eTop.style.overflowY=this.eBottom.style.overflowY=l,setCellSelectableCss:(l,a)=>{for(const d of[this.eTop,this.eBodyViewport,this.eBottom])d.classList.toggle(l,a)},setBodyViewportWidth:l=>this.eBodyViewport.style.width=l,setGridRootRole:l=>_setAriaRole(this.eGridRoot,l)};this.ctrl=this.createManagedBean(new GridBodyCtrl),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&_isCellSelectionEnabled(this.gos)||_isMultiRowSelection(this.gos))&&_setAriaMultiSelectable(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const i=this.eBodyViewport.classList;i.toggle("ag-row-animation",t),i.toggle("ag-row-no-animation",!t)}},GridBodySelector={selector:"AG-GRID-BODY",component:GridBodyComp},TabGuardClassNames={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},AgTabGuardCtrl=class extends AgBeanStub{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:i,eTopGuard:o,eBottomGuard:s,focusTrapActive:n,forceFocusOutWhenTabGuardsAreEmpty:r,isFocusableContainer:l,focusInnerElement:a,onFocusIn:d,onFocusOut:c,shouldStopEventPropagation:u,onTabKeyDown:h,handleKeyDown:g,isEmpty:p,eFocusableElement:f}=e;this.comp=i,this.eTopGuard=o,this.eBottomGuard=s,this.providedFocusInnerElement=a,this.eFocusableElement=f,this.focusTrapActive=!!n,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.isFocusableContainer=!!l,this.providedFocusIn=d,this.providedFocusOut=c,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=h,this.providedHandleKeyDown=g,this.providedIsEmpty=p}postConstruct(){this.createManagedBean(new AgManagedFocusFeature(this.eFocusableElement,this.stopPropagationCallbacks,{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();for(const e of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(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():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():_findFocusableElements(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const t=_getDocument(this.beans),i=_findFocusableElements(t.body,null,!0),o=i.indexOf(e?this.eTopGuard:this.eBottomGuard);if(o===-1)return;let s,n;e?(s=0,n=o):(s=o+1,n=i.length);const r=i.slice(s,n),l=this.gos.get("tabIndex");r.sort((a,d)=>{const c=Number.parseInt(a.getAttribute("tabindex")||"0"),u=Number.parseInt(d.getAttribute("tabindex")||"0");return u===l?1:c===l?-1:c===0?1:u===0?-1:c-u}),r[e?r.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=_findFocusableElements(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return _findNextFocusableElement(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},AgTabGuardFeature=class extends AgBeanStub{constructor(e,t){super(),this.comp=e,this.stopPropagationCallbacks=t}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:i,eFocusableElement:o,stopPropagationCallbacks:s}=this,n=[t,i],r={setTabIndex:C=>{for(const v of n)C==null?v.removeAttribute("tabindex"):v.setAttribute("tabindex",C)}};this.addTabGuards(t,i);const{focusTrapActive:l=!1,onFocusIn:a,onFocusOut:d,focusInnerElement:c,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}=e;this.tabGuardCtrl=this.createManagedBean(new AgTabGuardCtrl({comp:r,focusTrapActive:l,eTopGuard:t,eBottomGuard:i,eFocusableElement:o,onFocusIn:a,onFocusOut:d,focusInnerElement:c,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m},s))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=_getDocument(this.beans).createElement("div"),i=e==="top"?TabGuardClassNames.TAB_GUARD_TOP:TabGuardClassNames.TAB_GUARD_BOTTOM;return t.classList.add(TabGuardClassNames.TAB_GUARD,i),_setAriaRole(t,"presentation"),t}addTabGuards(e,t){const i=this.eFocusableElement;i.prepend(e),i.append(t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];_clearElement(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,i){_isNodeOrElement(t)||(t=t.getGui());const{eBottomGuard:o}=this;o?o.before(t):e(t,i)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;_removeFromParent(e),_removeFromParent(t),super.destroy()}},AgTabGuardComp=class extends AgComponentStub{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new AgTabGuardFeature(this,t)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},TabGuardComp=class extends AgTabGuardComp{initialiseTabGuard(e){super.initialiseTabGuard(e,STOP_PROPAGATION_CALLBACKS)}},GridCtrl=class extends BeanStub{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.beans.context.getId());const{dragAndDrop:o,ctrlsSvc:s}=this.beans;o?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new LayoutFeature(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=_observeResize(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),s.register("gridCtrl",this)}isDetailGrid(){return _findTabbableParent(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry?.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){const{view:t}=this;if(e===!1)t.setCursor(null);else{const i=e===1?"ew-resize":"ns-resize";t.setCursor(i)}}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:o}=this.getNextFocusableIndex(t,e);if(o<0||o>=t.length)return!1;if(o===0){if(i>0){const{visibleCols:s,focusSvc:n}=this.beans,r=s.allCols,l=_last(r);if(n.focusGridView({column:l,backwards:!0}))return!0}return!1}return this.focusContainer(t[o],e)}focusInnerElement(e){if(this.gos.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const i=this.getFocusableContainers(),{focusSvc:o,visibleCols:s}=this.beans,n=s.allCols;if(e){if(i.length>1)return this.focusContainer(_last(i),e);const r=_last(n);if(o.focusGridView({column:r,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||_isHeaderFocusSuppressed(this.beans)){if(o.focusGridView({column:n[0],backwards:e}))return!0;for(let r=1;r<i.length;r++)if(_focusInto(i[r].getGui(),e))return!0;return!1}return o.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{nextIndex:i}=this.getNextFocusableIndex(t,e),o=t[i];o?this.focusContainer(o):this.forceFocusOutOfContainer(e)}isFocusable(){const e=this.beans;return!_isCellFocusSuppressed(e)||!_isHeaderFocusSuppressed(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const i=_getActiveDomElement(this.beans),o=e.findIndex(n=>n.getGui().contains(i)),s=o+(t?-1:1);return{indexWithFocus:o,nextIndex:s}}focusContainer(e,t){e.setAllowFocus?.(!0);const i=_focusInto(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),i}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},GridComp=class extends TabGuardComp{constructor(e){super(),this.gridBody=RefPlaceholder,this.sideBar=RefPlaceholder,this.pagination=RefPlaceholder,this.rootWrapperBody=RefPlaceholder,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:n=>this.addCss(n),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:n=>{this.getGui().style.userSelect=n??"",this.getGui().style.webkitUserSelect=n??""},setCursor:n=>{this.getGui().style.cursor=n??""}},t=this.createManagedBean(new GridCtrl),i=t.getOptionalSelectors(),o=this.createTemplate(i),s=[GridBodySelector,...Object.values(i).filter(n=>!!n)];this.setTemplate(o,s),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>t.focusInnerElement(n),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{e.remove(),_logIfDebug(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const i=this.rootWrapperBody.classList,{AUTO_HEIGHT:o,NORMAL:s,PRINT:n}=LayoutCssClasses,{autoHeight:r,normal:l,print:a}=t;i.toggle(o,r),i.toggle(s,l),i.toggle(n,a),this.toggleCss(o,r),this.toggleCss(s,l),this.toggleCss(n,a)}createTemplate(e){const t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,i=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,o=e.statusBarSelector?{tag:"ag-status-bar"}:null,s=e.watermarkSelector?{tag:"ag-watermark"}:null,n=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},i]},o,n,s]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){if(!e&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];for(const t of[this.sideBar,this.pagination])t&&e.push(t);return e.filter(t=>_isVisible(t.getGui()))}},mod=(e,t)=>{for(const i of Object.keys(t))t[i]=e;return t},gridApiFunctionsMap={dispatchEvent:"CommunityCore",...mod("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...mod("GridState",{getState:0,setState:0}),...mod("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...mod("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...mod("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...mod("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...mod("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...mod("ValueCache",{expireValueCache:0}),...mod("CellApi",{getCellValue:0}),...mod("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...mod("Sort",{onSortChanged:0}),...mod("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...mod("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...mod("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...mod("HighlightChanges",{flashCells:0}),...mod("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...mod("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...mod("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...mod("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...mod("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...mod("ColumnResize",{setColumnWidths:0}),...mod("ColumnHover",{isColumnHovered:0}),...mod("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...mod("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...mod("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...mod("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...mod("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...mod("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...mod("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...mod("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...mod("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0}),...mod("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...mod("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...mod("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...mod("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...mod("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...mod("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...mod("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...mod("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...mod("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...mod("ContextMenu",{showContextMenu:0}),...mod("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...mod("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...mod("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...mod("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...mod("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...mod("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...mod("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...mod("StatusBar",{getStatusPanel:0}),...mod("AiToolkit",{getStructuredSchema:0})},defaultFns={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},dispatchEvent=(e,t)=>e.eventSvc.dispatchEvent(t),GridApiClass=class{};Reflect.defineProperty(GridApiClass,"name",{value:"GridApi"});var ApiFunctionService=class extends BeanStub{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new GridApiClass,this.fns={...defaultFns,dispatchEvent},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(gridApiFunctionsMap))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:i,beans:o}=this;i!==defaultFns&&(i[e]=o?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:i,fns:{[e]:o}}=this;return o?o(i,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:i,preDestroyLink:o}=this;if(!t)_warn(26,{fnName:e,preDestroyLink:o});else{const s=gridApiFunctionsMap[e];i.assertModuleRegistered(s,`api.${e}`)&&_warn(27,{fnName:e,module:s})}}destroy(){super.destroy(),this.fns=defaultFns,this.beans=null}};function getGridId(e){return e.context.getId()}function destroy(e){e.gridDestroySvc.destroy()}function isDestroyed(e){return e.gridDestroySvc.destroyCalled}function getGridOption(e,t){return e.gos.get(t)}function setGridOption(e,t,i){updateGridOptions(e,{[t]:i})}function updateGridOptions(e,t){e.gos.updateGridOptions({options:t})}function isModuleRegistered(e,t){const i=t.replace(/Module$/,"");return e.gos.isModuleRegistered(i)}var DndSourceElement={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},DndSourceComp=class extends Component{constructor(e,t,i){super(DndSourceElement),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(_createIconNoSpan("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:i,eCell:o,gos:s}=this,n=i.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(o,0,0),n){const l=_addGridCommonParams(s,{rowNode:t,dragEvent:e});n(l)}else try{const l=JSON.stringify(t.data);r.setData("application/json",l),r.setData("text/plain",l)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}};function addRowDropZone(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function removeRowDropZone(e,t){const i=e.dragAndDrop?.findExternalZone(t.getContainer());i&&e.dragAndDrop?.removeDropTarget(i)}function getRowDropZoneParams(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function getRowDropPositionIndicator(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function setRowDropPositionIndicator(e,t){const i=e.rowDropHighlightSvc;if(!i)return;const o=t?.row;let s=t?.dropIndicatorPosition;s!=="above"&&s!=="below"&&s!=="inside"&&(s="none");const n=o?.rowIndex;n==null||s==="none"?i.clear():i.set(o,s)}var tryPointerCapture=(e,t)=>{if(t!=null&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},capturePointer=(e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const i=t.pointerId;if(!tryPointerCapture(e,i))return null;const o={eElement:e,pointerId:i,onLost(s){pointerLostHandler(o,s)}};return e.addEventListener("lostpointercapture",o.onLost),o},releasePointerCapture=e=>{if(!e)return;removeLostHandler(e);const{eElement:t,pointerId:i}=e;if(t){try{t.releasePointerCapture(i)}catch{}e.eElement=null}},removeLostHandler=e=>{const{eElement:t,onLost:i}=e;t&&i&&(t.removeEventListener("lostpointercapture",i),e.onLost=null)},pointerLostHandler=(e,t)=>{removeLostHandler(e);const{eElement:i,pointerId:o}=e;i&&t.pointerId===o&&tryPointerCapture(i,o)},activePointerDrags,handledDragEvents,PASSIVE_TRUE={passive:!0},PASSIVE_FALSE={passive:!1},addHandledDragEvent=e=>{if(!handledDragEvents)handledDragEvents=new WeakSet;else if(handledDragEvents.has(e))return!1;return handledDragEvents.add(e),!0},BaseDragService=class extends AgBeanStub{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!activePointerDrags?.has(_getRootNode(this.beans))}hasPointerCapture(){const e=this.drag?.pointerCapture;return!!(e&&this.beans.eRootDiv.hasPointerCapture?.(e.pointerId))}destroy(){this.drag&&this.cancelDrag();const e=this.dragSources;for(const t of e)destroyDragSourceEntry(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let i=0,o=t.length;i<o;++i){const s=t[i];if(s.params===e){t.splice(i,1),destroyDragSourceEntry(s);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:i}=e,o=[];let s;if(i){const d=t.style;d&&(s=d.touchAction,d.touchAction="none")}const n={handlers:o,params:e,oldTouchAction:s};this.dragSources.push(n),addTempEventHandlers(o,[t,"pointerdown",d=>this.onPointerDown(e,d),PASSIVE_FALSE],[t,"mousedown",d=>this.onMouseDown(e,d)]);const a=this.gos.get("suppressTouch");i&&!a&&addTempEventHandlers(o,[t,"touchstart",c=>this.onTouchStart(e,c),PASSIVE_FALSE])}cancelDrag(e){const t=this.drag;e??(e=t?.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),t?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(e){const t=e.type;return(t==="mousemove"||t==="pointermove")&&e.cancelable&&_isEventFromThisInstance(this.beans,e)&&!_isFocusableFormField(getEventTargetElement(e))}initDrag(e,...t){this.drag=e;const i=this.beans,o=l=>this.onScroll(l),s=l=>this.onKeyDown(l),n=_getRootNode(i),r=_getDocument(i);addTempEventHandlers(e.handlers,[n,"contextmenu",preventEventDefault],[n,"keydown",s],[r,"scroll",o,{capture:!0}],[r.defaultView||window,"scroll",o],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;activePointerDrags?.get(t)===e&&activePointerDrags.delete(t),this.drag=null,releasePointerCapture(e.pointerCapture),clearTempEventHandlers(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const i=this.beans;if(handledDragEvents?.has(t))return;const o=t.pointerType;if(o==="touch"&&(i.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),_isFocusableFormField(getEventTargetElement(t))))||!t.isPrimary||o==="mouse"&&t.button!==0)return;this.destroyDrag();const s=_getRootNode(i),n=e.eElement,r=t.pointerId,l=new Dragging(s,e,t,r);activePointerDrags??(activePointerDrags=new WeakMap),activePointerDrags.set(s,l);const a=h=>{h.pointerId===r&&this.onMouseOrPointerMove(h)},d=h=>{h.pointerId===r&&this.onMouseOrPointerUp(h)},c=h=>{h.pointerId===r&&addHandledDragEvent(h)&&this.cancelDrag()},u=h=>this.draggingPreventDefault(h);this.initDrag(l,[s,"pointerup",d],[s,"pointercancel",c],[s,"pointermove",a,PASSIVE_FALSE],[s,"touchmove",u,PASSIVE_FALSE],[n,"mousemove",u,PASSIVE_FALSE]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):addHandledDragEvent(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!addHandledDragEvent(t)||_isFocusableFormField(getEventTargetElement(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){this.dragging&&preventEventDefault(t);return}this.destroyDrag();const o=this.beans,s=_getRootNode(o),n=new Dragging(s,e,t.touches[0]),r=h=>this.onTouchMove(h),l=h=>this.onTouchUp(h),a=h=>this.onTouchCancel(h),d=h=>this.draggingPreventDefault(h),c=_getRootNode(o),u=t.target??e.eElement;this.initDrag(n,[u,"touchmove",r,PASSIVE_TRUE],[u,"touchend",l,PASSIVE_TRUE],[u,"touchcancel",a,PASSIVE_TRUE],[c,"touchmove",d,PASSIVE_FALSE],[c,"touchend",l,PASSIVE_FALSE],[c,"touchcancel",a,PASSIVE_FALSE]),e.dragStartPixels===0&&this.onMove(n.start)}draggingPreventDefault(e){this.dragging&&preventEventDefault(e)}onMouseDown(e,t){if(t.button!==0||handledDragEvents?.has(t)||this.isPointer())return;const i=this.beans;this.destroyDrag();const o=new Dragging(_getRootNode(i),e,t),s=l=>this.onMouseOrPointerMove(l),n=l=>this.onMouseOrPointerUp(l),r=_getRootNode(i);this.initDrag(o,[r,"mousemove",s],[r,"mouseup",n]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):addHandledDragEvent(t)}onScroll(e){if(!addHandledDragEvent(e))return;const t=this.drag,i=t?.lastDrag;i&&this.dragging&&t.params?.onDragging?.(i)}onMouseOrPointerMove(e){addHandledDragEvent(e)&&(_isBrowserSafari()&&_getDocument(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&preventEventDefault(e),this.onMove(e))}onTouchCancel(e){const t=this.drag;!t||!addHandledDragEvent(e)||_getFirstActiveTouch(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){const t=this.drag;if(!t||!addHandledDragEvent(e))return;const i=_getFirstActiveTouch(t.start,e.touches);i&&(this.onMove(i),this.draggingPreventDefault(e))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const i=t.params;if(!this.dragging){const o=t.start,n=i.dragStartPixels??4;if(_areEventsNear(e,o,n)||(this.dragging=!0,i.capturePointer&&(t.pointerCapture=capturePointer(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:i.eElement}),i.onDragStart?.(o),this.drag!==t)||(i.onDragging?.(o),this.drag!==t))return}i.onDragging?.(e)}onTouchUp(e){const t=this.drag;t&&addHandledDragEvent(e)&&this.onUp(_getFirstActiveTouch(t.start,e.changedTouches))}onMouseOrPointerUp(e){addHandledDragEvent(e)&&this.onUp(e)}onUp(e){const t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,t.params.onDragStop?.(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===KeyCode.ESCAPE&&this.cancelDrag()}},destroyDragSourceEntry=e=>{clearTempEventHandlers(e.handlers);const t=e.oldTouchAction;if(t!=null){const i=e.params.eElement.style;i&&(i.touchAction=t)}},Dragging=class{constructor(e,t,i,o=null){this.rootEl=e,this.params=t,this.start=i,this.pointerId=o,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},getEventTargetElement=e=>{const t=e.target;return t instanceof Element?t:null},DragService=class extends BaseDragService{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},HorizontalResizeService=class extends BeanStub{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={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),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:i}=this.beans;return i.addDragSource(t),()=>i.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const i=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(i)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},RowDragElement={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},SKIP_ARIA_HIDDEN={skipAriaHidden:!0},RowDragComp=class extends Component{constructor(e,t,i,o,s,n=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=o,this.dragStartPixels=s,this.alwaysVisible=n,this.dragSource=null,this.disabled=!1}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(RowDragElement),this.getGui().appendChild(_createIconNoSpan("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,rowNode:t}=this,i=this.refreshVisibility.bind(this);this.addManagedListeners(e.eventSvc,{rowDragVisibilityChanged:i}),this.addManagedListeners(t,{dataChanged:i,cellChanged:i}),this.refreshVisibility()}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const{beans:e,column:t,rowNode:i}=this,{gos:o,dragAndDrop:s,rowDragSvc:n}=e,r=n?.visibility;let a=!(r==="suppress"||r==="hidden"&&!s?.hasExternalDropZones()),d=a;if(a&&!this.isCustomGui()&&t){const c=t.getColDef().rowDrag;if(c===!1)a=!1;else{const u=typeof c=="function";d=t.isRowDrag(i),a=u||d}}a&&d&&i.footer&&o.get("rowDragManaged")&&(d=!1,a=!0),d&&(d=a),a||this.setDisplayed(a,SKIP_ARIA_HIDDEN),d||this.setVisible(d,SKIP_ARIA_HIDDEN),this.setDisabled(!d||r==="disabled"&&!s?.hasExternalDropZones()),a&&this.setDisplayed(a,SKIP_ARIA_HIDDEN),d&&this.setVisible(d,SKIP_ARIA_HIDDEN)}setDisabled(e){e!==this.disabled&&(this.disabled=e,this.getGui()?.classList?.toggle("ag-drag-handle-disabled",e))}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const i=this.beans.selectionSvc?.getSelectedNodes()??[];return i.indexOf(e)!==-1?i:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();const o=_isEventSupported("pointerdown")?{pointerdown:preventEventDefault}:{mousedown:preventEventDefault};this.mouseDownListener=this.addManagedElementListeners(t,o)[0]}const i=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:o=>this.getDragItemName(o,i),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){const i=e?.dragItem||this.getDragItem(),o=(e?.dropTarget?.rows.length??i.rowNodes?.length)||1,s=this.column?.getColDef()?.rowDragText??this.gos.get("rowDragText");if(s)return s(i,o);if(o!==1)return`${o} ${t("rowDragRows","rows")}`;const n=this.cellValueFn();return n||`1 ${t("rowDragRow","rows")}`}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},AutoScrollService=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.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)}get scrolling(){return this.tickingInterval!==null}check(e,t=!1){const i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;const o=this.scrollContainer.getBoundingClientRect(),s=this.scrollByTick;this.tickLeft=e.clientX<o.left+s,this.tickRight=e.clientX>o.right-s,this.tickUp=e.clientY<o.top+s&&!i,this.tickDown=e.clientY>o.bottom-s&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},ChangedRowNodes=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},_csrmFirstLeaf=e=>{let t=e.childrenAfterGroup;for(;t?.length;){const i=t[0];if(i.sourceRowIndex>=0)return i;t=i.childrenAfterGroup}},_csrmReorderAllLeafs=(e,t,i,o)=>{if(!t.size||!e)return!1;let s=!1;const n=e.length??0;let r=-1;i&&(r=i.sourceRowIndex,i=r<0?_csrmFirstLeaf(i):null,i&&(r=i.sourceRowIndex)),r<0||r>=n?r=n:o||++r;let l=r,a=Math.min(r,n-1);for(const u of t){const h=u.sourceRowIndex;h<l&&(l=h),h>a&&(a=h)}let d=l;for(let u=l;u<r;++u){const h=e[u];t.has(h)||(h.sourceRowIndex!==d&&(h.sourceRowIndex=d,e[d]=h,s=!0),++d)}let c=a;for(let u=a;u>=r;--u){const h=e[u];t.has(h)||(h.sourceRowIndex!==c&&(h.sourceRowIndex=c,e[c]=h,s=!0),--c)}for(const u of t)u.sourceRowIndex!==d&&(u.sourceRowIndex=d,e[d]=u,s=!0),++d;return s};function _getCellPositionForEvent(e,t){return _getCellCtrlForEventTarget(e,t.target)?.getFocusedCellPosition()??null}function _getNormalisedMousePosition(e,t){const i=_isDomLayout(e.gos,"normal"),o=t;let s,n;o.clientX!=null||o.clientY!=null?(s=o.clientX,n=o.clientY):(s=o.x,n=o.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(n+=r,i){const l=e.ctrlsSvc.getScrollFeature(),a=l.getVScrollPosition(),d=l.getHScrollPosition();s+=d.left,n+=a.top}return{x:s,y:n}}var ChangedPath=class{constructor(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}depthFirstSearchChangedPath(e,t){const{rowNode:i,children:o}=e;if(o)for(let s=0;s<o.length;++s)this.depthFirstSearchChangedPath(o[s],t);t(i)}depthFirstSearchEverything(e,t,i){const o=e.childrenAfterGroup;if(o)for(let s=0,n=o.length;s<n;++s){const r=o[s];r.childrenAfterGroup?this.depthFirstSearchEverything(r,t,i):i&&t(r)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,i=!1){this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,i=0;for(;!this.mapToItems[t.id];){const o={rowNode:t,children:null};this.mapToItems[t.id]=o,i++,t=t.parent}return i}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;){this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={});for(const o of t)this.nodeIdsToColumns[i.id][o.getId()]=!0;i=i.parent}}linkPathItems(e,t){let i=e;for(let o=0;o<t;o++){const s=this.mapToItems[i.id],n=this.mapToItems[i.parent.id];n.children||(n.children=[]),n.children.push(s),i=i.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const i=this.createPathItems(e);this.linkPathItems(e,i),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const i=this.nodeIdsToColumns[e.id];return t.filter(s=>i[s.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const i=this.nodeIdsToColumns[e.id];return t.filter(s=>!i[s.getId()])}},POINTER_INSIDE_THRESHOLD=.25,RowDragFeature=class extends BeanStub{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{const i=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,o=new AutoScrollService({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:"y",getVerticalPosition:i,setVerticalPosition:s=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(s),onScrollCallback:()=>{const s=i();if(this.autoScrollOldV!==s){this.autoScrollOldV=s,this.autoScrollChanging=!0;return}const n=this.autoScrollChanging;this.autoScrollChanged=n,this.autoScrollChanging=!1,n&&(e.dragAndDrop?.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=o,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){return e?.dropTarget?.allowed===!1||this.beans.rowDragSvc.visibility!=="visible"?"notAllowed":"move"}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const i=this.beans.selectionSvc?.getSelectedNodes();if(i&&i.indexOf(t)>=0)return i.slice().sort(compareRowIndex)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:i,beans:o}=this;if(t){const l=this.getRowNodes(e);e.dragItem.rowNodes=l,setRowNodesDragging(l,!0)}this.lastDraggingEvent=e;const s=e.fromNudge,n=this.makeRowsDrop(i,e,s,!1);o.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);const r=this.autoScroll;n?.rowDragManaged&&n.moved&&n.allowed&&n.sameGrid&&!n.suppressMoveWhenRowDragging&&(!s&&!r?.scrolling||this.autoScrollChanged)&&this.dropRows(n),r?.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,i,o){const{beans:s,gos:n}=this,r=this.newRowsDrop(t,o),l=s.rowModel;if(t.dropTarget=r,t.changed=!1,!r)return null;let{sameGrid:a,rootNode:d,source:c,target:u}=r;u??(u=l.getRow(l.getRowCount()-1)??null);const h=this.beans.groupEditSvc,g=!!h?.canSetParent(r);let p=null;if(u?.footer){const m=_prevOrNextDisplayedRow(l,-1,u)??_prevOrNextDisplayedRow(l,1,u);g&&(p=u.sibling??d),u=m??null}u?.detail&&(u=u.parent),r.moved&&(r.moved=c!==u);let f=.5;if(u&&(a&&r.moved&&(p||!g)?f=c.rowIndex>u.rowIndex?-.5:.5:f=(r.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!g&&a&&u&&r.moved&&_isClientSideRowModel(n)){const m=deltaDraggingTarget(l,r);m&&(f=c.rowIndex>m.rowIndex?-.5:.5,u=m,r.moved&&(r.moved=c!==u))}return r.target=u,r.newParent=p,r.pointerPos=computePointerPos(u,r.y),r.yDelta=f,h?.fixRowsDrop(r,g,i,f),this.validateRowsDrop(r,g,o),t.changed||(t.changed=rowsDropChanged(e?.dropTarget,r)),r}newRowsDrop(e,t){const{beans:i,gos:o}=this,s=i.rowModel.rootNode,n=_isClientSideRowModel(o)?o.get("rowDragManaged"):!1,r=o.get("suppressMoveWhenRowDragging"),l=this.isFromThisGrid(e);let{rowNode:a,rowNodes:d}=e.dragItem;if(d||(d=a?[a]:[]),a||(a=d[0]),!a||!s)return null;const c=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;n&&(!d.length||i.rowDragSvc.visibility!=="visible"||(r||!l)&&!c)&&(u=!1);const h=_getNormalisedMousePosition(i,e).y,g=this.getOverNode(h);return{api:i.gridApi,context:i.gridOptions.context,draggingEvent:e,rowDragManaged:n,suppressMoveWhenRowDragging:r,sameGrid:l,withinGrid:c,treeData:!1,rootNode:s,moved:a!==g,y:h,overNode:g,overIndex:g?.rowIndex??-1,pointerPos:"none",position:"none",source:a,target:g??null,newParent:null,rows:d,allowed:u,highlight:!t&&n&&r&&(c||!l),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,i){const{source:o,target:s,yDelta:n,inside:r,moved:l,rowDragManaged:a,suppressMoveWhenRowDragging:d}=e;e.moved&&(e.moved=o!==s);const{position:c,fallbackPosition:u}=this.computeDropPosition(l,r,n);e.position=c,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,d,"initial");const h=(!a||e.allowed)&&this.gos.get("isRowValidDropPosition");h&&this.applyDropValidator(e,t,i,a,h),a&&(e.rows=this.filterRows(e)),this.beans.groupEditSvc?.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,d,"final"),e.position==="inside"&&(!e.allowed||!e.newParent)&&(e.position=u)}computeDropPosition(e,t,i){const o=i<0?"above":"below";return e?{position:t?"inside":o,fallbackPosition:o}:{position:"none",fallbackPosition:o}}enforceSuppressMoveWhenRowDragging(e,t,i){if(t){if(i==="initial"){e.moved||(e.allowed=!1);return}(!e.rows.length||e.position==="none")&&(e.allowed=!1)}}applyDropValidator(e,t,i,o,s){this.beans.groupEditSvc?.clearNewSameParent(e,t);const n=s(e);if(!n){e.allowed=!1;return}if(typeof n!="object")return;n.rows!==void 0&&(e.rows=n.rows??[]),t&&n.newParent!==void 0&&(e.newParent=n.newParent),n.target!==void 0&&(e.target=n.target),n.position&&(e.position=n.position),n.allowed!==void 0?e.allowed=n.allowed:o||(e.allowed=!0);const r=e.draggingEvent;n.changed&&r&&(r.changed=!0),!i&&n.highlight!==void 0&&(e.highlight=n.highlight)}addRowDropZone(e){if(!e.getContainer()){_warn(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){_warn(56);return}const i=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(s=>e.onDragEnter(this.rowDragEvent("rowDragEnter",s))),onDragLeave:e.onDragLeave&&(s=>e.onDragLeave(this.rowDragEvent("rowDragLeave",s))),onDragging:e.onDragging&&(s=>e.onDragging(this.rowDragEvent("rowDragMove",s))),onDragStop:e.onDragStop&&(s=>e.onDragStop(this.rowDragEvent("rowDragEnd",s))),onDragCancel:e.onDragCancel&&(s=>e.onDragCancel(this.rowDragEvent("rowDragCancel",s)))},o={isInterestedIn:s=>s===2,getIconName:()=>"move",external:!0,...i};t.addDropTarget(o),this.addDestroyFunc(()=>t.removeDropTarget(o))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:i=>{this.onDragEnter(i),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",i))},onDragLeave:i=>{this.onDragLeave(i),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",i))},onDragging:i=>{this.onDragging(i),e?.onDragging?.(this.rowDragEvent("rowDragMove",i))},onDragStop:i=>{this.onDragStop(i),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",i))},onDragCancel:i=>{this.onDragCancel(i),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",i))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:i}=this.beans,s=e>t.getCurrentPagePixelRange().pageLastPixel?-1:i.getRowIndexAtPixel(e);return s>=0?i.getRow(s):void 0}rowDragEvent(e,t){const i=this.beans,{dragItem:o,dropTarget:s,event:n,vDirection:r}=t,l=s?.rootNode===i.rowModel.rootNode,a=l?s.y:_getNormalisedMousePosition(i,t).y,d=l?s.overNode:this.getOverNode(a),c=l?s.overIndex:d?.rowIndex??-1;return{api:i.gridApi,context:i.gridOptions.context,type:e,event:n,node:o.rowNode,nodes:o.rowNodes,overIndex:c,overNode:d,y:a,vDirection:r,rowsDrop:s}}dispatchGridEvent(e,t){const i=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){const t=this.lastDraggingEvent?.dropTarget??null,i=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),i?.allowed&&i.rowDragManaged&&(!t?.droppedManaged||rowsDropChanged(t,i))&&this.dropRows(i),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){this.clearAutoScroll(),this.beans.groupEditSvc?.stopDragging(t),this.beans.rowDropHighlightSvc?.fromDrag(null),setRowNodesDragging(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){this.autoScroll?.ensureCleared(),this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}dropRows(e){return e.droppedManaged=!0,e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:i}){const o=_getRowIdCallback(this.gos),s=this.beans.rowModel,n=i.filter(({data:l,rowPinned:a})=>!s.getRowNode(o?.({data:l,level:0,rowPinned:a})??l.id)).map(({data:l})=>l);if(n.length===0)return!1;let r;if(t){const l=t.sourceRowIndex>=0?t:_csrmFirstLeaf(t);l&&(r=l.sourceRowIndex+(e==="above"?0:1))}return s.updateRowData({add:n,addIndex:r}),!0}filterRows(e){const{groupEditSvc:t}=this.beans,{rows:i,sameGrid:o}=e;let s;for(let n=0,r=i.length;n<r;++n){let l=!0;const a=i[n];(!a||a.footer||o&&a.destroyed&&!a.group||!this.csrmGetLeaf(a))&&(l=!1),l&&t&&!t.canDropRow(a,e)&&(l=!1),l?s?.push(a):s??(s=i.slice(0,n))}return s??i}csrmMoveRows(e){const t=this.beans.groupEditSvc;return t?.isGroupingDrop(e)?t.dropGroupEdit(e):this.csrmMoveRowsReorder(e)}csrmMoveRowsReorder({position:e,target:t,rows:i,newParent:o,rootNode:s}){let n=!1;const r=new Set;for(const h of i){o&&h.parent!==o&&(h.treeParent=o,n=!0);const g=this.csrmGetLeaf(h);g&&r.add(g)}if(!n&&r.size===0)return!1;const l=this.beans.focusSvc,a=l.getFocusedCell(),d=a&&_getCellByPosition(this.beans,a);if(r.size&&_csrmReorderAllLeafs(s._leafs,r,t,e==="above")&&(n=!0),!n)return!1;const c=this.beans.rowModel,u=new ChangedRowNodes;return u.reordered=!0,c.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedPath:new ChangedPath(!1,s),changedRowNodes:u}),d?d.focusCell():l.clearFocusedCell(),!0}csrmGetLeaf(e){if(e.sourceRowIndex>=0)return e.destroyed?void 0:e;const t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):_csrmFirstLeaf(e)}},rowsDropChanged=(e,t)=>e!==t&&(!e||e.sameGrid!==t.sameGrid||e.allowed!==t.allowed||e.position!==t.position||e.target!==t.target||e.source!==t.source||e.newParent!==t.newParent||!_areEqual(e.rows,t.rows)),compareRowIndex=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,setRowNodesDragging=(e,t)=>{for(let i=0,o=e?.length||0;i<o;++i){const s=e[i];s.dragging!==t&&(s.dragging=t,s.dispatchRowEvent("draggingChanged"))}},deltaDraggingTarget=(e,t)=>{let i=null,o=t.target;if(o&&t.rows.indexOf(o)<0)return null;const s=t.source;if(!o||!s)return null;let n=o.rowIndex-s.rowIndex;const r=n<0?-1:1;n=t.suppressMoveWhenRowDragging?Math.abs(n):1;const l=new Set(t.rows);do{const a=_prevOrNextDisplayedRow(e,r,o);if(!a)break;l.has(a)||(i=a,--n),o=a}while(n>0);return i},computePointerPos=(e,t)=>{const i=e?.rowTop,o=e?.rowHeight??0;if(i==null||!o||o<=0)return"none";const s=t-i,n=o*POINTER_INSIDE_THRESHOLD;return s<=n?"above":s>=o-n?"below":"inside"},RowDragService=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){const i=t.createManagedBean(new RowDragFeature(e)),o=this.beans.dragAndDrop;o.addDropTarget(i),t.addDestroyFunc(()=>o.removeDropTarget(i)),this.rowDragFeature=i;const s=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],s),this.addManagedEventListeners({newColumnsLoaded:s,columnRowGroupChanged:s,columnPivotModeChanged:s,sortChanged:s,filterChanged:s}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,i,o,s,n){return new RowDragComp(e,t,i,o,s,n)}createRowDragCompForRow(e,t){if(_isCellSelectionEnabled(this.gos))return;const i=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${i("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,i,o,s,n){const r=this.gos;return r.get("rowDragManaged")&&(!_isClientSideRowModel(r)||r.get("pagination"))?void 0:this.createRowDragComp(i,e,t,o,s,n)}cancelRowDrag(){this.rowDragFeature?.lastDraggingEvent&&this.beans.dragSvc?.cancelDrag()}computeVisibility(){const e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";const o=e.colModel.isPivotMode();return(o||e.rowGroupColsSvc?.columns?.length)&&!t.get("refreshAfterGroupEdit")?"hidden":o||e.filterManager?.isAnyFilterPresent()||e.sortSvc?.isSortActive()?"disabled":"visible"}refreshVisibility(){const e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,this.eventSvc?.dispatchEvent({type:"rowDragVisibilityChanged"}))}},RowDropHighlightService=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;!e||e?.rowIndex===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const i=e!==this.row,o=e.uiLevel,s=t!==this.position,n=o!==this.uiLevel;this.dragging=!1,(i||s||n)&&(i&&this.clear(),this.uiLevel=o,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:i,target:o,position:s}=t;if(i&&o&&s!=="none"){this.set(o,s),this.dragging=!0;return}}this.dragging&&this.clear()}},DragModule={moduleName:"Drag",version:VERSION,beans:[DragService]},DragAndDropModule={moduleName:"DragAndDrop",version:VERSION,dynamicBeans:{dndSourceComp:DndSourceComp},icons:{rowDrag:"grip"}},SharedDragAndDropModule={moduleName:"SharedDragAndDrop",version:VERSION,beans:[DragAndDropService],dependsOn:[DragModule],userComponents:{agDragAndDropImage:DragAndDropImageComponent},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},RowDragModule={moduleName:"RowDrag",version:VERSION,beans:[RowDropHighlightService,RowDragService],apiFunctions:{addRowDropZone,removeRowDropZone,getRowDropZoneParams,getRowDropPositionIndicator,setRowDropPositionIndicator},dependsOn:[SharedDragAndDropModule]},HorizontalResizeModule={moduleName:"HorizontalResize",version:VERSION,beans:[HorizontalResizeService],dependsOn:[DragModule]},columnMovingCSS=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",ColumnAnimationService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:i,executeLaterFuncs:o}=this;if(i.length===0&&o.length===0){e(),t();return}const s=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),s(i)},0),window.setTimeout(()=>{t(),s(o)},200)})}};function moveColumnByIndex(e,t,i){e.colMoves?.moveColumnByIndex(t,i,"api")}function moveColumns(e,t,i){e.colMoves?.moveColumns(t,i,"api")}var BodyDropPivotTarget=class extends BeanStub{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;if(t)for(const i of t)i.isPrimary()&&(i.isAnyFunctionActive()||(i.isAllowValue()?this.columnsToAggregate.push(i):i.isAllowRowGroup()?this.columnsToGroup.push(i):i.isAllowPivot()&&this.columnsToPivot.push(i)))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:i,pivotColsSvc:o}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&i?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&o?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function sortColsLikeCols(e,t){!t||t.length<=1||t.filter(o=>e.indexOf(o)<0).length>0||t.sort((o,s)=>{const n=e.indexOf(o),r=e.indexOf(s);return n-r})}function getColsToMove(e){const t=[...e];for(const i of e){let o=null,s=i.getParent();for(;s!=null&&s.getDisplayedLeafColumns().length===1;)o=s,s=s.getParent();if(o!=null){const r=!!o.getColGroupDef()?.marryChildren?o.getProvidedColumnGroup().getLeafColumns():o.getLeafColumns();for(const l of r)t.includes(l)||t.push(l)}}return t}function getLowestFragMove(e,t,i,o){const s=o.allCols;let n=null,r=null;for(let l=0;l<e.length;l++){const a=e[l],d=i.getProposedColumnOrder(t,a);if(!i.doesOrderPassRules(d))continue;const c=d.filter(h=>s.includes(h));if(r===null)r=c;else if(!_areEqual(c,r))break;const u=groupFragCount(d);(n===null||u<n.fragCount)&&(n={move:a,fragCount:u})}return n}function getBestColumnMoveIndexFromXPosition(e){const{isFromHeader:t,fromLeft:i,xPosition:o,fromEnter:s,fakeEvent:n,pinned:r,gos:l,colModel:a,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;t&&(u=getColsToMove(u));const h=u.slice();sortColsLikeCols(a.getCols(),h);const g=calculateValidMoves({movingCols:h,draggingRight:i,xPosition:o,pinned:r,gos:l,colModel:a,visibleCols:c}),p=calculateOldIndex(h,a);if(g.length===0)return;const f=g[0];if(p!==null&&(t||!s)&&!n&&(!i&&f>=p||i&&f<=p))return;const C=getLowestFragMove(g,h,d,c);if(!C)return;const v=C.move;if(!(v>a.getCols().length-h.length))return{columns:h,toIndex:v}}function attemptMoveColumns(e){const{columns:t,toIndex:i}=getBestColumnMoveIndexFromXPosition(e)||{},{finished:o,colMoves:s}=e;return!t||i==null?null:(s.moveColumns(t,i,"uiColumnMoved",o),o?null:{columns:t,toIndex:i})}function calculateOldIndex(e,t){const i=t.getCols(),o=e.map(a=>i.indexOf(a)).sort((a,d)=>a-d),s=o[0];return _last(o)-s!==o.length-1?null:s}function groupFragCount(e){function t(o){const s=[];let n=o.getOriginalParent();for(;n!=null;)s.push(n),n=n.getOriginalParent();return s}let i=0;for(let o=0;o<e.length-1;o++){let s=t(e[o]),n=t(e[o+1]);[s,n]=s.length>n.length?[s,n]:[n,s];for(const r of s)n.indexOf(r)===-1&&i++}return i}function getDisplayedColumns(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function calculateValidMoves(e){const{movingCols:t,draggingRight:i,xPosition:o,pinned:s,gos:n,colModel:r,visibleCols:l}=e;if(n.get("suppressMovableColumns")||t.some(w=>w.getColDef().suppressMovable))return[];const d=getDisplayedColumns(l,s),c=r.getCols(),u=d.filter(w=>t.includes(w)),h=d.filter(w=>!t.includes(w)),g=c.filter(w=>!t.includes(w));let p=0,f=o;if(i){let w=0;for(const S of u)w+=S.getActualWidth();f-=w}if(f>0){for(let w=0;w<h.length;w++){const S=h[w];if(f-=S.getActualWidth(),f<0)break;p++}i&&p++}let m;if(p>0){const w=h[p-1];m=g.indexOf(w)+1}else m=g.indexOf(h[0]),m===-1&&(m=0);const C=[m],v=(w,S)=>w-S;if(i){let w=m+1;const S=c.length-1;for(;w<=S;)C.push(w),w++;C.sort(v)}else{let w=m;const S=c.length-1;let b=c[w];for(;w<=S&&d.indexOf(b)<0;)w++,C.push(w),b=c[w];w=m-1;const y=0;for(;w>=y;)C.push(w),w--;C.sort(v).reverse()}return C}function normaliseX(e){const{pinned:t,fromKeyboard:i,gos:o,ctrlsSvc:s,useHeaderRow:n,skipScrollPadding:r}=e;let l=s.getHeaderRowContainerCtrl(t)?.eViewport,{x:a}=e;return l?(i&&(a-=l.getBoundingClientRect().left),o.get("enableRtl")&&(n&&(l=l.querySelector(".ag-header-row")),a=l.clientWidth-a),t==null&&!r&&(a+=s.get("center").getCenterViewportScrollLeft()),a):0}function setColumnsMoving(e,t){for(const i of e)i.moving=t,i.dispatchColEvent("movingChanged","uiColumnMoved")}var MOVE_FAIL_THRESHOLD=7,SCROLL_MOVE_WIDTH=100,SCROLL_GAP_NEEDED_BEFORE_MOVE=SCROLL_MOVE_WIDTH/2,SCROLL_ACCELERATION_RATE=5,SCROLL_TIME_INTERVAL=100,MoveColumnFeature=class extends BeanStub{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!_exists(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:i}=t||{},o=i?.columns??[];for(const s of o){const n=s.getPinned();if(s.getColDef().lockPinned){if(n==e)return"move";continue}const r=i?.containerType;if(r===e||!e)return"move";if(e&&(!n||r!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,i=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(i,!0,"uiColumnDragged");else{const s=t.visibleState,n=(i||[]).filter(r=>s[r.getId()]&&!r.isVisible());this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(i,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,o=!1){const{gos:s,ctrlsSvc:n}=this.beans,r=s.get("suppressMoveWhenColumnDragging");if(o&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!o&&_missing(e.hDirection))return;const l=normaliseX({x:e.x,pinned:this.pinned,gos:s,ctrlsSvc:n});t||this.checkCenterForScrolling(l),r?this.handleColumnDragWhileSuppressingMovement(e,t,i,l,o):this.handleColumnDragWhileAllowingMovement(e,t,i,l,o)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){if(!e?.length)return;const o=e.filter(s=>!s.getColDef().lockVisible);o.length&&this.beans.colModel.setColsVisible(o,t,i)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:i}=e;this.beans.colMoves.moveColumns(t,i,"uiColumnMoved",!0)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,i,o,s){const n=this.getAllMovingColumns(e,!0);if(s){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:l,xPosition:a}=this.getNormalisedXPositionInfo(n,r)||{};if(l==null||a==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:a,fromEnter:t,fakeEvent:i,fromLeft:l})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,o)}}handleColumnDragWhileAllowingMovement(e,t,i,o,s){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",l=e.dragSource.type===1,a=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:l,xPosition:o,fromLeft:r,fromEnter:t,fakeEvent:i}),d=attemptMoveColumns({...a,finished:s});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const i=e.dragSource.getDragItem();let o=null;t?(o=i.columnsInSplit,o||(o=i.columns)):o=i.columns;const s=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return o?o.filter(s):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:i,xPosition:o,fromLeft:s,fromEnter:n,fakeEvent:r}=e,{gos:l,colModel:a,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:i,fromLeft:s,xPosition:o,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:l,colModel:a,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){const{gos:i,colModel:o}=this.beans,s=i.get("enableRtl"),n=o.getCols().filter(c=>c.isVisible()&&c.getPinned()===this.pinned);let r=null,l=null,a=null;for(const c of n){if(l=c.getActualWidth(),r=this.getNormalisedColumnLeft(c,0,s),r!=null){const u=r+l;if(r<=t&&u>=t){a=c;break}}r=null,l=null}if(a)e.indexOf(a)!==-1&&(a=null);else{for(let c=n.length-1;c>=0;c--){const u=n[c],h=n[c].getParent();if(!h){a=u;break}const g=h?.getDisplayedLeafColumns();if(g.length){a=_last(g);break}}if(!a)return;r=this.getNormalisedColumnLeft(a,0,s),l=a.getActualWidth()}if(a==null||r==null||l==null){this.lastHighlightedColumn?.column!==a&&this.clearHighlighted();return}let d;if(t-r<l/2){const c=n.indexOf(a);c===0?d=0:(d=1,a=n[c-1])}else d=1;(this.lastHighlightedColumn?.column!==a||this.lastHighlightedColumn?.position!==d)&&this.clearHighlighted(),setColumnHighlighted(a,d),this.lastHighlightedColumn={column:a,position:d}}getNormalisedXPositionInfo(e,t){const{gos:i,visibleCols:o}=this.beans,s=i.get("enableRtl"),{firstMovingCol:n,column:r,position:l}=this.getColumnMoveAndTargetInfo(e,t,s);if(!n||!r||l==null)return;const a=o.allCols,d=a.indexOf(n),c=a.indexOf(r),u=l===0,h=d<c||d===c&&!u;let g=0;if(u?h&&(g-=1):h||(g+=1),c+g===d)return;const p=a[c+g];if(!p)return;const f=this.getNormalisedColumnLeft(p,20,s);return{fromLeft:h,xPosition:f}}getColumnMoveAndTargetInfo(e,t,i){const o=this.lastHighlightedColumn||{},{firstMovingCol:s,lastMovingCol:n}=findFirstAndLastMovingColumns(e);if(!s||!n||o.column||!t)return{firstMovingCol:s,...o};const l=this.getPinDirection()==="left";return{firstMovingCol:s,position:l?1:0,column:l!==i?s:n}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,i){const{gos:o,ctrlsSvc:s}=this.beans,n=e.getLeft();if(n==null)return null;const r=e.getActualWidth();return normaliseX({x:i?n+r-t:n+t,pinned:e.getPinned(),useHeaderRow:i,skipScrollPadding:!0,gos:o,ctrlsSvc:s})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,i=this.failedMoveAttempts>MOVE_FAIL_THRESHOLD;return t&&i||e.some(o=>o.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:i,fromEnter:o,fakeEvent:s,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:i,fromLeft:n,fromEnter:o,fakeEvent:s}),{columns:l,toIndex:a}=getBestColumnMoveIndexFromXPosition(r)||{};l&&a!=null&&(this.lastMovedInfo={columns:l,toIndex:a}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(setColumnHighlighted(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),i=t.getCenterViewportScrollLeft(),o=i+t.getCenterWidth();let s,n;this.gos.get("enableRtl")?(s=e<i+SCROLL_GAP_NEEDED_BEFORE_MOVE,n=e>o-SCROLL_GAP_NEEDED_BEFORE_MOVE):(n=e<i+SCROLL_GAP_NEEDED_BEFORE_MOVE,s=e>o-SCROLL_GAP_NEEDED_BEFORE_MOVE),this.needToMoveRight=s,this.needToMoveLeft=n,n||s?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),SCROLL_TIME_INTERVAL),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*SCROLL_ACCELERATION_RATE,e>SCROLL_MOVE_WIDTH&&(e=SCROLL_MOVE_WIDTH);let t=null;const i=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:o,dragAndDrop:s,gos:n}=this.beans;if(this.failedMoveAttempts<=MOVE_FAIL_THRESHOLD+1||!o)return;if(s.setDragImageCompIcon("pinned"),!n.get("suppressMoveWhenColumnDragging")){const r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,i=!1){const o=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!o.length)return 0;i&&(t=this.getPinDirection());const{pinnedCols:s,dragAndDrop:n}=this.beans;return s?.setColsPinned(o,t,"uiColumnDragged"),i&&n.nudge(),o.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function setColumnHighlighted(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function findFirstAndLastMovingColumns(e){const t=e.length;let i,o;for(let s=0;s<t;s++){if(!i){const n=e[s];n.getLeft()!=null&&(i=n)}if(!o){const n=e[t-1-s];n.getLeft()!=null&&(o=n)}if(i&&o)break}return{firstMovingCol:i,lastMovingCol:o}}var BodyDropTarget=class extends BeanStub{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,i=this.pinned;e.whenReady(this,o=>{let s;const n=o.gridBodyCtrl.eBodyViewport;switch(i){case"left":s=[[n,o.left.eContainer],[o.bottomLeft.eContainer],[o.topLeft.eContainer]];break;case"right":s=[[n,o.right.eContainer],[o.bottomRight.eContainer],[o.topRight.eContainer]];break;default:s=[[n,o.center.eViewport],[o.bottomCenter.eViewport],[o.topCenter.eViewport]];break}this.eSecondaryContainers=s}),this.moveColumnFeature=this.createManagedBean(new MoveColumnFeature(i)),this.bodyDropPivotTarget=this.createManagedBean(new BodyDropPivotTarget(i)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}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)}onDragCancel(){this.currentDropListener.onDragCancel()}},ColumnMoveService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,i){const o=this.beans.colModel.getCols();if(!o)return;const s=o[e];this.moveColumns([s],t,i)}moveColumns(e,t,i,o=!0){const{colModel:s,colAnimation:n,visibleCols:r,eventSvc:l}=this.beans,a=s.getCols();if(!a)return;if(t>a.length-e.length){_warn(30,{toIndex:t});return}n?.start();const d=s.getColsForKeys(e);this.doesMovePassRules(d,t)&&(_moveInArray(s.getCols(),d,t),r.refresh(i),l.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:o,source:i})),n?.finish()}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){const{colModel:t,gos:i}=this.beans;return!(!doesMovePassMarryChildren(e,t.getColTree())||!(s=>{const n=d=>d?d==="left"||d===!0?-1:1:0,r=i.get("enableRtl");let l=r?1:-1,a=!0;for(const d of s){const c=n(d.getColDef().lockPosition);r?c>l&&(a=!1):c<l&&(a=!1),l=c}return a})(e))}getProposedColumnOrder(e,t){const o=this.beans.colModel.getCols().slice();return _moveInArray(o,e,t),o}createBodyDropTarget(e,t){return new BodyDropTarget(e,t)}moveHeader(e,t,i,o,s){const{ctrlsSvc:n,gos:r,colModel:l,visibleCols:a,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,h=isColumnGroup(i),g=h?c.width:i.getActualWidth(),p=e==="left"!==r.get("enableRtl"),f=normaliseX({x:p?u-20:u+g+20,pinned:o,fromKeyboard:!0,gos:r,ctrlsSvc:n}),m=d.focusedHeader;attemptMoveColumns({allMovingColumns:h?i.getLeafColumns():[i],isFromHeader:!0,fromLeft:e==="right",xPosition:f,pinned:o,fromEnter:!1,fakeEvent:!1,gos:r,colModel:l,colMoves:this,visibleCols:a,finished:!0});let C;if(h){const v=i.getDisplayedLeafColumns();C=p?v[0]:_last(v)}else C=i;if(n.getScrollFeature().ensureColumnVisible(C,"auto"),(!s.isAlive()||r.get("ensureDomOrder"))&&m){let v;if(h){const w=i.getGroupId(),S=i.getLeafColumns();if(!S.length)return;const b=S[0].getParent();if(!b)return;v=findGroupWidthId(b,w)}else v=i;v&&d.focusHeaderPosition({headerPosition:{...m,column:v}})}}setDragSourceForHeader(e,t,i){const{gos:o,colModel:s,dragAndDrop:n,visibleCols:r}=this.beans;let l=!o.get("suppressDragLeaveHidesColumns");const a=isColumnGroup(t),d=a?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>l?"hide":"notAllowed",getDragItem:a?()=>createDragItemForGroup(t,r.allCols):()=>createDragItem(t),dragItemName:i,onDragStarted:()=>{l=!o.get("suppressDragLeaveHidesColumns"),setColumnsMoving(d,!0)},onDragStopped:()=>setColumnsMoving(d,!1),onDragCancelled:()=>setColumnsMoving(d,!1),onGridEnter:h=>{if(l){const{columns:g=[],visibleState:p}=h??{},f=a?C=>!p||p[C.getColId()]:()=>!0,m=g.filter(C=>!C.getColDef().lockVisible&&f(C));s.setColsVisible(m,!0,"uiColumnMoved")}},onGridExit:h=>{if(l){const g=h?.columns?.filter(p=>!p.getColDef().lockVisible)||[];s.setColsVisible(g,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function findGroupWidthId(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function createDragItem(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function createDragItemForGroup(e,t){const i=e.getProvidedColumnGroup().getLeafColumns(),o={};for(const l of i)o[l.getId()]=l.isVisible();const s=[];for(const l of t)i.indexOf(l)>=0&&(s.push(l),_removeFromArray(i,l));for(const l of i)s.push(l);const n=[],r=e.getLeafColumns();for(const l of s)r.indexOf(l)!==-1&&n.push(l);return{columns:s,columnsInSplit:n,visibleState:o,containerType:n[0]?.pinned}}var ColumnMoveModule={moduleName:"ColumnMove",version:VERSION,beans:[ColumnMoveService,ColumnAnimationService],apiFunctions:{moveColumnByIndex,moveColumns},dependsOn:[SharedDragAndDropModule],css:[columnMovingCSS]},AutoWidthCalculator=class extends BeanStub{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const i=this.getHeaderCellForColumn(e);if(!i)return-1;const o=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||o.push(i),this.getPreferredWidthForElements(o)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const i=document.createElement("form");i.style.position="fixed";const o=this.centerRowContainerCtrl.eContainer;for(const n of e)this.cloneItemIntoDummy(n,i);o.appendChild(i);const s=Math.ceil(i.getBoundingClientRect().width);return i.remove(),t=t??this.gos.get("autoSizePadding"),s+t}getHeaderCellForColumn(e){let t=null;for(const i of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const o=i.getHtmlElementForColumnHeader(e);o!=null&&(t=o)}return t}cloneItemIntoDummy(e,t){const i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";const o=document.createElement("div"),s=o.classList;["ag-header-cell","ag-header-group-cell"].some(l=>i.classList.contains(l))?(s.add("ag-header","ag-header-row"),o.style.position="static"):s.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(a=>r.classList.contains(a))){for(let a=0;a<r.classList.length;a++){const d=r.classList[a];d!="ag-row-position-absolute"&&s.add(d)}break}r=r.parentElement}o.appendChild(i),t.appendChild(o)}},AutoWidthModule={moduleName:"AutoWidth",version:VERSION,beans:[AutoWidthCalculator]};function setColumnWidths(e,t,i=!0,o="api"){e.colResize?.setColumnWidths(t,!1,i,o)}var GroupResizeFeature=class extends BeanStub{constructor(e,t,i,o){super(),this.comp=e,this.eResize=t,this.pinned=i,this.columnGroup=o}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:i}=this.beans,o=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(o),!t.get("suppressAutoSize")&&i&&this.addDestroyFunc(i.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:i,resizeRatios:o,groupAfterColumns:s,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=o,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){const o=this.normaliseDragChange(t),s=this.resizeStartWidth+o;this.resizeColumnsFromLocalValues(s,i,e)}getInitialValues(e){const t=a=>a.reduce((d,c)=>d+c.getActualWidth(),0),i=(a,d)=>a.map(c=>c.getActualWidth()/d),o=this.getColumnsToResize(),s=t(o),n=i(o,s),r={columnsToResize:o,resizeStartWidth:s,resizeRatios:n};let l=null;if(e&&(l=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),l){const a=l.getDisplayedLeafColumns(),d=r.groupAfterColumns=a.filter(u=>u.isResizable()),c=r.groupAfterStartWidth=t(d);r.groupAfterRatios=i(d,c)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t,i=!0){if(!this.resizeCols||!this.resizeRatios)return;const o={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(o,e,t,i)}resizeColumns(e,t,i,o=!0){const{columnsToResize:s,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:d}=e,c=[];if(c.push({columns:s,ratios:r,width:t}),l){const u=t-n;c.push({columns:l,ratios:d,width:a-u})}this.beans.colResize?.resizeColumnSets({resizeSets:c,finished:o,source:i}),o&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},ResizeFeature=class extends BeanStub{constructor(e,t,i,o,s){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=o,this.ctrl=s}postConstruct(){const e=[];let t,i;const o=()=>{if(_setDisplayed(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:l}=this.beans,a=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(a),i&&l&&e.push(l.addColumnAutosizeListeners(this.eResize,this.column))},s=()=>{for(const r of e)r();e.length=0},n=()=>{const r=this.column.isResizable(),l=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||l!==i)&&(t=r,i=l,s(),o())};n(),this.addDestroyFunc(s),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:i,lastResizeAmount:o,resizeStartWidth:s,beans:n}=this,r=this.normaliseResizeAmount(t),l=s+r,a=[{key:i,newWidth:l}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=n;if(this.column.getPinned()){const h=d?.leftWidth??0,g=d?.rightWidth??0,p=_getInnerWidth(c.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-o)>p)return}this.lastResizeAmount=r,u?.setColumnWidths(a,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.column.resizing=e,this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const i=this.pinned!=="left",o=this.pinned==="right";return this.gos.get("enableRtl")?i&&(t*=-1):o&&(t*=-1),t}},ColumnResizeService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,i,o){const s=[],{colModel:n,gos:r,visibleCols:l}=this.beans;for(const a of e){const d=n.getColDefCol(a.key)||n.getCol(a.key);if(!d)continue;if(s.push({width:a.newWidth,ratios:[1],columns:[d]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=l.getColAfter(d);if(!u)continue;const h=d.getActualWidth()-a.newWidth,g=u.getActualWidth()+h;s.push({width:g,ratios:[1],columns:[u]})}}s.length!==0&&this.resizeColumnSets({resizeSets:s,finished:i,source:o})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:o}=e;if(!(!t||t.every(c=>checkMinAndMaxWidthsForSet(c)))){if(i){const c=t&&t.length>0?t[0].columns:null;dispatchColumnResizedEvent(this.eventSvc,c,i,o)}return}const n=[],r=[];for(const c of t){const{width:u,columns:h,ratios:g}=c,p={},f={};for(const v of h)r.push(v);let m=!0,C=0;for(;m;){if(C++,C>1e3){_error(31);break}m=!1;const v=[];let w=0,S=u;h.forEach((y,R)=>{if(f[y.getId()])S-=p[y.getId()];else{v.push(y);const F=g[R];w+=F}});const b=1/w;v.forEach((y,R)=>{const E=R===v.length-1;let F;E?F=S:(F=Math.round(g[R]*u*b),S-=F);const P=y.getMinWidth(),x=y.getMaxWidth();F<P?(F=P,f[y.getId()]=!0,m=!0):x>0&&F>x&&(F=x,f[y.getId()]=!0,m=!0),p[y.getId()]=F})}for(const v of h){const w=p[v.getId()];v.getActualWidth()!==w&&(v.setActualWidth(w,o),n.push(v))}}const l=n.length>0;let a=[];if(l){const{colFlex:c,visibleCols:u,colViewport:h}=this.beans;a=c?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(o),u.updateBodyWidths(),h.checkViewportColumns()}const d=r.concat(a);(l||i)&&dispatchColumnResizedEvent(this.eventSvc,d,i,o,a)}resizeHeader(e,t,i){if(!e.isResizable())return;const o=e.getActualWidth(),s=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(o+t,s),n);this.setColumnWidths([{key:e,newWidth:r}],i,!0,"uiColumnResized")}createResizeFeature(e,t,i,o,s){return new ResizeFeature(e,t,i,o,s)}createGroupResizeFeature(e,t,i,o){return new GroupResizeFeature(e,t,i,o)}};function checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let o=0,s=0,n=!0;for(const a of t){const d=a.getMinWidth();o+=d||0;const c=a.getMaxWidth();c>0?s+=c:n=!1}const r=i>=o,l=!n||i<=s;return r&&l}var ColumnResizeModule={moduleName:"ColumnResize",version:VERSION,beans:[ColumnResizeService],apiFunctions:{setColumnWidths},dependsOn:[HorizontalResizeModule,AutoWidthModule]},GroupWidthFeature=class extends BeanStub{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);for(const t of this.columnGroup.getLeafColumns())t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})}removeListenersOnChildrenColumns(){for(const e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},HeaderGroupCellCtrl=class extends AbstractHeaderCellCtrl{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,i,o,s){const{column:n,beans:r}=this,{context:l,colNames:a,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,s=setupCompBean(this,l,s),this.setGui(t,s),this.displayName=a.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(s),this.setupExpandable(s),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:o,compBean:s}),this.setupUserComp(),this.addHeaderMouseListeners(s,o),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(s,g,t),c?.createRangeHighlightFeature(s,n,e),s.createManagedBean(new SetLeftFeature(n,t,r)),s.createManagedBean(new GroupWidthFeature(e,n)),u?this.resizeFeature=s.createManagedBean(u.createGroupResizeFeature(e,i,h,n)):e.setResizableDisplayed(!1),s.createManagedBean(new ManagedFocusFeature(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,g),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.getDefinition();return _addGridCommonParams(t.gos,{colDef:i,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,i=e.get("groupHeaderHeight");i!=null?i===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(i):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const i of t)e.addManagedListeners(i,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,i)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),i=t[0]===e,o=_last(t)===e;if(!i&&!o)return;const s=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(a=>a.column.isMoving());let r=!1,l=!1;if(n){const a=this.beans.gos.get("enableRtl"),d=s===1,c=s===0;i&&(a?l=d:r=c),o&&(a?r=c:l=d)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",l)}resizeHeader(e,t){const{resizeFeature:i}=this;if(!i)return;const o=i.getInitialValues(t);i.resizeColumns(o,o.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:i,enterpriseMenuFactory:o}=this.beans,s=this.column,n=s.getProvidedColumnGroup(),r=_addGridCommonParams(i,{displayName:this.displayName,columnGroup:s,setExpanded:a=>{e.setColumnGroupOpened(n,a,"gridInitializing")},setTooltip:(a,d)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(a,d)},showColumnMenu:(a,d)=>o?.showMenuAfterButtonClick(n,a,"columnMenu",d),showColumnMenuAfterMouseClick:(a,d)=>o?.showMenuAfterMouseEvent(n,a,"columnMenu",d),eGridHeader:this.eGui}),l=_getHeaderGroupCompDetails(t,r);l&&this.comp.setUserCompDetails(l)}addHeaderMouseListeners(e,t){const{column:i,comp:o,beans:{rangeSvc:s},gos:n}=this,r=c=>this.handleMouseOverChange(c.type==="mouseenter"),l=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",i.getProvidedColumnGroup()),a=c=>this.handleContextMenuMouseEvent(c,void 0,i.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:r,mouseleave:r,click:l,contextmenu:a}),o.toggleCss("ag-header-group-cell-selectable",_getEnableColumnSelection(n));const d=s?.createHeaderGroupCellMouseListenerFeature(this.column,t);d&&this.createManagedBean(d)}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const i=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:i,expandableChanged:i})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),i=_getHeaderClassesFromColDef(t,this.gos,null,e);e.isPadding()?(i.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&i.push("ag-header-span-height")):(i.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&i.push("ag-header-cell-wrap-text"));for(const o of i)this.comp.toggleCss(o,!0)}setupMovingCss(e){const{column:t}=this,o=t.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const n of o)e.addManagedListeners(n,{movingChanged:s});s()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;const{column:i,expandable:o,gos:s,beans:n}=this,r=_getEnableColumnSelection(s);if(e.key==KeyCode.ENTER){if(r&&!e.altKey)n.rangeSvc?.handleColumnSelection(i,e);else if(o){const l=!i.isExpanded();n.colGroupSvc.setColumnGroupOpened(i.getProvidedColumnGroup(),l,"uiColumnExpanded")}}}refreshAnnouncement(){let e;const{gos:t,column:i,beans:o}=this;if(_getEnableColumnSelection(t)){const n=this.getLocaleTextFunc(),r=o.rangeSvc?.isColumnInAnyRange(i);e=n("ariaColumnCellSelection",`Press CTRL+SPACE to ${r?"de":""}select all visible cells in this column group`)}this.ariaAnnouncement=e}announceAriaDescription(){const{beans:e,eGui:t,ariaAnnouncement:i}=this;!i||!t.contains(_getActiveDomElement(e))||e.ariaAnnounce?.announceValue(i,"columnHeader")}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function setColumnGroupOpened(e,t,i){e.colGroupSvc?.setColumnGroupOpened(t,i,"api")}function getColumnGroup(e,t,i){return e.colGroupSvc?.getColumnGroup(t,i)??null}function getProvidedColumnGroup(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function getDisplayNameForColumnGroup(e,t,i){return e.colNames.getDisplayNameForColumnGroup(t,i)||""}function getColumnGroupState(e){return e.colGroupSvc?.getColumnGroupState()??[]}function setColumnGroupState(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function resetColumnGroupState(e){e.colGroupSvc?.resetColumnGroupState("api")}function getLeftDisplayedColumnGroups(e){return e.visibleCols.treeLeft}function getCenterDisplayedColumnGroups(e){return e.visibleCols.treeCenter}function getRightDisplayedColumnGroups(e){return e.visibleCols.treeRight}function getAllDisplayedColumnGroups(e){return e.visibleCols.getAllTrees()}var GroupInstanceIdCreator=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return typeof t!="number"?i=0:i=t+1,this.existingIds[e]=i,i}};function _removeAllFromUnorderedArray(e,t){for(let i=0;i<t.length;i++){const o=e.indexOf(t[i]);o>=0&&(e[o]=e[e.length-1],e.pop())}}var VisibleColsService=class extends BeanStub{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:i,colModel:o,colGroupSvc:s,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(o,s),s?.updateOpenClosedVisibility(),this.leftCols=pickDisplayedCols(this.treeLeft),this.centerCols=pickDisplayedCols(this.treeCenter),this.rightCols=pickDisplayedCols(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(o),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(l=>l.isAutoHeight()),i?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(o,this.leftCols,this.rightCols,e),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let i=t.getParent();for(;i;){if(!i.isPadding()){const o=i.getProvidedColumnGroup().getLevel()+1;o>e&&(e=o);break}i=i.getParent()}}return e}updateBodyWidths(){const e=getWidthOfColsInList(this.centerCols),t=getWidthOfColsInList(this.leftCols),i=getWidthOfColsInList(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,i,o){let s,n;this.gos.get("enableRtl")?(s=t?t[0]:null,n=i?_last(i):null):(s=t?_last(t):null,n=i?i[0]:null);for(const r of e.getCols())r.setLastLeftPinned(r===s,o),r.setFirstRightPinned(r===n,o)}buildTrees(e,t){const i=e.getColsToShow(),o=i.filter(a=>a.getPinned()=="left"),s=i.filter(a=>a.getPinned()=="right"),n=i.filter(a=>a.getPinned()!="left"&&a.getPinned()!="right"),r=new GroupInstanceIdCreator,l=a=>t?t.createColumnGroups(a):a.columns;this.treeLeft=l({columns:o,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=l({columns:s,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=l({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),i=[],o=[],s=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?i.push(n):s.push(n):o.push(n)}this.ariaOrderColumns=i.concat(o).concat(s)}getAriaColIndex(e){let t;return isColumnGroup(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(const e of[this.treeLeft,this.treeRight,this.treeCenter])for(const t of e)isColumnGroup(t)&&t.checkLeft()}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const o=t.getCols().slice(0),s=this.gos.get("enableRtl");for(const n of[this.leftCols,this.rightCols,this.centerCols]){if(s){let r=getWidthOfColsInList(n);for(const l of n)r-=l.getActualWidth(),l.setLeft(r,e)}else{let r=0;for(const l of n)l.setLeft(r,e),r+=l.getActualWidth()}_removeAllFromUnorderedArray(o,n)}for(const n of o)n.setLeft(null,e)}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:i}}=this;return i.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:i}}=this;return i.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,i,o){const s=[];let n=null;for(let r=0;r<t.length;r++){const l=t[r],a=t.length-r,d=Math.min(l.getColSpan(e),a),c=[l];if(d>1){const h=d-1;for(let g=1;g<=h;g++)c.push(t[r+g]);r+=h}let u;if(i){u=!1;for(const h of c)i(h)&&(u=!0)}else u=!0;u&&(s.length===0&&n&&(o&&o(l))&&s.push(n),s.push(l)),n=l}return s}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,i=t.indexOf(e);return i>0?t[i-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};depthFirstAllColumnTreeSearch(this.treeCenter,!1,e),depthFirstAllColumnTreeSearch(this.treeLeft,!1,e),depthFirstAllColumnTreeSearch(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let i=0;i<t.length;i++){const o=this[t[i]];if(o.length)return e?_last(o):o[0]}return null}getColAfter(e){const t=this.allCols,i=t.indexOf(e);return i<t.length-1?t[i+1]:null}getColsLeftWidth(){return getWidthOfColsInList(this.leftCols)}getDisplayedColumnsRightWidth(){return getWidthOfColsInList(this.rightCols)}isColAtEdge(e,t){const i=this.allCols;if(!i.length)return!1;const o=t==="first";let s;if(isColumnGroup(e)){const n=e.getDisplayedLeafColumns();if(!n.length)return!1;s=o?n[0]:_last(n)}else s=e;return(o?i[0]:_last(i))===s}};function depthFirstAllColumnTreeSearch(e,t,i){if(e)for(let o=0;o<e.length;o++){const s=e[o];if(isColumnGroup(s)){const n=t?s.getDisplayedChildren():s.getChildren();depthFirstAllColumnTreeSearch(n,t,i)}i(s)}}function pickDisplayedCols(e){const t=[];return depthFirstAllColumnTreeSearch(e,!0,i=>{isColumn(i)&&t.push(i)}),t}var ColumnGroupService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return depthFirstOriginalTreeSearch(null,t,i=>{isProvidedColumnGroup(i)&&e.push({groupId:i.getGroupId(),open:i.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const i=[];depthFirstOriginalTreeSearch(null,t,o=>{if(isProvidedColumnGroup(o)){const s=o.getColGroupDef(),n={groupId:o.getGroupId(),open:s?s.openByDefault:void 0};i.push(n)}}),this.setColumnGroupState(i,e)}setColumnGroupState(e,t){const{colModel:i,colAnimation:o,visibleCols:s,eventSvc:n}=this.beans;if(!i.getColTree().length)return;o?.start();const l=[];for(const a of e){const d=a.groupId,c=a.open,u=this.getProvidedColGroup(d);u&&u.isExpanded()!==c&&(u.setExpanded(c),l.push(u))}s.refresh(t,!0),l.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:l.length===1?l[0]:void 0,columnGroups:l}),o?.finish()}setColumnGroupOpened(e,t,i){let o;isProvidedColumnGroup(e)?o=e.getId():o=e||"",this.setColumnGroupState([{groupId:o,open:t}],i)}getProvidedColGroup(e){let t=null;return depthFirstOriginalTreeSearch(null,this.beans.colModel.getColTree(),i=>{isProvidedColumnGroup(i)&&i.getId()===e&&(t=i)}),t}getGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),o=e.getDisplayedLeafColumns(),s=t==="After"?_last(o):o[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](s);if(!r)return null;const l=this.getColGroupAtLevel(r,i);if(l!==e)return l}}getColGroupAtLevel(e,t){let i=e.getParent(),o,s;for(;o=i.getProvidedColumnGroup().getLevel(),s=i.getPaddingLevel(),!(o+s<=t);)i=i.getParent();return i}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();depthFirstAllColumnTreeSearch(e,!1,t=>{isColumnGroup(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(isColumnGroup(e))return e;const i=this.beans.visibleCols.getAllTrees(),o=typeof t=="number";let s=null;return depthFirstAllColumnTreeSearch(i,!1,n=>{if(isColumnGroup(n)){const r=n;let l;o?l=e===r.getGroupId()&&t===r.getPartId():l=e===r.getGroupId(),l&&(s=r)}}),s}createColumnGroups(e){const{columns:t,idCreator:i,pinned:o,oldDisplayedGroups:s,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(s),l=[];let a=t;for(;a.length;){const d=a;a=[];let c=0;const u=h=>{const g=c;c=h;const p=d[g],m=(isColumnGroup(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(m==null){for(let v=g;v<h;v++)l.push(d[v]);return}const C=this.createColumnGroup(m,i,r,o,n);for(let v=g;v<h;v++)C.addChild(d[v]);a.push(C)};for(let h=1;h<d.length;h++){const g=d[h],f=(isColumnGroup(g)?g.getProvidedColumnGroup():g).getOriginalParent(),m=d[c],v=(isColumnGroup(m)?m.getProvidedColumnGroup():m).getOriginalParent();f!==v&&u(h)}c<d.length&&u(d.length)}return n||this.setupParentsIntoCols(l,null),l}createProvidedColumnGroup(e,t,i,o,s,n,r){const l=s.getUniqueKey(t.groupId||null,null),a=createMergedColGroupDef(this.beans,t,l),d=new AgProvidedColumnGroup(a,l,!1,i);this.createBean(d);const c=this.findExistingGroup(t,n);c&&n.splice(c.idx,1);const u=c?.group;u&&d.setExpanded(u.isExpanded());const h=_recursivelyCreateColumns(this.beans,a.children,i+1,e,o,s,n,r);return d.setChildren(h),d}balanceColumnTree(e,t,i,o){const s=[];for(let n=0;n<e.length;n++){const r=e[n];if(isProvidedColumnGroup(r)){const l=r,a=this.balanceColumnTree(l.getChildren(),t+1,i,o);l.setChildren(a),s.push(l)}else{let l,a;for(let d=t;d<i;d++){const c=o.getUniqueKey(null,null),u=createMergedColGroupDef(this.beans,null,c),h=new AgProvidedColumnGroup(u,c,!0,d);this.createBean(h),a&&a.setChildren([h]),a=h,l||(l=a)}if(l&&a)if(s.push(l),e.some(c=>isProvidedColumnGroup(c))){a.setChildren([r]);continue}else{a.setChildren(e);break}s.push(r)}}return s}findDepth(e){let t=0,i=e;for(;i?.[0]&&isProvidedColumnGroup(i[0]);)t++,i=i[0].getChildren();return t}findMaxDepth(e,t){let i=t;for(let o=0;o<e.length;o++){const s=e[o];if(isProvidedColumnGroup(s)){const n=s,r=this.findMaxDepth(n.getChildren(),t+1);i<r&&(i=r)}}return i}balanceTreeForAutoCols(e,t){const i=[];for(const o of e){let s=o;for(let n=t-1;n>=0;n--){const r=new AgProvidedColumnGroup(null,`FAKE_PATH_${o.getId()}_${n}`,!0,n);this.createBean(r),r.setChildren([s]),s.originalParent=r,s=r}t===0&&(o.originalParent=null),i.push(s)}return i}findExistingGroup(e,t){if(e.groupId!=null)for(let o=0;o<t.length;o++){const s=t[o];if(s.getColGroupDef()&&s.getId()===e.groupId)return{idx:o,group:s}}}createColumnGroup(e,t,i,o,s){const n=e.getGroupId(),r=t.getInstanceIdForKey(n),l=createUniqueColumnGroupId(n,r);let a=i[l];return a&&a.getProvidedColumnGroup()!==e&&(a=null),_exists(a)?a.reset():(a=new AgColumnGroup(e,n,r,o),s||this.createBean(a)),a}mapOldGroupsById(e){const t={},i=o=>{for(const s of o)if(isColumnGroup(s)){const n=s;t[s.getUniqueId()]=n,i(n.getChildren())}};return e&&i(e),t}setupParentsIntoCols(e,t){for(const i of e??[])if(i.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),i.parent=t,isColumnGroup(i)){const o=i;this.setupParentsIntoCols(o.getChildren(),o)}}},ColumnGroupModule={moduleName:"ColumnGroup",version:VERSION,dynamicBeans:{headerGroupCellCtrl:HeaderGroupCellCtrl},beans:[ColumnGroupService],apiFunctions:{getAllDisplayedColumnGroups,getCenterDisplayedColumnGroups,getColumnGroup,getColumnGroupState,getDisplayNameForColumnGroup,getLeftDisplayedColumnGroups,getProvidedColumnGroup,getRightDisplayedColumnGroups,resetColumnGroupState,setColumnGroupOpened,setColumnGroupState}},ColumnModel=class extends BeanStub{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(_convertColumnEventSourceType(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),_convertColumnEventSourceType(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:i,colAutosize:o,rowGroupColsSvc:s,pivotColsSvc:n,valueColsSvc:r,visibleCols:l,eventSvc:a,groupHierarchyColSvc:d}=t,c=this.colDefs?_compareColumnStatesAndDispatchEvents(t,e):void 0;i?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=_createColumnTree(t,this.colDefs,!0,h,e);_destroyColumnTree(t,this.colDefCols?.tree,g.columnTree);const p=g.columnTree,f=g.treeDepth,m=_getColumnsFromTree(p),C={};for(const v of m)C[v.getId()]=v;this.colDefCols={tree:p,treeDepth:f,list:m,map:C},this.createColumnsForService([d],this.colDefCols,e),s?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,l.refresh(e),a.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),a.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&o?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const i=this.cols?.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:s,rowNumbersSvc:n,quickFilter:r,pivotResultCols:l,showRowGroupCols:a,rowAutoHeight:d,visibleCols:c,colViewport:u,eventSvc:h,formula:g}=this.beans,p=this.selectCols(l,this.colDefCols);g?.setFormulasActive(p),this.createColumnsForService([o,s,n],p,t);const f=_shouldMaintainColumnOrder(this.gos,this.showingPivotResult);(!e||f)&&this.restoreColOrder(p),this.positionLockedCols(p),a?.refresh(),r?.refreshCols(),this.setColSpanActive(),d?.setAutoHeightActive(p),c.clear(),u.clear(),_areEqual(i,this.cols.tree)||h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,i){for(const o of e)o&&(o.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)},i),o.addColumns(t))}selectCols(e,t){const i=e?.getPivotResultCols()??null;this.showingPivotResult=i!=null;const{map:o,list:s,tree:n,treeDepth:r}=i??t;return this.cols={list:s.slice(),map:{...o},tree:n.slice(),treeDepth:r},i&&(i.list.some(a=>this.cols?.map[a.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{beans:e,showingPivotResult:t,cols:i}=this,{valueColsSvc:o,selectionColSvc:s}=e,n=this.isPivotMode()&&!t,r=s?.isSelectionColumnEnabled(),l=_isRowNumbers(e),a=o?.columns;return i.list.filter(c=>{const u=isColumnGroupAutoCol(c);if(n){const h=a?.includes(c);return u||h||r&&isColumnSelectionCol(c)||l&&isRowNumberCol(c)}else return u||c.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,i){_applyColumnState(this.beans,{state:e.map(o=>({colId:typeof o=="string"?o:o.getColId(),hide:!t}))},i)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const i=t.filter(u=>e.map[u.getId()]!=null);if(i.length===0)return;if(i.length===e.list.length){e.list=i;return}const o=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:o(h):!1};if(!i.some(u=>o(u))){const u=new Set(i);for(const h of e.list)u.has(h)||i.push(h);e.list=i;return}const s=new Map;for(let u=0;u<i.length;u++){const h=i[u];s.set(h,u)}const n=e.list.filter(u=>!s.has(u));if(n.length===0){e.list=i;return}const r=(u,h)=>{const g=h?h.getOriginalParent():u.getOriginalParent();if(!g)return null;let p=null,f=null;for(const m of g.getChildren())if(!(m===h||m===u)){if(m instanceof AgColumn){const C=s.get(m);if(C==null)continue;(p==null||p<C)&&(p=C,f=m);continue}m.forEachLeafColumn(C=>{const v=s.get(C);v!=null&&(p==null||p<v)&&(p=v,f=C)})}return f??r(u,g)},l=[],a=new Map;for(const u of n){const h=r(u,null);if(h==null){l.push(u);continue}const g=a.get(h);g===void 0?a.set(h,u):Array.isArray(g)?g.push(u):a.set(h,[g,u])}const d=new Array(e.list.length);let c=d.length-1;for(let u=l.length-1;u>=0;u--)d[c--]=l[u];for(let u=i.length-1;u>=0;u--){const h=i[u],g=a.get(h);if(g)if(Array.isArray(g))for(let p=g.length-1;p>=0;p--){const f=g[p];d[c--]=f}else d[c--]=g;d[c--]=h}e.list=d}positionLockedCols(e){e.list=placeLockedColumns(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:i,eventSvc:o}=this.beans;i.refresh(t),o.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=_convertColumnEventSourceType(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){_destroyColumnTree(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:i,selectionColSvc:o,groupHierarchyColSvc:s}=this.beans;_forAll(this.colDefCols?.list,e)||_forAll(i?.columns?.list,e)||_forAll(o?.columns?.list,e)||_forAll(s?.columns?.list,e)||_forAll(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(t==null)return null;const{map:i,list:o}=t;if(typeof e=="string"&&i[e])return i[e];for(let l=0;l<o.length;l++)if(_columnsMatch(o[l],e))return o[l];const{autoColSvc:s,selectionColSvc:n,groupHierarchyColSvc:r}=this.beans;return s?.getColumn(e)??n?.getColumn(e)??r?.getColumn(e)??null}},SkeletonCellRendererElement={tag:"div",cls:"ag-skeleton-container"},SkeletonCellRenderer=class extends Component{constructor(){super(SkeletonCellRendererElement)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>_setAriaLabelledBy(e.eParentOfValue)),_setAriaLabelledBy(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.getLocaleTextFunc();this.getGui().textContent=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");_setAriaLabel(this.getGui(),t)}setupLoading(e){const t=_createElement({tag:"div",cls:"ag-skeleton-effect"}),i=e.node.rowIndex;if(i!=null){const n=75+25*(i%2===0?Math.sin(i):Math.cos(i));t.style.width=`${n}%`}this.getGui().appendChild(t);const o=this.getLocaleTextFunc(),s=e.deferRender?o("ariaDeferSkeletonCellLoading","Cell is loading"):o("ariaSkeletonCellLoading","Row data is loading");_setAriaLabel(this.getGui(),s)}refresh(e){return!1}},CheckboxCellRendererModule={moduleName:"CheckboxCellRenderer",version:VERSION,userComponents:{agCheckboxCellRenderer:CheckboxCellRenderer}},SkeletonCellRendererModule={moduleName:"SkeletonCellRenderer",version:VERSION,userComponents:{agSkeletonCellRenderer:SkeletonCellRenderer}};function getColumnDef(e,t){const i=e.colModel.getColDefCol(t);return i?i.getColDef():null}function getColumnDefs(e){return e.colModel.getColumnDefs(!0)}function getDisplayNameForColumn(e,t,i){return e.colNames.getDisplayNameForColumn(t,i)||""}function getColumn(e,t){return e.colModel.getColDefCol(t)}function getColumns(e){return e.colModel.getColDefCols()}function applyColumnState(e,t){return _applyColumnState(e,t,"api")}function getColumnState(e){return _getColumnState(e)}function resetColumnState(e){_resetColumnState(e,"api")}function isPinning(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function isPinningLeft(e){return e.visibleCols.isPinningLeft()}function isPinningRight(e){return e.visibleCols.isPinningRight()}function getDisplayedColAfter(e,t){return e.visibleCols.getColAfter(t)}function getDisplayedColBefore(e,t){return e.visibleCols.getColBefore(t)}function setColumnsVisible(e,t,i){e.colModel.setColsVisible(t,i,"api")}function setColumnsPinned(e,t,i){e.pinnedCols?.setColsPinned(t,i,"api")}function getAllGridColumns(e){return e.colModel.getCols()}function getDisplayedLeftColumns(e){return e.visibleCols.leftCols}function getDisplayedCenterColumns(e){return e.visibleCols.centerCols}function getDisplayedRightColumns(e){return e.visibleCols.rightCols}function getAllDisplayedColumns(e){return e.visibleCols.allCols}function getAllDisplayedVirtualColumns(e){return e.colViewport.getViewportColumns()}function _deepCloneDefinition(e,t){if(!e)return;const i=e,o={};for(const s of Object.keys(i)){if(t&&t.indexOf(s)>=0||SKIP_JS_BUILTINS.has(s))continue;const n=i[s];typeof n=="object"&&n!==null&&n.constructor===Object?o[s]=_deepCloneDefinition(n):o[s]=n}return o}var ColumnDefFactory=class extends BeanStub{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,i,o,s=!1){const n=e.slice();t?n.sort((a,d)=>i.indexOf(a)-i.indexOf(d)):(i||s)&&n.sort((a,d)=>o.indexOf(a)-o.indexOf(d));const r=this.rowGroupColsSvc?.columns,l=this.pivotColsSvc?.columns;return this.buildColumnDefs(n,r,l)}buildColumnDefs(e,t=[],i=[]){const o=[],s={};for(const n of e){const r=this.createDefFromColumn(n,t,i);let l=!0,a=r,d=n.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}const h=s[d.getGroupId()];if(h){h.children.push(a),l=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[a],s[u.groupId]=u,a=u,d=d.getOriginalParent()),d!=null&&c===d){l=!1;break}c=d}l&&o.push(a)}return o}createDefFromGroup(e){const t=_deepCloneDefinition(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){const o=_deepCloneDefinition(e.getColDef());return o.colId=e.getColId(),o.width=e.getActualWidth(),o.rowGroup=e.isRowGroupActive(),o.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,o.pivot=e.isPivotActive(),o.pivotIndex=e.isPivotActive()?i.indexOf(e):null,o.aggFunc=e.isValueActive()?e.getAggFunc():null,o.hide=e.isVisible()?void 0:!0,o.pinned=e.isPinned()?e.getPinned():null,o.sort=e.getSortDef(),o.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,o}},ColumnFlexService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const i=this.flexViewportWidth,{visibleCols:o,colDelayRenderSvc:s}=this.beans,n=o.centerCols;let r=-1;if(e.resizingCols){const f=new Set(e.resizingCols);for(let m=n.length-1;m>=0;m--)if(f.has(n[m])){r=m;break}}let l=!1;const a=n.map((f,m)=>{const C=f.getFlex(),v=C!=null&&C>0&&m>r;return l||(l=v),{col:f,isFlex:v,flex:Math.max(0,C??0),initialSize:f.getActualWidth(),min:f.getMinWidth(),max:f.getMaxWidth(),targetSize:0}});if(l?(s?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(s),!i||!l)return[];let d=a.length,c=a.reduce((f,m)=>f+m.flex,0),u=i;const h=(f,m)=>{f.frozenSize=m,f.col.setActualWidth(m,t),u-=m,c-=f.flex,d-=1},g=f=>f.frozenSize!=null;for(const f of a)f.isFlex||h(f,f.initialSize);for(;d>0;){const f=Math.round(c<1?u*c:u);let m,C=0,v=0;for(const b of a){if(g(b))continue;m=b,v+=f*(b.flex/c);const y=v-C,R=Math.round(y);b.targetSize=R,C+=R}m&&(m.targetSize+=f-C);let w=0;for(const b of a){if(g(b))continue;const y=b.targetSize,R=Math.min(Math.max(y,b.min),b.max);w+=R-y,b.violationType=R===y?void 0:R<y?"max":"min",b.targetSize=R}const S=w===0?"all":w>0?"min":"max";for(const b of a)g(b)||(S==="all"||b.violationType===S)&&h(b,b.targetSize)}e.skipSetLeft||o.setLeftValues(t),e.updateBodyWidths&&o.updateBodyWidths();const p=a.filter(f=>f.isFlex&&!f.violationType).map(f=>f.col);if(e.fireResizedEvent){const f=a.filter(C=>C.initialSize!==C.frozenSize).map(C=>C.col),m=a.filter(C=>C.flex).map(C=>C.col);dispatchColumnResizedEvent(this.eventSvc,f,!0,t,m)}return this.revealColumns(s),p}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){const{flex:t,initialFlex:i}=e.colDef;t!==void 0?e.flex=t:i!==void 0&&(e.flex=i)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},_parseBigIntOrNull=e=>{if(typeof e=="bigint")return e;let t;if(typeof e=="number")t=e;else if(typeof e=="string"&&(t=e.trim(),t===""||(t.endsWith("n")&&(t=t.slice(0,-1)),!/^[+-]?\d+$/.test(t))))return null;if(t==null)return null;try{return BigInt(t)}catch{return null}},DATE_TIME_SEPARATOR="T",DATE_TIME_SEPARATOR_REGEXP=new RegExp(`[${DATE_TIME_SEPARATOR} ]`),DATE_TIME_REGEXP=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${DATE_TIME_SEPARATOR}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function _padStartWidthZeros(e,t){return e.toString().padStart(t,"0")}function _serialiseDate(e,t=!0,i=DATE_TIME_SEPARATOR){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>_padStartWidthZeros(s,2)).join("-");return t&&(o+=i+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>_padStartWidthZeros(s,2)).join(":")),o}function _getDateParts(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),_padStartWidthZeros(e.getDate(),2),_padStartWidthZeros(e.getHours(),2),`:${_padStartWidthZeros(e.getMinutes(),2)}`,`:${_padStartWidthZeros(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,_padStartWidthZeros(e.getDate(),2)].map(String):null}var calculateOrdinal=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"},MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"],DAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function _dateToFormattedString(e,t){if(t==null)return _serialiseDate(e,!1);const i=_padStartWidthZeros(e.getFullYear(),4),o={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>MONTHS[e.getMonth()],MMM:()=>MONTHS[e.getMonth()].slice(0,3),MM:()=>_padStartWidthZeros(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${calculateOrdinal(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${calculateOrdinal(e.getDate())}`,DD:()=>_padStartWidthZeros(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>DAYS[e.getDay()],ddd:()=>DAYS[e.getDay()].slice(0,3),dd:()=>DAYS[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${calculateOrdinal(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(o).join("|"),"g");return t.replace(s,n=>n in o?o[n]():n)}function _isValidDate(e,t=!1){return!!_parseDateTimeFromString(e,t)}function _isValidDateTime(e){return _isValidDate(e,!0)}function _parseDateTimeFromString(e,t=!1,i){if(!e||!i&&!DATE_TIME_REGEXP.test(e))return null;const[o,s]=e.split(DATE_TIME_SEPARATOR_REGEXP);if(!o)return null;const n=o.split("-").map(g=>Number.parseInt(g,10));if(n.filter(g=>!isNaN(g)).length!==3)return null;const[r,l,a]=n,d=new Date(r,l-1,a);if(d.getFullYear()!==r||d.getMonth()!==l-1||d.getDate()!==a||!s&&t)return null;if(!s||s==="00:00:00")return d;const[c,u,h]=s.split(":").map(g=>Number.parseInt(g,10));if(c>=0&&c<24)d.setHours(c);else if(t)return null;if(u>=0&&u<60)d.setMinutes(u);else if(t)return null;if(h>=0&&h<60)d.setSeconds(h);else if(t)return null;return d}function _getValueUsingField(e,t,i){if(!t||!e)return;if(!i)return e[t];const o=t.split(".");let s=e;for(let n=0;n<o.length;n++){if(s==null)return;s=s[o[n]]}return s}var SORTED_CELL_DATA_TYPES_FOR_MATCHING=["dateTimeString","dateString","text","number","bigint","boolean","date"],DataTypeService=class extends BeanStub{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},bigint({filterModuleBean:e}){return e?{cellEditor:"agTextCellEditor"}:{cellEditor:"agTextCellEditor",comparator:{default:bigintComparator,absolute:bigintAbsoluteComparator}}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:({node:e,event:t,column:i})=>t.key===KeyCode.SPACE&&i.isCellEditable(e)}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:i}){return{cellEditorParams:{useFormatter:!0},comparator:(o,s)=>{const n=t.getColDefCol(i),r=n?.getColDef();if(!n||!r)return 0;const l=o==null?"":e({column:n,node:null,value:o}),a=s==null?"":e({column:n,node:null,value:s});return l===a?0:l>a?1:-1},keyCreator:e}},text(){return{}}}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={},i={},o=c=>u=>{const{column:h,node:g,value:p}=u;let f=h.getColDef().valueFormatter;return f===c.groupSafeValueFormatter&&(f=c.valueFormatter),this.beans.valueSvc.formatValue(h,g,p,f)};for(const c of Object.keys(e)){const u=e[c],h={...u,groupSafeValueFormatter:createGroupSafeValueFormatter(u,this.gos)};t[c]=h,i[c]=o(h)}const s=this.gos.get("dataTypeDefinitions")??{},n={};for(const c of Object.keys(s)){const u=s[c],h=this.processDataTypeDefinition(u,s,[c],e);h&&(t[c]=h,u.dataTypeMatcher&&(n[c]=u.dataTypeMatcher),i[c]=o(h))}const{valueParser:r,valueFormatter:l}=e.object,{valueParser:a,valueFormatter:d}=t.object;this.hasObjectValueParser=a!==r,this.hasObjectValueFormatter=d!==l,this.formatValueFuncs=i,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(n,e)}sortKeysInMatchers(e,t){const i={...e};for(const o of SORTED_CELL_DATA_TYPES_FOR_MATCHING)delete i[o],i[o]=e[o]??t[o].dataTypeMatcher;return i}processDataTypeDefinition(e,t,i,o){let s;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=o[n];const l=t[n];if(r&&l&&(r=l),!validateDataTypeDefinition(e,r,n))return;s=mergeDataTypeDefinitions(r,e)}else{if(i.includes(n)){_warn(44);return}const r=t[n];if(!validateDataTypeDefinition(e,r,n))return;const l=this.processDataTypeDefinition(r,t,[...i,n],o);if(!l)return;s=mergeDataTypeDefinitions(l,e)}return{...s,groupSafeValueFormatter:createGroupSafeValueFormatter(s,this.gos)}}updateColDefAndGetColumnType(e,t,i){let{cellDataType:o}=t;o===void 0&&(o=e.cellDataType);const{field:s}=t;if((o==null||o===!0)&&(o=this.canInferCellDataType(e,t)?this.inferCellDataType(s,i):!1),this.addFormulaCellEditorToColDef(e,t),!o){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[o];if(!n){_warn(47,{cellDataType:o});return}return e.cellDataType=o,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,o,n,i),n.columnTypes}addFormulaCellEditorToColDef(e,t){!(t.allowFormula??e.allowFormula)||t.cellEditor||(e.cellEditor="agFormulaCellEditor")}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const i=o=>{t.add(o.key)};e.__addEventListener("columnStateUpdated",i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",i))}canInferCellDataType(e,t){const{gos:i}=this;if(!_isClientSideRowModel(i))return!1;const o={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(doColDefPropsPreventInference(t,o))return!1;const s=t.type===null?e.type:t.type;if(s){const n=i.get("columnTypes")??{};if(convertColumnTypes(s).some(l=>{const a=n[l.trim()];return a&&doColDefPropsPreventInference(a,o)}))return!1}return!doColDefPropsPreventInference(e,o)}inferCellDataType(e,t){if(!e)return;let i;const o=this.getInitialData();if(o){const n=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");i=_getValueUsingField(o,e,n)}else this.initWaitForRowData(t);return i==null?void 0:Object.keys(this.dataTypeMatchers).find(n=>this.dataTypeMatchers[n](i))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?._leafs;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:i,eventSvc:o}=this.beans;t&&i&&(i.shouldQueueResizeOperations=!0);const[s]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(s?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&i?.processResizeOperations(),o.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const i=[];this.destroyColumnStateUpdateListeners();const o={},s={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],l=this.colModel.getCol(n);if(!l)continue;const a=l.getColDef();if(!this.resetColDefIntoCol(l,"cellDataTypeInferred"))continue;const d=l.getColDef();if(t&&d.type&&d.type!==a.type){const c=getUpdatedColumnState(l,r);c.rowGroup&&c.rowGroupIndex==null&&(o[n]=c),c.pivot&&c.pivotIndex==null&&(s[n]=c),i.push(c)}}t&&i.push(...this.generateColumnStateForRowGroupAndPivotIndexes(o,s)),i.length&&_applyColumnState(this.beans,{state:i},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const i={},{rowGroupColsSvc:o,pivotColsSvc:s}=this.beans;return o?.restoreColumnOrder(i,e),s?.restoreColumnOrder(i,t),Object.values(i)}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const o=_addColumnDefaultAndTypes(this.beans,i,e.getColId());return e.setColDef(o,i,t),!0}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const i=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!i||e.getColDef().allowFormula&&this.beans.formula?.isFormula(t)?!0:i(t)}validateColDef(e){const t=i=>_warn(48,{property:i});if(e.cellDataType==="object"){const{object:i}=this.dataTypeDefinitions;e.valueFormatter===i.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===i.valueParser&&!this.hasObjectValueParser&&t("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:i,beans:o,formatValueFuncs:s}=this,n=i[t];n&&o.colFilter?.setColDefPropsForDataType(e,n,s[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,i,o){const s=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[i.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:i,colId:o,formatValue:s,filterModuleBean:this.beans.filterManager});e.cellEditor==="agFormulaCellEditor"&&n.cellEditor!==e.cellEditor&&(n.cellEditor=e.cellEditor),Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),i=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:o=>_parseDateTimeFromString(o.newValue&&String(o.newValue)),valueFormatter:o=>o.value==null?"":!(o.value instanceof Date)||isNaN(o.value.getTime())?t("invalidDate","Invalid Date"):_serialiseDate(o.value,i)??"",dataTypeMatcher:o=>o instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:i=>_parseDateTimeFromString(i)??void 0,dateFormatter:i=>_serialiseDate(i??null,t)??void 0,valueParser:i=>_isValidDate(String(i.newValue))?i.newValue:null,valueFormatter:i=>_isValidDate(String(i.value))?String(i.value):"",dataTypeMatcher:i=>typeof i=="string"&&_isValidDate(i)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>t.newValue?.trim?.()===""?null:Number(t.newValue),valueFormatter:t=>t.value==null?"":typeof t.value!="number"||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},bigint:{baseDataType:"bigint",valueParser:t=>{const{newValue:i}=t;return i==null||typeof i=="string"&&i.trim()===""?null:_parseBigIntOrNull(i)},valueFormatter:t=>t.value==null?"":typeof t.value!="bigint"?e("invalidBigInt","Invalid BigInt"):String(t.value),dataTypeMatcher:t=>typeof t=="bigint"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:_toStringOrNull(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>t.newValue==null?t.newValue:t.newValue?.trim?.()===""?null:String(t.newValue).toLowerCase()==="true",valueFormatter:t=>t.value==null?"":String(t.value),dataTypeMatcher:t=>typeof t=="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>typeof t=="string"&&_isValidDateTime(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>_toStringOrNull(t.value)??""}}}destroyColumnStateUpdateListeners(){for(const e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function mergeDataTypeDefinitions(e,t){const i={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...convertColumnTypes(e.columnTypes),...convertColumnTypes(t.columnTypes)]),i}function validateDataTypeDefinition(e,t,i){return t?t.baseDataType!==e.baseDataType?(_warn(46),!1):!0:(_warn(45,{parentCellDataType:i}),!1)}var isNumberOrBigintType=e=>typeof e=="bigint"||typeof e=="number",isNumberOrBigintBaseDataType=e=>e==="number"||e==="bigint";function createGroupSafeValueFormatter(e,t){if(e.valueFormatter)return i=>{const{node:o,colDef:s,column:n,value:r}=i;if(o?.group){const l=(s.pivotValueColumn??n).getAggFunc();if(l){if(l==="first"||l==="last")return e.valueFormatter(i);const{baseDataType:a}=e;if(isNumberOrBigintBaseDataType(a)&&l!=="count"){if(isNumberOrBigintType(r))return e.valueFormatter(i);if(r==null)return;if(typeof r=="object"){if(typeof r.toNumber=="function")return e.valueFormatter({...i,value:r.toNumber()});if("value"in r)return e.valueFormatter({...i,value:r.value})}}return}}else if(t.get("groupHideOpenParents")&&i.column.isRowGroupActive()&&typeof i.value=="string"&&!e.dataTypeMatcher?.(i.value))return;return e.valueFormatter(i)}}function doesColDefPropPreventInference(e,t,i,o){if(!t[i])return!1;const s=e[i];return s===null?(t[i]=!1,!1):o===void 0?!!s:s===o}function bigintComparator(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const i=_parseBigIntOrNull(e),o=_parseBigIntOrNull(t);return i!=null&&o!=null?i===o?0:i>o?1:-1:0}function bigintAbsoluteComparator(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const i=toAbsoluteBigInt(e),o=toAbsoluteBigInt(t);return i!=null&&o!=null?i===o?0:i>o?1:-1:0}function toAbsoluteBigInt(e){const t=_parseBigIntOrNull(e);return t==null?null:t<0n?-t:t}function doColDefPropsPreventInference(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,o])=>doesColDefPropPreventInference(e,t,i,o))}function getUpdatedColumnState(e,t){const i=getColumnStateFromColDef(e);for(const o of t)delete i[o],o==="rowGroup"?delete i.rowGroupIndex:o==="pivot"&&delete i.pivotIndex;return i}var DataTypeModule={moduleName:"DataType",version:VERSION,beans:[DataTypeService],dependsOn:[CheckboxCellRendererModule]},ColumnFlexModule={moduleName:"ColumnFlex",version:VERSION,beans:[ColumnFlexService]},ColumnApiModule={moduleName:"ColumnApi",version:VERSION,beans:[ColumnDefFactory],apiFunctions:{getColumnDef,getDisplayNameForColumn,getColumn,getColumns,applyColumnState,getColumnState,resetColumnState,isPinning,isPinningLeft,isPinningRight,getDisplayedColAfter,getDisplayedColBefore,setColumnsVisible,setColumnsPinned,getAllGridColumns,getDisplayedLeftColumns,getDisplayedCenterColumns,getDisplayedRightColumns,getAllDisplayedColumns,getAllDisplayedVirtualColumns,getColumnDefs}},ColumnNameService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const o=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:s}=this.beans;return i&&s?s.getHeaderName(e,o):o}getDisplayNameForProvidedColumnGroup(e,t,i){const o=t?.getColGroupDef();return o?this.getHeaderName(o,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,o,s){const n=e.headerValueGetter;if(n){const r=_addGridCommonParams(this.gos,{colDef:e,column:t,columnGroup:i,providedColumnGroup:o,location:s});return typeof n=="function"?n(r):typeof n=="string"?this.beans.expressionSvc?.evaluate(n,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return _camelCaseToHumanText(e.field)}return""}},ColumnViewportService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}getScrollPosition(){return this.scrollPosition}setScrollPosition(e,t,i=!1){const{visibleCols:o}=this,s=o.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!s)){if(this.scrollWidth=e,this.scrollPosition=t,o.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=o.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(i)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let i;switch(e){case"left":i=this.rowsOfHeadersToRenderLeft[t];break;case"right":i=this.rowsOfHeadersToRenderRight[t];break;default:i=this.rowsOfHeadersToRenderCenter[t];break}return i??[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||isAnyParentAutoHeaderHeight(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,i=t+e.getActualWidth(),o=this.viewportLeft-200,s=this.viewportRight+200,n=t<o&&i<o,r=t>s&&i>s;return!n&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=n=>{const r=n.getLeft();return _exists(r)&&r>this.viewportLeft},i=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:o}=this,s=o.centerCols;return o.getColsForRow(e,s,i,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const i=o=>{const s=new Set,n={};for(const r of o){let l=r.getParent();const a=r.isSpanHeaderHeight();for(;l&&!s.has(l);){if(a&&l.isPadding()){l=l.getParent();continue}const c=l.getProvidedColumnGroup().getLevel();n[c]??(n[c]=[]),n[c].push(l),s.add(l),l=l.getParent()}}return n};this.rowsOfHeadersToRenderLeft=i(e),this.rowsOfHeadersToRenderRight=i(t),this.rowsOfHeadersToRenderCenter=i(this.headerColsWithinViewport)}extractViewport(){const e=o=>`${o.getId()}-${o.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),i=this.colsWithinViewportHash!==t;return i&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),i}};function isAnyParentAutoHeaderHeight(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var AgComponentUtils=class extends BeanStub{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class i{refresh(){return!1}getGui(){return this.eGui}init(s){const n=t(s),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=_loadTemplate("<span>"+n+"</span>");return}if(n==null){this.eGui=_createElement({tag:"span"});return}this.eGui=n}}return i}},CellRendererFunctionModule={moduleName:"CellRendererFunction",version:VERSION,beans:[AgComponentUtils]},BaseRegistry=class extends AgBeanStub{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){if(e){this.dynamicBeans??(this.dynamicBeans={});for(const t of Object.keys(e))this.dynamicBeans[t]=e[t]}}createDynamicBean(e,t,...i){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));const o=this.dynamicBeans[e];if(o==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new o(...i)}};function isComponentMetaFunc(e){return typeof e=="object"&&!!e.getComp}var Registry=class extends BaseRegistry{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:i,dynamicBeans:o,selectors:s}=e;if(i){const n=(r,l,a,d)=>{this.agGridDefaults[r]=l,(a||d)&&(this.agGridDefaultOverrides[r]={params:a,processParams:d})};for(const r of Object.keys(i)){let l=i[r];if(isComponentMetaFunc(l)&&(l=l.getComp(this.beans)),typeof l=="object"){const{classImp:a,params:d,processParams:c}=l;n(r,a,d,c)}else n(r,l)}}this.registerDynamicBeans(o);for(const n of s??[])this.selectors[n.selector]=n;if(t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const i=(l,a,d,c)=>({componentFromFramework:a,component:l,params:d,processParams:c}),{frameworkOverrides:o}=this.beans,s=o.frameworkComponent(t,this.gos.get("components"));if(s!=null)return i(s,!0);const n=this.jsComps[t];if(n){const l=o.isFrameworkComponent(n);return i(n,l)}const r=this.agGridDefaults[t];if(r){const l=this.agGridDefaultOverrides[t];return i(r,!1,l?.params,l?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?_errMsg(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??_errMsg(256)}},NUM_CTRLS=23,CtrlsService=class extends BeanStub{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(const e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===NUM_CTRLS&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const i=this.readyCallbacks.indexOf(t);i>=0&&this.readyCallbacks.splice(i,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:i}=this.params;return[e,i,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},sharedCSS=':where([class^=ag-]),:where([class^=ag-]):after,:where([class^=ag-]):before{box-sizing:border-box}:where([class^=ag-]):where(button){color:inherit}:where([class^=ag-]):where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}:where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block}.ag-measurement-element-border:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}.ag-popup-child{top:0;z-index:5}.ag-popup-child:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled .ag-icon,[disabled] .ag-icon{opacity:.5}.ag-icon-grip.ag-disabled,.ag-icon-grip[disabled]{opacity:.35}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}',IS_SSR=typeof window!="object"||!window?.document?.fonts?.forEach,FORCE_LEGACY_THEMES=!1,_injectGlobalCSS=(e,t,i,o,s,n,r=!1)=>{if(IS_SSR||FORCE_LEGACY_THEMES)return;o&&(e=`@layer ${CSS.escape(o).replaceAll("\\.",".")} { ${e} }`);let l=injectionState.map.get(t);if(l||(l=[],injectionState.map.set(t,l)),l.some(u=>u.css===e))return;const a=document.createElement("style");n&&a.setAttribute("nonce",n),a.dataset.agGlobalCss=i,a.textContent=e;const d={css:e,el:a,priority:s,isParams:r};let c;for(const u of l){if(u.priority>s)break;c=u}if(c){c.el.after(a);const u=l.indexOf(c);l.splice(u+1,0,d)}else t.nodeName==="STYLE"?t.after(a):t.insertBefore(a,t.querySelector(":not(title, meta)")),l.push(d)},_injectCoreAndModuleCSS=(e,t,i,o)=>{_injectGlobalCSS(sharedCSS,e,"shared",t,0,i),o?.forEach((s,n)=>s.forEach(r=>_injectGlobalCSS(r,e,n,t,0,i)))},_useParamsCss=(e,t,i,o,s,n)=>{if(IS_SSR||FORCE_LEGACY_THEMES)return;const r=injectionState.grids.get(e);r?r.paramsCss=t:injectionState.grids.set(e,{styleContainer:o,paramsCss:t}),removeStaleParamsCss(o),t&&i&&_injectGlobalCSS(t,o,i,s,2,n,!0)},_unregisterInstanceUsingThemingAPI=e=>{const t=injectionState.grids.get(e)?.styleContainer;if(!t)return;injectionState.grids.delete(e),Array.from(injectionState.grids.values()).some(o=>o.styleContainer===t)?removeStaleParamsCss(t):(removeStaleParamsCss(t,!0),injectionState.map.delete(t))},removeStaleParamsCss=(e,t=!1)=>{const i=new Set;for(const s of injectionState.grids.values())s.styleContainer===e&&i.add(s.paramsCss);const o=injectionState.map.get(e)??[];for(let s=o.length-1;s>=0;s--)(t||o[s].isParams&&!i.has(o[s].css))&&(o[s].el.remove(),o.splice(s,1))},_a,injectionState=(_a=typeof window=="object"?window:{}).agStyleInjectionState??(_a.agStyleInjectionState={map:new WeakMap,grids:new Map}),createPart=e=>new PartImpl(e),defaultModeName="$default",partCounter=0,PartImpl=class{constructor({feature:e,params:t,modeParams:i={},css:o,cssImports:s}){this.feature=e,this.css=o,this.cssImports=s,this.modeParams={[defaultModeName]:{...i[defaultModeName]??{},...t??{}},...i}}use(e,t,i){let o=this._inject;if(o==null){let{css:s}=this;if(s){const n=`ag-theme-${this.feature??"part"}-${++partCounter}`;typeof s=="function"&&(s=s()),s=`:where(.${n}) {
|
|
${s}
|
|
}
|
|
`;for(const r of this.cssImports??[])s=`@import url(${JSON.stringify(r)});
|
|
${s}`;o={css:s,class:n}}else o=!1;this._inject=o}return o&&e&&_injectGlobalCSS(o.css,e,o.class,t,1,i),o?o.class:!1}},kebabCase=e=>e.replace(/[A-Z]|\d+/g,t=>`-${t}`).toLowerCase(),paramToVariableName=e=>`--ag-${kebabCase(e)}`,paramToVariableExpression=e=>`var(${paramToVariableName(e)})`,clamp=(e,t,i)=>Math.max(t,Math.min(i,e)),memoize=e=>{const t=new Map;return i=>{const o=i;return t.has(o)||t.set(o,e(i)),t.get(o)}},accentMix=e=>({ref:"accentColor",mix:e}),foregroundMix=e=>({ref:"foregroundColor",mix:e}),foregroundBackgroundMix=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),foregroundHeaderBackgroundMix=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),backgroundColor={ref:"backgroundColor"},foregroundColor={ref:"foregroundColor"},accentColor={ref:"accentColor"},defaultLightColorSchemeParams={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:foregroundMix(.15),chromeBackgroundColor:foregroundBackgroundMix(.02),browserColorScheme:"light"},sharedDefaults={...defaultLightColorSchemeParams,textColor:foregroundColor,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,focusShadow:{spread:3,color:accentMix(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:backgroundColor,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:accentColor,toggleButtonOffBackgroundColor:foregroundBackgroundMix(.3),toggleButtonSwitchBackgroundColor:backgroundColor,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}},panelBackgroundColor:backgroundColor,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontFamily:{ref:"headerFontFamily"},panelTitleBarFontSize:{ref:"headerFontSize"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,dialogShadow:{ref:"popupShadow"},dialogBorder:{color:foregroundMix(.2)},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},dataFontSize:{ref:"fontSize"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontSize:{ref:"fontSize"},headerFontWeight:500,headerTextColor:{ref:"textColor"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,menuBorder:{color:foregroundMix(.2)},menuBackgroundColor:foregroundBackgroundMix(.03),menuTextColor:foregroundBackgroundMix(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"}},paramTypes=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],getParamType=memoize(e=>(e=e.toLowerCase(),paramTypes.find(t=>e.endsWith(t.toLowerCase()))??"length")),literalToCSS=e=>typeof e=="object"&&e?.ref?paramToVariableExpression(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,colorValueToCss=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e&&"ref"in e){const t=paramToVariableExpression(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?paramToVariableExpression(e.onto):"transparent"}, ${t} ${clamp(e.mix*100,0,100)}%)`}return!1},colorSchemeValueToCss=literalToCSS,lengthValueToCss=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:typeof e=="object"&&e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,i=>i[0]==="-"?i:" "+paramToVariableExpression(i)+" ")})`:typeof e=="object"&&e&&"ref"in e?paramToVariableExpression(e.ref):!1,scaleValueToCss=literalToCSS,borderValueToCss=(e,t)=>typeof e=="string"?e:e===!0?borderValueToCss({},t):e===!1?t==="columnBorder"?borderValueToCss({color:"transparent"},t):"none":typeof e=="object"&&e&&"ref"in e?paramToVariableExpression(e.ref):borderStyleValueToCss(e.style??"solid")+" "+lengthValueToCss(e.width??{ref:"borderWidth"})+" "+colorValueToCss(e.color??{ref:"borderColor"}),shadowValueParamsToCss=e=>[lengthValueToCss(e.offsetX??0),lengthValueToCss(e.offsetY??0),lengthValueToCss(e.radius??0),lengthValueToCss(e.spread??0),colorValueToCss(e.color??{ref:"foregroundColor"}),...e.inset?["inset"]:[]].join(" "),shadowValueToCss=e=>typeof e=="string"?e:e===!1?"none":typeof e=="object"&&e&&"ref"in e?paramToVariableExpression(e.ref):Array.isArray(e)?e.map(shadowValueParamsToCss).join(", "):shadowValueParamsToCss(e),borderStyleValueToCss=literalToCSS,fontFamilyValueToCss=e=>typeof e=="string"?e.includes(",")?e:quoteUnsafeChars(e):typeof e=="object"&&e&&"googleFont"in e?fontFamilyValueToCss(e.googleFont):typeof e=="object"&&e&&"ref"in e?paramToVariableExpression(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),quoteUnsafeChars(t))).join(", "):!1,quoteUnsafeChars=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),fontWeightValueToCss=literalToCSS,imageValueToCss=e=>typeof e=="string"?e:typeof e=="object"&&e&&"url"in e?`url(${JSON.stringify(e.url)})`:typeof e=="object"&&e&&"svg"in e?imageValueToCss({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):typeof e=="object"&&e&&"ref"in e?paramToVariableExpression(e.ref):!1,durationValueToCss=(e,t,i)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&i.warn(104,{value:e,param:t}),`${e}s`):typeof e=="object"&&e&&"ref"in e?paramToVariableExpression(e.ref):!1,paramValidators={color:colorValueToCss,colorScheme:colorSchemeValueToCss,length:lengthValueToCss,scale:scaleValueToCss,border:borderValueToCss,borderStyle:borderStyleValueToCss,shadow:shadowValueToCss,image:imageValueToCss,fontFamily:fontFamilyValueToCss,fontWeight:fontWeightValueToCss,duration:durationValueToCss},paramValueToCss=(e,t,i)=>{const o=getParamType(e);return paramValidators[o](t,e,i)},paramsId=0,_asThemeImpl=e=>{if(!(e instanceof ThemeImpl))throw new Error("theme is not an object created by createTheme");return e},createSharedTheme=(e,t)=>new ThemeImpl({themeLogger:e,overridePrefix:t}),ThemeImpl=class _{constructor(t,i=[]){this.params=t,this.parts=i}withPart(t){return typeof t=="function"&&(t=t()),t instanceof PartImpl?new _(this.params,[...this.parts,t]):(this.params.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(createPart({feature:t}))}withParams(t,i=defaultModeName){return this.withPart(createPart({modeParams:{[i]:t}}))}_startUse({styleContainer:t,cssLayer:i,nonce:o,loadThemeGoogleFonts:s,moduleCss:n}){if(IS_SSR||FORCE_LEGACY_THEMES)return;uninstallLegacyCSS(),_injectCoreAndModuleCSS(t,i,o,n);const r=getGoogleFontsUsed(this);if(r.length>0)for(const l of r)s&&loadGoogleFont(l,o);for(const l of this.parts)l.use(t,i,o)}_getCssClass(){return FORCE_LEGACY_THEMES?"ag-theme-quartz":this._cssClassCache??(this._cssClassCache=deduplicatePartsByFeature(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).concat(this._getParamsClassName()).join(" "))}_getParamsClassName(){return this._paramsClassName??(this._paramsClassName=`ag-theme-params-${++paramsId}`)}_getModeParams(){let t=this._paramsCache;if(!t){const i={[defaultModeName]:{...sharedDefaults}};for(const o of deduplicatePartsByFeature(this.parts))for(const s of Object.keys(o.modeParams)){const n=o.modeParams[s];if(n){const r=i[s]??(i[s]={}),l=new Set;for(const a of Object.keys(n)){const d=n[a];d!==void 0&&(r[a]=d,l.add(a))}if(s===defaultModeName)for(const a of Object.keys(i)){const d=i[a];if(a!==defaultModeName)for(const c of l)delete d[c]}}}this._paramsCache=t=i}return t}_getParamsCss(){if(!this._paramsCssCache){let t="",i="";const o=this._getModeParams(),{overridePrefix:s,themeLogger:n}=this.params,r=s?`--ag-${s}-`:void 0;for(const d of Object.keys(o)){const c=o[d];if(d!==defaultModeName){const h=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(d):d}"]) & {
|
|
`;t+=h,i+=h}for(const u of Object.keys(c).sort()){const h=c[u],g=paramValueToCss(u,h,n);if(g===!1)n.error(107,{key:u,value:h});else{const p=paramToVariableName(u),f=r?p.replace("--ag-",r):p,m=p.replace("--ag-","--ag-inherited-");t+=` ${p}: var(${m}, ${g});
|
|
`,i+=` ${m}: var(${f});
|
|
`}}d!==defaultModeName&&(t+=`}
|
|
`,i+=`}
|
|
`)}const l=`:where(.${this._getParamsClassName()})`;let a=`${l} {
|
|
${t}}
|
|
`;a+=`:has(> ${l}):not(${l}) {
|
|
${i}}
|
|
`,this._paramsCssCache=a}return this._paramsCssCache}},deduplicatePartsByFeature=e=>{const t=new Map;for(const o of e)t.set(o.feature,o);const i=[];for(const o of e)(!o.feature||t.get(o.feature)===o)&&i.push(o);return i},getGoogleFontsUsed=e=>{const t=new Set,i=n=>{if(Array.isArray(n))n.forEach(i);else{const r=n?.googleFont;typeof r=="string"&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(n=>Object.values(n)).forEach(i),Array.from(t).sort()},uninstalledLegacyCSS=!1,uninstallLegacyCSS=()=>{if(!uninstalledLegacyCSS){uninstalledLegacyCSS=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},loadGoogleFont=async(e,t)=>{const i=`@import url('https://${googleFontsDomain}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
|
|
`;_injectGlobalCSS(i,document.head,`googleFont:${e}`,void 0,0,t)},googleFontsDomain="fonts.googleapis.com",LIST_ITEM_HEIGHT={changeKey:"listItemHeight",type:"length",defaultValue:24},BaseEnvironment=class extends AgBeanStub{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){const{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t);const i=e.get("themeStyleContainer"),o=typeof ShadowRoot<"u",s=o&&t.getRootNode()instanceof ShadowRoot;this.eStyleContainer=(typeof i=="function"?i():i)??(s?t:document.head),!i&&!s&&o&&warnOnAttachToShadowRoot(t,this.shadowRootError.bind(this),this.addDestroyFunc.bind(this)),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.getSizeEl(LIST_ITEM_HEIGHT),this.initVariables(),this.addDestroyFunc(()=>_unregisterInstanceUsingThemingAPI(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("theme")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){const{theme:i}=this,o=i?i._getCssClass():this.applyLegacyThemeClasses();for(const s of Array.from(e.classList))s.startsWith("ag-theme-")&&e.classList.remove(s);if(o){const s=e.className;e.className=`${s}${s?" ":""}${o}${t?.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let i=!1;for(const o of Array.from(t.classList))o.startsWith("ag-theme-")&&(i=!0,e=e?`${e} ${o}`:o);i&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?_injectGlobalCSS(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(LIST_ITEM_HEIGHT)}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const i=this.measureSizeEl(e);return i==="detached"||i==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,i),i)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const i=t.offsetWidth;return i===NO_VALUE_SENTINEL?"no-styles":(this.sizesMeasured=!0,i)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=_createAgElement({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const i=this.getMeasurementContainer();t=_createAgElement({tag:"div"});const o=this.setSizeElStyles(t,e);i.appendChild(t),this.sizeEls.set(e,t);const{type:s,noWarn:n}=e;if(s!=="length"&&s!=="border")return t;let r=this.measureSizeEl(e);r==="no-styles"&&!n&&this.varError(o,e.defaultValue);const l=_observeResize(this.beans,t,()=>{const a=this.measureSizeEl(e);a==="detached"||a==="no-styles"||(this.lastKnownValues.set(e,a),a!==r&&(r=a,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>l()),t}setSizeElStyles(e,t){const{changeKey:i,type:o}=t;let s=paramToVariableName(i);return o==="border"?(s.endsWith("-width")&&(s=s.slice(0,-6)),e.className="ag-measurement-element-border",e.style.setProperty("--ag-internal-measurement-border",`var(${s}, solid ${NO_VALUE_SENTINEL}px)`)):e.style.width=`var(${s}, ${NO_VALUE_SENTINEL}px)`,s}handleThemeChange(){const{gos:e,theme:t}=this,i=e.get("theme");let o;if(i==="legacy")o=void 0;else{const s=i??this.getDefaultTheme();s instanceof ThemeImpl?o=s:this.themeError(s)}o!==t&&this.handleNewTheme(o),this.postProcessThemeChange(o,i)}handleNewTheme(e){const{gos:t,eRootDiv:i,globalCSS:o}=this,s=this.getAdditionalCss();if(e){_injectCoreAndModuleCSS(this.eStyleContainer,this.cssLayer,this.styleNonce,s);for(const[n,r]of o)_injectGlobalCSS(n,this.eStyleContainer,r,this.cssLayer,0,this.styleNonce);o.length=0}this.theme=e,e?._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:s}),_useParamsCss(this,e?._getParamsCss()??null,e?._getParamsClassName()??null,this.eStyleContainer,this.cssLayer,this.styleNonce),this.applyThemeClasses(i),this.fireStylesChangedEvent("theme")}fireStylesChangedEvent(e){this.eventSvc.dispatchEvent({type:"stylesChanged",[`${e}Changed`]:!0})}},NO_VALUE_SENTINEL=15538,warnOnAttachToShadowRoot=(e,t,i)=>{let o=60;const s=setInterval(()=>{typeof ShadowRoot<"u"&&e.getRootNode()instanceof ShadowRoot&&(t(),clearInterval(s)),(_isInDOM(e)||--o<0)&&clearInterval(s)},1e3);i(()=>clearInterval(s))},coreCSS='.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-body-viewport::-webkit-scrollbar,.ag-center-cols-viewport::-webkit-scrollbar,.ag-floating-bottom-viewport::-webkit-scrollbar,.ag-floating-top-viewport::-webkit-scrollbar,.ag-header-viewport::-webkit-scrollbar,.ag-sticky-bottom-viewport::-webkit-scrollbar,.ag-sticky-top-viewport::-webkit-scrollbar{display:none!important}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-left-sticky-bottom,.ag-pinned-right-cols-container,.ag-pinned-right-sticky-bottom,.ag-sticky-bottom-container,.ag-sticky-top-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-active),&:where(.ag-scrollbar-scrolling){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-sticky-bottom{box-sizing:content-box!important;:where(.ag-pinned-left-sticky-bottom),:where(.ag-pinned-right-sticky-bottom),:where(.ag-sticky-bottom-container){border-top:var(--ag-row-border);box-sizing:border-box}}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;:where(.ag-column-group-closed-icon),:where(.ag-column-group-opened-icon){cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width)/2);content:"";height:var(--ag-row-drag-indicator-width);pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label,:where(.ag-header-group-cell-selectable) .ag-header-cell-comp-wrapper{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden)),:where(.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)):before,.ag-header-group-cell:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}.ag-header-cell:where(:not(.ag-floating-filter)):where(:hover):before,.ag-header-group-cell:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:where(:not(.ag-floating-filter)):where(.ag-header-cell-moving):before,.ag-header-group-cell:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}:where(.ag-header-cell:not(.ag-floating-filter)>*,.ag-header-group-cell>*){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-column-drag-indicator-color);border-radius:calc(var(--ag-column-drag-indicator-width)/2);content:"";height:100%;position:absolute;top:0;width:var(--ag-column-drag-indicator-width)}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2}:where(.ag-ltr) .ag-header-cell-resize{right:-3px}:where(.ag-rtl) .ag-header-cell-resize{left:-3px}.ag-header-cell-resize:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}:where(.ag-ltr) .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-rtl) .ag-header-cell-resize:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{container-type:normal;display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{container-type:normal;display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);container-type:inline-size;display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color)}.ag-chart-menu-icon:hover,.ag-chart-settings-next:hover,.ag-chart-settings-prev:hover,.ag-column-group-icons:hover,.ag-column-select-header-icon:hover,.ag-filter-toolpanel-expand:hover,.ag-floating-filter-button-button:hover,.ag-group-title-bar-icon:hover,.ag-header-cell-filter-button:hover,.ag-header-cell-menu-button:hover,.ag-header-expand-icon:hover,.ag-panel-title-bar-button-icon:hover,.ag-panel-title-bar-button:hover,.ag-set-filter-group-icons:hover,:where(.ag-group-contracted) .ag-icon:hover,:where(.ag-group-expanded) .ag-icon:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}:where(.ag-filter-active),:where(.ag-filter-toolpanel-group-instance-header-icon),:where(.ag-filter-toolpanel-instance-header-icon){position:relative}:where(.ag-filter-active):after,:where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-filter-toolpanel-instance-header-icon):after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-ltr) :where(.ag-filter-active):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-instance-header-icon):after{right:-1px}:where(.ag-rtl) :where(.ag-filter-active):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-instance-header-icon):after{left:-1px}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}',coreDefaults={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:backgroundColor,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},cellFontFamily:{ref:"fontFamily"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:accentColor,rangeSelectionBackgroundColor:accentMix(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:accentMix(.5),rangeHeaderHighlightColor:foregroundHeaderBackgroundMix(.08),rowNumbersSelectedColor:accentMix(.5),rowHoverColor:accentMix(.08),columnHoverColor:accentMix(.05),selectedRowBackgroundColor:accentMix(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:backgroundColor,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:foregroundMix(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:foregroundMix(.1),iconButtonActiveColor:accentColor,iconButtonActiveBackgroundColor:accentMix(.28),iconButtonActiveIndicatorColor:accentColor,setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:foregroundMix(.8),cellEditingBorder:{color:accentColor},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:foregroundMix(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:foregroundMix(.13)},selectCellBackgroundColor:foregroundMix(.07),selectCellBorder:{color:foregroundMix(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:backgroundColor,filterPanelApplyButtonBackgroundColor:accentColor,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:foregroundColor,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:foregroundColor,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:foregroundMix(.15),statusBarLabelColor:foregroundColor,statusBarLabelFontWeight:500,statusBarValueColor:foregroundColor,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"},rowDragIndicatorColor:{ref:"rangeSelectionBorderColor"},rowDragIndicatorWidth:2,columnDragIndicatorColor:{ref:"accentColor"},columnDragIndicatorWidth:2},batchEditStyleDefaultCSS=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",baseParams={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},baseDarkBatchEditParams={...baseParams,cellBatchEditTextColor:"#f3d0b3"},makeBatchEditStyleBaseTreeShakeable=()=>createPart({feature:"batchEditStyle",params:baseParams,css:batchEditStyleDefaultCSS}),batchEditStyleBase=makeBatchEditStyleBaseTreeShakeable(),buttonStyleBaseCSS=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}.ag-standard-button:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}",baseParams2={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},makeButtonStyleBaseTreeShakeable=()=>createPart({feature:"buttonStyle",params:baseParams2,css:buttonStyleBaseCSS}),buttonStyleBase=makeButtonStyleBaseTreeShakeable(),makeButtonStyleQuartzTreeShakeable=()=>createPart({feature:"buttonStyle",params:{...baseParams2,buttonBackgroundColor:backgroundColor,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:accentColor}},css:buttonStyleBaseCSS}),buttonStyleQuartz=makeButtonStyleQuartzTreeShakeable(),makeButtonStyleAlpineTreeShakeable=()=>createPart({feature:"buttonStyle",params:{...baseParams2,buttonBackgroundColor:backgroundColor,buttonBorder:{color:accentColor},buttonFontWeight:600,buttonTextColor:accentColor,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBackgroundColor:accentColor,buttonActiveTextColor:backgroundColor},css:buttonStyleBaseCSS}),buttonStyleAlpine=makeButtonStyleAlpineTreeShakeable(),makeButtonStyleBalhamTreeShakeable=()=>createPart({feature:"buttonStyle",params:{...baseParams2,buttonBorder:{color:foregroundColor,width:2,style:"outset"},buttonActiveBorder:{color:foregroundColor,width:2,style:"inset"},buttonBackgroundColor:foregroundBackgroundMix(.07),buttonHoverBackgroundColor:backgroundColor,buttonVerticalPadding:{calc:"spacing * 0.5"}},css:buttonStyleBaseCSS}),buttonStyleBalham=makeButtonStyleBalhamTreeShakeable(),columnDropStyleBorderedCSS=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",columnDropStylePlainCSS=".ag-column-drop-vertical-empty-message{color:var(--ag-subtle-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600;padding-top:var(--ag-spacing)}:where(.ag-ltr) .ag-column-drop-vertical-empty-message{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing));padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-column-drop-vertical-empty-message{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing))}",makeColumnDropStyleBorderedTreeShakeable=()=>createPart({feature:"columnDropStyle",css:columnDropStyleBorderedCSS}),columnDropStyleBordered=makeColumnDropStyleBorderedTreeShakeable(),makeColumnDropStylePlainTreeShakeable=()=>createPart({feature:"columnDropStyle",css:columnDropStylePlainCSS}),columnDropStylePlain=makeColumnDropStylePlainTreeShakeable(),baseParams3={formulaToken1Color:"#3269c6",formulaToken1BackgroundColor:{ref:"formulaToken1Color",mix:.08},formulaToken1Border:{color:{ref:"formulaToken1Color"}},formulaToken2Color:"#c0343f",formulaToken2BackgroundColor:{ref:"formulaToken2Color",mix:.06},formulaToken2Border:{color:{ref:"formulaToken2Color"}},formulaToken3Color:"#8156b8",formulaToken3BackgroundColor:{ref:"formulaToken3Color",mix:.08},formulaToken3Border:{color:{ref:"formulaToken3Color"}},formulaToken4Color:"#007c1f",formulaToken4BackgroundColor:{ref:"formulaToken4Color",mix:.06},formulaToken4Border:{color:{ref:"formulaToken4Color"}},formulaToken5Color:"#b03e85",formulaToken5BackgroundColor:{ref:"formulaToken5Color",mix:.08},formulaToken5Border:{color:{ref:"formulaToken5Color"}},formulaToken6Color:"#b74900",formulaToken6BackgroundColor:{ref:"formulaToken6Color",mix:.06},formulaToken6Border:{color:{ref:"formulaToken6Color"}},formulaToken7Color:"#247492",formulaToken7BackgroundColor:{ref:"formulaToken7Color",mix:.08},formulaToken7Border:{color:{ref:"formulaToken7Color"}}},makeBatchEditStyleBaseTreeShakeable2=()=>createPart({feature:"formulaStyle",params:baseParams3}),formulaStyleBase=makeBatchEditStyleBaseTreeShakeable2(),gridThemeLogger={warn:(...e)=>{_warn(e[0],e[1])},error:(...e)=>{_error(e[0],e[1])},preInitErr:(...e)=>{_logPreInitErr(e[0],e[2],e[1])}},createTheme=()=>createSharedTheme(gridThemeLogger).withParams(coreDefaults).withPart(buttonStyleQuartz).withPart(columnDropStyleBordered).withPart(batchEditStyleBase).withPart(formulaStyleBase),checkboxStyleDefaultCSS='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color)}&:where(.ag-checked):after{background-color:var(--ag-checkbox-checked-shape-color)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input,.ag-radio-button-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}.ag-checkbox-input-wrapper:after,.ag-radio-button-input-wrapper:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}.ag-checkbox-input-wrapper:where(:focus-within,:active),.ag-radio-button-input-wrapper:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color)}&:where(.ag-indeterminate):after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',makeCheckboxStyleDefaultTreeShakeable=()=>createPart({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:backgroundColor,checkboxUncheckedBorderColor:foregroundBackgroundMix(.3),checkboxCheckedBackgroundColor:accentColor,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:backgroundColor,checkboxIndeterminateBackgroundColor:foregroundBackgroundMix(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:backgroundColor,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:checkboxStyleDefaultCSS}),checkboxStyleDefault=makeCheckboxStyleDefaultTreeShakeable(),makeColorSchemeLightTreeShakeable=()=>createPart({feature:"colorScheme",params:defaultLightColorSchemeParams}),colorSchemeLight=makeColorSchemeLightTreeShakeable(),makeColorSchemeLightWarmTreeShakeable=()=>createPart({feature:"colorScheme",params:{...defaultLightColorSchemeParams,foregroundColor:"#000000de",borderColor:"#60300026",chromeBackgroundColor:"#60300005"}}),colorSchemeLightWarm=makeColorSchemeLightWarmTreeShakeable(),makeColorSchemeLightColdTreeShakeable=()=>createPart({feature:"colorScheme",params:{...defaultLightColorSchemeParams,foregroundColor:"#000",chromeBackgroundColor:"#f3f8f8"}}),colorSchemeLightCold=makeColorSchemeLightColdTreeShakeable(),darkParams=()=>({...defaultLightColorSchemeParams,...baseDarkBatchEditParams,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:foregroundBackgroundMix(.05),rowHoverColor:accentMix(.15),selectedRowBackgroundColor:accentMix(.2),menuBackgroundColor:foregroundBackgroundMix(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:foregroundColor,findMatchColor:backgroundColor,findActiveMatchColor:backgroundColor,checkboxUncheckedBorderColor:foregroundBackgroundMix(.4),toggleButtonOffBackgroundColor:foregroundBackgroundMix(.4),rowBatchEditBackgroundColor:foregroundBackgroundMix(.1),formulaToken1Color:"#4da3e5",formulaToken2Color:"#f55864",formulaToken3Color:"#b688f2",formulaToken4Color:"#24bb4a",formulaToken5Color:"#e772ba",formulaToken6Color:"#f69b5f",formulaToken7Color:"#a3e6ff"}),makeColorSchemeDarkTreeShakeable=()=>createPart({feature:"colorScheme",params:darkParams()}),colorSchemeDark=makeColorSchemeDarkTreeShakeable(),makeColorSchemeDarkWarmTreeShakeable=()=>createPart({feature:"colorScheme",params:{backgroundColor:"hsl(29, 10%, 17%)",foregroundColor:"#FFF",browserColorScheme:"dark"}}),darkBlueParams=()=>({...darkParams(),backgroundColor:"#1f2836"}),colorSchemeDarkWarm=makeColorSchemeDarkWarmTreeShakeable(),makeColorSchemeDarkBlueTreeShakeable=()=>createPart({feature:"colorScheme",params:darkBlueParams()}),colorSchemeDarkBlue=makeColorSchemeDarkBlueTreeShakeable(),makeColorSchemeVariableTreeShakeable=()=>createPart({feature:"colorScheme",params:defaultLightColorSchemeParams,modeParams:{light:defaultLightColorSchemeParams,dark:darkParams(),"dark-blue":darkBlueParams()}}),colorSchemeVariable=makeColorSchemeVariableTreeShakeable(),iconSetBalhamCSS=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M22 12h-2v-2h-8v.092c.056 1.352 3.426 2.598 4.472 4.404.682 1.174.438 2.754-.572 3.72C14.29 19.618 12 20.924 12 22h8v-2h2v4H10c0-1.586-.098-3.304 1.016-4.314 1.904-1.632 4.89-3.108 3.54-4.42-1.918-1.68-4.464-2.936-4.554-5.12L10 8h12z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='m6.414 17 2.294 2.292-1.416 1.416L2.586 16l4.706-4.708 1.416 1.416L6.414 15H15V6.414l-2.292 2.294-1.416-1.416L16 2.586l4.708 4.706-1.416 1.416L17 6.414V15h8.586l-2.294-2.292 1.416-1.416L29.414 16l-4.706 4.708-1.416-1.416L25.586 17H17v8.586l2.292-2.294 1.416 1.416L16 29.414l-4.708-4.706 1.416-1.416L15 25.586V17z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 4C9.378 4 4 9.378 4 16s5.378 12 12 12 12-5.378 12-12S22.622 4 16 4m0 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S6 21.52 6 16 10.48 6 16 6m0 8.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M14 25h-2V7h2zm6 0h-2V7h2zm6 0h-2V7h2zM8 25H6V7h2z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M21.929 27.999h-7.828a5.09 5.09 0 0 1-5.086-5.086v-9.812a5.087 5.087 0 0 1 5.086-5.086h7.828a5.09 5.09 0 0 1 5.086 5.086v9.812a5.087 5.087 0 0 1-5.086 5.086m.16-17.984h-8.088a2.94 2.94 0 0 0-2.938 2.938v10.132a2.94 2.94 0 0 0 2.938 2.938h8.088a2.94 2.94 0 0 0 2.936-2.938V12.953a2.94 2.94 0 0 0-2.936-2.938M7.041 26.013h-2.05a4 4 0 0 1-.006-.228V9.065a5.07 5.07 0 0 1 5.064-5.064h12.812q.069 0 .134.002v2.012H9.915a2.876 2.876 0 0 0-2.874 2.874z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 24 24'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m16 14.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14.703 15.096 6.215 4.719a1 1 0 1 1 1.548-1.267l13.058 15.965A5.001 5.001 0 0 1 28 23.916a5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 4.98 4.98 0 0 1 1.23-3.283l-3.238-3.958-3.272 4.001a4.98 4.98 0 0 1 1.265 3.323 5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 5 5 0 0 1 7.13-4.522zM8.991 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M23 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1m-5.723-8.852 1.292 1.579 7.205-8.808a1 1 0 0 0-1.548-1.267z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M9.304 7.89a15.2 15.2 0 0 1 6.404-1.638c.294-.002.292-.002.584 0 5.956.174 11.328 4.088 13.62 9.748 0 0-1.318 3.178-3.224 5.174a13.6 13.6 0 0 1-2.226 1.874L26.414 25 25 26.414l-2.336-2.336C17.866 26.396 11.776 26.15 7.36 22.96a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.218 2.002-3.718a14.6 14.6 0 0 1 3.442-3.334L5.586 7 7 5.586zm-.3 2.528c-2.038 1.344-3.708 3.246-4.724 5.508L4.248 16c2.46 5.762 9.622 9.064 15.63 7.15q.688-.219 1.342-.516l-.912-.912a6.96 6.96 0 0 1-4.19 1.394c-3.862 0-7-3.136-7-7 0-1.57.52-3.022 1.394-4.19zm14.032 11.204a13.25 13.25 0 0 0 4.684-5.548l.032-.074c-1.984-4.646-6.834-7.798-12.006-7.748-1.712.05-3.386.458-4.922 1.158l1.102 1.102a6.97 6.97 0 0 1 4.192-1.396 7.003 7.003 0 0 1 5.606 11.192zm-11.09-8.262a5.003 5.003 0 0 0 6.928 6.928zm8.342 5.514a5.002 5.002 0 0 0-6.928-6.928z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16.292 6.32c5.956.174 11.328 4.086 13.62 9.746 0 0-1.318 3.18-3.224 5.176-4.862 5.088-13.534 5.97-19.328 1.784a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.216 2.002-3.716 2.678-3.64 7.03-5.896 11.618-6.03.294-.004.292-.004.584 0m-.546 2c-4.896.142-9.458 3.202-11.466 7.672l-.032.074c2.46 5.762 9.622 9.066 15.63 7.152 3.458-1.102 6.342-3.738 7.842-7.076l.032-.076C25.768 11.42 20.918 8.27 15.746 8.32m.254.946c3.754 0 6.8 3.048 6.8 6.8 0 3.754-3.046 6.8-6.8 6.8s-6.8-3.046-6.8-6.8c0-3.752 3.046-6.8 6.8-6.8m5 6.768V16c0-2.76-2.24-5-5-5s-5 2.24-5 5v.066c0 2.76 2.24 5 5 5s5-2.24 5-5z'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M26 8.184c-.066 2.658-4.058 5.154-6.742 7.974a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h20zM8 8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.066-2.658 4.058-5.154 6.742-7.974.198-.23.258-.538.258-.842z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.354 8.708 17.06 16l7.294 7.292-1.416 1.416L14.232 16l8.706-8.708zM9.646 8v16h-2V8z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M14 21h-4v-2h4zm12 0H16v-2h10zm-12-4h-4v-2h4zm12 0H16v-2h10zm-16-4H6v-2h4zm16 0H12v-2h14z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m17.768 16-8.706 8.708-1.416-1.416L14.94 16 7.646 8.708l1.416-1.416zm6.586 8h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='m17.621 11-2 2h12.586v6H15.621l2 2-4.414 4.414L3.793 16l9.414-9.414zm-11 5 6.586 6.586L14.793 21l-4-4h15.414v-2H10.793l4-4-1.586-1.586z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M17.138 13.418a1.03 1.03 0 0 0-.298.658s.125.096.226.178c1.372 1.114 2.033 3.039 1.582 4.796a4.7 4.7 0 0 1-1.205 2.123c-1.145 1.151-2.296 2.294-3.445 3.441-1.241 1.232-3.185 1.691-4.864 1.105-1.546-.54-2.756-1.938-3.048-3.572-.267-1.496.246-3.108 1.319-4.186l.578-.578-.03-.092a10.5 10.5 0 0 1-.452-2.3v-.005c-.776.775-1.621 1.489-2.275 2.396-1.817 2.522-1.643 6.323.706 8.669 1.813 1.811 4.708 2.462 7.171 1.517a6.75 6.75 0 0 0 2.336-1.518l3.427-3.424c1.939-1.954 2.533-5.126 1.294-7.674a6.8 6.8 0 0 0-2.071-2.481l-.003-.002zM21.265 4a6.8 6.8 0 0 0-4.734 1.964l-3.427 3.424c-1.961 1.977-2.52 5.092-1.32 7.619a6.8 6.8 0 0 0 2.098 2.537l.003.002c.32-.32.643-.637.96-.96.167-.172.27-.401.286-.64l-.204-.167c-1.603-1.287-2.215-3.68-1.316-5.616a4.7 4.7 0 0 1 .918-1.32c1.145-1.151 2.296-2.294 3.445-3.441 1.239-1.23 3.178-1.694 4.864-1.105 1.83.639 3.16 2.498 3.12 4.493a4.8 4.8 0 0 1-1.391 3.265l-.578.578.03.092c.235.743.387 1.519.452 2.3v.005c.732-.731 1.521-1.406 2.162-2.244 1.192-1.559 1.643-3.651 1.204-5.575a6.8 6.8 0 0 0-3.98-4.703 6.8 6.8 0 0 0-2.529-.506h-.061z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='m7.54 17.4.1 6.98 6.96.1-2.24-2.24L16 18.6 13.4 16l-3.64 3.64zm16.92-2.8-.1-6.98-6.96-.1 2.24 2.24L16 13.4l2.6 2.6 3.64-3.64z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M26 23H6v-2h20zm0-6H6v-2h20zm0-6H6V9h20z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath fill='%23000' d='M16 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='m14.8 24.26-.1-6.96-6.96-.1 2.24 2.24-3.64 3.64 2.6 2.6 3.64-3.64zm2.4-16.52.1 6.96 6.96.1-2.24-2.24 3.64-3.64-2.6-2.6-3.64 3.64z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142m-1.414 6.07h16.97v2.002H7.515z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='m10.044 21.258 4.478-4.198L16 18.444 9 25l-7-6.556 1.478-1.384 4.478 4.198V7h2.088zm14 3.742h-2.088V10.742l-4.478 4.198L16 13.556 23 7q3.5 3.28 7 6.556l-1.478 1.384-4.478-4.198z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16.186 3.646c8.188.154 14.898 9.796 11.17 17.78-3.298 7.066-13.932 9.374-19.848 3.87-3.9-3.632-5.076-9.896-2.684-14.708 2.082-4.19 6.588-6.974 11.362-6.942m-.298 1.998c-6.922.132-12.578 8.308-9.33 15.052 3.342 6.934 15.246 7.646 18.932 0 3.076-6.386-1.988-15.1-9.602-15.052m7.596 6.422c2.864 5.33-1.744 13.186-8.306 12.536a8.6 8.6 0 0 1-3.232-.998l-1.266-.706L22.778 10.8q.351.633.706 1.266m-9.422 10.276c3.296 1.028 7.246-1.006 8.216-4.418a6.6 6.6 0 0 0-.056-3.742zm2.104-14.696a8.8 8.8 0 0 1 3.936 1.038l1.266.706L9.27 21.488c-3.018-5.41-.99-13.37 6.318-13.834q.289-.01.578-.008m-.31 2c-4.06.154-7.23 4.614-6.03 8.46l8.16-8.16a6.8 6.8 0 0 0-2.13-.3'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M20 6.5c0-1-1-3-4-3s-4 2-4 3H8c-2.21 0-4 1.79-4 4v14c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-14c0-2.21-1.79-4-4-4zm-4 .546c.734 0 1.334.572 1.334 1.272S16.734 9.59 16 9.59s-1.334-.572-1.334-1.272.6-1.272 1.334-1.272M24 26.5H8a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h2v4h12v-4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008c-1.358-.022-2.714-.026-4.07-.022v4.034h4.07z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142M15 15l-.001-7.485h2.002L17 15l7.485-.001v2.002L17 17l.001 7.485h-2.002L15 17l-7.485.001v-2.002z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m28.207 16-9.414 9.414L14.379 21l2-2H3.793v-6h12.586l-2-2 4.414-4.414zm-11-5 4 4H5.793v2h15.414l-4 4 1.586 1.586L25.379 16l-6.586-6.586z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='m24.708 19.645-1.416 1.416L16 13.767l-7.292 7.294-1.416-1.416L16 10.939z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='M24.708 10.855 13 22.561l-5.708-5.706 1.416-1.416L13 19.733 23.292 9.439z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6 15h20v2H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M5.35 3.999a.2.2 0 0 0-.14.058c-.388.38-.768.768-1.152 1.152a.21.21 0 0 0-.002.288c7.459 7.506 14.965 14.965 22.447 22.447a.21.21 0 0 0 .288.002q.576-.574 1.151-1.151a.21.21 0 0 0 .002-.288C20.484 19.002 12.979 11.542 5.497 4.06a.2.2 0 0 0-.146-.061zm.611 12.548c-1.933 1.939-2.538 5.119-1.289 7.688a6.79 6.79 0 0 0 4.891 3.672 6.82 6.82 0 0 0 5.893-1.866l1.984-1.984-1.438-1.438-1.986 1.986c-1.486 1.476-3.993 1.81-5.834.629a4.73 4.73 0 0 1-2.024-2.853 4.76 4.76 0 0 1 1.241-4.393l1.986-1.986-1.438-1.438-1.984 1.984zM21.273 3.999a6.78 6.78 0 0 0-4.727 1.963l-1.984 1.984L16 9.384l1.985-1.985a4.74 4.74 0 0 1 2.776-1.338c1.974-.224 4.045.926 4.845 2.834.712 1.699.329 3.778-1.004 5.12L22.616 16l1.439 1.438q1-1 2-2c2.012-2.031 2.557-5.368 1.112-7.982-1.144-2.07-3.432-3.441-5.834-3.459h-.061z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M23.182 5a3.82 3.82 0 0 1 2.83 6.383l-.131.137-2.09 2.088a1 1 0 0 1-.084.099 1 1 0 0 1-.098.084L12.533 24.869a3 3 0 0 1-1.245.746l-4.353 1.32-.003.002a1.5 1.5 0 0 1-1.87-1.867l.003-.004 1.32-4.352v-.003l.06-.174c.13-.344.321-.661.565-.936l.126-.135L18.209 8.39a1 1 0 0 1 .18-.181l2.092-2.09.137-.132A3.82 3.82 0 0 1 23.182 5M8.548 20.883a1 1 0 0 0-.25.415l-1.049 3.451 3.457-1.048.114-.042q.17-.076.301-.206l10.458-10.46-2.572-2.572zM23.182 7c-.482 0-.946.19-1.287.531v.001l-1.474 1.475 2.572 2.572 1.474-1.474.121-.133A1.82 1.82 0 0 0 23.182 7'/%3E%3C/svg%3E")}`,iconSetBalham=createPart({feature:"iconSet",css:iconSetBalhamCSS}),iconSetAlpineCSS=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24 6H8v2l8 8-8 8v2h16v-2H11l8-8-8-8h13z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 11.171 2.687 16l4.828 4.829-1.414 1.414L-.142 16l6.243-6.243zm16.97 0 1.414-1.414L32.142 16l-6.243 6.243-1.414-1.414L29.313 16zM16.028 13.2l2.829 2.828-2.829 2.829-2.828-2.829zm-4.857 11.285L16 29.313l4.829-4.828 1.414 1.414L16 32.142l-6.243-6.243zm0-16.97L9.757 6.101 16-.142l6.243 6.243-1.414 1.414L16 2.687z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667A13.32 13.32 0 0 0 2.667 16c0 7.373 5.96 13.333 13.333 13.333S29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M14 7h4v18h-4zM8 17h4v8H8zM20 13h4v12h-4z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26 25H6V7h20zM12 11H8v12h4zm6 0h-4v12h4zm6 12V11h-4v12z' style='fill-rule:nonzero' transform='translate(0 -1)'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m12 6 10 10-10 10-2-2 8-8-8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.984 13.894 27.05 2.828l2.122 2.122-11.066 11.066 11.066 11.066-2.122 2.12-11.066-11.066L4.918 29.202l-2.12-2.12 11.066-11.066L2.798 4.95l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M13.775 15.198 3.835 2.945a1.501 1.501 0 0 1 2.33-1.89l14.997 18.488A6.003 6.003 0 0 1 29.657 25c0 3.311-2.688 6-6 6s-6-2.689-6-6c0-1.335.437-2.569 1.176-3.566l-3.127-3.855-3.001 3.7A5.97 5.97 0 0 1 14 25c0 3.311-2.689 6-6 6s-6-2.689-6-6a6.003 6.003 0 0 1 8.315-5.536zm9.882 6.702a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M8 21.95a3.05 3.05 0 1 0 .001 6.101A3.05 3.05 0 0 0 8 21.95m9.63-11.505 1.932 2.381 8.015-9.881a1.5 1.5 0 0 0-2.329-1.89z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 26 10 16 20 6l2 2-8 8 8 8z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath fill='%23000' fill-rule='nonzero' d='M8.95 10.364 7 8.414 8.414 7l2.32 2.32A13.2 13.2 0 0 1 16.5 8c5.608 0 10.542 3.515 12.381 8.667L29 17l-.119.333a13 13 0 0 1-4.255 5.879l1.466 1.466-1.414 1.414-1.754-1.753A13.2 13.2 0 0 1 16.5 26c-5.608 0-10.542-3.515-12.381-8.667L4 17l.119-.333a13 13 0 0 1 4.83-6.303m1.445 1.445A11.02 11.02 0 0 0 6.148 17c1.646 4.177 5.728 7 10.352 7 1.76 0 3.441-.409 4.94-1.146l-1.878-1.878A5.06 5.06 0 0 1 16.5 22c-2.789 0-5.05-2.239-5.05-5 0-1.158.398-2.223 1.065-3.07zm1.855-.974 1.794 1.795A5.07 5.07 0 0 1 16.5 12c2.789 0 5.05 2.239 5.05 5 0 .9-.24 1.745-.661 2.474l2.305 2.306A11 11 0 0 0 26.852 17c-1.646-4.177-5.728-7-10.352-7-1.495 0-2.933.295-4.25.835'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16.5 23c4.624 0 8.706-2.823 10.352-7-1.646-4.177-5.728-7-10.352-7s-8.706 2.823-10.352 7c1.646 4.177 5.728 7 10.352 7M4.119 15.667C5.958 10.515 10.892 7 16.5 7s10.542 3.515 12.381 8.667L29 16l-.119.333C27.042 21.485 22.108 25 16.5 25S5.958 21.485 4.119 16.333L4 16zM16.5 21c2.789 0 5.049-2.239 5.049-5s-2.26-5-5.049-5-5.049 2.239-5.049 5 2.26 5 5.049 5' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m28 8-8 8v5l-6 6V16L6 8V6h22zM9 8l7 7v7l2-2v-5l7-7z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 7v1H9V7zm0-3v1H5.001V4zm-7 7H5v-1h2zm0-3H5V7h2zM3 5H1V4h2zm11 5v1H9v-1zm-7 4H5v-1h2zm7-1v1H9v-1z' style='fill-rule:nonzero' transform='matrix(2 0 0 2 0 -2)'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333a6.67 6.67 0 0 0-6.667 6.667 6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133 4.136 4.136 0 0 1-4.133 4.133h-5.333v2.533h5.333a6.67 6.67 0 0 0 6.667-6.667 6.67 6.67 0 0 0-6.667-6.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z' style='fill-rule:nonzero' transform='translate(-3.692 -3.692)scale(1.23077)'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 30H2V18h2.828v7.05l8.254-8.252 2.12 2.12-8.252 8.254H14zm4-28h12v12h-2.828V6.95l-8.254 8.252-2.12-2.12 8.252-8.254H18z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 13H0v-2h20zm0-6H0V5h20zm0-6H0v-2h20z' style='fill-rule:nonzero' transform='translate(6 9)'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 27a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M2 18h12v12h-2.828v-7.05l-8.254 8.252-2.12-2.12 8.252-8.254H2zm28-4H18V2h2.828v7.05L29.082.798l2.12 2.12-8.252 8.254H30z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.94 6 9.06 7.88 17.167 16 9.06 24.12 10.94 26l10-10z' style='fill-rule:nonzero' transform='translate(1)'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M23.708 14.645 16 6.939l-7.708 7.706 1.416 1.416L16 9.767l6.292 6.294zM23.708 20.355 16 28.061l-7.708-7.706 1.416-1.416L16 25.233l6.292-6.294z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.334 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4M16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008a213 213 0 0 0-4.07-.022v4.034h4.07z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.94 7.88 20.06 6l-10 10 10 10 1.88-1.88L13.833 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.708 2.355 8 10.061.292 2.355 1.708.939 8 7.233 14.292.939z' style='fill-rule:nonzero' transform='translate(8 14)'/%3E%3Cpath d='M5 26h22v2H5zM15 4h2v18h-2z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 10.667 16 21.334l8.667-10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.333 7.334 10.666 16l10.667 8.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.667 24.666 21.334 16 10.667 7.333z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 21.333 16 10.666l8.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M11.586 22.96 27.718 6.828 29.84 8.95 11.586 27.202 2.4 18.016l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m11.94 6-1.88 1.88L18.167 16l-8.107 8.12L11.94 26l10-10z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6 13.5h20v3H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.12 9.06 16 17.167 7.88 9.06 6 10.94l10 10 10-10z' style='fill-rule:nonzero' transform='translate(0 1)'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M6.222 25.778h1.611l14.834-14.811-1.611-1.611-14.834 14.81zM4 28v-4.733L22.644 4.656a2.26 2.26 0 0 1 1.567-.634q.423 0 .833.167.412.166.734.478l1.589 1.6q.333.322.483.733t.15.822q0 .423-.161.839-.162.416-.472.728L8.733 28zm17.856-17.833-.8-.811 1.61 1.61z'/%3E%3C/svg%3E")}`,iconSetAlpine=createPart({feature:"iconSet",css:iconSetAlpineCSS}),iconSetMaterialCSS=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M24 5.333H8V8l8.667 8L8 24v2.667h16v-4h-9.333L21.334 16l-6.667-6.667H24z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='M13.333 11.556h5.333V8h3.556L16 1.778 9.778 8h3.556zm-1.777 1.777H8V9.777l-6.222 6.222L8 22.221v-3.556h3.556zM30.222 16 24 9.778v3.556h-3.556v5.333H24v3.556l6.222-6.222zm-11.555 4.444h-5.333V24H9.778L16 30.222 22.222 24h-3.556z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 2.667C8.627 2.667 2.667 8.627 2.667 16S8.627 29.333 16 29.333 29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M5.333 10.667h5.333V5.334H5.333zm8 16h5.333v-5.333h-5.333zm-8 0h5.333v-5.333H5.333zm0-8h5.333v-5.333H5.333zm8 0h5.333v-5.333h-5.333zm8-13.334v5.333h5.333V5.333zm-8 5.334h5.333V5.334h-5.333zm8 8h5.333v-5.333h-5.333zm0 8h5.333v-5.333h-5.333z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m25.333 8.547-1.88-1.88L16 14.12 8.547 6.667l-1.88 1.88L14.12 16l-7.453 7.453 1.88 1.88L16 17.88l7.453 7.453 1.88-1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m19 3-6 6 2 2 7-7V3m-10 9.5a.503.503 0 0 1-.5-.5c0-.274.226-.5.5-.5s.5.226.5.5-.226.5-.5.5M6 20c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2M6 8c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2m3.64-.36c.23-.5.36-1.05.36-1.64 0-2.194-1.806-4-4-4S2 3.806 2 6s1.806 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.194 0-4 1.806-4 4s1.806 4 4 4 4-1.806 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1z' style='fill-rule:nonzero' transform='translate(4 4)'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M21.106 15.088A5.19 5.19 0 0 0 16 10.814a5.17 5.17 0 0 0-3.668 1.522L9.866 9.868a12.2 12.2 0 0 1 6.133-1.646c5.186 0 9.614 3.225 11.408 7.778a12.34 12.34 0 0 1-5.276 6.133l-2.468-2.466a5.17 5.17 0 0 0 1.449-2.802h-2.123c-.148.508-.42.964-.782 1.33l-1.33-1.33h-2.514l2.196 2.196q-.272.049-.56.05a3.11 3.11 0 0 1-2.99-2.245h-2.123a5.19 5.19 0 0 0 7.3 3.836l2.247 2.247a12.2 12.2 0 0 1-4.434.828c-5.186 0-9.614-3.225-11.408-7.778a12.3 12.3 0 0 1 3.781-5.111l2.924 2.924a5.1 5.1 0 0 0-.404 1.275h4.206l-1.296-1.296a3.1 3.1 0 0 1 2.196-.903c1.404 0 2.587.924 2.976 2.199h2.13z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16 8.222c-5.186 0-9.614 3.225-11.408 7.778 1.794 4.553 6.222 7.778 11.408 7.778S25.614 20.553 27.408 16C25.614 11.447 21.186 8.222 16 8.222m0 12.964c-2.862 0-5.186-2.324-5.186-5.186s2.324-5.186 5.186-5.186 5.186 2.324 5.186 5.186-2.324 5.186-5.186 5.186m0-8.297c-1.721 0-3.111 1.39-3.111 3.111s1.39 3.111 3.111 3.111 3.111-1.39 3.111-3.111-1.39-3.111-3.111-3.111'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M13.333 24h5.333v-2.667h-5.333zM4 8v2.667h24V8zm4 9.333h16v-2.667H8z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M18.667 21.333h8.889A3.555 3.555 0 0 1 24 24.889h-5.333zm8.888-7.111v3.556h-8.889v-3.556zM24 7.111a3.555 3.555 0 0 1 3.556 3.556h-16V7.111zm-8.889 17.778h-3.556v-3.556h3.556zm0-7.111h-3.556v-3.556h3.556zM8 10.667H4.444A3.555 3.555 0 0 1 8 7.111z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227v-2.667z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333c-3.68 0-6.667 2.987-6.667 6.667s2.987 6.667 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333c2.28 0 4.133 1.853 4.133 4.133s-1.853 4.133-4.133 4.133h-5.333v2.533h5.333c3.68 0 6.667-2.987 6.667-6.667s-2.987-6.667-6.667-6.667z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='m17.778 11.708 3.25-3.251 2.516 2.516-3.251 3.25h4.597v3.556h-4.597l3.251 3.25-2.516 2.516-3.25-3.251v4.597h-3.556v-4.597l-3.25 3.251-2.516-2.516 3.251-3.25H7.11v-3.556h4.597l-3.251-3.25 2.516-2.516 3.25 3.251V7.111h3.556zm-3.251 7.847h2.944l2.084-2.084v-2.944l-2.084-2.084h-2.944l-2.084 2.084v2.944z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='M4 4h24v2.667H4z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M4 24h24v-2.667H4zm0-6.667h24v-2.667H4zM4 8v2.667h24V8z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 26.667a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 24q0-1.1.784-1.883A2.57 2.57 0 0 1 16 21.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 16q0-1.1.784-1.883A2.57 2.57 0 0 1 16 13.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 8q0-1.1.784-1.883A2.57 2.57 0 0 1 16 5.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='M8 25.333h16V28H8z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='M4 24h16v-2.667H4zM4 8v2.667h24V8zm0 9.333h24v-2.667H4z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M25.333 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4zM16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m11.106 22.093-4.444 4.444-1.259-1.259 4.444-4.444zm5.872-16.63 9.618 9.62-.962.962-.962-.962-7.694 3.847 1.924 1.924-2.74 2.74-7.696-7.696 2.741-2.74 1.924 1.925 3.847-7.696-.962-.962z'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M26.667 30.223H5.334a3.556 3.556 0 0 1-3.556-3.556V5.334a3.556 3.556 0 0 1 3.556-3.556h21.333a3.556 3.556 0 0 1 3.556 3.556v21.333a3.556 3.556 0 0 1-3.556 3.556m-16-8.89H5.334v5.333h5.333zm16-7.11H12.444v12.444h14.223zm-9.15 6.85-2.039 2.037 2.039 2.039-1.257 1.257-3.295-3.296 3.295-3.295q.63.628 1.257 1.257zm-6.85-6.85H5.334v5.333h5.333zm15.74 3.816-1.257 1.256-2.039-2.037-2.037 2.037-1.257-1.256 3.295-3.296zM10.667 5.333H5.334v5.333h5.333zm8.889 0h-7.112v5.333h7.112zm7.111 0h-5.333v5.333h5.333z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M9.333 12.667 16 19.334l6.667-6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M19.333 9.333 12.666 16l6.667 6.667V9.334z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='M12.667 22.667 19.334 16l-6.667-6.667v13.333z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='M9.333 19.333 16 12.666l6.667 6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='m11.727 21.167-5.56-5.56-1.893 1.88 7.453 7.453 16-16-1.88-1.88z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6.667 14.667h18.667v2.667H6.667z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M22.12 11.06 16 17.167 9.88 11.06 8 12.94l8 8 8-8z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M26.667 12H5.334v2.667h21.333zM5.333 20h21.333v-2.667H5.333z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11'/%3E%3Cpath fill='currentColor' d='M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28zM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972z'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22M3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22M12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M18.666 24h-5.333v-2.667h5.333zM24 17.333H8v-2.667h16zm3.59-9.344h3.221v2.657h-3.22v3.22h-2.656v-3.22h-3.221V7.989h3.22V4.77h2.657zm-8.582 2.678H4V8h15.008z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M6.222 25.778h1.611l14.834-14.811-1.611-1.611-14.834 14.81zM4 28v-4.733L22.644 4.656a2.26 2.26 0 0 1 1.567-.634q.423 0 .833.167.412.166.734.478l1.589 1.6q.333.322.483.733t.15.822q0 .423-.161.839-.162.416-.472.728L8.733 28zm17.856-17.833-.8-.811 1.61 1.61z'/%3E%3C/svg%3E")}`,iconSetMaterial=createPart({feature:"iconSet",css:iconSetMaterialCSS}),iconOverrides=e=>{const t=[];if(e.type==="image"){const{icons:i,mask:o}=e;for(const s of Object.keys(i)){const n=imageValueToCss(i[s]);o?t.push(`.ag-icon-${s}::before { mask-image: ${n}; }`):t.push(`.ag-icon-${s}::before { background-image: ${n}; ${unsetMaskIcon} }`)}}if(e.type==="font"){const{family:i,weight:o,color:s,icons:n}=e;let r=unsetMaskIcon;i&&(r+=` font-family: ${fontFamilyValueToCss(i)};`),o&&(r+=` font-weight: ${fontWeightValueToCss(o)};`),s&&(r+=` color: ${colorValueToCss(s)};`);for(const l of Object.keys(n))t.push(`.ag-icon-${l}::before { content: ${JSON.stringify(n[l])}; ${r} }`)}return createPart({css:t.join(`;
|
|
`),cssImports:e.cssImports})},unsetMaskIcon="background-color: unset; mask-image: unset; -webkit-mask-image: unset;",iconNameToSvgFragment={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>'},iconNameToFullSvg={aasc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2012 8.07928C13.6346 8.0793 14.0128 8.15365 14.3359 8.30193C14.6609 8.45018 14.9141 8.65595 15.0947 8.9201C15.2754 9.18439 15.3683 9.49109 15.374 9.83904H14.1904C14.1676 9.60898 14.0695 9.4303 13.8965 9.30291C13.7235 9.1756 13.4889 9.1115 13.1924 9.1115C12.9909 9.1115 12.8204 9.1404 12.6816 9.19744C12.543 9.25255 12.4364 9.32917 12.3623 9.42791C12.2901 9.52678 12.2539 9.63933 12.2539 9.76482C12.2501 9.8692 12.272 9.9604 12.3193 10.0383C12.3688 10.1162 12.4369 10.1843 12.5225 10.2414C12.6079 10.2964 12.7064 10.3451 12.8184 10.3869C12.9304 10.4268 13.0505 10.4609 13.1777 10.4894L13.7031 10.6144C13.9578 10.6715 14.1914 10.7479 14.4043 10.8429C14.6173 10.938 14.8021 11.0547 14.958 11.1935C15.1138 11.3323 15.2348 11.4957 15.3203 11.6838C15.4077 11.8719 15.4522 12.088 15.4541 12.3312C15.4522 12.6885 15.3611 12.9986 15.1807 13.2609C15.0019 13.5214 14.7427 13.7248 14.4043 13.8693C14.0678 14.0118 13.6617 14.0832 13.1865 14.0832C12.7153 14.0832 12.3048 14.0107 11.9551 13.8664C11.6071 13.7219 11.3345 13.5071 11.1387 13.2238C10.9449 12.9387 10.8435 12.5862 10.834 12.1662H12.0283C12.0416 12.362 12.0984 12.5252 12.1973 12.6564C12.298 12.7857 12.4323 12.8838 12.5996 12.9504C12.7688 13.0149 12.96 13.047 13.1729 13.047C13.3817 13.047 13.563 13.0169 13.7168 12.9562C13.8727 12.8954 13.9935 12.8106 14.0791 12.7023C14.1647 12.5939 14.208 12.469 14.208 12.3283C14.2079 12.1974 14.1686 12.0875 14.0908 11.9982C14.0148 11.9089 13.9022 11.8324 13.7539 11.7697C13.6076 11.707 13.4276 11.6501 13.2148 11.5988L12.5791 11.4387C12.0869 11.3189 11.6982 11.1318 11.4131 10.8771C11.128 10.6224 10.9855 10.2793 10.9873 9.84783C10.9854 9.49418 11.0804 9.18439 11.2705 8.9201C11.4625 8.65603 11.7261 8.45015 12.0605 8.30193C12.3951 8.15369 12.7754 8.07928 13.2012 8.07928Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 14.0002H4.48926L4.05664 12.6681H1.94824L1.51465 14.0002H0.19043L2.20703 8.15935H3.79883L5.8125 14.0002ZM2.26172 11.7043H3.74316L3.02539 9.49334H2.98047L2.26172 11.7043Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 8.15935C8.88165 8.15935 9.24031 8.22251 9.52734 8.34978C9.81445 8.47717 10.0303 8.65477 10.1748 8.88103C10.3192 9.10536 10.3916 9.36368 10.3916 9.65642C10.3916 9.88452 10.3461 10.085 10.2549 10.258C10.1637 10.4289 10.0384 10.5696 9.87891 10.6799C9.72117 10.7882 9.54024 10.8657 9.33691 10.9113V10.9679C9.55917 10.9775 9.76716 11.0406 9.96094 11.1564C10.1568 11.2724 10.3158 11.4356 10.4375 11.6447C10.5591 11.8519 10.6201 12.099 10.6201 12.3859C10.6201 12.6958 10.5427 12.9727 10.3887 13.216C10.2366 13.4573 10.0113 13.6486 9.71289 13.7892C9.41443 13.9299 9.04655 14.0002 8.60938 14.0002H6.11426V8.15935H8.45215ZM7.34863 12.9904H8.35547C8.69943 12.9904 8.95057 12.9252 9.1084 12.7941C9.26621 12.661 9.34473 12.4834 9.34473 12.2629C9.34468 12.1014 9.30643 11.9587 9.22852 11.8351C9.15056 11.7116 9.03903 11.6145 8.89453 11.5441C8.75195 11.4738 8.58148 11.4387 8.38379 11.4387H7.34863V12.9904ZM7.34863 10.6037H8.26465C8.43369 10.6036 8.58376 10.5737 8.71484 10.5148C8.84793 10.454 8.95227 10.3683 9.02832 10.258C9.10628 10.1477 9.14551 10.0155 9.14551 9.8615C9.14546 9.65055 9.07008 9.48001 8.91992 9.35076C8.77165 9.22169 8.56064 9.15741 8.28711 9.1574H7.34863V10.6037Z" fill="black"/><path d="M7.16602 0.377127C7.44584 0.189493 7.82551 0.20905 8.08496 0.442557L11.418 3.44256C11.7257 3.71966 11.7507 4.19428 11.4736 4.50213C11.1966 4.80961 10.7228 4.83441 10.415 4.55779L7.60938 2.03338L5.11328 4.53045C4.82042 4.82326 4.34562 4.82322 4.05273 4.53045C3.75986 4.23757 3.75989 3.7628 4.05273 3.4699L7.05273 0.4699L7.16602 0.377127Z" fill="black"/></svg>',adesc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.3867 11.4697C10.6796 11.1771 11.1544 11.1769 11.4473 11.4697C11.7399 11.7626 11.7399 12.2374 11.4473 12.5303L8.44727 15.5303L8.33398 15.623C8.05425 15.8106 7.67449 15.7909 7.41504 15.5576L4.08203 12.5576C3.77415 12.2805 3.74927 11.8059 4.02637 11.498C4.30342 11.1907 4.77722 11.1657 5.08496 11.4424L7.89062 13.9668L10.3867 11.4697Z" fill="black"/><path d="M13.2012 3.0791C13.6346 3.07912 14.0128 3.1535 14.3359 3.30176C14.6611 3.45006 14.9141 3.65661 15.0947 3.9209C15.2752 4.18513 15.3683 4.49104 15.374 4.83887H14.1904C14.1676 4.60882 14.0695 4.43012 13.8965 4.30273C13.7235 4.17546 13.4889 4.11133 13.1924 4.11133C12.9909 4.11133 12.8204 4.14023 12.6816 4.19727C12.5431 4.25236 12.4364 4.32902 12.3623 4.42773C12.2901 4.52659 12.2539 4.63919 12.2539 4.76465C12.2501 4.86901 12.272 4.96023 12.3193 5.03809C12.3688 5.11604 12.4369 5.18417 12.5225 5.24121C12.6079 5.29623 12.7064 5.34496 12.8184 5.38672C12.9304 5.42661 13.0505 5.46075 13.1777 5.48926L13.7031 5.61426C13.9578 5.67128 14.1914 5.74776 14.4043 5.84277C14.6172 5.93784 14.8021 6.05457 14.958 6.19336C15.1139 6.33216 15.2348 6.49633 15.3203 6.68457C15.4076 6.8727 15.4522 7.08885 15.4541 7.33203C15.4521 7.68929 15.3612 7.99944 15.1807 8.26172C15.0019 8.52216 14.7427 8.72465 14.4043 8.86914C14.0678 9.01165 13.6617 9.08301 13.1865 9.08301C12.7153 9.08299 12.3048 9.01057 11.9551 8.86621C11.6072 8.72173 11.3345 8.50786 11.1387 8.22461C10.9447 7.9394 10.8435 7.58622 10.834 7.16602H12.0283C12.0416 7.36176 12.0985 7.52509 12.1973 7.65625C12.298 7.78554 12.4323 7.88365 12.5996 7.9502C12.7688 8.01477 12.96 8.04785 13.1729 8.04785C13.3817 8.04781 13.5629 8.01678 13.7168 7.95605C13.8727 7.89522 13.9935 7.81051 14.0791 7.70215C14.1646 7.59387 14.2079 7.46965 14.208 7.3291C14.208 7.19796 14.1687 7.08739 14.0908 6.99805C14.0148 6.90868 13.9022 6.83228 13.7539 6.76953C13.6076 6.70685 13.4276 6.64993 13.2148 6.59863L12.5791 6.43848C12.0868 6.31871 11.6982 6.13163 11.4131 5.87695C11.1279 5.62221 10.9855 5.27916 10.9873 4.84766C10.9854 4.49404 11.0804 4.18517 11.2705 3.9209C11.4625 3.65661 11.7259 3.45006 12.0605 3.30176C12.3951 3.15353 12.7754 3.0791 13.2012 3.0791Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 9H4.48926L4.05664 7.66797H1.94824L1.51465 9H0.19043L2.20703 3.15918H3.79883L5.8125 9ZM2.26172 6.7041H3.74316L3.02539 4.49414H2.98047L2.26172 6.7041Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 3.15918C8.88181 3.15918 9.24025 3.22322 9.52734 3.35059C9.81445 3.47798 10.0303 3.6546 10.1748 3.88086C10.3193 4.10518 10.3916 4.36351 10.3916 4.65625C10.3916 4.88432 10.3461 5.08484 10.2549 5.25781C10.1636 5.4289 10.0386 5.57039 9.87891 5.68066C9.72118 5.78898 9.54022 5.86549 9.33691 5.91113V5.96875C9.55913 5.9783 9.76719 6.04044 9.96094 6.15625C10.1568 6.27223 10.3158 6.43538 10.4375 6.64453C10.5591 6.85173 10.6201 7.09875 10.6201 7.38574C10.6201 7.69567 10.5427 7.97245 10.3887 8.21582C10.2366 8.45719 10.0113 8.64841 9.71289 8.78906C9.41442 8.9297 9.04658 8.99999 8.60938 9H6.11426V3.15918H8.45215ZM7.34863 7.99023H8.35547C8.69948 7.99023 8.95057 7.92504 9.1084 7.79395C9.26621 7.66085 9.34473 7.48325 9.34473 7.2627C9.34466 7.10125 9.3064 6.95844 9.22852 6.83496C9.15056 6.71143 9.03899 6.61427 8.89453 6.54395C8.75196 6.47365 8.58145 6.43848 8.38379 6.43848H7.34863V7.99023ZM7.34863 5.60352H8.26465C8.43369 5.60347 8.58376 5.57354 8.71484 5.51465C8.84791 5.45381 8.95228 5.36807 9.02832 5.25781C9.10623 5.14755 9.14551 5.01529 9.14551 4.86133C9.14542 4.65046 9.07002 4.48078 8.91992 4.35156C8.77163 4.22228 8.56087 4.15724 8.28711 4.15723H7.34863V5.60352Z" fill="black"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>'},getQuartzIconsCss=(e={})=>{let t="";for(const i of[...Object.keys(iconNameToSvgFragment),...Object.keys(iconNameToFullSvg)]){const o=quartzIconSvg(i,e.strokeWidth);t+=`.ag-icon-${i}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(o)}'); }
|
|
`}return t},quartzIconSvg=(e,t=1.5)=>{const i=iconNameToFullSvg[e];if(i)return i;const o=iconNameToSvgFragment[e];if(!o)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+o+"</svg>"},iconSetQuartz=(e={})=>createPart({feature:"iconSet",css:()=>getQuartzIconsCss(e)}),iconSetQuartzLight=iconSetQuartz({strokeWidth:1}),iconSetQuartzRegular=iconSetQuartz(),iconSetQuartzBold=iconSetQuartz({strokeWidth:2}),inputStyleBaseCSS=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}&:where(.ag-ltr,.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding:0 var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper),:where(.ag-filter-add-select),:where(.ag-filter-filter),:where(.ag-filter-toolpanel-search),:where(.ag-floating-filter-search-icon),:where(.ag-mini-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper),:where(.ag-ltr) :where(.ag-filter-add-select),:where(.ag-ltr) :where(.ag-filter-filter),:where(.ag-ltr) :where(.ag-filter-toolpanel-search),:where(.ag-ltr) :where(.ag-floating-filter-search-icon),:where(.ag-ltr) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper),:where(.ag-rtl) :where(.ag-filter-add-select),:where(.ag-rtl) :where(.ag-filter-filter),:where(.ag-rtl) :where(.ag-filter-toolpanel-search),:where(.ag-rtl) :where(.ag-floating-filter-search-icon),:where(.ag-rtl) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',inputStyleBorderedCSS=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}",inputStyleUnderlinedCSS=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){border-left:none;border-right:none;border-top:none}",baseParams4={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},makeInputStyleBaseTreeShakeable=()=>createPart({feature:"inputStyle",params:baseParams4,css:inputStyleBaseCSS}),inputStyleBase=makeInputStyleBaseTreeShakeable(),makeInputStyleBorderedTreeShakeable=()=>createPart({feature:"inputStyle",params:{...baseParams4,inputBackgroundColor:backgroundColor,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:accentColor},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:foregroundBackgroundMix(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>inputStyleBaseCSS+inputStyleBorderedCSS}),inputStyleBordered=makeInputStyleBorderedTreeShakeable(),makeInputStyleUnderlinedTreeShakeable=()=>createPart({feature:"inputStyle",params:{...baseParams4,inputBackgroundColor:"transparent",inputBorder:{width:2,color:foregroundMix(.3)},inputPaddingStart:{ref:"spacing"},inputFocusBorder:"solid 2px var(--ag-accent-color)",inputDisabledTextColor:{ref:"textColor",mix:.5},inputDisabledBorder:"solid 1px var(--ag-border-color)",inputInvalidBorder:{width:2,color:{ref:"invalidColor",mix:.3}}},css:()=>inputStyleBaseCSS+inputStyleUnderlinedCSS}),inputStyleUnderlined=makeInputStyleUnderlinedTreeShakeable(),tabStyleBaseCSS='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative}.ag-tab:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}.ag-tab.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}.ag-tab:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}.ag-tab.ag-tab-selected:after{opacity:1}',tabStyleRolodexCSS=".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}",baseParams5={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},makeTabStyleBaseTreeShakeable=()=>createPart({feature:"tabStyle",params:baseParams5,css:tabStyleBaseCSS}),tabStyleBase=makeTabStyleBaseTreeShakeable(),makeTabStyleQuartzTreeShakeable=()=>createPart({feature:"tabStyle",params:{...baseParams5,tabBarBorder:!0,tabBarBackgroundColor:foregroundMix(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:backgroundColor},css:tabStyleBaseCSS}),tabStyleQuartz=makeTabStyleQuartzTreeShakeable(),makeTabStyleMaterialTreeShakeable=()=>createPart({feature:"tabStyle",params:{...baseParams5,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabSelectedUnderlineColor:{ref:"primaryColor"},tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:0},css:tabStyleBaseCSS}),tabStyleMaterial=makeTabStyleMaterialTreeShakeable(),makeTabStyleAlpineTreeShakeable=()=>createPart({feature:"tabStyle",params:{...baseParams5,tabBarBorder:!0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabHoverTextColor:accentColor,tabSelectedTextColor:accentColor,tabSelectedUnderlineColor:accentColor,tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0.3s"},css:tabStyleBaseCSS}),tabStyleAlpine=makeTabStyleAlpineTreeShakeable(),makeTabStyleRolodexTreeShakeable=()=>createPart({feature:"tabStyle",params:{...baseParams5,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabBarHorizontalPadding:{ref:"spacing"},tabBarTopPadding:{ref:"spacing"},tabBarBorder:!0,tabHorizontalPadding:{calc:"spacing * 2"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:{ref:"spacing"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:backgroundColor},css:()=>tabStyleBaseCSS+tabStyleRolodexCSS}),tabStyleRolodex=makeTabStyleRolodexTreeShakeable(),materialAdjustmentsCSS=".ag-dnd-ghost,.ag-filter-toolpanel-header,.ag-filter-toolpanel-search,.ag-multi-filter-group-title-bar,.ag-panel-title-bar-title,.ag-status-bar{color:var(--ag-header-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600}.ag-column-drop-horizontal{background-color:color-mix(in srgb,var(--ag-background-color),var(--ag-foreground-color) 8%)}.ag-cell.ag-cell-inline-editing{background-color:var(--ag-background-color);background-image:linear-gradient(0deg,var(--ag-input-background-color),var(--ag-input-background-color));border:var(--ag-input-border)!important;border-width:1px!important;height:calc(var(--ag-row-height) + var(--ag-spacing)*3);padding:var(--ag-spacing);:where(.ag-row-last:not(.ag-row-first)) &{bottom:0}:where(.ag-has-focus) &{border:var(--ag-input-focus-border)!important;border-width:1px!important}}.ag-advanced-filter-builder-button,.ag-standard-button{text-transform:uppercase}.ag-status-bar{border:solid var(--ag-border-width) var(--ag-border-color)}.ag-list-item-hovered:after{background-color:var(--ag-primary-color)}.ag-pill-button:hover{color:var(--ag-primary-color)}.ag-filter-add-button,.ag-filter-add-button:hover{border-bottom:2px solid var(--ag-primary-color)}",themeQuartzParams=()=>({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),makeThemeQuartzTreeShakeable=()=>createTheme().withPart(checkboxStyleDefault).withPart(colorSchemeVariable).withPart(iconSetQuartzRegular).withPart(tabStyleQuartz).withPart(inputStyleBordered).withPart(columnDropStyleBordered).withParams(themeQuartzParams()),themeQuartz=makeThemeQuartzTreeShakeable(),themeAlpineParams=()=>({accentColor:"#2196f3",selectedRowBackgroundColor:accentMix(.3),inputFocusBorder:{color:accentMix(.4)},focusShadow:{radius:2,spread:1.6,color:accentMix(.4)},iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",checkboxUncheckedBorderColor:foregroundBackgroundMix(.45),checkboxIndeterminateBackgroundColor:foregroundBackgroundMix(.45),checkboxIndeterminateBorderColor:foregroundBackgroundMix(.45),checkboxBorderWidth:2,checkboxBorderRadius:2,fontSize:13,dataFontSize:14,headerFontWeight:700,borderRadius:3,wrapperBorderRadius:3,tabSelectedUnderlineColor:accentColor,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sideButtonSelectedUnderlineColor:accentColor,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,sideButtonSelectedBorder:!1,sideButtonBarTopPadding:{calc:"spacing * 3"},sideButtonSelectedBackgroundColor:"transparent",sideButtonHoverTextColor:accentColor,iconButtonHoverColor:accentColor,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:foregroundBackgroundMix(.45),colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}),makeThemeAlpineTreeShakeable=()=>createTheme().withPart(buttonStyleAlpine).withPart(checkboxStyleDefault).withPart(colorSchemeVariable).withPart(iconSetAlpine).withPart(tabStyleAlpine).withPart(inputStyleBordered).withPart(columnDropStyleBordered).withParams(themeAlpineParams()),themeAlpine=makeThemeAlpineTreeShakeable(),themeBalhamParams=()=>({accentColor:"#0091ea",borderColor:foregroundMix(.2),spacing:4,widgetVerticalSpacing:{calc:"max(8px, spacing)"},borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},checkboxBorderRadius:2,checkboxBorderWidth:1,checkboxUncheckedBackgroundColor:backgroundColor,checkboxUncheckedBorderColor:foregroundBackgroundMix(.5),checkboxCheckedBackgroundColor:backgroundColor,checkboxCheckedBorderColor:accentColor,checkboxCheckedShapeColor:accentColor,checkboxIndeterminateBackgroundColor:backgroundColor,checkboxIndeterminateBorderColor:foregroundBackgroundMix(.5),checkboxIndeterminateShapeColor:foregroundBackgroundMix(.5),focusShadow:{radius:2,spread:1,color:accentColor},headerTextColor:foregroundMix(.6),iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",fontSize:12,tabSelectedBackgroundColor:backgroundColor,headerFontWeight:"bold",toggleButtonWidth:32,toggleButtonHeight:16,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:foregroundBackgroundMix(.5),sideButtonBorder:!0,sideButtonBarTopPadding:{calc:"spacing * 4"},popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)",statusBarLabelColor:foregroundMix(.54),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,panelTitleBarIconColor:foregroundColor,colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}),makeThemeBalhamTreeShakeable=()=>createTheme().withPart(buttonStyleBalham).withPart(checkboxStyleDefault).withPart(colorSchemeVariable).withPart(iconSetBalham).withPart(tabStyleRolodex).withPart(inputStyleBordered).withPart(columnDropStylePlain).withParams(themeBalhamParams()),themeBalham=makeThemeBalhamTreeShakeable(),makeStyleMaterialTreeShakeable=()=>{const e={tabSelectedUnderlineColor:{ref:"primaryColor"},sideButtonSelectedUnderlineColor:{ref:"primaryColor"},buttonTextColor:{ref:"primaryColor"},rangeSelectionBackgroundColor:{ref:"primaryColor",mix:.2},rangeSelectionBorderColor:{ref:"primaryColor"},rangeSelectionHighlightColor:{ref:"primaryColor",mix:.5},rangeHeaderHighlightColor:{ref:"foregroundColor",mix:.08},rowNumbersSelectedColor:{ref:"primaryColor",mix:.5},inputFocusBorder:{width:2,color:{ref:"primaryColor"}},pickerButtonFocusBorder:{width:1,color:{ref:"primaryColor"}},cellEditingBorder:{color:{ref:"primaryColor"}},menuBackgroundColor:{ref:"backgroundColor"},sideButtonBarBackgroundColor:backgroundColor,sideButtonSelectedBackgroundColor:"transparent",sideButtonBarTopPadding:{calc:"spacing * 4"},headerColumnResizeHandleColor:"none",headerBackgroundColor:{ref:"backgroundColor"},rowHoverColor:foregroundMix(.08),columnHoverColor:foregroundMix(.08),headerCellHoverBackgroundColor:foregroundMix(.05),statusBarLabelColor:foregroundMix(.63),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,valueChangeValueHighlightBackgroundColor:"#00acc1",panelTitleBarIconColor:foregroundColor,advancedFilterBuilderButtonBarBorder:!1,filterPanelApplyButtonColor:{ref:"buttonTextColor"},filterPanelApplyButtonBackgroundColor:{ref:"buttonBackgroundColor"},colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2,rowDragIndicatorColor:{ref:"primaryColor"},columnDragIndicatorColor:{ref:"primaryColor"}},t={...e,primaryColor:"#3f51b5",foregroundColor:"#000D",headerTextColor:"#0008",accentColor:"#ff4081",checkboxUncheckedBorderColor:foregroundColor,checkboxIndeterminateBackgroundColor:foregroundColor,toggleButtonOffBackgroundColor:foregroundColor,selectedRowBackgroundColor:"rgba(33, 150, 243, 0.3)"},i={...e,primaryColor:"#3f51b5",foregroundColor:"#fffD",headerTextColor:"#fff8",accentColor:"#bb86fc",checkboxUncheckedBorderColor:foregroundBackgroundMix(.5),checkboxIndeterminateBackgroundColor:foregroundBackgroundMix(.5),toggleButtonOffBackgroundColor:foregroundBackgroundMix(.5),selectedRowBackgroundColor:"#bb86fc33"};return createPart({feature:"styleMaterial",css:materialAdjustmentsCSS,params:t,modeParams:{light:t,dark:i,"dark-blue":i}})},styleMaterial=makeStyleMaterialTreeShakeable(),themeMaterialParams=()=>({rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.75 * rowVerticalPaddingScale"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4.75 * headerVerticalPaddingScale"},widgetVerticalSpacing:{calc:"spacing * 1.75"},cellHorizontalPadding:{calc:"spacing * 3"},buttonHorizontalPadding:{ref:"spacing"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 2"},fontSize:13,iconSize:18,borderRadius:0,wrapperBorderRadius:0,wrapperBorder:!1,menuBorder:!1,dialogBorder:!1,panelTitleBarBorder:!1,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sidePanelBorder:!1,sideButtonSelectedBorder:!1,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,buttonBorder:!1,buttonDisabledBorder:!1,focusShadow:{spread:4,color:foregroundMix(.16)},fontFamily:[{googleFont:"Roboto"},"-apple-system","BlinkMacSystemFont","Segoe UI","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],inputHeight:{calc:"max(iconSize, fontSize) + spacing * 3"},pickerButtonBorder:{width:1,color:"transparent"},headerFontWeight:600,headerFontSize:{calc:"fontSize - 1px"},checkboxBorderWidth:2,checkboxBorderRadius:2,toggleButtonWidth:34,toggleButtonSwitchInset:1,cardShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)",popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)"}),makeThemeMaterialTreeShakeable=()=>createTheme().withPart(buttonStyleBase).withPart(checkboxStyleDefault).withPart(colorSchemeVariable).withPart(iconSetMaterial).withPart(tabStyleMaterial).withPart(inputStyleUnderlined).withPart(columnDropStylePlain).withPart(styleMaterial).withParams(themeMaterialParams()),themeMaterial=makeThemeMaterialTreeShakeable(),cssVariable=(e,t,i,o,s)=>({changeKey:e,type:t,defaultValue:i,noWarn:o,cacheDefault:s}),CELL_HORIZONTAL_PADDING=cssVariable("cellHorizontalPadding","length",16),INDENTATION_LEVEL=cssVariable("indentationLevel","length",0,!0,!0),ROW_GROUP_INDENT_SIZE=cssVariable("rowGroupIndentSize","length",0),ROW_HEIGHT=cssVariable("rowHeight","length",42),HEADER_HEIGHT=cssVariable("headerHeight","length",48),ROW_BORDER_WIDTH=cssVariable("rowBorderWidth","border",1),PINNED_BORDER_WIDTH=cssVariable("pinnedRowBorderWidth","border",1),HEADER_ROW_BORDER_WIDTH=cssVariable("headerRowBorderWidth","border",1);function _addAdditionalCss(e,t){for(const i of t.sort((o,s)=>o.moduleName.localeCompare(s.moduleName))){const o=i.css;o&&e.set(`module-${i.moduleName}`,o)}}var Environment=class extends BaseEnvironment{initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(ROW_HEIGHT),this.getSizeEl(HEADER_HEIGHT),this.getSizeEl(ROW_BORDER_WIDTH),this.getSizeEl(PINNED_BORDER_WIDTH),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(PINNED_BORDER_WIDTH)}getRowBorderWidth(){return this.getCSSVariablePixelValue(ROW_BORDER_WIDTH)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(HEADER_ROW_BORDER_WIDTH)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(ROW_HEIGHT)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(HEADER_HEIGHT)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(CELL_HORIZONTAL_PADDING)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(INDENTATION_LEVEL),i=this.getCSSVariablePixelValue(ROW_GROUP_INDENT_SIZE);return e-1+i*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){const{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),i=this.gos.get("rowHeight");if(i==null||isNaN(i)||!isFinite(i))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const o=`${i}px`;return t!=o?(e.style.setProperty("--ag-line-height",o),i):t!=""?Number.parseFloat(t):-1}fireStylesChangedEvent(e){e==="rowBorderWidth"&&this.refreshRowBorderWidthVariable(),super.fireStylesChangedEvent(e)}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(ROW_BORDER_WIDTH);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&_error(t?106:239)}getAdditionalCss(){const e=new Map;return e.set("core",[coreCSS]),_addAdditionalCss(e,Array.from(_getAllRegisteredModules())),e}getDefaultTheme(){return themeQuartz}varError(e,t){_warn(9,{variable:{cssName:e,defaultValue:t}})}themeError(e){_error(240,{theme:e})}shadowRootError(){_error(293)}},BaseEventService=class extends AgBeanStub{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new LocalEventService}addListener(e,t,i){this.globalSvc.addEventListener(e,t,i)}removeListener(e,t,i){this.globalSvc.removeEventListener(e,t,i)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},EventService=class extends BaseEventService{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function getHeaderIndexToFocus(e,t,i){const o=e.visibleCols.headerGroupRowCount;if(i>=o)return{column:t,headerRowIndex:i};let s=t.getParent();for(;s&&s.getProvidedColumnGroup().getLevel()>i;)s=s.getParent();const n=t.isSpanHeaderHeight();return!s||n&&s.isPadding()?{column:t,headerRowIndex:o}:{column:s,headerRowIndex:s.getProvidedColumnGroup().getLevel()}}var HeaderNavigationService=class extends BeanStub{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,i=>{this.gridBodyCon=i.gridBodyCtrl});const t=_getDocument(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let i;const{colModel:o,colGroupSvc:s,ctrlsSvc:n}=this.beans;if(typeof e=="string"?(i=o.getCol(e),i||(i=s?.getColumnGroup(e)??null)):i=e,!i)return null;const l=n.getHeaderRowContainerCtrl()?.getAllCtrls(),a=_last(l||[]).type==="filter",d=getFocusHeaderRowCount(this.beans)-1;let c=-1,u=i;for(;u;)c++,u=u.getParent();let h=c;return t&&a&&h===d-1&&h++,h===-1?null:{headerRowIndex:h,column:i}}navigateVertically(e,t){const{focusSvc:i,visibleCols:o}=this.beans,{focusedHeader:s}=i;if(!s)return!1;const{headerRowIndex:n}=s,r=s.column,l=getFocusHeaderRowCount(this.beans),a=this.getHeaderRowType(n),d=o.headerGroupRowCount;let{headerRowIndex:c,column:u,headerRowIndexWithoutSpan:h}=e==="UP"?getColumnVisibleParent(a,r,n):getColumnVisibleChild(r,n,d),g=!1;return c<0&&(c=0,u=r,g=!0),c>=l?(c=-1,this.currentHeaderRowWithoutSpan=-1):h!==void 0&&(this.currentHeaderRowWithoutSpan=h),!g&&!u?!1:i.focusHeaderPosition({headerPosition:{headerRowIndex:c,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,i){const{focusSvc:o,gos:s}=this.beans,n={...o.focusedHeader};let r,l;this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==s.get("enableRtl")?(l="Before",r=this.findHeader(n,l)):(l="After",r=this.findHeader(n,l));const a=s.getCallback("tabToNextHeader");if(t&&a){const d=o.focusHeaderPositionFromUserFunc({userFunc:a,headerPosition:r,direction:l});if(d){const{headerRowIndex:c}=o.focusedHeader||{};c!=null&&c!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return d}return r||!t?o.focusHeaderPosition({headerPosition:r,direction:l,fromTab:t,allowUserOverride:!0,event:i}):this.focusNextHeaderRow(n,l,i)}focusNextHeaderRow(e,t,i){const o=this.beans,s=e.headerRowIndex;let n=null,r;const l=getFocusHeaderRowCount(o),a=this.beans.visibleCols.allCols;if(t==="Before"){if(s<=0)return!1;n=_last(a),r=s-1,this.currentHeaderRowWithoutSpan-=1}else n=a[0],r=s+1,this.currentHeaderRowWithoutSpan<l?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:d,headerRowIndex:c}=getHeaderIndexToFocus(this.beans,n,r);return c>=l&&(c=-1),o.focusSvc.focusHeaderPosition({headerPosition:{column:d,headerRowIndex:c},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(isColumnGroup(e)){const o=e.getDisplayedLeafColumns();i=t==="Before"?_last(o):o[0]}else i=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(i)}findHeader(e,t){const{colGroupSvc:i,visibleCols:o}=this.beans;let s=e.column;if(s instanceof AgColumnGroup){const a=s.getDisplayedLeafColumns();s=t==="Before"?a[0]:a[a.length-1]}const n=t==="Before"?o.getColBefore(s):o.getColAfter(s);if(!n)return;const r=o.headerGroupRowCount;if(e.headerRowIndex>=r)return{headerRowIndex:e.headerRowIndex,column:n};const l=i?.getColGroupAtLevel(n,e.headerRowIndex);return l?l.isPadding()&&n.isSpanHeaderHeight()?{headerRowIndex:o.headerGroupRowCount,column:n}:{headerRowIndex:e.headerRowIndex,column:l??n}:{headerRowIndex:n instanceof AgColumn&&n.isSpanHeaderHeight()?o.headerGroupRowCount:e.headerRowIndex,column:n}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function getColumnVisibleParent(e,t,i){const o=i-1;if(e!=="filter"){const s=t instanceof AgColumn&&t.isSpanHeaderHeight();let n=t.getParent();for(;n&&(n.getProvidedColumnGroup().getLevel()>o||s&&n.isPadding());)n=n.getParent();if(n)return s?{column:n,headerRowIndex:n.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:o}:{column:n,headerRowIndex:o,headerRowIndexWithoutSpan:o}}return{column:t,headerRowIndex:o,headerRowIndexWithoutSpan:o}}function getColumnVisibleChild(e,t,i){const o=t+1,s={column:e,headerRowIndex:o,headerRowIndexWithoutSpan:o};if(e instanceof AgColumnGroup){if(o>=i)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:i,headerRowIndexWithoutSpan:o};let r=e.getDisplayedChildren()[0];if(r instanceof AgColumnGroup&&r.isPadding()){const a=r.getDisplayedLeafColumns()[0];a.isSpanHeaderHeight()&&(r=a)}s.column=r,r instanceof AgColumn&&r.isSpanHeaderHeight()&&(s.headerRowIndex=i,s.headerRowIndexWithoutSpan=o)}return s}var FocusService=class extends BeanStub{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(_registerKeyboardFocusEvents(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(_getActiveDomElement(this.beans),DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=_getActiveDomElement(this.beans);return this.isDomDataPresentInHierarchy(e,DOM_DATA_KEY_CELL_CTRL,!0)?!0:this.isDomDataPresentInHierarchy(e,DOM_DATA_KEY_ROW_CTRL,!0)}isDomDataPresentInHierarchy(e,t,i){let o=e;for(;o;){const s=_getDomData(this.gos,o,t);if(s)return s.destroyed&&i?(this.attemptToRecoverFocus(),!1):!0;o=o.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:i,column:o}=e,s={rowIndex:t,rowPinned:i,column:o,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i});return n&&(s.isFullWidthCell=n.isFullWidth()),s}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:i,rowPinned:o,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:n=!1,sourceEvent:r}=e,l=this.colModel.getCol(t);if(!l){this.focusedCell=null;return}this.focusedCell={rowIndex:i,rowPinned:_makeNull(o),column:l};const a=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...a,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:s,preventScrollOnBrowserFocus:n,sourceEvent:r}),this.previousCellFocusParams=a}isCellFocused(e){return this.focusedCell==null?!1:_areCellsEqual(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:i,pinned:o}}=e,{column:s,headerRowIndex:n}=this.focusedHeader;return t===s&&i===n&&o==s.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),_isHeaderFocusSuppressed(this.beans))return!1;const{direction:t,fromTab:i,allowUserOverride:o,event:s,fromCell:n,rowWithoutSpanValue:r,scroll:l=!0}=e;let{headerPosition:a}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(a);if(o){const d=this.focusedHeader,c=getFocusHeaderRowCount(this.beans);if(i){const u=this.gos.getCallback("tabToNextHeader");u&&(a=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:d,headerPosition:a,headerRowCount:c}))}else{const u=this.gos.getCallback("navigateToNextHeader");if(u&&s){const h={key:s.key,previousHeaderPosition:d,nextHeaderPosition:a,headerRowCount:c,event:s};a=u(h)}}}return a?this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:s,fromCell:n,rowWithoutSpanValue:r,scroll:l}):!1}focusHeaderPositionFromUserFunc(e){if(_isHeaderFocusSuppressed(this.beans))return!1;const{userFunc:t,headerPosition:i,direction:o,event:s}=e,n=this.focusedHeader,r=getFocusHeaderRowCount(this.beans),l=this.getHeaderPositionFromUserFunc({userFunc:t,direction:o,currentPosition:n,headerPosition:i,headerRowCount:r});return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:o,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:i,currentPosition:o,headerPosition:s,headerRowCount:n}=e,l=t({backwards:i==="Before",previousHeaderPosition:o,nextHeaderPosition:s,headerRowCount:n});return l===!0?o:l===!1?null:l}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:i,fromCell:o,rowWithoutSpanValue:s,event:n,scroll:r=!0}=e,{column:l,headerRowIndex:a}=t,{filterManager:d,ctrlsSvc:c,headerNavigation:u}=this.beans;if(this.focusedHeader&&isHeaderPositionEqual(e.headerPosition,this.focusedHeader))return!1;if(a===-1)return d?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:l,event:n});r&&u?.scrollToColumn(l,i);const g=c.getHeaderRowContainerCtrl(l.getPinned())?.focusHeader(t.headerRowIndex,l,n)||!1;return u&&g&&(s!=null||o)&&(u.currentHeaderRowWithoutSpan=s??-1),g}focusFirstHeader(){if(this.overlays?.exclusive&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=getHeaderIndexToFocus(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.exclusive&&this.focusOverlay(!0))return!0;const t=getFocusHeaderRowCount(this.beans)-1,i=_last(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===_makeNull(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&_focusInto(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:i=!0,event:o}=e;if(this.overlays?.exclusive)return i&&this.focusOverlay(t);if(_isCellFocusSuppressed(this.beans))return t&&!_isHeaderFocusSuppressed(this.beans)?this.focusLastHeader():i&&this.focusOverlay(t)?!0:t?!1:_focusNextGridCoreContainer(this.beans,t);const s=t?_getLastRow(this.beans):_getFirstRow(this.beans);if(s){const n=e.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:l}=s,a=_getRowNode(this.beans,s);if(!n||!a||r==null)return!1;if(n.isSuppressNavigable(a)){const d=this.gos.get("enableRtl");let c;return!o||o.key===KeyCode.TAB?c=d?KeyCode.LEFT:KeyCode.RIGHT:c=o.key,this.beans.navigation?.navigateToNextCell(null,c,{rowIndex:r,column:n,rowPinned:l||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:r,column:n,rowPinned:l}),t&&this.rowRenderer.getRowByPosition(s)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(s,t)||(this.setFocusedCell({rowIndex:r,column:n,rowPinned:_makeNull(l),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:r,rowPinned:l,column:n})),!0}return!!(i&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const i=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:i,headerRowIndex:getFocusHeaderRowCount(this.beans)-1}}):this.focusGridView({column:i})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},ScrollVisibleService=class extends BeanStub{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){const{gos:e}=this;this.horizontalScrollShowing=e.get("alwaysShowHorizontalScroll")===!0,this.verticalScrollShowing=e.get("alwaysShowVerticalScroll")===!0,this.getScrollbarWidth();const t=this.updateScrollVisible.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t,displayedColumnsWidthChanged:t,newColumnsLoaded:t})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),i=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==i)&&(this.horizontalScrollGap=t,this.verticalScrollGap=i,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),i=typeof e=="number"&&e>=0?e:_getScrollbarWidth();i!=null&&(this.scrollbarWidth=i,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},GridDestroyService=class extends BeanStub{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:i}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),i.destroy(),super.destroy()}},_PUBLIC_EVENTS=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"],_INTERNAL_EVENTS=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","rowDragVisibilityChanged","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","stylesChanged","storeUpdated","filterDestroyed","filterHandlerDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged","rowNodeDataChanged","cellEditValuesChanged","filterSwitched","filterClosed","headerRowsChanged","rowExpansionStateChanged","showRowGroupColsSetChanged"],_GET_ALL_EVENTS=()=>[..._PUBLIC_EVENTS,..._INTERNAL_EVENTS],ALWAYS_SYNC_GLOBAL_EVENTS=new Set(["gridPreDestroyed","fillStart","pasteStart"]),_PUBLIC_EVENT_HANDLERS_MAP=_PUBLIC_EVENTS.reduce((e,t)=>(e[t]=_getCallbackForEvent(t),e),{}),USER_COMP_MODULES={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agExportingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agNoMatchingRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agBigIntColumnFilter:"BigIntFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agBigIntColumnFloatingFilter:"BigIntFilter",agDateColumnFloatingFilter:"DateFilter",agFormulaCellEditor:"Formula",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function quote(e){return`"${e}"`}var COLUMN_DEFINITION_DEPRECATIONS=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}}),COLUMN_DEFINITION_MOD_VALIDATIONS={allowFormula:"Formula",aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t,...i})=>{const o=i.groupRowEditable;return!!t||!!o?typeof e=="string"?USER_COMP_MODULES[e]??"CustomEditor":"CustomEditor":null},cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:USER_COMP_MODULES[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?USER_COMP_MODULES[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(i=>t.includes(i))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},COLUMN_DEFINITION_VALIDATIONS=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:i})=>i?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},allowFormula:{supportedRowModels:["clientSide"]},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,i)=>i.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const i=t.headerValueGetter;return typeof i=="function"||typeof i=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return _errMsg(262);if(t.smallLeft)return _errMsg(263);if(t.smallRight)return _errMsg(264)}return null}},sort:{validate:t=>_isSortDefValid(t.sort)||_isSortDirectionValid(t.sort)?null:`sort must be of type (SortDirection | SortDef), currently it is ${typeof t.sort=="object"?JSON.stringify(t.sort):toStringWithNullUndefined(t.sort)}`},initialSort:{validate:t=>_isSortDefValid(t.initialSort)||_isSortDirectionValid(t.initialSort)?null:`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${typeof t.initialSort=="object"?JSON.stringify(t.initialSort):toStringWithNullUndefined(t.initialSort)}`},sortingOrder:{validate:t=>{const i=t.sortingOrder;if(Array.isArray(i)&&i.length>0){const o=i.filter(s=>!(_isSortDefValid(s)||_isSortDirectionValid(s)));if(o.length>0)return`sortingOrder must be an array of type non-null (SortDirection | SortDef)[], incorrect items are: [${o.map(s=>typeof s=="string"||s==null?toStringWithNullUndefined(s):JSON.stringify(s)).join(", ")}]`}else if(!Array.isArray(i)||!i.length)return`sortingOrder must be an array with at least one element, currently it is [${i}]`;return null}},type:{validate:t=>{const i=t.type;return i instanceof Array?i.some(s=>typeof s!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof i=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:i})=>i?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:i,cellSelection:o,suppressRowTransform:s,enableCellSpan:n,rowDragEntireRow:r,enableCellTextSelection:l})=>typeof i=="object"&&i?.mode==="singleRow"&&i?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":o?"colDef.spanRows is not supported with cellSelection.":s?"colDef.spanRows is not supported with suppressRowTransform.":n?r?"colDef.spanRows is not supported with rowDragEntireRow.":l?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:i={}},o){const s=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),n=[];for(const r of t.groupHierarchy??[]){if(typeof r=="object"){o.validation?.validateColDef(r);continue}!s.has(r)&&!(r in i)&&n.push(quote(r))}if(n.length>0){const r=`The following parts of colDef.groupHierarchy are not recognised: ${n.join(", ")}.`,l=`Choose one of ${[...s].map(quote).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${r}
|
|
${l}`}return null}}}),colDefPropertyMap={headerName:void 0,columnGroupShow:void 0,headerStyle: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,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,groupRowEditable:void 0,groupRowValueSetter: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,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,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,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,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight: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,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0,allowFormula:void 0},ALL_PROPERTIES=()=>Object.keys(colDefPropertyMap),COL_DEF_VALIDATORS=()=>({objectName:"colDef",allProperties:ALL_PROPERTIES(),docsUrl:"column-properties/",deprecations:COLUMN_DEFINITION_DEPRECATIONS(),validations:COLUMN_DEFINITION_VALIDATIONS()}),STRING_GRID_OPTIONS=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],OBJECT_GRID_OPTIONS=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","activeOverlayParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","formulaDataSource","formulaFuncs","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],ARRAY_GRID_OPTIONS=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector","suppressOverlays"],_NUMBER_GRID_OPTIONS=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipSwitchShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],OTHER_GRID_OPTIONS=["theme","rowSelection"],_BOOLEAN_MIXED_GRID_OPTIONS=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],_BOOLEAN_GRID_OPTIONS=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","refreshAfterGroupEdit","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows","animateColumnResizing"],_FUNCTION_GRID_OPTIONS=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","overlayComponent","loadingOverlayComponent","noRowsOverlayComponent","overlayComponentSelector","activeOverlay","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","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","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],_GET_ALL_GRID_OPTIONS=()=>[...ARRAY_GRID_OPTIONS,...OBJECT_GRID_OPTIONS,...STRING_GRID_OPTIONS,..._NUMBER_GRID_OPTIONS,..._FUNCTION_GRID_OPTIONS,..._BOOLEAN_GRID_OPTIONS,..._BOOLEAN_MIXED_GRID_OPTIONS,...OTHER_GRID_OPTIONS],GRID_OPTION_DEPRECATIONS=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}});function toConstrainedNum(e,t,i){return typeof t=="number"||t==null?t==null||t>=i?null:`${e}: value should be greater than or equal to ${i}`:`${e}: value should be a number`}var GRID_OPTIONS_MODULES={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",refreshAfterGroupEdit:["RowGrouping","TreeData"],rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},GRID_OPTION_VALIDATIONS=()=>{const e={autoSizePadding:{validate({autoSizePadding:i}){return toConstrainedNum("autoSizePadding",i,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:i}){return toConstrainedNum("cacheBlockSize",i,1)}},cacheOverflowSize:{validate({cacheOverflowSize:i}){return toConstrainedNum("cacheOverflowSize",i,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:i=>{const o=i.domLayout,s=["autoHeight","normal","print"];return o&&!s.includes(o)?`domLayout must be one of [${s.join()}], currently it's ${o}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:i,pinnedTopRowData:o,pinnedBottomRowData:s}){return i&&(o||s)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:i,isRowPinnable:o,pinnedTopRowData:s,pinnedBottomRowData:n}){return o&&(s||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!i&&o?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:i,isRowPinned:o,pinnedTopRowData:s,pinnedBottomRowData:n}){return o&&(s||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!i&&o?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:i={}},o,s){for(const n of Object.keys(i))s.validation?.validateColDef(i[n]);return null}},icons:{validate:({icons:i})=>{if(i){if(i.smallDown)return _errMsg(262);if(i.smallLeft)return _errMsg(263);if(i.smallRight)return _errMsg(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:i}){return toConstrainedNum("infiniteInitialRowCount",i,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:i=>{if(typeof i.ssrmExpandAllAffectsAllRows=="boolean"){if(i.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(i.ssrmExpandAllAffectsAllRows&&typeof i.getRowId!="function")return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:i}){return toConstrainedNum("keepDetailRowsCount",i,1)}},paginationPageSize:{validate({paginationPageSize:i}){return toConstrainedNum("paginationPageSize",i,1)}},paginationPageSizeSelector:{validate:i=>{const o=i.paginationPageSizeSelector;return typeof o=="boolean"||o==null||o.length?null:`'paginationPageSizeSelector' cannot be an empty array.
|
|
If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:i}){return toConstrainedNum("rowBuffer",i,0)}},rowClass:{validate:i=>typeof i.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:i}){return i&&typeof i=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':i&&typeof i!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":i&&i.mode!=="multiRow"&&i.mode!=="singleRow"?`Selection mode "${i.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:i=>{const o=i.rowStyle;return o&&typeof o=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:i}){return toConstrainedNum("serverSideInitialRowCount",i,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:i=>{const o=i.sortingOrder;if(Array.isArray(o)&&o.length>0){const s=o.filter(n=>!_getSortDefFromInput(n));if(s.length>0)return`sortingOrder must be an array of type (SortDirection | SortDef)[], incorrect items are: ${s.map(n=>typeof n=="string"||n==null?toStringWithNullUndefined(n):JSON.stringify(n))}]`}else if(!Array.isArray(o)||!o.length)return`sortingOrder must be an array with at least one element, currently it's ${o}`;return null}},tooltipHideDelay:{validate:i=>i.tooltipHideDelay&&i.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:i=>i.tooltipShowDelay&&i.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},tooltipSwitchShowDelay:{validate:i=>i.tooltipSwitchShowDelay&&i.tooltipSwitchShowDelay<0?"tooltipSwitchShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:i=>{const o=i.rowModelType??"clientSide";switch(o){case"clientSide":{const{treeDataChildrenField:s,treeDataParentIdField:n,getDataPath:r,getRowId:l}=i;if(!s&&!n&&!r)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(s){if(r)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!l)return"getRowId callback not provided, tree data with parent id cannot be built.";if(r)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const s=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${o} row model.`;return i.isServerSideGroup&&i.getServerSideGroupKey?null:s}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:i}){return toConstrainedNum("viewportRowModelBufferSize",i,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:i}){return toConstrainedNum("viewportRowModelPageSize",i,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:i,showOpenedGroup:o}){return i?.field&&o?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":i?.valueGetter&&o?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:i=>{const o=i.renderingMode,s=["default","legacy"];return o&&!s.includes(o)?`renderingMode must be one of [${s.join()}], currently it's ${o}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:i})=>{if(!i)return null;const o=["fitCellContents","fitGridWidth","fitProvidedWidth"],s=i.type;return s!=="fitCellContents"&&s!=="fitGridWidth"&&s!=="fitProvidedWidth"?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${o.map(n=>'"'+n+'"').join(", ")}, currently it's ${s}`:s==="fitProvidedWidth"&&typeof i.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${i.width}`:null}}},t={};for(const i of _BOOLEAN_GRID_OPTIONS)t[i]={expectedType:"boolean"};for(const i of _NUMBER_GRID_OPTIONS)t[i]={expectedType:"number"};return _mergeDeep(t,e),t},GRID_OPTIONS_VALIDATORS=()=>({objectName:"gridOptions",allProperties:[..._GET_ALL_GRID_OPTIONS(),...Object.values(_PUBLIC_EVENT_HANDLERS_MAP)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:GRID_OPTION_DEPRECATIONS(),validations:GRID_OPTION_VALIDATIONS()}),changeSetId=0,gridInstanceSequence=0,GRID_DOM_KEY="__ag_grid_instance",GridOptionsService=class extends BeanStub{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=gridInstanceSequence++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new LocalEventService,this.globalEventHandlerFactory=e=>(t,i)=>{if(!this.isAlive())return;const o=ALWAYS_SYNC_GLOBAL_EVENTS.has(t);if(o&&!e||!o&&e||!isPublicEventHandler(t))return;const s=(n,r)=>{const l=_PUBLIC_EVENT_HANDLERS_MAP[n],a=this.gridOptions[l];typeof a=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>a(r))};if(this.gridReadyFired)s(t,i);else if(t==="gridReady"){s(t,i),this.gridReadyFired=!0;for(const n of this.queueEvents)s(n.eventName,n.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:i})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??GRID_OPTION_DEFAULTS[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return _exists(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(i=>e(this.addCommon(i)))}updateGridOptions({options:e,force:t,source:i="api"}){const o={id:changeSetId++,properties:[]},s=[],{gridOptions:n,validation:r}=this;for(const l of Object.keys(e)){const a=GlobalGridOptions.applyGlobalGridOption(l,e[l]);r?.warnOnInitialPropertyUpdate(i,l);const d=t||typeof a=="object"&&i==="api",c=n[l];if(d||c!==a){n[l]=a;const u={type:l,currentValue:a,previousValue:c,changeSet:o,source:i};s.push(u)}}this.validateGridOptions(this.gridOptions),o.properties=s.map(l=>l.type);for(const l of s)_logIfDebug(this,`Updated property ${l.type} from`,l.previousValue," to ",l.currentValue),this.propEventSvc.dispatchEvent(l)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const i of Object.keys(e)){const o=e[i];if(o==null||o===!1)continue;let s=t[i];typeof s=="function"&&(s=s(e,this.gridOptions,this.beans)),s&&this.assertModuleRegistered(s,i)}}validateGridOptions(e){this.validateOptions(e,GRID_OPTIONS_MODULES),this.validation?.processGridOptions(e)}validateColDef(e,t,i){(i||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,COLUMN_DEFINITION_MOD_VALIDATIONS),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const i=Array.isArray(e)?e.some(o=>this.isModuleRegistered(o)):this.isModuleRegistered(e);return i||_error(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),i}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:_areModulesGridScoped(),rowModelType:this.get("rowModelType"),isUmd:_isUmd()}}isModuleRegistered(e){return _isModuleRegistered(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[GRID_DOM_KEY]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const i=t[GRID_DOM_KEY];if(_exists(i))return i===this.instanceId;t=t.parentElement}return!1}};function isPublicEventHandler(e){return!!_PUBLIC_EVENT_HANDLERS_MAP[e]}var HeaderCellMouseListenerFeature=class extends BeanStub{constructor(e,t){super(),this.column=e,this.eGui=t,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:e=>e&&this.onClick(e)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(e){const{sortSvc:t,rangeSvc:i,gos:o}=this.beans;if(!(_getEnableColumnSelection(o)?e.altKey:!0))i?.handleColumnSelection(this.column,e);else if(this.column.isSortable()){const n=this.column.isMoving(),l=Date.now()-this.lastMovingChanged<50;n||l||t?.progressSortFromEvent(this.column,e)}}};function getHeaderCompElementParams(e,t){const i={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:i},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:i},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[e?{tag:"span",ref:"eColRef",cls:"ag-header-col-ref"}:null,{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:i},t?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var HeaderComp=class extends Component{constructor(){super(...arguments),this.eFilter=RefPlaceholder,this.eFilterButton=RefPlaceholder,this.eSortIndicator=RefPlaceholder,this.eMenu=RefPlaceholder,this.eLabel=RefPlaceholder,this.eText=RefPlaceholder,this.eColRef=RefPlaceholder,this.eSortOrder=RefPlaceholder,this.eSortAsc=RefPlaceholder,this.eSortDesc=RefPlaceholder,this.eSortMixed=RefPlaceholder,this.eSortNone=RefPlaceholder,this.eSortAbsoluteAsc=RefPlaceholder,this.eSortAbsoluteDesc=RefPlaceholder,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||e.column.formulaRef!=this.currentRef||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const i={...e};_mergeDeep(i,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(i)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const{formula:i}=this.beans,o=e.template;return o?o?.trim?o.trim():o:getHeaderCompElementParams(!!i?.active,t)}init(e){this.params=e;const{sortSvc:t,touchSvc:i,rowNumbersSvc:o,userCompFactory:s}=this.beans,n=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),this.eLabel&&(this.mouseListener??(this.mouseListener=this.createManagedBean(new HeaderCellMouseListenerFeature(e.column,this.eLabel)))),i?.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),o?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(s,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const i=_getInnerHeaderCompDetails(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderComponent=o,this.eText&&this.eText.appendChild(o.getGui())):this.destroyBean(o))}))}setDisplayName(e){const{displayName:t}=e,i=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||i===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=_toString(t))}addInIcon(e,t,i){const o=_createIconNoSpan(e,this.beans,i);o&&t.appendChild(o)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){_removeFromParent(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:i}=this,o=_isLegacyMenuEnabled(e);this.addInIcon(o?"menu":"menuAlt",t,i.column),t.classList.toggle("ag-header-menu-icon",!o);const s=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=s,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(s)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:i}=this;t||this.toggleMenuAlwaysShow(!0),i.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:i,beans:o,eMenu:s,eFilterButton:n}=this,r=t.column,l=_isLegacyMenuEnabled(i);if(e&&!l){if(o.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??s??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(s??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:i}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:o,eSortOrder:s,eSortAsc:n,eSortDesc:r,eSortMixed:l,eSortNone:a,eSortAbsoluteAsc:d,eSortAbsoluteDesc:c}=this;o.attachCustomElements(s,n,r,l,a,d,c)}this.eSortIndicator.setupSort(i),this.currentSort&&e.setupHeader(this,i)}setupColumnRefIndicator(){const{eColRef:e,beans:{editModelSvc:t},params:i}=this;e&&(this.currentRef=i.column.formulaRef,e.textContent=this.currentRef,_setDisplayed(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{const o=t?.getEditPositions(),s=!!this.currentRef&&!!o?.some(n=>n.column.isAllowFormula());_setDisplayed(e,s)},cellEditingStopped:()=>{_setDisplayed(e,!1)}}))}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const i=()=>{const o=t.column.isFilterActive();_setDisplayed(e,o,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,i,"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,i,o){if(!e)return _removeFromParent(t),!1;const s=this.params.column;return this.addInIcon(o,t,s),this.addManagedListeners(s,{filterChanged:i}),i(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:i}=this;return e?t??i??this.getGui():i??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}},GroupStickyLabelFeature=class extends BeanStub{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){const{columnGroup:e,beans:t}=this,{ctrlsSvc:i}=t;i.whenReady(this,()=>{const o=this.refreshPosition.bind(this);e.getPinned()==null&&this.addManagedEventListeners({bodyScroll:s=>{s.direction==="horizontal"&&this.updateSticky(s.left)}}),this.addManagedListeners(e,{leftChanged:o,displayedChildrenChanged:o}),this.addManagedEventListeners({columnResized:o}),this.refreshPosition()})}refreshPosition(){const{columnGroup:e,beans:t}=this,i=e.getLeft(),o=e.getActualWidth();if(i==null||o===0){this.left=null,this.right=null,this.setSticky(!1);return}this.left=i,this.right=i+o;const s=t.colViewport.getScrollPosition();s!=null&&this.updateSticky(s)}updateSticky(e){const{beans:t,left:i,right:o}=this;if(i==null||o==null){this.setSticky(!1);return}const{gos:s,visibleCols:n}=t,l=s.get("enableRtl")?n.bodyWidth-e:e;this.setSticky(i<l&&o>l)}setSticky(e){const{isSticky:t,eLabel:i}=this;t!==e&&(this.isSticky=e,i.classList.toggle("ag-sticky-label",e))}},HeaderGroupCompElement={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},HeaderGroupComp=class extends Component{constructor(){super(HeaderGroupCompElement),this.agOpened=RefPlaceholder,this.agClosed=RefPlaceholder,this.agLabel=RefPlaceholder,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:i}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),i?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&_warn(89)}workOutInnerHeaderGroupComponent(e,t){const i=_getInnerHeaderGroupCompDetails(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderGroupComponent=o,this.agLabel.appendChild(o.getGui())):this.destroyBean(o))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:i},beans:{colGroupSvc:o}}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const s=a=>{if(_isStopPropagationForAgGrid(a))return;const d=!i.isExpanded();o.setColumnGroupOpened(i.getProvidedColumnGroup(),d,"uiColumnExpanded")};this.addTouchAndClickListeners(t,s),this.addTouchAndClickListeners(e,s);const n=a=>{_stopPropagationForAgGrid(a)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:s}),this.updateIconVisibility();const r=i.getProvidedColumnGroup(),l=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:l,expandableChanged:l})}addTouchAndClickListeners(e,t){this.beans.touchSvc?.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:i}}=this;if(i.isExpandable()){const o=i.isExpanded();_setDisplayed(e,o),_setDisplayed(t,!o)}else _setDisplayed(e,!1),_setDisplayed(t,!1)}addInIcon(e,t){const i=_createIconNoSpan(e,this.beans,null);i&&t.appendChild(i)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:i}=this;_setDisplayed(t,!1),_setDisplayed(i,!1)}}setupLabel(e){const{displayName:t,columnGroup:i}=e,{innerHeaderGroupComponent:o,isLoadingInnerComponent:s}=this,n=o||s;_exists(t)&&!n&&(this.agLabel.textContent=_toString(t)),i.getColGroupDef()?.suppressStickyLabel||this.createManagedBean(new GroupStickyLabelFeature(this.getGui(),i))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},ColumnHeaderCompModule={moduleName:"ColumnHeaderComp",version:VERSION,userComponents:{agColumnHeader:HeaderComp},icons:{menu:"menu",menuAlt:"menu-alt"}},ColumnGroupHeaderCompModule={moduleName:"ColumnGroupHeaderComp",version:VERSION,userComponents:{agColumnGroupHeader:HeaderGroupComp},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},AnimationFrameService=class extends BeanStub{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&_warn(92)}createTask(e,t,i,o,s=!1){this.verify();let n=i;o&&this.batchFrameworkComps&&(n="f1");const r={task:e,index:t,createOrder:++this.taskCount,deferred:s};this.addTaskToList(this[n],r),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((i,o)=>i.deferred!==o.deferred?i.deferred?-1:1:i.index!==o.index?t*(o.index-i.index):o.createOrder-i.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:i,f1:o,destroyTasks:s,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:l}=n,a=t.list,d=i.list,c=o.list,u=Date.now();let h=0;const g=e<=0,p=r.getScrollFeature();for(;g||h<e;){if(!p.scrollGridIfNeeded()){let m;if(a.length)this.sortTaskList(t),m=a.pop().task;else if(d.length)this.sortTaskList(i),m=d.pop().task;else if(c.length)l.wrapOutgoing(()=>{for(;(g||h<e)&&!p.scrollGridIfNeeded();){if(c.length)this.sortTaskList(o),m=c.pop().task,m();else break;h=Date.now()-u}}),m=()=>{};else if(s.length)m=s.pop();else break;m()}h=Date.now()-u}a.length||d.length||c.length||s.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);_requestAnimationFrame(this.beans,e)}isQueueEmpty(){return!this.ticking}},AnimationFrameModule={moduleName:"AnimationFrame",version:VERSION,beans:[AnimationFrameService]},IconService=class extends BeanStub{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return _createIconNoSpan(e,this.beans,t?.column)}},TouchService=class extends BeanStub{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!_isIOSUserAgent())return;const t=(i,o,s)=>{const{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget(s?.target??null);r?.column&&r.dispatchCellContextMenuEvent(s??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,s,n,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!_isIOSUserAgent()||_isEventSupported("dblclick"))return!1;const o=Date.now(),s=o-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=o,s})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:i,menuSvc:o}=this.beans;if(t.get("suppressTouch"))return;const{params:s,eMenu:n,eFilterButton:r}=e,l=new TouchListener(e.getGui(),!0);e.addDestroyFunc(()=>l.destroy());const a=e.shouldSuppressMenuHide(),d=a&&_exists(n)&&s.enableMenu;let c=l;if(d&&(c=new TouchListener(n,!0),e.addDestroyFunc(()=>c.destroy())),s.enableMenu||o?.isHeaderContextMenuEnabled(s.column)){const u=d?"tap":"longTap",h=g=>s.showColumnMenuAfterMouseClick(g.touchStart);e.addManagedListeners(c,{[u]:h}),e.addManagedListeners(l,{longTap:h})}if(s.enableSorting){const u=h=>{const g=h.touchStart.target;a&&(n?.contains(g)||r?.contains(g))||i?.progressSort(s.column,!1,"uiColumnSorted")};e.addManagedListeners(l,{tap:u})}if(s.enableFilterButton&&r){const u=new TouchListener(r,!0);e.addManagedListeners(u,{tap:()=>s.showFilter(r)}),e.addDestroyFunc(()=>u.destroy())}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const i=new TouchListener(t.eGridHeader,!0),o=s=>t.showColumnMenuAfterMouseClick(s.touchStart);e.addManagedListeners(i,{longTap:o}),e.addDestroyFunc(()=>i.destroy())}}setupForHeaderGroupElement(e,t,i){const o=new TouchListener(t,!0);e.addManagedListeners(o,{tap:i}),e.addDestroyFunc(()=>o.destroy())}mockContextMenu(e,t,i){if(!_isIOSUserAgent())return;const o=new TouchListener(t),s=n=>{_isEventFromThisInstance(this.beans,n.touchEvent)&&i(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(o,{longTap:s}),e.addDestroyFunc(()=>o.destroy())}},TouchModule={moduleName:"Touch",version:VERSION,beans:[TouchService]},CellNavigationService=class extends BeanStub{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const i=e===KeyCode.UP,o=e===KeyCode.DOWN,s=e===KeyCode.LEFT;let n,r;const{pageBounds:l,gos:a,visibleCols:d,pinnedRowModel:c}=this.beans,{rowPinned:u}=t;if(i||o)u&&c?i?r=0:r=u==="top"?c.getPinnedTopRowCount()-1:c.getPinnedBottomRowCount()-1:r=i?l.getFirstRow():l.getLastRow(),n=t.column;else{const h=a.get("enableRtl");r=t.rowIndex,n=(s!==h?d.allCols:[...d.allCols].reverse()).find(p=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:p}))}return n?{rowIndex:r,rowPinned:u,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,o=!1;for(;!o;){switch(e){case KeyCode.UP:i=this.getCellAbove(i);break;case KeyCode.DOWN:i=this.getCellBelow(i);break;case KeyCode.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case KeyCode.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,_warn(8,{key:e});break}i?o=this.isCellGoodToFocusOn(i):o=!0}return i}isCellGoodToFocusOn(e){const t=e.column;let i;const{pinnedRowModel:o,rowModel:s}=this.beans;switch(e.rowPinned){case"top":i=o?.getPinnedTopRow(e.rowIndex);break;case"bottom":i=o?.getPinnedBottomRow(e.rowIndex);break;default:i=s.getRow(e.rowIndex);break}return i?!this.isSuppressNavigable(t,i):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,i=_getRowBelow(this.beans,t,!0);return i?{rowIndex:i.rowIndex,column:e.column,rowPinned:i.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,i=_getRowAbove(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return i?{rowIndex:i.rowIndex,column:e.column,rowPinned:i.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:i}=this.beans,o=t.allCols;let s=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=o[0];const l=_getRowBelow(this.beans,e,!0);if(_missing(l)||!l.rowPinned&&!(i?.isRowInPage(l.rowIndex)??!0))return null;s=l?l.rowIndex:null,n=l?l.rowPinned:null}return{rowIndex:s,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:i,pagination:o}=t,s=i.allCols;let n=e.rowIndex,r=e.rowPinned,l=i.getColBefore(e.column);if(!l){l=_last(s);const a=_getRowAbove(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(_missing(a)||!a.rowPinned&&!(o?.isRowInPage(a.rowIndex)??!0))return null;n=a?a.rowIndex:null,r=a?a.rowPinned:null}return{rowIndex:n,column:l,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:i}=e.colDef;if(typeof i=="boolean")return i;if(typeof i=="function"){const o=e.createColumnFunctionCallbackParams(t);return i(o)}return!1}};function getFocusedCell(e){return e.focusSvc.getFocusedCell()}function clearFocusedCell(e){return e.focusSvc.clearFocusedCell()}function setFocusedCell(e,t,i,o){e.focusSvc.setFocusedCell({rowIndex:t,column:i,rowPinned:o,forceBrowserFocus:!0})}function tabToNextCell(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function tabToPreviousCell(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function setFocusedHeader(e,t,i=!1){const o=e.headerNavigation?.getHeaderPositionForColumn(t,i);o&&e.focusSvc.focusHeaderPosition({headerPosition:o})}function _unwrapUserComp(e){const t=e;return t?.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var EditModelService=class extends BeanStub{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new EditCellValidationModel,this.rowValidations=new EditRowValidationModel,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const i=this.getEditRow(e);t?i.delete(t):i.clear(),i.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const i=e&&this.edits.get(e);if(i)return i;if(t.checkSiblings){const o=e.pinnedSibling;if(o)return this.getEditRow(o)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;const i=this.getEditRow(e),o=e.pinnedSibling,s=t&&o&&this.getEditRow(o);if(!i&&!s)return;const n={...e.data},r=(l,a)=>l.forEach(({pendingValue:d},c)=>{d!==UNEDITED&&(a[c.getColId()]=d)});return i&&r(i,n),s&&r(s,n),n}getEdit(e={},t){const{rowNode:i,column:o}=e,s=this.edits;if(this.suspendEdits||s.size===0||!i||!o)return;const n=s.get(i)?.get(o);if(n)return n;if(t?.checkSiblings){const r=i.pinnedSibling;if(r)return s.get(r)?.get(o)}}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((i,o)=>{const s=new Map;i.forEach(({editorState:n,...r},l)=>s.set(l,{...r})),t.set(o,s)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,i)=>{const o=new Map;t.forEach((s,n)=>o.set(n,{...s})),this.edits.set(i,o)})}setEdit(e,t){const i=this.edits;(i.size===0||!i.has(e.rowNode))&&i.set(e.rowNode,new Map);const o=this.getEdit(e),s={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...o,...t};return this.getEditRow(e.rowNode).set(e.column,s),s}clearEditValue(e){const{rowNode:t,column:i}=e;if(!t)return;const o=n=>{n.editorValue=void 0,n.pendingValue=n.sourceValue,n.state="changed"};if(!i){this.getEditRow(t)?.forEach(o);return}const s=this.getEdit(e);s&&o(s)}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((i,o)=>{for(const s of i.keys()){const{editorState:n,...r}=i.get(s);t.push({rowNode:o,column:s,...r})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:i,column:o}=e,{withOpenEditor:s}=t;if(i){const n=this.getEditRow(i,t);return n?o?s?this.getEdit(e)?.state==="editing":n.has(o):n.size!==0?s?Array.from(n.values()).some(({state:r})=>r==="editing"):!0:!1:!1}return s?this.getEditPositions().some(({state:n})=>n==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:i,column:o}=e;o&&!t.has(o)&&t.set(o,{editorValue:void 0,pendingValue:UNEDITED,sourceValue:this.beans.valueSvc.getValue(o,i,"data"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(i,t)}stop(e,t,i){if(this.hasEdits(e))if(t){const o=this.getEditRow(e.rowNode)?.get(e.column);o&&(o.pendingValue===UNEDITED||o.pendingValue===o.sourceValue)?this.removeEdits(e):o&&i&&(o.editorValue=void 0)}else this.removeEdits(e)}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},EditCellValidationModel=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:i}=e||{};return this.cellValidations?.get(t)?.get(i)}hasCellValidation(e){return!e?.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:i,column:o}=e;this.cellValidations.has(i)||this.cellValidations.set(i,new Map),this.cellValidations.get(i).set(o,t)}clearCellValidation(e){const{rowNode:t,column:i}=e;this.cellValidations.get(t)?.delete(i)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},EditRowValidationModel=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function _getRowCtrl(e,t={}){const{rowIndex:i,rowId:o,rowCtrl:s,rowPinned:n}=t;if(s)return s;const{rowModel:r,rowRenderer:l}=e;let{rowNode:a}=t;return a||(o?a=_getRowById(e,o,n):i!=null&&(a=r.getRow(i))),l.getRowCtrls(a?[a]:[])?.[0]}function _getCellCtrl(e,t={}){const{cellCtrl:i,colId:o,columnId:s,column:n}=t;if(i)return i;const r=e.colModel.getCol(o??s??_getColId(n)),l=t.rowCtrl??_getRowCtrl(e,t),a=l?.getCellCtrl(r)??void 0;if(a)return a;const d=t.rowNode??l?.rowNode;if(d)return e.rowRenderer.getCellCtrls([d],[r])?.[0]}function _stopEditing(e){const{editSvc:t}=e;t?.isBatchEditing()?(_syncFromEditors(e,{persist:!0}),_destroyEditors(e)):t?.stopEditing(void 0,{source:"api"})}function _addStopEditingWhenGridLosesFocus(e,t,i){const{gos:o,popupSvc:s}=t;if(!o.get("stopEditingWhenCellsLoseFocus"))return;const n=r=>{const l=r.relatedTarget;if(_getTabIndex(l)===null){_stopEditing(t);return}let a=i.some(d=>d.contains(l))&&o.isElementInThisInstance(l);a||(a=!!s&&(s.getActivePopups().some(d=>d.contains(l))||s.isElementWithinCustomPopup(l))),a||_stopEditing(t)};for(const r of i)e.addManagedElementListeners(r,{focusout:n})}function _getColId(e){if(e)return typeof e=="string"?e:e.getColId()}var UNEDITED=Symbol("unedited"),getCellEditorInstances=(e,t={})=>{const i=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),o=new Array(i.length);let s=0;for(let n=0,r=i.length;n<r;++n){const a=i[n].comp?.getCellEditor();a&&(o[s++]=_unwrapUserComp(a))}return o.length=s,o};function _setupEditors(e,t,i,o,s,n){t.length===0&&i?.rowNode&&i?.column&&_setupEditor(e,i,{key:o,event:s,cellStartedEdit:n});const{valueSvc:r,editSvc:l,editModelSvc:a}=e,{rowNode:d,column:c}=i??{};for(const u of t){const{rowNode:h,column:g}=u,p=_getCellCtrl(e,u);if(!p){if(h&&g){const m=r.getValue(g,h,"data"),w=(i?.rowNode===h&&i?.column===g&&o||void 0)??l?.getCellDataValue(u)??r.getValueForDisplay({column:g,node:h,from:"edit"})?.value??m??UNEDITED;a?.setEdit(u,{pendingValue:getNormalisedFormula(e,w,!1,g),sourceValue:m,state:"editing"})}continue}const f=n&&d===p.rowNode&&p.column===c;_setupEditor(e,{rowNode:d,column:p.column},{key:f?o:null,event:f?s:null,cellStartedEdit:f&&n})}}function _sourceAndPendingDiffer({pendingValue:e,sourceValue:t}){return e===UNEDITED&&(e=t),e!==t}function _filterChangedEdits(e){const t=new Map;for(const[i,o]of e){const s=new Map;for(const[n,r]of o)_sourceAndPendingDiffer(r)&&s.set(n,r);s.size>0&&t.set(i,s)}return t}function _setupEditor(e,t,i){const{key:o,event:s,cellStartedEdit:n,silent:r}=i??{},{editModelSvc:l,editSvc:a,gos:d,userCompFactory:c}=e,u=_getCellCtrl(e,t),h=u?.comp?.getCellEditor(),g=_createEditorParams(e,t,o,n&&!r),p=l?.getEdit(t),f=g.value??p?.sourceValue;if(h){l?.setEdit(t,{editorValue:getNormalisedFormula(e,f,!0,t.column),state:"editing"}),h.refresh?.(g);return}const m=t.column.getColDef(),C=_getCellEditorDetails(c,m,g);if(!C)return;const{popupFromSelector:v,popupPositionFromSelector:w}=C,S=v??!!m.cellEditorPopup,b=w??m.cellEditorPopupPosition;if(checkAndPreventDefault(C.params,s),!u)return;const{rangeFeature:y,rowCtrl:R,comp:E,onEditorAttachedFuncs:F}=u;l?.setEdit(t,{editorValue:getNormalisedFormula(e,f,!0,t.column),state:"editing"}),u.editCompDetails=C,F.push(()=>y?.unsetComp()),E?.setEditDetails(C,S,b,d.get("reactiveCustomComponents")),R?.refreshRow({suppressFlash:!0});const P=l?.getEdit(t);!r&&!P?.editorState?.cellStartedEditing&&(a?.dispatchCellEvent(t,s,"cellEditingStarted",{value:f}),l?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function _valueFromEditor(e,t,i){const o={editorValueExists:!1};if(_hasValidationRules(e)&&(t.getValidationErrors?.()?.length??0)>0||i?.isCancelling)return o;if(i?.isStopping){const n=t?.isCancelAfterEnd?.();if(n)return{...o,isCancelAfterEnd:n}}return{editorValue:t.getValue(),editorValueExists:!0}}function _createEditorParams(e,t,i,o){const{valueSvc:s,gos:n,editSvc:r}=e,l=e.gos.get("enableGroupEdit"),a=_getCellCtrl(e,t),d=t.rowNode?.rowIndex??void 0,c=r?.isBatchEditing(),u=e.colModel.getCol(t.column.getId()),{rowNode:h,column:g}=t,p=a.comp?.getCellEditor(),f=r?.getCellDataValue(t),m=f===void 0?p?_valueFromEditor(e,p)?.editorValue:void 0:f,C=m===UNEDITED?s.getValueForDisplay({column:u,node:h,from:"edit"})?.value:m;let v=l?m:C;return g.isAllowFormula()&&e.formula?.isFormula(v)&&(v=e.formula?.normaliseFormula(v,!0)??v),_addGridCommonParams(n,{value:v,eventKey:i??null,column:g,colDef:g.getColDef(),rowIndex:d,node:h,data:h.data,cellStartedEdit:!!o,onKeyDown:a?.onKeyDown.bind(a),stopEditing:w=>{r.stopEditing(t,{source:c?"ui":"api",suppressNavigateAfterEdit:w}),_destroyEditor(e,t,{})},eGridCell:a?.eGui,parseValue:w=>s.parseValue(u,h,w,a?.value),formatValue:a?.formatValue.bind(a),validate:()=>{r?.validateEdit()}})}function _purgeUnchangedEdits(e,t){const{editModelSvc:i}=e;i?.getEditMap().forEach((o,s)=>{o.forEach((n,r)=>{!t&&(n.state==="editing"||n.pendingValue===UNEDITED)||!_sourceAndPendingDiffer(n)&&(n.state!=="editing"||t)&&i?.removeEdits({rowNode:s,column:r})})})}function _refreshEditorOnColDefChanged(e,t){const i=t.comp?.getCellEditor();if(!i?.refresh)return;const{eventKey:o,cellStartedEdit:s}=t.editCompDetails.params,{column:n}=t,r=_createEditorParams(e,t,o,s),l=n.getColDef(),a=_getCellEditorDetails(e.userCompFactory,l,r);i.refresh(checkAndPreventDefault(a.params,o))}function checkAndPreventDefault(e,t){return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function _syncFromEditors(e,t){for(const i of e.editModelSvc?.getEditPositions()??[]){const o=_getCellCtrl(e,i);if(!o)continue;const s=o.comp?.getCellEditor();if(!s)continue;const{editorValue:n,editorValueExists:r,isCancelAfterEnd:l}=_valueFromEditor(e,s,t);l&&e.editModelSvc?.setEdit(i,{editorState:{isCancelAfterEnd:l}}),_syncFromEditor(e,i,n,void 0,!r,t)}}function _syncFromEditor(e,t,i,o,s,n){const{editModelSvc:r,valueSvc:l}=e;if(!r)return;const{rowNode:a,column:d}=t;if(!(a&&d))return;let c=r.getEdit(t);if(c?.sourceValue===void 0){const u=c?getNormalisedFormula(e,c.editorValue,!1,d):UNEDITED,h={sourceValue:l.getValue(d,a,"data"),pendingValue:u};n?.persist&&(h.state="changed"),c=r.setEdit(t,h)}r.setEdit(t,{editorValue:s?getNormalisedFormula(e,c.sourceValue,!0,d):i}),n?.persist&&_persistEditorValue(e,t)}function getNormalisedFormula(e,t,i,o){const{formula:s}=e;return o.isAllowFormula()&&s?.isFormula(t)?s?.normaliseFormula(t,i)??t:t}function _persistEditorValue(e,t){const{editModelSvc:i}=e,o=i?.getEdit(t),n={pendingValue:getNormalisedFormula(e,o?.editorValue,!1,t.column)};!o?.editorState?.cellStoppedEditing&&o?.state!=="editing"&&(n.state="changed"),i?.setEdit(t,n)}function _destroyEditors(e,t,i={}){if(t||(t=e.editModelSvc?.getEditPositions()),t)for(const o of t)_destroyEditor(e,o,i)}function _destroyEditor(e,t,i,o=_getCellCtrl(e,t)){const s=e.editModelSvc,n=s?.getEdit(t);let r;if(n&&n.state!=="editing"&&n.editorState?.cellStoppedEditing?r=n.state:r="changed",!o){n&&s?.setEdit(t,{state:r});return}const l=o.comp,a=l?.getCellEditor();if(l&&!a){if(o?.refreshCell(),n){s?.setEdit(t,{state:r});const c=e.gos.get("enableGroupEdit")?_enabledGroupEditStoppedArgs(n,i?.cancel):{valueChanged:!1,newValue:void 0,oldValue:n.sourceValue};dispatchEditingStopped(e,t,c,i)}return}if(_hasValidationRules(e)){const c=n&&a?.getValidationErrors?.(),u=s?.getCellValidationModel();c?.length?u?.setCellValidation(t,{errorMessages:c}):u?.clearCellValidation(t)}n&&s?.setEdit(t,{state:r}),l?.setEditDetails(),l?.refreshEditStyles(!1,!1),o?.refreshCell({force:!0,suppressFlash:!0});const d=s?.getEdit(t);if(d&&d.state!=="editing"){const c=i?.cancel,u=e.gos.get("enableGroupEdit")?_enabledGroupEditStoppedArgs(d,c):_cellEditStoppedArgs(d,n,c);dispatchEditingStopped(e,t,u,i)}}function _enabledGroupEditStoppedArgs(e,t){const{sourceValue:i,pendingValue:o}=e;let s;return!t&&o!==UNEDITED&&(s=o),{valueChanged:!t&&_sourceAndPendingDiffer(e),newValue:s,oldValue:i,value:i}}function _cellEditStoppedArgs(e,t,i){if(i||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let o=e.editorValue;return(o==null||o===UNEDITED)&&(o=t?.pendingValue),o===UNEDITED&&(o=void 0),{valueChanged:_sourceAndPendingDiffer(e),newValue:o,oldValue:e.sourceValue}}function dispatchEditingStopped(e,t,i,{silent:o,event:s}={}){const{editSvc:n,editModelSvc:r}=e,l=r?.getEdit(t),{editorState:a}=l||{},{isCancelBeforeStart:d}=a||{};!o&&!d&&(n?.dispatchCellEvent(t,s,"cellEditingStopped",i),r?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function _columnDefsRequireValidation(e){if(!e)return!1;for(let t=0,i=e.length;t<i;++t){const o=e[t],s=o.cellEditorParams;if(!(!s||!o.editable&&!o.groupRowEditable)&&(s.minLength!==void 0||s.maxLength!==void 0||s.getValidationErrors!==void 0||s.min!==void 0||s.max!==void 0))return!0}return!1}function _editorsRequireValidation(e){const t=e.rowRenderer.getCellCtrls();for(let i=0,o=t.length;i<o;++i){const n=t[i].comp?.getCellEditor();if(n){const r=_unwrapUserComp(n);if(r.getValidationElement||r.getValidationErrors)return!0}}return!1}function _hasValidationRules(e){return!!e.gos.get("getFullRowEditValidationErrors")||_columnDefsRequireValidation(e.colModel.getColumnDefs())||_editorsRequireValidation(e)}function _populateModelValidationErrors(e,t){if(!(t||_hasValidationRules(e)))return;const i=new EditCellValidationModel,{ariaAnnounce:o,localeSvc:s,editModelSvc:n,gos:r}=e,l=r.get("editType")==="fullRow",d=_getLocaleTextFunc(s)("ariaValidationErrorPrefix","Cell Editor Validation"),c=new Set;for(const u of e.rowRenderer.getCellCtrls()){const h=u.comp?.getCellEditor();if(!h)continue;const g=_unwrapUserComp(h),{rowNode:p,column:f}=u,m=g.getValidationErrors?.()??[],C=g.getValidationElement?.(!1)||!g.isPopup?.()&&u.eGui;if(C){const v=m!=null&&m.length>0,w=v?m.join(". "):"";_setAriaInvalid(C,v),v&&o.announceValue(`${d} ${m}`,"editorValidation"),C instanceof HTMLInputElement?C.setCustomValidity(w):C.classList.toggle("invalid",v)}m?.length>0&&i.setCellValidation({rowNode:p,column:f},{errorMessages:m}),c.add(u.rowCtrl)}if(_syncFromEditors(e,{persist:!1}),n?.setCellValidationModel(i),l){const u=_generateRowValidationErrors(e);n?.setRowValidationModel(u)}for(const u of c.values()){u.rowEditStyleFeature?.applyRowStyles();for(const h of u.getAllCellCtrls())h.tooltipFeature?.refreshTooltip(!0),h.editorTooltipFeature?.refreshTooltip(!0),h.editStyleFeature?.applyCellStyles?.()}}var _generateRowValidationErrors=e=>{const t=new EditRowValidationModel,i=e.gos.get("getFullRowEditValidationErrors"),o=e.editModelSvc?.getEditMap();if(!o)return t;for(const s of o.keys()){const n=o.get(s);if(!n)continue;const r=[],{rowIndex:l,rowPinned:a}=s;for(const c of n.keys()){const u=n.get(c);if(!u)continue;const{editorValue:h,pendingValue:g,sourceValue:p}=u,f=h??(g===UNEDITED?void 0:g)??p;r.push({column:c,colId:c.getColId(),rowIndex:l,rowPinned:a,oldValue:p,newValue:f})}const d=i?.({editorsState:r})??[];d.length>0&&t.setRowValidation({rowNode:s},{errorMessages:d})}return t};function _validateEdit(e){_populateModelValidationErrors(e,!0);const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const i=[];return t.forEach((o,s)=>{o.forEach(({errorMessages:n},r)=>{i.push({column:r,rowIndex:s.rowIndex,rowPinned:s.rowPinned,messages:n??null})})}),i}function _isManualPinnedRow(e){return!!(e.rowPinned&&e.pinnedSibling)}function _getNodesInRangeForSelection(e,t,i,o){const s=t==="top";if(!i)return _getNodesInRangeForSelection(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),o);if(!o){const a=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return _getNodesInRangeForSelection(e,t,i,s?e.getPinnedTopRow(a-1):e.getPinnedBottomRow(a-1))}let n=!1,r=!1;const l=[];return e.forEachPinnedRow(t,a=>{if(a===i&&!n){n=!0,l.push(a);return}if(n&&a===o){r=!0,l.push(a);return}n&&!r&&l.push(a)}),l}function _createCellEvent(e,t,i,{rowNode:o,column:s},n){return _addGridCommonParams(e.gos,{type:i,node:o,data:o.data,value:n,column:s,colDef:s.getColDef(),rowPinned:o.rowPinned,event:t,rowIndex:o.rowIndex})}function _isDeleteKey(e,t=!1){return e===KeyCode.DELETE?!0:!t&&e===KeyCode.BACKSPACE?_isMacOsUserAgent():!1}var CellKeyboardListenerFeature=class extends BeanStub{constructor(e,t,i,o){super(),this.cellCtrl=e,this.rowNode=i,this.rowCtrl=o,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case KeyCode.ENTER:this.onEnterKeyDown(e);break;case KeyCode.F2:this.onF2KeyDown(e);break;case KeyCode.ESCAPE:this.onEscapeKeyDown(e);break;case KeyCode.TAB:this.onTabKeyDown(e);break;case KeyCode.BACKSPACE:case KeyCode.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case KeyCode.DOWN:case KeyCode.UP:case KeyCode.RIGHT:case KeyCode.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){const{cellCtrl:i,beans:o}=this;if(!o.editSvc?.isEditing(i,{withOpenEditor:!0})){if(e.shiftKey&&i.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const s=i.getFocusedCellPosition();o.navigation?.navigateToNextCell(e,t,s,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:i}=this.beans;if(!t)return;const o=t.extendLatestRangeInDirection(e);o&&(e.key===KeyCode.LEFT||e.key===KeyCode.RIGHT?i?.ensureColumnVisible(o.column):i?.ensureRowVisible(o.rowIndex))}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:i,beans:o,rowNode:s}=this,{gos:n,rangeSvc:r,eventSvc:l,editSvc:a}=o;if(l.dispatchEvent({type:"keyShortcutChangedCellStart"}),_isDeleteKey(e,n.get("enableCellEditingOnBackspace"))&&!a?.isEditing(i,{withOpenEditor:!0})){if(r&&_isCellSelectionEnabled(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(i.isCellEditable()){const d=o.valueSvc.getDeleteValue(i.column,s);s.setDataValue(i.column,d,"cellClear")}}else a?.isEditing(i,{withOpenEditor:!0})||o.editSvc?.startEditing(i,{startedEdit:!0,event:t});l.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){const{cellCtrl:t,beans:i}=this,{editSvc:o,navigation:s}=i,n=o?.isEditing(t,{withOpenEditor:!0}),r=t.rowNode,l=o?.isRowEditing(r,{withOpenEditor:!0}),a=d=>{o?.startEditing(d,{startedEdit:!0,event:e,source:"edit"})&&e.preventDefault()};if(n||l){if(this.isCtrlEnter(e)){o?.applyBulkEdit(t,i?.rangeSvc?.getCellRanges()||[]);return}if(_populateModelValidationErrors(i),o?.checkNavWithValidation(void 0,e)==="block-stop")return;o?.isEditing(t,{withOpenEditor:!0})?o?.stopEditing(t,{event:e,source:"edit"}):l&&!t.isCellEditable()?o?.stopEditing({rowNode:r},{event:e,source:"edit"}):a(t)}else if(i.gos.get("enterNavigatesVertically")){const d=e.shiftKey?KeyCode.UP:KeyCode.DOWN;s?.navigateToNextCell(null,d,t.cellPosition,!1)}else{if(o?.hasValidationErrors())return;o?.hasValidationErrors(t)&&o.revertSingleCellEdit(t,!0),a(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===KeyCode.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:i}}=this;i?.isEditing()&&(_populateModelValidationErrors(this.beans),i?.checkNavWithValidation(void 0,e)==="block-stop")||i?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:i}}=this;i?.checkNavWithValidation(t,e)==="block-stop"&&i.revertSingleCellEdit(t),setTimeout(()=>{i?.stopEditing(t,{event:e,cancel:!0})})}processCharacter(e){const i=e.target!==this.eGui,{beans:{editSvc:o},cellCtrl:s}=this;if(i||o?.isEditing(s,{withOpenEditor:!0}))return;if(e.key===KeyCode.SPACE)this.onSpaceKeyDown(e);else if(o?.isCellEditable(s,"ui")){if(o?.hasValidationErrors()&&!o?.hasValidationErrors(s))return;o?.startEditing(s,{startedEdit:!0,event:e,source:"api",editable:!0}),!s.editCompDetails?.params?.suppressPreventDefault&&e.preventDefault()}}onSpaceKeyDown(e){const{gos:t,editSvc:i}=this.beans,{rowNode:o}=this.cellCtrl;!i?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&_isRowSelection(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,o,"spaceKey"),e.preventDefault()}},CellMouseListenerFeature=class extends BeanStub{constructor(e,t,i){super(),this.cellCtrl=e,this.column=i,this.beans=t}onMouseEvent(e,t){if(!_isStopPropagationForAgGrid(t))switch(e){case"click":this.onCellClicked(t);break;case"pointerdown":case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:i,editSvc:o,editModelSvc:s,frameworkOverrides:n,gos:r}=this.beans,l=e.ctrlKey||e.metaKey,{cellCtrl:a}=this,{column:d,cellPosition:c,rowNode:u}=a,h=_suppressCellMouseEvent(r,d,u,e);i&&l&&!h&&i.getCellRangeCount(c)>1&&i.intersectLastRange(!0);const g=a.createEvent(e,"cellClicked");g.isEventHandlingSuppressed=h,t.dispatchEvent(g);const p=d.getColDef();if(p.onCellClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{p.onCellClicked(g)})},0),!h&&s?.getState(a)!=="editing"){const f=o?.isEditing(),m=o?.isRangeSelectionEnabledWhileEditing(),C=s?.getCellValidationModel().getCellValidationMap().size??0,v=s?.getRowValidationModel().getRowValidationMap().size??0;if(f&&(m||C>0||v>0))return;o?.shouldStartEditing(a,e)?o?.startEditing(a,{event:e}):o?.shouldStopEditing(a,e)&&(this.beans.gos.get("editType")==="fullRow"?o?.stopEditing(a,{event:e,source:"edit"}):o?.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){const{column:t,beans:i,cellCtrl:o}=this,{eventSvc:s,frameworkOverrides:n,editSvc:r,editModelSvc:l,gos:a}=i,d=_suppressCellMouseEvent(a,o.column,o.rowNode,e),c=t.getColDef(),u=o.createEvent(e,"cellDoubleClicked");if(u.isEventHandlingSuppressed=d,s.dispatchEvent(u),typeof c.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{c.onCellDoubleClicked(u)})},0),!d&&r?.shouldStartEditing(o,e)&&l?.getState(o)!=="editing"){const h=r?.isEditing(),g=r?.isRangeSelectionEnabledWhileEditing(),p=l?.getCellValidationModel().getCellValidationMap().size??0,f=l?.getRowValidationModel().getRowValidationMap().size??0;if(h&&(g||p>0||f>0))return;r?.startEditing(o,{event:e})}}onMouseDown(e){const{shiftKey:t}=e,i=e.target,{cellCtrl:o,beans:s}=this,{eventSvc:n,rangeSvc:r,rowNumbersSvc:l,focusSvc:a,gos:d,editSvc:c}=s,{column:u,rowNode:h,cellPosition:g}=o,p=_suppressCellMouseEvent(d,u,h,e),f=()=>{const w=o.createEvent(e,"cellMouseDown");w.isEventHandlingSuppressed=p,n.dispatchEvent(w)};if(p){f();return}if(this.isRightClickInExistingRange(e))return;const m=r&&!r.isEmpty(),C=this.containsWidget(i),v=isRowNumberCol(u);if(!(l&&v&&!l.handleMouseDownOnCell(g,e))){if(!t||!m){const w=c?.isEditing(o),b=d.get("enableCellTextSelection")&&e.defaultPrevented,y=(_isBrowserSafari()||b)&&!w&&!_isFocusableFormField(i)&&!C;o.focusCell(y,e)}if(t&&m&&!a.isCellFocused(g)){e.preventDefault();const w=a.getFocusedCell();if(w){const{column:S,rowIndex:b,rowPinned:y}=w,R=!!c?.isRangeSelectionEnabledWhileEditing?.();c?.isEditing(w)&&!R&&c?.stopEditing(w),R||a.setFocusedCell({column:S,rowIndex:b,rowPinned:y,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}C||(r?.handleCellMouseDown(e,g),f())}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const i=t.isCellInAnyRange(this.cellCtrl.cellPosition),o=_interpretAsRightClick(this.beans,e);if(i&&o)return!0}return!1}containsWidget(e){return _isElementChildOfClass(e,"ag-selection-checkbox",3)||_isElementChildOfClass(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:i}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),i?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:i}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),i?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,i=t.contains(e.target),o=t.contains(e.relatedTarget);return i&&o}},CellPositionFeature=class extends BeanStub{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();_areEqual(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,i=e.getColSpan(t),o=[];if(i===1)o.push(e);else{let s=e;const n=e.getPinned();for(let r=0;s&&r<i&&(o.push(s),s=this.beans.visibleCols.getColAfter(s),!(!s||_missing(s)||n!==s.getPinned()));r++);}return o}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=_last(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,i=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const o=t.bodyWidth;return i+o+(e||0)}return i+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const i=_getRowHeightAsNumber(this.beans)*this.rowSpan;this.eContent.style.height=`${i}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},CSS_CELL="ag-cell",CSS_AUTO_HEIGHT="ag-cell-auto-height",CSS_NORMAL_HEIGHT="ag-cell-normal-height",CSS_CELL_FOCUS="ag-cell-focus",CSS_CELL_FIRST_RIGHT_PINNED="ag-cell-first-right-pinned",CSS_CELL_LAST_LEFT_PINNED="ag-cell-last-left-pinned",CSS_CELL_NOT_INLINE_EDITING="ag-cell-not-inline-editing",CSS_CELL_WRAP_TEXT="ag-cell-wrap-text",instanceIdSequence4=0,CellCtrl=class extends BeanStub{constructor(e,t,i,o){super(),this.column=e,this.rowNode=t,this.rowCtrl=o,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=i,this.gos=i.gos,this.editSvc=i.editSvc,this.hasEdit=!!i.editSvc;const{colId:s}=e;this.instanceId=s+"-"+instanceIdSequence4++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new CellPositionFeature(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this),this.editStyleFeature=e.editSvc?.createCellStyleFeature(this),this.mouseListener=new CellMouseListenerFeature(this,e,this.column),this.keyboardListener=new CellKeyboardListenerFeature(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&_isCellSelectionEnabled(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(this)),isRowNumberCol(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),_populateModelValidationErrors(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,i,o,s,n,r){this.comp=e,this.eGui=t,this.printLayout=s,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(o,r),this.refreshFirstAndLastStyles(),this.checkFormulaError(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer();const l=n?this.isCellEditable():void 0,a=!l&&this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0});if(l||a?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:l}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const d of this.onCompAttachedFuncs)d();this.onCompAttachedFuncs=[]}}checkFormulaError(){const e=!!this.beans.formula?.getFormulaError(this.column,this.rowNode);this.eGui.classList.toggle("formula-error",e)}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:i,ctrlsSvc:o,eventSvc:s}=e,n=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const l=_getLoadingCellRendererDetails(i,n,r);if(o.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let a;const d=new AgPromise(u=>{a=u}),[c]=this.addManagedListeners(s,{bodyScrollEnd:()=>{a(),c()}});return{loadingComp:l,onReady:d}}return{loadingComp:l,onReady:AgPromise.resolve()}}showValue(e,t){const{beans:i,column:o,rowNode:s,rangeFeature:n}=this,{userCompFactory:r}=i;let l=this.getValueToDisplay(),a;const d=s.stub&&s.groupData?.[o.getId()]==null,c=o.getColDef();if(d||this.isCellRenderer()){const u=this.createCellRendererParams();!d||isRowNumberCol(o)?a=_getCellRendererDetails(r,c,u):a=_getLoadingCellRendererDetails(r,c,u)}if(!a&&!d&&i.findSvc?.isMatch(s,o)){const u=this.createCellRendererParams();a=_getCellRendererDetails(r,{...o.getColDef(),cellRenderer:"agFindCellRenderer"},u)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(s,{checkSiblings:!0})){const u=this.editSvc.prepDetailsDuringBatch(this,{compDetails:a,valueToDisplay:l});u&&(u.compDetails?a=u.compDetails:u.valueToDisplay&&(l=u.valueToDisplay))}this.comp.setRenderDetails(a,l,e),this.customRowDragComp?.refreshVisibility(),!t&&n&&_requestAnimationFrame(i,()=>n?.refreshRangeStyleAndHandle()),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){const e="ag-cell-value",t=this.column.getColDef().cellRenderer==="agCheckboxCellRenderer";let i="";return t&&(i=" ag-allow-overflow"),`${e}${i}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&_isManualPinnedRow(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:i}=this.beans.gridOptions,o=_getCheckboxLocation(t),s=isColumnSelectionCol(this.column);return i==="custom"&&o!=="selectionColumn"&&s?!1:e.checkboxSelection||s&&typeof t=="object"&&_getCheckboxes(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),o=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||i||o||s}onPopupEditorClosed(){const{editSvc:e}=this.beans;e?.isEditing(this,{withOpenEditor:!0})&&e?.stopEditing(this,{source:e?.isBatchEditing()?"ui":"api"})}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:i,rowNode:o,comp:s,eGui:n,beans:{valueSvc:r,gos:l,editSvc:a}}=this;return _addGridCommonParams(l,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay({column:i,node:o,from:"edit"}).value,setValue:c=>a?.setDataValue({rowNode:o,column:i},c)||o.setDataValue(i,c),formatValue:this.formatValue.bind(this),data:o.data,node:o,pinned:i.getPinned(),colDef:i.getColDef(),column:i,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:s.getParentOfValue(),registerRowDragger:(c,u,h,g)=>this.registerRowDragger(c,u,g),setTooltip:(c,u)=>{l.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(c,u),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){const{editSvc:t,comp:i}=this;!i?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell({force:e,suppressFlash:t,newData:i}={}){const{editStyleFeature:o,customStyleFeature:s,rowCtrl:{rowEditStyleFeature:n},beans:{cellFlashSvc:r,filterManager:l},column:a,comp:d,suppressRefreshCell:c,tooltipFeature:u}=this;if(c)return;const{field:h,valueGetter:g,showRowGroup:p,enableCellChangeFlash:f}=a.getColDef(),m=h==null&&g==null&&p==null,C=e||m||i,v=!!d,w=this.updateAndFormatValue(v),S=C||w;if(v){if(S){this.showValue(!!i,!1);const b=l?.isSuppressFlashingCellsBecauseFiltering();!t&&!b&&f&&r?.flashCell(this),o?.applyCellStyles?.(),s?.applyUserStyles(),s?.applyClassesFromColDef(),n?.applyRowStyles(),this.checkFormulaError()}u?.refreshTooltip(),s?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,i=this.valueFormatted,{value:o,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit"});return this.value=o,this.valueFormatted=s,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i:!0}valuesAreEqual(e,t){const i=this.column.getColDef();return i.equals?i.equals(e,t):e===t}addDomData(e){const t=this.eGui;_setDomData(this.beans.gos,t,DOM_DATA_KEY_CELL_CTRL,this),e.addDestroyFunc(()=>_setDomData(this.beans.gos,t,DOM_DATA_KEY_CELL_CTRL,null))}createEvent(e,t){const{rowNode:i,column:o,value:s,beans:n}=this;return _createCellEvent(n,e,t,{rowNode:i,column:o},s)}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature?.getColSpanningList()??[]}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:i}=this;refreshFirstAndLastStyles(e,t,i.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);_setAriaColIndex(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){const i=this.editSvc?.allowedFocusTargetOnValidation(this);i&&i!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:i},comp:o}=this;if(!o||t?.isEditing(this)||!this.isCellFocused()||!i.shouldTakeFocus())return;const s=()=>{if(!this.isAlive())return;const n=o.getFocusableElement();this.isCellFocused()&&n.focus({preventScroll:!0})};if(e){setTimeout(s,0);return}s()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(isRowNumberCol(this.column)&&(e=!0),_addOrRemoveAttribute(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(CSS_CELL_FIRST_RIGHT_PINNED,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(CSS_CELL_LAST_LEFT_PINNED,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(_isCellFocusSuppressed(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const i=this.isCellFocused(),o=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss(CSS_CELL_FOCUS,i),i&&(e?.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let s=this.comp.getFocusableElement();if(o){const r=_findFocusableElements(s,null,!0);r.length&&(s=r[0])}const n=e?e.preventScrollOnBrowserFocus:!0;s.focus({preventScroll:n}),_placeCaretAtEnd(t,s)}i&&this.focusEventWhileNotReady&&(this.focusEventWhileNotReady=null),i&&e&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:_makeNull(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(CSS_CELL,!0),e.toggleCss(CSS_CELL_NOT_INLINE_EDITING,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(CSS_AUTO_HEIGHT,t),e.toggleCss(CSS_NORMAL_HEIGHT,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(CSS_CELL_WRAP_TEXT,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),i=this.createEvent(e,"cellContextMenu"),{beans:o}=this;o.eventSvc.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{o.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(i)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(_getActiveDomElement(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,i){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const o=this.createRowDragComp(e,t,i);o&&(this.customRowDragComp=o,this.addDestroyFunc(()=>{this.beans.context.destroyBean(o),this.customRowDragComp=null}),o.refreshVisibility())}createRowDragComp(e,t,i){const o=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,i);if(o)return this.beans.context.createBean(o),o}cellEditorAttached(){for(const e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}};function processClassRules(e,t,i,o,s,n){if(i==null&&t==null)return;const r={},l={},a=(d,c)=>{for(const u of d.split(" "))u.trim()!=""&&c(u)};if(i){const d=Object.keys(i);for(let c=0;c<d.length;c++){const u=d[c],h=i[u];let g;typeof h=="string"?g=e?e.evaluate(h,o):!0:typeof h=="function"&&(g=h(o)),a(u,p=>{g?r[p]=!0:l[p]=!0})}}if(t&&n)for(const d of Object.keys(t))a(d,c=>{r[c]||(l[c]=!0)});n&&Object.keys(l).forEach(n),Object.keys(r).forEach(s)}function calculateRowLevel(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var RowStyleService=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const i=this.gos,o=r=>{if(typeof r=="string")e.push(r);else if(Array.isArray(r))for(const l of r)e.push(l)},s=i.get("rowClass");s&&o(s);const n=i.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},l=n(r);o(l)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,i=>{e.push(i)},()=>{})}processRowClassRules(e,t,i){const{gos:o,expressionSvc:s}=this.beans,n=_addGridCommonParams(o,{data:e.data,node:e,rowIndex:e.rowIndex});processClassRules(s,void 0,o.get("rowClassRules"),n,t,i)}processStylesFromGridOptions(e){const t=this.gos,i=t.get("rowStyle"),o=t.getCallback("getRowStyle");let s;if(o){const n={data:e.data,node:e,rowIndex:e.rowIndex};s=o(n)}if(s||i)return Object.assign({},i,s)}},instanceIdSequence5=0,RowCtrl=class extends BeanStub{constructor(e,t,i,o,s){super(),this.rowNode=e,this.useAnimationFrameForCreate=o,this.printLayout=s,this.focusEventWhileNotReady=null,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.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+instanceIdSequence5++,this.rowId=_escapeString(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=calculateRowLevel(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=_escapeString(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,i,o){const{context:s,rowRenderer:n}=this.beans;o=setupCompBean(this,s,o);const r={rowComp:e,element:t,containerType:i,compBean:o};this.allRowGuis.push(r),this.updateGui(i,r),this.initialiseRowComp(r);const l=this.rowNode,a=this.rowType==="FullWidthLoading"||l.stub,d=!l.data&&this.beans.rowModel.getType()==="infinite";!a&&!d&&!l.rowPinned&&n.dispatchFirstDataRenderedEvent(),this.setupFocus()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";for(const i of this.allRowGuis)i.element.style.display=t}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),_isRowSelection(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const i=e.rowComp,o=this.getInitialRowClasses(e.containerType);for(const s of o)i.toggleCss(s,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&_setAriaExpanded(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(i),this.setRowCompRowBusinessKey(i),_setDomData(t,e.element,DOM_DATA_KEY_ROW_CTRL,this),e.compBean.addDestroyFunc(()=>_setDomData(t,e.element,DOM_DATA_KEY_ROW_CTRL,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=_escapeString(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(_batchCall(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(_batchCall(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const i=this.createBean(t,this.beans.context);this.rowDragComps.push(i),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(o=>o!==i),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(i,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),i=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(i)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const 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)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:i,beans:{visibleCols:o}}=this,s=!!e||!o.isPinningLeft(),n=!!t,r=!!i||!o.isPinningRight();return s&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const{rowNode:e,gos:t,beans:{colModel:i}}=this,o=e.stub&&!t.get("suppressServerSideFullWidthLoadingRow")&&!t.get("groupHideOpenParents"),s=this.isNodeFullWidthCell(),n=t.get("masterDetail")&&e.detail,r=i.isPivotMode(),l=_isFullWidthGroupRow(t,e,r);o?this.rowType="FullWidthLoading":n?this.rowType="FullWidthDetail":s?this.rowType="FullWidth":l?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:i}=this.beans;if(!i?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(i.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new CellCtrl(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,i=null){const o={list:[],map:{}},s=(d,c,u)=>{u!=null?o.list.splice(u,0,c):o.list.push(c),o.map[d]=c},n=[];for(const d of t){const c=d.getInstanceId();let u=e.map[c];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(d)),u&&s(c,u)}for(const d of e.list){const c=d.column.getInstanceId();if(o.map[c]!=null)continue;!this.isCellEligibleToBeRemoved(d,i)?n.push([c,d]):d.destroy()}if(n.length)for(const[d,c]of n){const u=o.list.findIndex(g=>g.column.getLeft()>c.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);s(d,c,h)}const{focusSvc:r,visibleCols:l}=this.beans,a=r.getFocusedCell();if(a&&a.column.getPinned()==i){const d=a.column.getInstanceId();if(!o.map[d]&&l.allCols.includes(a.column)){const u=this.createFocusedCellCtrl();if(u){const h=o.list.findIndex(p=>p.column.getLeft()>u.column.getLeft()),g=h===-1?void 0:Math.max(h-1,0);s(d,u,g)}}}return o}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,i=e.getFocusedCell();if(!i)return;const o=t?.getCellSpan(i.column,this.rowNode);if(o){if(o.firstNode!==this.rowNode||!o.doesSpanContain(i))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(i.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(const t of this.allRowGuis){const i=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(i,e)}}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const i=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i);const o=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,o,"left");const s=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,s,"right")}}isCellEligibleToBeRemoved(e,t){const{column:s}=e;if(s.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{visibleCols:n,editSvc:r}=this.beans,l=r?.isEditing(e),a=e.isCellFocused();return l||a?!(n.allCols.indexOf(s)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||_isDomLayout(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=_exists(this.rowNode.oldRowTop),{visibleCols:i}=this.beans,o=i.isPinningLeft(),s=i.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=o,n.right=s}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=o,n.right=s}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,l)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,l).params):!0,t=e(this.fullWidthGui,null),i=e(this.centerGui,null),o=e(this.leftGui,"left"),s=e(this.rightGui,"right");return t&&i&&o&&s}addListeners(){const{beans:e,gos:t,rowNode:i}=this,{expansionSvc:o,eventSvc:s,context:n,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...o?.getRowExpandedListeners(this)??{}}),i.detail&&this.addManagedListeners(i.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(i,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(s,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:l})=>{l&&!i.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(const a of this.allRowGuis)this.addRowDraggerToRow(a);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,n)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(const t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}for(const i of this.getAllCellCtrls())i.refreshCell(e);for(const i of this.allRowGuis)this.setRowCompRowId(i.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(i.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:"none",i=t==="above",o=t==="inside",s=t==="below",n=t!=="none",r=i||s,l=this.rowNode.uiLevel,a=r&&l>0,d=a?l.toString():"0";for(const c of this.allRowGuis){const u=c.rowComp;u.toggleCss("ag-row-highlight-above",i),u.toggleCss("ag-row-highlight-inside",o),u.toggleCss("ag-row-highlight-below",s),u.toggleCss("ag-row-highlight-indent",a),n?c.element.style.setProperty("--ag-row-highlight-level",d):c.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const e=this.rowNode.dragging;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:_makeNull(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:i,column:o}=t;if(!(i.element===e.target))return;const r=this.rowNode,{focusSvc:l,navigation:a}=this.beans,d=l.getFocusedCell(),c={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:d?.column??o};a?.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||_isStopPropagationForAgGrid(e))return;const t=this.allRowGuis.find(l=>l.element.contains(e.target)),i=t?t.element:null,o=i===e.target,s=_getActiveDomElement(this.beans);let n=!1;i&&s&&(n=i.contains(s)&&s.classList.contains("ag-cell"));let r=null;!o&&!n&&(r=_findNextFocusableElement(this.beans,i,!1,e.shiftKey)),(this.isFullWidth()&&o||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>_isVisible(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(const i of this.allRowGuis)_addOrRemoveAttribute(i.element,"tabindex",t)}setupFocus(){this.isFullWidth()&&(this.restoreFullWidthFocus(!0),this.onFullWidthRowFocused(this.focusEventWhileNotReady??void 0))}restoreFullWidthFocus(e=!1){const{focusSvc:t,editSvc:i}=this.beans;if(i?.isEditing(this)||!t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)||!t.shouldTakeFocus())return;const o=this.getFullWidthRowGuiForFocus();if(!o)return;const s=()=>{this.isAlive()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)&&o.element.focus({preventScroll:!0})};if(e){setTimeout(s,0);return}s()}getFullWidthRowGuiForFocus(e){if(this.fullWidthGui)return this.fullWidthGui;const t=this.beans.focusSvc.getFocusedCell(),i=this.beans.colModel.getCol(e?.column??t?.column);if(!i)return;const o=i?.pinned;return o==="right"?this.rightGui:o==="left"?this.leftGui:this.centerGui}setFullWidthRowFocusedClass(e,t){this.forEachGui(void 0,i=>{i.element.classList.toggle("ag-full-width-focus",t&&i===e)})}onFullWidthRowFocused(e){const{focusSvc:t}=this.beans;if(!(this.isFullWidth()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))){this.setFullWidthRowFocusedClass(void 0,!1);return}const o=this.getFullWidthRowGuiForFocus(e);if(!o){e&&(this.focusEventWhileNotReady=e),this.setFullWidthRowFocusedClass(void 0,!1);return}this.setFullWidthRowFocusedClass(o,!0),this.focusEventWhileNotReady=null,e?.forceBrowserFocus&&o.element.focus({preventScroll:!0})}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const i={list:[],map:{}};for(const o of e.list)o!==t&&(i.list.push(o),i.map[o.column.getInstanceId()]=o);return i}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"pointerdown":case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:i}=this;return _addGridCommonParams(this.gos,{type:e,node:i,data:i.data,rowIndex:i.rowIndex,rowPinned:i.rowPinned,event:t})}createRowEventWithSource(e,t){const i=this.createRowEvent(e,t);return i.source=this,i}onRowDblClick(e){if(_isStopPropagationForAgGrid(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),i=this.getColumnForFullWidth(t);if(!(!t||!i))return{rowGui:t,column:i}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=_isElementChildOfClass(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:i}=this.beans;t?.removeAllCellRanges();const o=this.findFullWidthInfoForEvent(e);if(!o)return;const{rowGui:s,column:n}=o,r=s.element,l=e.target,a=this.rowNode;let d=e.defaultPrevented||_isBrowserSafari();r&&r.contains(l)&&_isFocusableFormField(l)&&(d=!1),i.setFocusedCell({rowIndex:a.rowIndex,column:n,rowPinned:a.rowPinned,forceBrowserFocus:d})}isSuppressMouseEvent(e){const{gos:t,rowNode:i}=this;if(this.isFullWidth()){const s=this.findFullWidthRowGui(e.target);return _suppressFullWidthMouseEvent(t,s?.rowComp.getFullWidthCellRendererParams(),i,e)}const o=_getCellCtrlForEventTarget(t,e.target);return o!=null&&_suppressCellMouseEvent(t,o.column,i,e)}onRowClick(e){if(_isStopPropagationForAgGrid(e)||this.lastMouseDownOnDragger)return;const i=this.isSuppressMouseEvent(e),{eventSvc:o,selectionSvc:s}=this.beans,n=this.createRowEventWithSource("rowClicked",e);n.isEventHandlingSuppressed=i,o.dispatchEvent(n),!i&&s?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:i,rowNode:o}=this,s=_addGridCommonParams(i,{fullWidth:!0,data:o.data,node:o,value:o.key,valueFormatted:o.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,l,a,d)=>this.addFullWidthRowDragging(r,l,a,d),setTooltip:(r,l)=>{i.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(r,l)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return _getFullWidthDetailCellRendererDetails(n,s);case"FullWidthGroup":{const{value:r,valueFormatted:l}=this.beans.valueSvc.getValueForDisplay({node:this.rowNode,includeValueFormatted:!0,from:"edit"});return s.value=r,s.valueFormatted=l,_getFullWidthGroupCellRendererDetails(n,s)}case"FullWidthLoading":return _getFullWidthLoadingCellRendererDetails(n,s);default:return _getFullWidthCellRendererDetails(n,s)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,i="",o){const{rowDragSvc:s,context:n}=this.beans;if(!s||!this.isFullWidth())return;const r=s.createRowDragComp(()=>i,this.rowNode,void 0,e,t,o);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){const e=calculateRowLevel(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;for(const o of this.allRowGuis)o.rowComp.toggleCss(t,!0),o.rowComp.toggleCss(i,!1)}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(const i of this.allRowGuis)i.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(const i of this.allRowGuis)i.rowComp.toggleCss("ag-row-last",t)}}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(const t of e)for(const i of this.allRowGuis)i.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0)},e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,i=>i.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),i=this.isFullWidth(),{rowNode:o,beans:s}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(o.rowIndex%2===0?"ag-row-even":"ag-row-odd"),o.isRowPinned()&&(n.push("ag-row-pinned"),s.pinnedRowModel?.isManual()&&n.push("ag-row-pinned-manual")),!o.isRowPinned()&&o.pinnedSibling&&n.push("ag-row-pinned-source"),o.isSelected()&&n.push("ag-row-selected"),o.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),o.stub&&n.push("ag-row-loading"),i&&n.push("ag-full-width-row"),s.expansionSvc?.addExpandedCss(n,o),o.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=s;return r&&(r.processClassesFromGridOptions(n,o),r.preProcessRowClassRules(n,o)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),i&&(t==="left"&&n.push("ag-cell-last-left-pinned"),t==="right"&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:i}=e,{rowNode:o,beans:s,gos:n}=this;i.addManagedListeners(t,{pointerenter:r=>{r.pointerType==="mouse"&&o.dispatchRowEvent("mouseEnter")},pointerleave:r=>{r.pointerType==="mouse"&&o.dispatchRowEvent("mouseLeave")}}),i.addManagedListeners(o,{mouseEnter:()=>{!s.dragSvc?.dragging&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),o.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(i=>i.element);for(const i of t)i.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),i=this.applyPaginationOffset(t.top,!0)-100,o=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(i,e),o)}forEachGui(e,t){if(e)t(e);else for(const i of this.allRowGuis)t(i)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),s=_isGetRowHeightFunction(this.gos)?_getRowHeightForNode(this.beans,this.rowNode).height:void 0,n=s?`${Math.min(i,s)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,n&&r.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&_isAnimateRows(this.gos)&&!t.sticky)if(t.rowTop!=null){const s=this.roundRowTopToBounds(t.rowTop);this.setRowTop(s)}else for(const s of this.allRowGuis)s.rowComp.toggleCss("ag-opacity-zero",!0);this.fullWidthGui?.element.contains(_getActiveDomElement(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const i=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(i),this.beans.eventSvc.dispatchEvent(i),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const e=t=>{for(const i of t.list)i.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const i=this.beans.pageBounds.getPixelOffset();return e+i*(t?1:-1)}setRowTop(e){if(!this.printLayout&&_exists(e)){const t=this.applyPaginationOffset(e),s=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(s)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let i;if(t.sticky)i=t.stickyRowTop;else{const o=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,s=this.applyPaginationOffset(o);i=t.isRowPinned()?s:this.beans.rowContainerHeight.getRealPixelPosition(s)}return i+"px"}setRowTopStyle(e){for(const t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let i=null;for(const o of this.getAllCellCtrls())o.column==e&&(i=o);if(i!=null||t)return i;for(const o of this.getAllCellCtrls())o?.getColSpanningList().indexOf(e)>=0&&(i=o);return i}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const i=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),o=this.rowNode.rowIndex%2===0,s=i+this.rowNode.rowIndex+1;this.forEachGui(e,n=>{n.rowComp.setRowIndex(t),n.rowComp.toggleCss("ag-row-even",o),n.rowComp.toggleCss("ag-row-odd",!o),_setAriaRowIndex(n.element,s)})}},NavigationService=class extends BeanStub{constructor(){super(),this.beanName="navigation",this.onPageDown=_throttle(this.onPageDown,100),this.onPageUp=_throttle(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const i=e.key,o=e.altKey,s=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=_getCellPositionForEvent(this.gos,e);let l=!1;switch(i){case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:!s&&!o&&(this.onHomeOrEndKey(i),l=!0);break;case KeyCode.LEFT:case KeyCode.RIGHT:case KeyCode.UP:case KeyCode.DOWN:if(!r)return!1;s&&!o&&!n&&(this.onCtrlUpDownLeftRight(i,r),l=!0);break;case KeyCode.PAGE_DOWN:case KeyCode.PAGE_UP:!s&&!o&&(l=this.handlePageUpDown(i,r,t));break}return l&&e.preventDefault(),l}handlePageUpDown(e,t,i){return i&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===KeyCode.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:i,focusIndex:o,focusColumn:s,isAsync:n,rowPinned:r}){const{scrollFeature:l}=this.gridBodyCon;_exists(i)&&!i.isPinned()&&l.ensureColumnVisible(i),_exists(e)&&l.ensureIndexVisible(e,t),n||l.ensureIndexVisible(o);const{focusSvc:a,rangeSvc:d}=this.beans;a.setFocusedCell({rowIndex:o,column:s,rowPinned:r,forceBrowserFocus:!0}),d?.setRangeToCell({rowIndex:o,rowPinned:r,column:s})}onPageDown(e){const t=this.beans,i=getVScroll(t),o=this.getViewportHeight(),{pageBounds:s,rowModel:n,rowAutoHeight:r}=t,l=s.getPixelOffset(),a=i.top+o,d=n.getRowIndexAtPixel(a+l);r?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,i=getVScroll(t),{pageBounds:o,rowModel:s,rowAutoHeight:n}=t,r=o.getPixelOffset(),l=i.top,a=s.getRowIndexAtPixel(l+r);n?.active?this.navigateToNextPageWithAutoHeight(e,a,!0):this.navigateToNextPage(e,a,!0)}navigateToNextPage(e,t,i=!1){const{pageBounds:o,rowModel:s}=this.beans,n=this.getViewportHeight(),r=o.getFirstRow(),l=o.getLastRow(),a=o.getPixelOffset(),d=s.getRow(e.rowIndex),c=i?d?.rowHeight-n-a:n-a,u=d?.rowTop+c;let h=s.getRowIndexAtPixel(u+a);if(h===e.rowIndex){const p=i?-1:1;t=h=e.rowIndex+p}let g;i?(g="bottom",h<r&&(h=r),t<r&&(t=r)):(g="top",h>l&&(h=l),t>l&&(t=l)),this.isRowTallerThanView(s.getRow(h))&&(t=h,g="top"),this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const o=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:o,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const i=t?-1:1,o=this.getViewportHeight(),{pageBounds:s,rowModel:n}=this.beans,r=s.getLastRow();let l=0,a=e.rowIndex;for(;a>=0&&a<=r;){const d=n.getRow(a);if(d){const c=d.rowHeight??0;if(l+c>o)break;l+=c}a+=i}return Math.max(0,Math.min(a,r))}getViewportHeight(){const e=this.beans,t=getVScroll(e),i=this.beans.scrollVisibleSvc.getScrollbarWidth();let o=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(o-=i),o}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const i=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),o=this.getNormalisedPosition(i),{rowIndex:s,rowPinned:n,column:r}=o??i,l=r;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:l,focusIndex:s,focusColumn:l,rowPinned:n})}onHomeOrEndKey(e){const t=e===KeyCode.PAGE_HOME,{visibleCols:i,pageBounds:o,rowModel:s}=this.beans,n=i.allCols,r=t?o.getFirstRow():o.getLastRow(),l=s.getRow(r);if(!l)return;const a=(t?n:[...n].reverse()).find(d=>!d.isSuppressNavigable(l));a&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:a,focusIndex:r,focusColumn:a})}onTabKeyDown(e,t){const i=t.shiftKey,o=this.tabToNextCellCommon(e,i,t),s=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:l,gos:a}=s;if(o!==!1){o?t.preventDefault():o===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(i);return}if(i){const{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?d===0:d===r.getFirstRow())&&(a.get("headerHeight")===0||_isHeaderFocusSuppressed(s)?_focusNextGridCoreContainer(s,!0,!0):(t.preventDefault(),l.focusPreviousFromFirstCell(t)))}else e instanceof CellCtrl&&e.focusCell(!0),(l.focusOverlay(!1)||_focusNextGridCoreContainer(s,i))&&t.preventDefault()}tabToNextCell(e,t){const i=this.beans,{focusSvc:o,rowRenderer:s}=i,n=o.getFocusedCell();if(!n)return!1;let r=_getCellByPosition(i,n);return!r&&(r=s.getRowByPosition(n),!r?.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t,"api")}tabToNextCellCommon(e,t,i,o="ui"){const{editSvc:s,focusSvc:n}=this.beans;let r;const l=e instanceof CellCtrl?e:e.getAllCellCtrls()?.[0];return s?.isEditing()?r=s?.moveToNextCell(l,t,i,o):r=this.moveToNextCellNotEditing(e,t,i),r===null?r:r||!!n.focusedHeader}moveToNextCellNotEditing(e,t,i){const o=this.beans.visibleCols.allCols;let s;if(e instanceof RowCtrl){if(s={...e.getRowPosition(),column:t?o[0]:_last(o)},this.gos.get("embedFullWidthRows")&&i){const r=e.findFullWidthInfoForEvent(i);r&&(s.column=r.column)}}else s=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(s,{backwards:t,startEditing:!1});if(n===!1)return null;if(n instanceof CellCtrl)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return _exists(n)}findNextCellToFocusOn(e,{backwards:t,startEditing:i,skipToNextEditableCell:o}){let s=e;const n=this.beans,{cellNavigation:r,gos:l,focusSvc:a,rowRenderer:d,rangeSvc:c}=n;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=r.getNextTabbedCell(s,t);const u=l.getCallback("tabToNextCell");if(_exists(u)){const f=u({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:s||null});if(f===!0)s=e;else{if(f===!1)return!1;s={rowIndex:f.rowIndex,column:f.column,rowPinned:f.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const p=getFocusHeaderRowCount(n);return a.focusHeaderPosition({headerPosition:{headerRowIndex:p+s.rowIndex,column:s.column},fromCell:!0}),null}const h=l.get("editType")==="fullRow";if(i&&(!h||o)&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const g=_getCellByPosition(n,s);if(!g){const p=d.getRowByPosition(s);if(!p||!p.isFullWidth()||i)continue;return{...p.getRowPosition(),column:s?.column}}if(!r.isSuppressNavigable(g.column,g.rowNode))return g.setFocusedCellPosition(s),c?.setRangeToCell(s),g}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:i,rowModel:o}=this.beans;return t==="top"?i?.getPinnedTopRow(e):t==="bottom"?i?.getPinnedBottomRow(e):o.getRow(e)}navigateToNextCell(e,t,i,o){let s=i,n=!1;const r=this.beans,{cellNavigation:l,focusSvc:a,gos:d}=r;for(;s&&(s===i||!this.isValidNavigateCell(s));)d.get("enableRtl")?t===KeyCode.LEFT&&(s=this.getLastCellOfColSpan(s)):t===KeyCode.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=l.getNextCellToFocus(t,s),n=_missing(s);if(n&&e&&e.key===KeyCode.UP&&(s={rowIndex:-1,rowPinned:null,column:i.column}),o){const u=d.getCallback("navigateToNextCell");if(_exists(u)){const g=u({key:t,previousCellPosition:i,nextCellPosition:s||null,event:e});_exists(g)?s={rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:s=null}}if(!s)return;if(s.rowIndex<0){const u=getFocusHeaderRowCount(r);a.focusHeaderPosition({headerPosition:{headerRowIndex:u+s.rowIndex,column:i.column},event:e||void 0,fromCell:!0});return}const c=this.getNormalisedPosition(s);c?this.focusPosition(c):this.tryToFocusFullWidthRow(s)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const i=_getCellByPosition(this.beans,e);return i?(e=i.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:i,rowRenderer:o,focusSvc:s,eventSvc:n}=this.beans,r=i.allCols;if(!o.getRowByPosition(e)?.isFullWidth())return!1;const a=s.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?_last(r):r[0])};this.focusPosition(d);const c=t??(a!=null&&_isRowBefore(d,a));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:i}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),i?.setRangeToCell(e)}isValidNavigateCell(e){return!!_getRowNode(this.beans,e)}getLastCellOfColSpan(e){const t=_getCellByPosition(this.beans,e);if(!t)return e;const i=t.getColSpanningList();return i.length===1?e:{rowIndex:e.rowIndex,column:_last(i),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=_isGroupRowsSticky(this.gos),i=this.beans.rowModel.getRow(e.rowIndex),o=t&&i?.sticky,{scrollFeature:s}=this.gridBodyCon;!o&&_missing(e.rowPinned)&&s.ensureIndexVisible(e.rowIndex),e.column.isPinned()||s.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function getVScroll(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var KeyboardNavigationModule={moduleName:"KeyboardNavigation",version:VERSION,beans:[NavigationService,CellNavigationService,HeaderNavigationService],apiFunctions:{getFocusedCell,clearFocusedCell,setFocusedCell,setFocusedHeader,tabToNextCell,tabToPreviousCell}},PageBoundsListener=class extends BeanStub{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:i}=this.beans;t?t.calculatePages():e.calculateBounds(0,i.getRowCount()-1)}},PageBoundsService=class extends BeanStub{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,i=e?.rowTop??0,o=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:i,pageLastPixel:o}}calculateBounds(e,t){const{rowModel:i}=this.beans,o=i.getRowBounds(e);o&&(o.rowIndex=e),this.topRowBounds=o;const s=i.getRowBounds(t);s&&(s.rowIndex=t),this.bottomRowBounds=s,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},pinnedColumnModuleCSS=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",SetPinnedWidthFeature=class extends BeanStub{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const i of this.elements)i&&(_setDisplayed(i,t),_setFixedWidth(i,e))}},PinnedColumnService=class extends BeanStub{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:i}=this.beans,o=_isDomLayout(e,"print"),s=o?0:t.getColsLeftWidth(),n=o?0:t.getDisplayedColumnsRightWidth();s!=this.leftWidth&&(this.leftWidth=s,i.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,i.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=_getInnerWidth(e);if(t<=50)return;const i=this.getPinnedColumnsOverflowingViewport(t-50),o=this.gos.getCallback("processUnpinnedColumns"),{columns:s,hasLockedPinned:n}=i;let r=s;!r.length&&!n||(o&&(r=o({columns:r,viewportWidth:t})),r?.length&&(r=r.filter(l=>!isRowNumberCol(l)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new SetPinnedWidthFeature(e,t)}setColsPinned(e,t,i){const{colModel:o,colAnimation:s,visibleCols:n,gos:r}=this.beans;if(!o.cols||!e?.length)return;if(_isDomLayout(r,"print")){_warn(37);return}s?.start();let l;t===!0||t==="left"?l="left":t==="right"?l="right":l=null;const a=[];for(const d of e){if(!d)continue;const c=o.getCol(d);c&&c.getPinned()!==l&&(this.setColPinned(c,l),a.push(c))}a.length&&(n.refresh(i),dispatchColumnPinnedEvent(this.eventSvc,a,i)),s?.finish()}initCol(e){const{pinned:t,initialPinned:i}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,i)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const i=e.pinned==="left",o=e.pinned==="right";e.hidden=!0;const s=()=>{const n=i?this.leftWidth:this.rightWidth;if(n==null)return;const r=n==0,l=e.hidden!==r,a=this.gos.get("enableRtl"),d=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(a&&i||!a&&o)?n+d:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),l&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:s,rightPinnedWidthChanged:s,scrollVisibilityChanged:s,scrollbarWidthChanged:s})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:o,rightWidth:s}=this,n=_getInnerWidth(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(o+s+e>n)if(n>o+s)e=n-o-s;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,i=this.leftWidth??0,o=t+i;let s=!1;if(o<e)return{columns:[],hasLockedPinned:s};const{visibleCols:n}=this.beans,r=[...n.leftCols],l=[...n.rightCols];let a=0,d=0;const c=0,u=[];let h=o-c-e;for(;(d<r.length||a<l.length)&&h>0;){if(a<l.length){const g=l[a++];if(g.colDef.lockPinned){s=!0;continue}h-=g.getActualWidth(),u.push(g)}if(d<r.length&&h>0){const g=r[d++];if(g.colDef.lockPinned){s=!0;continue}h-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:s}}},PinnedColumnModule={moduleName:"PinnedColumn",version:VERSION,beans:[PinnedColumnService],css:[pinnedColumnModuleCSS]},BaseAriaAnnouncementService=class extends AgBeanStub{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=_debounce(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=_getDocument(e),i=this.descriptionContainer=t.createElement("div");i.classList.add("ag-aria-description-container"),_setAriaLive(i,"polite"),_setAriaRelevant(i,"additions text"),_setAriaAtomic(i,!0),e.eRootDiv.appendChild(i)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}\u200B`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(_clearElement(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},AriaAnnouncementService=class extends BaseAriaAnnouncementService{},AriaModule={moduleName:"Aria",version:VERSION,beans:[AriaAnnouncementService]},columnDelayRenderCSS=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",HideClass="ag-delay-render",ColumnDelayRenderService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(HideClass)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;const{renderStatus:t,ctrlsSvc:i}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}i.getGridBodyCtrl().eGridBody.classList.remove(HideClass),this.alreadyRevealed=!0}},ColumnDelayRenderModule={moduleName:"ColumnDelayRender",version:VERSION,beans:[ColumnDelayRenderService],css:[columnDelayRenderCSS]};function showLoadingOverlay(e){e.overlays?.showLoadingOverlay()}function showNoRowsOverlay(e){e.overlays?.showNoRowsOverlay()}function hideOverlay(e){e.overlays?.hideOverlay()}var overlayWrapperComponentCSS=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex;padding:var(--ag-spacing)}",OverlayWrapperElement={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},OverlayWrapperComponent=class extends Component{constructor(){super(OverlayWrapperElement),this.eOverlayWrapper=RefPlaceholder,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(overlayWrapperComponentCSS)}handleKeyDown(e){if(e.key!==KeyCode.TAB||e.defaultPrevented||_isStopPropagationForAgGrid(e))return;const{beans:t,eOverlayWrapper:i}=this;if(i&&_findNextFocusableElement(t,i,!1,e.shiftKey))return;let s=!1;e.shiftKey?s=t.focusSvc.focusGridView({column:_last(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):s=_focusNextGridCoreContainer(t,!1),s&&e.preventDefault()}updateLayoutClasses(e,t){const i=this.eOverlayWrapper;if(!i)return;const o=i.classList,{AUTO_HEIGHT:s,NORMAL:n,PRINT:r}=LayoutCssClasses;o.toggle(s,t.autoHeight),o.toggle(n,t.normal),o.toggle(r,t.print)}postConstruct(){this.createManagedBean(new LayoutFeature(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper?.classList;if(!t){this.activeCssClass=null;return}this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=i,!e)return this.refreshWrapperPadding(),AgPromise.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),i&&this.isGridFocused()){const o=_getActiveDomElement(this.beans);o&&!_isNothingFocused(this.beans)&&(this.elToFocusAfter=o)}return e.then(o=>{const s=this.eOverlayWrapper;if(!s){this.destroyBean(o);return}if(this.activePromise!==e){this.activeOverlay!==o&&(this.destroyBean(o),o=null);return}this.activePromise=null,o&&(this.activeOverlay!==o&&(s.appendChild(o.getGui()),this.activeOverlay=o),i&&this.isGridFocused()&&_focusInto(s))}),e}refreshWrapperPadding(){if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}const e=!!this.activeOverlay||!!this.activePromise;let t=0;e&&!this.overlayExclusive&&(t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),t!==this.oldWrapperPadding&&(this.oldWrapperPadding=t,this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`))}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);const i=this.eOverlayWrapper;i&&_clearElement(i),t?.focus?.({preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=_getActiveDomElement(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},OverlayWrapperSelector={selector:"AG-OVERLAY-WRAPPER",component:OverlayWrapperComponent},overlayCompTypeOptionalMethods=["refresh"],overlayCompType=e=>({name:e,optionalMethods:overlayCompTypeOptionalMethods}),LoadingOverlayDef={id:"agLoadingOverlay",overlayType:"loading",comp:overlayCompType("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:e=>{const t=e.get("loading");return t===!1||e.get("suppressLoadingOverlay")===!0&&t!==!0}},NoRowsOverlayDef={id:"agNoRowsOverlay",overlayType:"noRows",comp:overlayCompType("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:e=>e.get("suppressNoRowsOverlay")},NoMatchingRowsOverlayDef={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:overlayCompType("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},ExportingOverlayDef={id:"agExportingOverlay",overlayType:"exporting",comp:overlayCompType("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},CustomOverlayDef={id:"activeOverlay",comp:overlayCompType("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},getActiveOverlayDef=e=>e?{agLoadingOverlay:LoadingOverlayDef,agNoRowsOverlay:NoRowsOverlayDef,agNoMatchingRowsOverlay:NoMatchingRowsOverlayDef,agExportingOverlay:ExportingOverlayDef}[e]??CustomOverlayDef:null,getOverlayDefForType=e=>e?{loading:LoadingOverlayDef,noRows:NoRowsOverlayDef,noMatchingRows:NoMatchingRowsOverlayDef,exporting:ExportingOverlayDef}[e]:null,OverlayService=class extends BeanStub{constructor(){super(...arguments),this.beanName="overlays",this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.newColumnsLoadedCleanup=null}postConstruct(){const e=this.gos;this.showInitialOverlay=_isClientSideRowModel(e);const t=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[i,o,s,n]=this.addManagedEventListeners({newColumnsLoaded:t,rowCountReady:()=>{this.disableInitialOverlay(),t(),o()},rowDataUpdated:t,modelUpdated:t});this.newColumnsLoadedCleanup=i,this.addManagedPropertyListeners(["loading","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams"],r=>this.onPropChange(new Set(r.changeSet?.properties)))}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(e,t){this.isAlive()&&(t?this.eWrapper===e&&(this.eWrapper=void 0):this.eWrapper=e,this.updateOverlay(!1))}isVisible(){return!!this.currentDef}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos;if(!this.eWrapper||e.get("activeOverlay")||this.isDisabled(LoadingOverlayDef))return;const t=e.get("loading");!t&&t!==void 0||this.doShowOverlay(LoadingOverlayDef)}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;!this.eWrapper||e.get("activeOverlay")||e.get("loading")||this.isDisabled(NoRowsOverlayDef)||(this.userForcedNoRows=!0,this.doShowOverlay(NoRowsOverlayDef))}async showExportOverlay(e){const{gos:t,beans:i}=this;if(!this.eWrapper||t.get("activeOverlay")||t.get("loading")||this.isDisabled(ExportingOverlayDef)||this.userForcedNoRows&&this.currentDef===NoRowsOverlayDef){e();return}const o=this.getDesiredDefWithOverride(ExportingOverlayDef);if(!o){e();return}this.exportsInProgress++,this.focusedCell=i.focusSvc.getFocusedCell(),await this.doShowOverlay(o),await new Promise(n=>setTimeout(()=>n()));const s=Date.now();try{e()}finally{const n=Date.now()-s,r=Math.max(0,300-n),l=()=>{this.exportsInProgress--,this.exportsInProgress===0&&(this.updateOverlay(!1),_attemptToRestoreCellFocus(i,this.focusedCell),this.focusedCell=null)};r>0?setTimeout(()=>l(),r):l()}}hideOverlay(){const e=this.gos;this.showInitialOverlay=!1;const t=this.userForcedNoRows;if(this.userForcedNoRows=!1,e.get("loading")){_warn(99);return}if(e.get("activeOverlay")){_warn(296);return}if(this.currentDef===NoMatchingRowsOverlayDef){_warn(297);return}this.doHideOverlay(),t&&this.getOverlayDef()!==NoRowsOverlayDef&&this.updateOverlay(!1)}getOverlayWrapperSelector(){return OverlayWrapperSelector}getOverlayWrapperCompClass(){return OverlayWrapperComponent}onPropChange(e){const t=e.has("activeOverlay");if((t||e.has("loading"))&&this.updateOverlay(t))return;const i=this.currentDef,o=this.eWrapper?.activeOverlay;if(o&&i){const s=e.has("activeOverlayParams");if(i===CustomOverlayDef)s&&o.refresh?.(this.makeCompParams(!0));else{const n=i.paramsKey;(e.has("overlayComponentParams")||n&&e.has(n))&&o.refresh?.(this.makeCompParams(!1,n,i.overlayType))}}}updateOverlay(e){const t=this.eWrapper;if(!t)return this.currentDef=null,!1;const i=this.getDesiredDefWithOverride(),o=this.currentDef,s=i===CustomOverlayDef&&e;return i!==o?i?(this.doShowOverlay(i),!0):(this.disableInitialOverlay(),this.doHideOverlay()):s&&i?(t.hideOverlay(),this.doShowOverlay(i),!0):(i||this.disableInitialOverlay(),!1)}getDesiredDefWithOverride(e){const{gos:t}=this;let i=getActiveOverlayDef(t.get("activeOverlay"));return i||(i=e??this.getOverlayDef(),i&&this.isDisabled(i)&&(i=null)),i}getOverlayDef(){const{gos:e,beans:t}=this,{rowModel:i}=t,o=e.get("loading");if(o!==void 0){if(this.disableInitialOverlay(),o)return LoadingOverlayDef}else if(this.showInitialOverlay){if(!this.isDisabled(LoadingOverlayDef)&&(!e.get("columnDefs")||!e.get("rowData")))return LoadingOverlayDef;this.disableInitialOverlay()}else this.disableInitialOverlay();const n=i.getOverlayType();return getOverlayDefForType(n)}disableInitialOverlay(){this.showInitialOverlay=!1,this.newColumnsLoadedCleanup?.(),this.newColumnsLoadedCleanup=null}doShowOverlay(e){const{gos:t,beans:i}=this,{userCompFactory:o}=i;this.currentDef=e;const s=e!==CustomOverlayDef,n=!!e.exclusive;this.exclusive=n;let r;(e.paramsKey&&t.get(e.paramsKey)||e.compKey&&t.get(e.compKey))&&(r=e.paramsKey);let l;s&&(t.get("overlayComponent")||t.get("overlayComponentSelector"))&&(l=o.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),l??(l=o.getCompDetailsFromGridOptions(e.comp,s?e.id:void 0,this.makeCompParams(!s,r,e.overlayType),!1));const a=l?.newAgStackInstance()??null,d=this.eWrapper?this.eWrapper.showOverlay(a,e.wrapperCls,n):AgPromise.resolve();return this.eWrapper?.refreshWrapperPadding(),this.setExclusive(n),d}makeCompParams(e,t,i){const{gos:o}=this,s=e?o.get("activeOverlayParams"):{...o.get("overlayComponentParams"),...t&&o.get(t)||null,overlayType:i};return _addGridCommonParams(o,s??{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;const t=this.eWrapper;return t&&(t.hideOverlay(),t.refreshWrapperPadding(),this.setExclusive(!1)),e}setExclusive(e){this.oldExclusive!==e&&(this.oldExclusive=e,this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"}))}isDisabled(e){const{gos:t}=this;return e.overlayType&&t.get("suppressOverlays")?.includes(e.overlayType)||e.isSuppressed?.(t)===!0}},OverlayModule={moduleName:"Overlay",version:VERSION,userComponents:{agLoadingOverlay:LoadingOverlayComponent,agNoRowsOverlay:NoRowsOverlayComponent,agNoMatchingRowsOverlay:NoMatchingRowsOverlayComponent,agExportingOverlay:ExportingOverlayComponent},apiFunctions:{showLoadingOverlay,showNoRowsOverlay,hideOverlay},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[OverlayService]},RowContainerHeightService=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=_getMaxDivHeight(),_logIfDebug(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,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,t=e*this.pixelsToShave;_logIfDebug(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),i=e/t;return this.maxScrollY*i}},ROW_ANIMATION_TIMEOUT=400,RowRenderer=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{for(const n of this.getAllCellCtrls())n.onCellSelectionChanged()},t=()=>{for(const n of this.getAllCellCtrls())n.updateRangeBordersIfRangeCount()},i=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},o=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>o()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{_isCellSelectionEnabled(this.gos)?i():o()}),_isCellSelectionEnabled(this.gos)&&i()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",o=>this.onSuppressCellFocusChanged(o.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:o,previousValue:s})=>{(!s&&o||s&&!o)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:i}=this.beans;if(i&&this.addManagedPropertyListener("showOpenedGroup",()=>{const o=i.columns;o.length&&this.refreshCells({columns:o,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const o=this.gridBodyCtrl;o.setStickyTopHeight(0),o.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=_isDomLayout(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new RowCtrlCache(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),i=this.cachedRowCtrls?.getEntries()??[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}isCellBeingRendered(e,t){const i=this.rowCtrlsByRowIndex[e];return!t||!i?!!i:i.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!i.getCellCtrl(t)||!i.isRowRendered()}updateCellFocus(e){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(e?.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t)for(const i of this.getAllCellCtrls())t.onFlashCells(i,e)},columnHoverChanged:()=>{for(const e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(const e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.getCols();for(const t of e){const i=a=>{for(const d of this.getAllCellCtrls())d.column===t&&a(d)},o=()=>{i(a=>a.onLeftChanged())},s=()=>{i(a=>a.onWidthChanged())},n=()=>{i(a=>a.onFirstRightPinnedChanged())},r=()=>{i(a=>a.onLastLeftPinnedChanged())},l=()=>{i(a=>a.onColDefChanged())};t.__addEventListener("leftChanged",o),t.__addEventListener("widthChanged",s),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",l),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",o),t.__removeEventListener("widthChanged",s),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",l)})}}onDomLayoutChanged(){const e=_isDomLayout(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];for(const i of this.getAllRowCtrls()){const o=i.getCellCtrl(e,!0)?.eGui;o&&t.push(o)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,i){const{pinnedRowModel:o,beans:s,printLayout:n}=this,r=Object.fromEntries(e.map(a=>[a.rowNode.id,a]));o?.forEachPinnedRow(t,(a,d)=>{const c=e[d];c&&o.getPinnedRowById(c.rowNode.id,t)===void 0&&(c.destroyFirstPass(),c.destroySecondPass()),a.id in r&&i?(e[d]=r[a.id],delete r[a.id]):e[d]=new RowCtrl(a,s,!1,!1,n)});const l=(t==="top"?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount())??0;e.length=l}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const i=o=>{const s=o[e.rowIndex];s&&s.rowNode===e&&(s.destroyFirstPass(),s.destroySecondPass(),o[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":i(this.topRowCtrls);break;case"bottom":i(this.bottomRowCtrls);break;default:i(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(const o of e??[])this.redrawRow(o,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const i=!e.domLayoutChanged&&!!e.recycleRows,o=e.animate&&_isAnimateRows(this.gos),s=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n,gos:r}=this;if(n){n.checkStickyRows();const l=n.extraTopHeight+n.extraBottomHeight;l&&this.updateContainerHeights(l)}this.recycleRows(s,o),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?i:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let i=this.pageBounds.getCurrentPageHeight();i===0&&(i=1),t.setModelHeight(i+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(_errMsg(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,i=this.findPositionToFocus(e);if(!i){t.focusHeaderPosition({headerPosition:{headerRowIndex:getFocusHeaderRowCount(this.beans)-1,column:e.column}});return}if(e.rowIndex!==i.rowIndex||e.rowPinned!=i.rowPinned){t.setFocusedCell({...i,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(_addGridCommonParams(this.gos,{...i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:i}=this.beans;let o=e;for(o.rowPinned==null&&t&&i&&!t.isRowInPage(o.rowIndex)&&(o={rowPinned:null,rowIndex:i.getFirstRow()});o;){if(o.rowPinned==null&&i)if(o.rowIndex<i.getFirstRow()){if(o=_getRowAbove(this.beans,{rowPinned:null,rowIndex:0}),!o)return null}else o.rowIndex>i.getLastRow()&&(o={rowPinned:null,rowIndex:i.getLastRow()});const s=this.getRowByPosition(o);if(s?.isAlive())return{...s.getRowPosition(),column:e.column};o=_getRowAbove(this.beans,o)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),i=t.length;for(let o=0;o<i;o++){const s=t[o].getAllCellCtrls(),n=s.length;for(let r=0;r<n;r++)e.push(s[r])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),i=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...i,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,i){const o=this.rowCtrlsByRowIndex[t];o&&o.addEventListener(e,i)}refreshCells({rowNodes:e,columns:t,force:i,suppressFlash:o}={}){const s={force:i,newData:!1,suppressFlash:o};for(const n of this.getCellCtrls(e,t))n.refreshOrDestroyCell(s);this.refreshFullWidth(e)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const i of this.getRowCtrls(e)){if(!i.isFullWidth())continue;i.refreshFullWidth()||(t=!0,this.redrawRow(i.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=mapRowNodes(e),i=this.getAllRowCtrls();return!e||!t?i:i.filter(o=>{const s=o.rowNode;return isRowInMap(s,t)})}getCellCtrls(e,t){let i;_exists(t)&&(i={},t.forEach(s=>{const n=this.colModel.getCol(s);_exists(n)&&(i[n.getId()]=!0)}));const o=[];for(const s of this.getRowCtrls(e))for(const n of s.getAllCellCtrls()){const r=n.column.getId();i&&!i[r]||o.push(n)}return o}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const i of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[i].rowNode.id==null&&e.push(i);this.removeRowCtrls(e);const t={};for(const i of Object.values(this.rowCtrlsByRowIndex)){const o=i.rowNode;t[o.id]=i}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const i of e){const o=this.rowCtrlsByRowIndex[i];o&&(o.destroyFirstPass(t),o.destroySecondPass()),delete this.rowCtrlsByRowIndex[i]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:i}=this.beans,{afterScroll:o}=e;let s;const n=this.stickyRowFeature;n&&(s=t?.getFocusCellToUseAfterRefresh()||void 0);const r=this.firstRenderedRow,l=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let a=!1;if(n){a=n.checkStickyRows();const c=n.extraTopHeight+n.extraBottomHeight;c&&this.updateContainerHeights(c)}const d=this.firstRenderedRow!==r||this.lastRenderedRow!==l;if(!(o&&!a&&!d)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,o),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(o&&!a),s!=null)){const c=t?.getFocusCellToUseAfterRefresh();s!=null&&c==null&&(i?.flushAllFrames(),this.restoreFocusedCell(s))}}removeRowCompsNotToDraw(e,t){const i={};for(const n of e)i[n]=!0;const s=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!i[n]);this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){const t=[];for(let r=this.firstRenderedRow;r<=this.lastRenderedRow;r++)t.push(r);const i=this.beans.pagination,o=this.beans.focusSvc?.getFocusedCell()?.rowIndex;o!=null&&(o<this.firstRenderedRow||o>this.lastRenderedRow)&&(!i||i.isRowInPage(o))&&o<this.rowModel.getRowCount()&&t.push(o);const s=r=>{const l=r.rowNode.rowIndex;l==null||l===o||(l<this.firstRenderedRow||l>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(l)};for(const r of Object.values(this.rowCtrlsByRowIndex))s(r);if(e)for(const r of Object.values(e))s(r);t.sort((r,l)=>r-l);const n=[];for(let r=0;r<t.length;r++){const l=t[r],a=this.rowModel.getRow(l);a&&!a.sticky&&n.push(l)}return n}recycleRows(e,t=!1,i=!1){const o=this.calculateIndexesToDraw(e);(this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(o,!t);for(const s of o)this.createOrUpdateRowCtrl(s,e,t,i);if(e){const{animationFrameSvc:s}=this.beans;s?.active&&i&&!this.printLayout?s.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),i=e.isPinningRight();(this.pinningLeft!==t||i!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=i,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];for(const t of this.getFullWidthRowCtrls()){const i=t.rowNode.rowIndex;e.push(i.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=mapRowNodes(e);return this.getAllRowCtrls().filter(i=>{if(!i.isFullWidth())return!1;const o=i.rowNode;return!(t!=null&&!isRowInMap(o,t))})}createOrUpdateRowCtrl(e,t,i,o){let s,n=this.rowCtrlsByRowIndex[e];if(n||(s=this.rowModel.getRow(e),_exists(s)&&_exists(t)&&t[s.id]&&s.alreadyRendered&&(n=t[s.id],t[s.id]=null)),!n)if(s||(s=this.rowModel.getRow(e)),_exists(s))n=this.createRowCon(s,i,o);else return;s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n}destroyRowCtrls(e,t){const i=[];if(e){for(const o of Object.values(e))if(o){if(this.cachedRowCtrls&&o.isCacheable()){this.cachedRowCtrls.addRow(o);continue}if(o.destroyFirstPass(!t),t){const s=o.instanceId;this.zombieRowCtrls[s]=o,i.push(()=>{o.destroySecondPass(),delete this.zombieRowCtrls[s]})}else o.destroySecondPass()}}t&&(i.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const o of i)o()},ROW_ANIMATION_TIMEOUT))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=_getRowHeightAsNumber(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:i}=this;e.updateOffset();let o,s;if(!i.isRowsToRender())o=0,s=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),o=t.getFirstRow(),s=t.getLastRow();else{const c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let g=!1,p,f;do{const S=t.getPixelOffset(),{pageFirstPixel:b,pageLastPixel:y}=t.getCurrentPagePixelRange(),R=e.divStretchOffset,E=u.getVScrollPosition(),F=E.top,P=E.bottom;h?(p=b+R,f=y+R):(p=Math.max(F+S-c,b)+R,f=Math.min(P+S+c,y)+R),this.firstVisibleVPixel=Math.max(F+S,b)+R,this.lastVisibleVPixel=Math.min(P+S,y)+R,g=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(g);let m=i.getRowIndexAtPixel(p),C=i.getRowIndexAtPixel(f);const v=t.getFirstRow(),w=t.getLastRow();m<v&&(m=v),C>w&&(C=w),o=m,s=C}const n=_isDomLayout(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),l=Math.max(this.getRowBuffer(),500);n&&!r&&s-o>l&&(s=o+l);const a=o!==this.firstRenderedRow,d=s!==this.lastRenderedRow;(a||d)&&(this.firstRenderedRow=o,this.lastRenderedRow=s,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:o,lastRow:s}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,_requestAnimationFrame(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const i=this.pinnedRowModel?.ensureRowHeightsValid(),o=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:s,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,s.getFirstRow(),s.getLastRow());return(r||o)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),o||r||i?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const o=e.rowNode,s=this.focusSvc.isRowFocused(o.rowIndex,o.rowPinned),n=this.editSvc?.isEditing(e),r=o.detail;return s||n||r?!!this.isRowPresent(o):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,i){const o=this.cachedRowCtrls?.getRow(e)??null;if(o)return o;const s=i&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new RowCtrl(e,this.beans,t,s,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(o=>o.rowNode),t=this.getStickyTopRowCtrls().map(o=>o.rowNode),i=this.getStickyBottomRowCtrls().map(o=>o.rowNode);return[...t,...e,...i]}getRowByPosition(e){let t;const{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i],t||(t=this.getStickyTopRowCtrls().find(o=>o.rowNode.rowIndex===i)||null,t||(t=this.getStickyBottomRowCtrls().find(o=>o.rowNode.rowIndex===i)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const o=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!o}},RowCtrlCache=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e?.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],_removeFromArray(this.entriesList,i)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],_removeFromArray(this.entriesList,e)}getEntries(){return this.entriesList}};function mapRowNodes(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const i of e){const o=i.id;switch(i.rowPinned){case"top":t.top[o]=i;break;case"bottom":t.bottom[o]=i;break;default:t.normal[o]=i;break}}return t}function isRowInMap(e,t){const i=e.id;switch(e.rowPinned){case"top":return t.top[i]!=null;case"bottom":return t.bottom[i]!=null;default:return t.normal[i]!=null}}var RowNodeSorter=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=_isClientSideRowModel(this.gos)?_csrmFirstLeaf:defaultGetLeaf,this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],this.updateOptions.bind(this));const e=this.updatePivotModeState.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),this.updateOptions(),e()}updateOptions(){this.accentedSort=!!this.gos.get("accentedSort"),this.primaryColumnsSortGroups=_isColumnsSortingCoupledToGroup(this.gos)}updatePivotModeState(){this.pivotActive=this.beans.colModel.isPivotActive()}doFullSortInPlace(e,t){return e.sort((i,o)=>this.compareRowNodes(t,i,o))}compareRowNodes(e,t,i){if(t===i)return 0;const o=this.accentedSort;for(let s=0,n=e.length;s<n;++s){const r=e[s],l=r.sort==="desc";let a=this.getValue(t,r.column),d=this.getValue(i,r.column),c;const u=this.getComparator(r,t);if(u?c=u(a,d,t,i,l):(r.type==="absolute"&&(a=absoluteValueTransformer(a),d=absoluteValueTransformer(d)),c=_defaultComparator(a,d,o)),c)return r.sort==="asc"?c:-c}return 0}getComparator(e,t){const i=e.column.getColDef(),o=this.getComparatorFromColDef(i,e);if(o)return o;if(!i.showRowGroup)return;const s=!t.group&&i.field;if(!s)return;const n=this.beans.colModel.getColDefCol(s);if(n)return this.getComparatorFromColDef(n.getColDef(),e)}getComparatorFromColDef(e,t){const i=e.comparator;if(i!=null)return typeof i=="object"?i[_normalizeSortType(t.type)]:i}getValue(e,t){const i=this.beans;if(this.primaryColumnsSortGroups){if(e.rowGroupColumn===t)return this.getGroupDataValue(e,t);if(e.group&&t.getColDef().showRowGroup)return}const o=i.valueSvc.getValue(t,e,"data");if(t.isAllowFormula()){const s=i.formula;if(s?.isFormula(o))return s.resolveValue(t,e)}return o}getGroupDataValue(e,t){if(_isGroupUseEntireRow(this.gos,this.pivotActive)){const o=this.firstLeaf(e);return o&&this.beans.valueSvc.getValue(t,o,"data")}const i=this.beans.showRowGroupCols?.getShowRowGroupCol(t.getId());return i?e.groupData?.[i.getId()]:void 0}},defaultGetLeaf=e=>{if(e.data)return e;let t=e.childrenAfterGroup;for(;t?.length;){const i=t[0];if(i.data)return i;t=i.childrenAfterGroup}},absoluteValueTransformer=e=>{if(!e)return e;if(typeof e=="bigint")return e<0n?-e:e;const t=Number(e);return isNaN(t)?e:Math.abs(t)};function onSortChanged(e){e.sortSvc?.onSortChanged("api")}var makeIconParams=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),SortIndicatorElement={tag:"span",cls:"ag-sort-indicator-container",children:[makeIconParams("Order","order"),makeIconParams("Asc","ascending-icon"),makeIconParams("Desc","descending-icon"),makeIconParams("Mixed","mixed-icon"),makeIconParams("AbsoluteAsc","absolute-ascending-icon"),makeIconParams("AbsoluteDesc","absolute-descending-icon"),makeIconParams("None","none-icon")]},SortIndicatorComp=class extends Component{constructor(e){super(),this.eSortOrder=RefPlaceholder,this.eSortAsc=RefPlaceholder,this.eSortDesc=RefPlaceholder,this.eSortMixed=RefPlaceholder,this.eSortNone=RefPlaceholder,this.eSortAbsoluteAsc=RefPlaceholder,this.eSortAbsoluteDesc=RefPlaceholder,e||this.setTemplate(SortIndicatorElement)}attachCustomElements(e,t,i,o,s,n,r){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=o,this.eSortNone=s,this.eSortAbsoluteAsc=n,this.eSortAbsoluteDesc=r}setupSort(e,t=!1){if(this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("sortAbsoluteAscending",this.eSortAbsoluteAsc,e),this.addInIcon("sortAbsoluteDescending",this.eSortAbsoluteDesc,e);const i=this.updateIcons.bind(this),o=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:o,columnRowGroupChanged:o}),this.onSortChanged()}addInIcon(e,t,i){if(t==null)return;const o=_createIconNoSpan(e,this.beans,i);o&&t.appendChild(o)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortAbsoluteAsc:i,eSortAbsoluteDesc:o,eSortNone:s,column:n,gos:r,beans:l}=this,{isDefaultSortAllowed:a,isAbsoluteSortAllowed:d,isAbsoluteSort:c,isDefaultSort:u,isAscending:h,isDescending:g,direction:p}=_getDisplaySortForColumn(n,l);if(e&&_setDisplayed(e,h&&u&&a,{skipAriaHidden:!0}),t&&_setDisplayed(t,g&&u&&a,{skipAriaHidden:!0}),s){const f=!n.getColDef().unSortIcon&&!r.get("unSortIcon");_setDisplayed(s,!f&&!p,{skipAriaHidden:!0})}i&&_setDisplayed(i,h&&c&&d,{skipAriaHidden:!0}),o&&_setDisplayed(o,g&&c&&d,{skipAriaHidden:!0})}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:i}=this;this.addInIcon("sortUnSort",e,t);const o=t.getColDef().showRowGroup;_isColumnsSortingCoupledToGroup(i)&&o&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:i}=this;if(e){const o=t.sortSvc.getDisplaySortForColumn(i)?.direction==="mixed";_setDisplayed(e,o,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:i}}=this;if(!e)return;const o=i.getColumnsWithSortingOrdered(),s=i.getDisplaySortIndexForColumn(t)??-1,n=o.some(l=>i.getDisplaySortIndexForColumn(l)??-1>=1),r=s>=0&&n;_setDisplayed(e,r,{skipAriaHidden:!0}),s>=0?e.textContent=(s+1).toString():_clearElement(e)}},SortIndicatorSelector={selector:"AG-SORT-INDICATOR",component:SortIndicatorComp},SortService=class extends BeanStub{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,i){const o=this.getNextSortDirection(e);this.setSortForColumn(e,o,t,i)}progressSortFromEvent(e,t){const o=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,o,"uiColumnSorted")}setSortForColumn(e,t,i,o){const{gos:s,showRowGroupCols:n}=this.beans,r=_isColumnsSortingCoupledToGroup(s);let l=[e];if(r&&e.getColDef().showRowGroup){const u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(h=>h.isSortable());u&&(l=[e,...u])}for(const c of l)this.setColSort(c,t,o);const a=(i||s.get("alwaysMultiSort"))&&!s.get("suppressMultiSort"),d=[];if(!a){const c=this.clearSortBarTheseColumns(l,o);d.push(...c)}this.updateSortIndex(e),d.push(...l),this.dispatchSortChangedEvents(o,d)}updateSortIndex(e){const{gos:t,colModel:i,showRowGroupCols:o}=this.beans,s=_isColumnsSortingCoupledToGroup(t),n=o?.getShowRowGroupCol(e.getId()),r=s&&n||e,l=this.getColumnsWithSortingOrdered();i.forAllCols(c=>this.setColSortIndex(c,null));const a=l.filter(c=>s&&c.getColDef().showRowGroup?!1:c!==r);(r.getSortDef()?[...a,r]:a).forEach((c,u)=>this.setColSortIndex(c,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{if(t.getSortDef())return e=!0,!0}),e}dispatchSortChangedEvents(e,t){const i={type:"sortChanged",source:e};t&&(i.columns=t),this.eventSvc.dispatchEvent(i)}clearSortBarTheseColumns(e,t){const i=[];return this.beans.colModel.forAllCols(o=>{e.includes(o)||(o.getSortDef()&&i.push(o),this.setColSort(o,void 0,t))}),i}getNextSortDirection(e){const t=e.getSortingOrder(),i=e.getSortDef();let s=t.findIndex(n=>_areSortDefsEqual(n,i))+1;return s>=t.length&&(s=0),_getSortDefFromInput(t[s])}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:i,rowGroupColsSvc:o}=this.beans;let s=[];if(t.forAllCols(d=>{d.getSortDef()&&s.push(d)}),t.isPivotMode()){const d=_isColumnsSortingCoupledToGroup(e);s=s.filter(c=>{const u=!!c.getAggFunc(),h=!c.isPrimary(),g=d?i?.getShowRowGroupCol(c.getId()):c.getColDef().showRowGroup;return u||h||g})}const n=o?.columns.filter(d=>!!d.getSortDef())??[],r={};s.forEach((d,c)=>r[d.getId()]=c),s.sort((d,c)=>{const u=d.getSortIndex(),h=c.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){const g=r[d.getId()],p=r[c.getId()];return g>p?1:-1}else return h==null?-1:1});const l=_isColumnsSortingCoupledToGroup(e)&&!!n.length;l&&(s=[...new Set(s.map(d=>i?.getShowRowGroupCol(d.getId())??d))]);const a=new Map;if(s.forEach((d,c)=>a.set(d,c)),l)for(const d of n){const c=i.getShowRowGroupCol(d.getId());a.set(d,a.get(c))}return a}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}collectSortItems(e=!1){const t=[],i=this.getColumnsWithSortingOrdered();for(const o of i){const s=o.getSortDef()?.direction;if(!s)continue;const n=_normalizeSortType(o.getSortDef()?.type),r={sort:s,type:n};e?r.colId=o.getId():r.column=o,t.push(r)}return t}getSortModel(){return this.collectSortItems(!0)}getSortOptions(){return this.collectSortItems()}canColumnDisplayMixedSort(e){const t=_isColumnsSortingCoupledToGroup(this.gos),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSortDef();const o=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,s=o[0].getSortDef();return o.every(r=>_areSortDefsEqual(r.getSortDef(),s))?s:{type:_normalizeSortType(e.getSortDef()?.type),direction:"mixed"}}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t){const i=()=>{const{type:o,direction:s}=_getSortDefFromInput(t.getSortDef());if(e.toggleCss("ag-header-cell-sorted-asc",s==="asc"),e.toggleCss("ag-header-cell-sorted-desc",s==="desc"),e.toggleCss("ag-header-cell-sorted-abs-asc",o==="absolute"&&s==="asc"),e.toggleCss("ag-header-cell-sorted-abs-desc",o==="absolute"&&s==="desc"),e.toggleCss("ag-header-cell-sorted-none",!s),t.getColDef().showRowGroup){const l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(a=>s==a.getSortDef()?.direction);e.toggleCss("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:i,columnPinned:i,columnRowGroupChanged:i,displayedColumnsChanged:i})}initCol(e){const{sortIndex:t,initialSortIndex:i}=e.colDef,o=_getSortDefFromColDef(e.colDef);o&&e.setSortDef(o,!0),t!==void 0?t!==null&&(e.sortIndex=t):i!==null&&(e.sortIndex=i)}updateColSort(e,t,i){t!==void 0&&this.setColSort(e,_getSortDefFromInput(t),i)}setColSort(e,t,i){_areSortDefsEqual(e.getSortDef(),t)||(e.setSortDef(_getSortDefFromInput(t),t===void 0),e.dispatchColEvent("sortChanged",i)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new SortIndicatorComp(e)}getSortIndicatorSelector(){return SortIndicatorSelector}},SortModule={moduleName:"Sort",version:VERSION,beans:[SortService,RowNodeSorter],apiFunctions:{onSortChanged},userComponents:{agSortIndicator:SortIndicatorComp},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}},SyncService=class extends BeanStub{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:i}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),i.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),_logIfDebug(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,_convertColumnEventSourceType(e.source))}}},SOURCE_PASTE="paste",ChangeDetectionService=class extends BeanStub{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;_isClientSideRowModel(e,t)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:i}=this.beans;if(e.source===SOURCE_PASTE||t.get("suppressChangeDetection"))return;const o=e.node,s=[o],n=this.clientSideRowModel,r=n?.rootNode;if(r&&!o.isRowPinned()){const l=t.get("aggregateOnlyChangedColumns"),a=new ChangedPath(l,r);a.addParentNode(o.parent,[e.column]),n.doAggregate(a),a.forEachChangedNodeDepthFirst(d=>{s.push(d),d.sibling&&s.push(d.sibling)})}i.refreshCells({rowNodes:s})}},ExpressionService=class extends BeanStub{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);_error(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(i){return _error(16,{expression:e,params:t,e:i}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const i=this.createFunctionBody(e),o=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",i);return t[e]=o,o}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},ValueCache=class extends BeanStub{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){if(this.active){const o=this.cacheVersion;e.__cacheVersion!==o&&(e.__cacheVersion=o,e.__cacheData={}),e.__cacheData[t]=i}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},ValueCacheModule={moduleName:"ValueCache",version:VERSION,beans:[ValueCache],apiFunctions:{expireValueCache}},ExpressionModule={moduleName:"Expression",version:VERSION,beans:[ExpressionService]},ChangeDetectionModule={moduleName:"ChangeDetection",version:VERSION,beans:[ChangeDetectionService]},CellApiModule={moduleName:"CellApi",version:VERSION,apiFunctions:{getCellValue}},ValueService=class extends BeanStub{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.formulaDataSvc=e.formulaDataSvc}postConstruct(){this.initialised||this.init()}init(){const{gos:e,valueCache:t}=this;this.executeValueGetter=t?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=_isServerSideRowModel(e),this.cellExpressions=e.get("enableCellExpressions"),this.isTreeData=e.get("treeData"),this.initialised=!0;const i=o=>this.callColumnCellValueChangedHandler(o);this.eventSvc.addListener("cellValueChanged",i,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",i,!0)),this.addManagedPropertyListener("treeData",o=>this.isTreeData=o.currentValue)}getValueForDisplay(e){const t=this.beans,i=e.column,o=e.node,s=t.showRowGroupColValueSvc,n=!i&&o.group,r=i?.colDef.showRowGroup,l=!this.isTreeData||o.footer;if(s&&l&&(n||r)){const h=s.getGroupValue(o,i,this.displayIgnoresAggData(o));return h==null?{value:null,valueFormatted:null}:{value:h.value,valueFormatted:e.includeValueFormatted?s.formatAndPrefixGroupColValue(h,i,e.exporting):null}}if(!i)return{value:o.key,valueFormatted:null};let a=this.getValue(i,o,e.from,this.displayIgnoresAggData(o)),d=a;const c=t.formula;i.isAllowFormula()&&c?.isFormula(a)&&(e.useRawFormula?(a=c.normaliseFormula(a,!0),d=c.resolveValue(i,o)):(a=c.resolveValue(i,o),d=a));const u=e.includeValueFormatted&&!(e.exporting&&i.colDef.useValueFormatterForExport===!1);return{value:a,valueFormatted:u?this.formatValue(i,o,d):null}}getValue(e,t,i,o=!1){if(this.initialised||this.init(),!t)return;const s=e.getColDef();if(!t.group){const a=s.pivotValueColumn;a&&(e=a)}const n=this.editSvc?.getPendingEditValue(t,e,i);if(n!==void 0)return n;const r=s.showRowGroup;if(typeof r=="string"&&(this.beans.rowGroupColsSvc?.getColumnIndex(r)??-1)>t.level)return null;let l=this.resolveValue(e,t,o);if(this.cellExpressions&&_isExpressionString(l)){const a=l.substring(1);l=this.executeValueGetter(a,t.data,e,t)}return l}getFormulaFromDataSource(e,t){const i=this.formulaDataSvc;if(!i?.hasDataSource()||!e.isAllowFormula())return;const o=i.getFormula({column:e,rowNode:t});return _isExpressionString(o)?o:void 0}displayIgnoresAggData(e){return!e.group||!e.expanded||e.footer||e.leafGroup&&this.colModel.isPivotMode()?!1:!!e.sibling&&!this.gos.get("groupSuppressBlankHeader")}resolveValue(e,t,i){const o=e.getColDef(),s=e.getColId(),n=this.isTreeData,r=this.getFormulaFromDataSource(e,t);if(r!==void 0)return r;const l=!i&&t.aggData&&t.aggData[s]!==void 0;if(n&&l)return t.aggData[s];const a=t.data,d=o.field;if(n&&o.valueGetter)return this.executeValueGetter(o.valueGetter,a,e,t);if(n&&d&&a)return _getValueUsingField(a,d,e.isFieldContainsDots());const c=t.groupData;if(c&&s in c)return t.groupData[s];if(l)return t.aggData[s];const h=o.showRowGroup,g=typeof h!="string"||!t.group,p=this.isSsrm&&i&&!!o.aggFunc,f=this.isSsrm&&t.footer&&t.field&&(h===!0||h===t.field);if(o.valueGetter&&!p)return g?this.executeValueGetter(o.valueGetter,a,e,t):void 0;if(f)return _getValueUsingField(a,t.field,e.isFieldContainsDots());if(d&&a&&!p)return g?_getValueUsingField(a,d,e.isFieldContainsDots()):void 0}parseValue(e,t,i,o){const s=e.getColDef();if(s.allowFormula&&this.beans.formula?.isFormula(i))return i;const n=s.valueParser;if(_exists(n)){const r=_addGridCommonParams(this.gos,{node:t,data:t?.data,oldValue:o,newValue:i,colDef:s,column:e});return typeof n=="function"?n(r):this.expressionSvc?.evaluate(n,r)}return i}getDeleteValue(e,t){return _exists(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay({column:e,node:t,from:"edit"}).value)??null:null}formatValue(e,t,i,o,s=!0){const{expressionSvc:n}=this.beans;let r=null,l;const a=e.getColDef();if(o?l=o:s&&(l=a.valueFormatter),l){const d=t?t.data:null,c=_addGridCommonParams(this.gos,{value:i,node:t,data:d,colDef:a,column:e});typeof l=="function"?r=l(c):r=n?n.evaluate(l,c):null}else if(a.refData)return a.refData[i]||"";return r==null&&Array.isArray(i)&&(r=i.join(", ")),r}setValue(e,t,i,o){const s=t.getColDef();if(!e.data&&this.canCreateRowNodeData(e,s)&&(e.data={}),!this.isSetValueSupported({column:t,newValue:i,colDef:s}))return!1;const n=this.getValue(t,e,"data"),r=_addGridCommonParams(this.gos,{node:e,data:e.data,oldValue:n,newValue:i,colDef:s,column:t}),l=e.group?s.groupRowValueSetter:void 0;let a=!1,d=!1;if(e.data){const c=this.handleExternalFormulaChange({column:t,eventSource:o,newValue:i,setterParams:r,rowNode:e});if(c!==null)return c;a=this.computeValueChange({column:t,rowNode:e,newValue:i,params:r,rowData:e.data,valueSetter:s.valueSetter,field:s.field})??!0}return l&&(d=l(_addGridCommonParams(this.gos,{node:e,data:e.data,oldValue:n,newValue:i,colDef:s,column:t,eventSource:o,valueChanged:a||i!==n,aggregatedChildren:this.beans.aggStage?.getAggregatedChildren(e,t)??[]}))??!0),!a&&!d?!1:this.finishValueChange(e,t,r,o)}canCreateRowNodeData(e,t){return e.group?!(t.groupRowValueSetter!=null||t.groupRowEditable!=null||t.pivotValueColumn):!0}finishValueChange(e,t,i,o){e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const s=this.getValue(t,e,"data");return this.dispatchCellValueChangedEvent(e,i,s,o),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,i,s,o),!0}isSetValueSupported(e){const{column:t,newValue:i,colDef:o}=e,{field:s,valueSetter:n}=o,r=this.beans.formula,l=t.isAllowFormula()&&r?.isFormula(i),a=!!this.formulaDataSvc?.hasDataSource();return _missing(s)&&_missing(n)&&!(a&&l)?(_warn(17),!1):this.dataTypeSvc&&!this.dataTypeSvc.checkType(t,i)?(_warn(135),!1):!0}handleExternalFormulaChange(e){const{column:t,rowNode:i,newValue:o,eventSource:s,setterParams:n}=e,r=this.beans.formula,l=this.formulaDataSvc;if(!l?.hasDataSource()||!t.isAllowFormula())return null;const a=r?.isFormula(o),d=l.getFormula({column:t,rowNode:i});if(a){if(!(d!==o))return!1;l.setFormula({column:t,rowNode:i,formula:o});const u=r?.resolveValue(t,i),h=t.getColDef();if(_exists(h.valueSetter)||!_missing(h.field)){const g={...n,newValue:u};this.computeValueChange({column:t,rowNode:i,newValue:u,params:g,rowData:i.data,valueSetter:h.valueSetter,field:h.field})}return this.finishValueChange(i,t,n,s)}return d!==void 0&&l.setFormula({column:t,rowNode:i,formula:void 0}),null}computeValueChange(e){const{valueSetter:t,params:i,rowData:o,field:s,column:n,newValue:r}=e;return _exists(t)?typeof t=="function"?t(i):this.expressionSvc?.evaluate(t,i):!!o&&this.setValueUsingField(o,s,r,n.isFieldContainsDots())}dispatchCellValueChangedEvent(e,t,i,o){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:i,value:i,source:o})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,i,o){if(!t)return!1;let s=!1;if(!o)s=e[t]===i,s||(e[t]=i);else{const n=t.split(".");let r=e;for(;n.length>0&&r;){const l=n.shift();n.length===0?(s=r[l]===i,s||(r[l]=i)):r=r[l]}}return!s}executeValueGetterWithValueCache(e,t,i,o){const s=i.getColId(),n=this.valueCache.getValue(o,s);if(n!==void 0)return n;const r=this.executeValueGetterWithoutValueCache(e,t,i,o);return this.valueCache.setValue(o,s,r),r}executeValueGetterWithoutValueCache(e,t,i,o){const s=_addGridCommonParams(this.gos,{data:t,node:o,column:i,colDef:i.getColDef(),getValue:r=>this.getValueCallback(o,r)});let n;return typeof e=="function"?n=e(s):n=this.expressionSvc?.evaluate(e,s),n}getValueCallback(e,t){const i=this.colModel.getColDefCol(t);return i?this.getValue(i,e,"data"):null}getKeyForNode(e,t){const i=this.getValue(e,t,"data"),o=e.getColDef().keyCreator;let s=i;if(o){const n=_addGridCommonParams(this.gos,{value:i,colDef:e.getColDef(),column:e,node:t,data:t.data});s=o(n)}return typeof s=="string"||s==null||(s=String(s),s==="[object Object]"&&_warn(121)),s}},CommunityCoreModule={moduleName:"CommunityCore",version:VERSION,beans:[GridDestroyService,ApiFunctionService,Registry,UserComponentFactory,RowContainerHeightService,VisibleColsService,EventService,GridOptionsService,ColumnModel,PageBoundsService,PageBoundsListener,RowRenderer,ValueService,FocusService,Environment,ScrollVisibleService,CtrlsService,SyncService,ColumnNameService,ColumnViewportService,IconService],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId,destroy,isDestroyed,getGridOption,setGridOption,updateGridOptions,isModuleRegistered},dependsOn:[DataTypeModule,ColumnMoveModule,ColumnResizeModule,SortModule,ColumnHeaderCompModule,ColumnGroupModule,ColumnGroupHeaderCompModule,OverlayModule,ChangeDetectionModule,AnimationFrameModule,KeyboardNavigationModule,PinnedColumnModule,AriaModule,TouchModule,CellRendererFunctionModule,ColumnFlexModule,ExpressionModule,SkeletonCellRendererModule,ColumnDelayRenderModule]};function _fuzzySuggestions(e){const{inputValue:t,allSuggestions:i,hideIrrelevant:o,filterByPercentageOfBestMatch:s}=e;let n=(i??[]).map((a,d)=>({value:a,relevance:_getLevenshteinSimilarityDistance(t,a),idx:d}));if(n.sort((a,d)=>a.relevance-d.relevance),o&&(n=n.filter(a=>a.relevance<Math.max(a.value.length,t.length))),n.length>0&&s&&s>0){const d=n[0].relevance*s;n=n.filter(c=>d-c.relevance<0)}const r=[],l=[];for(const a of n)r.push(a.value),l.push(a.idx);return{values:r,indices:l}}function _getLevenshteinSimilarityDistance(e,t){const i=e.length,o=t.length;if(o===0)return i||0;let s=e.toLocaleLowerCase(),n=t.toLocaleLowerCase(),r;e.length<t.length&&(r=n,n=s,s=r,r=t,t=e,e=r);let l=new Uint16Array(o+1),a=new Uint16Array(o+1);for(let u=0;u<=o;u++)l[u]=u;let d=0;const c=i/2-10;for(let u=1;u<=i;u++){const h=e[u-1],g=s[u-1];a[0]=u;for(let p=1;p<=o;p++){const f=t[p-1],m=n[p-1];if(g!==m){const C=a[p-1],v=l[p],w=l[p-1];let S=C<v?C:v;w<S&&(S=w),a[p]=S+1|0;continue}if(d++,h===f&&d++,u>1&&p>1){const C=e[u-2],v=s[u-2],w=t[p-2],S=n[p-2];v===S&&(d++,C===w&&d++)}u<c&&d++,a[p]=l[p-1]}r=l,l=a,a=r}return l[o]/(d+1)}var ENTERPRISE_MODULE_NAMES={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1,Formula:1},ALL_COLUMN_FILTERS=["TextFilter","NumberFilter","BigIntFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],RESOLVABLE_MODULE_NAMES={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:ALL_COLUMN_FILTERS,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...ALL_COLUMN_FILTERS,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...ALL_COLUMN_FILTERS,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},MODULES_FOR_ROW_MODELS={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function resolveModuleNames(e,t){const i=[];for(const o of Array.isArray(e)?e:[e]){const s=RESOLVABLE_MODULE_NAMES[o];if(s)for(const n of s){const r=MODULES_FOR_ROW_MODELS[n];(!r||r===t)&&i.push(n)}else i.push(o)}return i}var NoModulesRegisteredError=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
|
|
|
|
import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
|
|
|
|
ModuleRegistry.registerModules([ AllCommunityModule ]);
|
|
`,moduleImportMsg=e=>{const t=e.map(o=>`import { ${convertToUserModuleName(o)} } from '${ENTERPRISE_MODULE_NAMES[o]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(o=>o==="IntegratedCharts"||o==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
|
|
${t.join(`
|
|
`)}
|
|
|
|
ModuleRegistry.registerModules([ ${e.map(o=>convertToUserModuleName(o,!0)).join(", ")} ]);
|
|
|
|
For more info see: ${baseDocLink}/modules/`};function convertToUserModuleName(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function umdMissingModule(e,t){const i=t.filter(n=>n==="IntegratedCharts"||n==="Sparklines");let o="";return!globalThis?.agCharts&&i.length>0?o=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
|
|
`:t.some(n=>ENTERPRISE_MODULE_NAMES[n])&&(o=o+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
|
|
`),o}function missingRowModelTypeError({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var missingModule=({reasonOrId:e,moduleName:t,gridScoped:i,gridId:o,rowModelType:s,additionalText:n,isUmd:r})=>{const l=resolveModuleNames(t,s),a=typeof e=="string"?e:MISSING_MODULE_REASONS[e];if(r)return umdMissingModule(a,l);const d=l.filter(h=>h==="IntegratedCharts"||h==="Sparklines"),c=d.length>0?`${d.map(h=>convertToUserModuleName(h)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${a} as ${l.length>1?"one of "+l.map(h=>convertToUserModuleName(h)).join(", "):convertToUserModuleName(l[0])} is not registered${i?" for gridId: "+o:""}. ${c} Check if you have registered the module:
|
|
`}
|
|
${moduleImportMsg(l)}`+(n?`
|
|
|
|
${n}`:"")},missingChartsWithModule=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
|
|
|
|
import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
|
|
import { ModuleRegistry } from 'ag-grid-community';
|
|
import { ${e} } from 'ag-grid-enterprise';
|
|
|
|
ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
|
|
`,clipboardApiError=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,AG_GRID_ERRORS={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:i})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",i],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions:
|
|
"alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.
|
|
Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
|
|
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"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.",33:()=>"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.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"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.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}
|
|
${clipboardApiError(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e})=>`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:i,pageSizeOptions:o})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${i?"":" the default"} paginationPageSizeSelector=[${o?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:i,jsComps:o})=>{const s=[],n=[...Object.keys(i??[]).filter(l=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(l)),...Object.keys(o??[]).filter(l=>!!o[l])],r=_fuzzySuggestions({inputValue:t,allSuggestions:n,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return s.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
|
|
`),r.length>0&&s.push(` Did you mean: [${r.slice(0,3)}]?
|
|
`),s.push("If using a custom component check it has been registered correctly."),s},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${baseDocLink}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{const i=_fuzzySuggestions({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,i.length>0?` Did you mean: [${i.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join(`
|
|
`)},110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"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 (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
|
|
Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:i})=>["duplicate group keys for row data, keys should be unique",e,t,...i??[]],187:({rowId:e,firstData:t,secondData:i})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",i],188:e=>`getRowId callback must be provided for Server Side Row Model ${e?.feature||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:missingModule,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${baseDocLink}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.
|
|
Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`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(); }, 0).
|
|
To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>missingChartsWithModule("IntegratedChartsModule"),258:()=>missingChartsWithModule("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:i,gridId:o,rowModelType:s})=>missingModule({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:USER_COMP_MODULES[t],gridId:o,gridScoped:i,rowModelType:s}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${baseDocLink}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>NoModulesRegisteredError(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:missingRowModelTypeError,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`,293:()=>"The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the themeStyleContainer grid option to let the grid know where in the document to insert theme CSS.",294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:e})=>`colDef.allowFormula is not supported with ${e}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.'};function getError(e,t){const i=AG_GRID_ERRORS[e];if(!i)return[`Missing error text for error id ${e}!`];const o=i(t),n=`
|
|
See ${getErrorLink(e,t)}`;return Array.isArray(o)?o.concat(n):[o,n]}var MISSING_MODULE_REASONS={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},VanillaFrameworkOverrides=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${BASE_URL}/${this.frameworkName}-data-grid`,setValidationDocLink(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},_gridApiCache=new WeakMap,_gridElementCache=new WeakMap;function createGrid(e,t,i){if(!t)return _error(11),{};const o=i;let s;if(!o?.setThemeOnGridDiv){const r=_createElement({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,s=()=>e.remove()}return new GridCoreCreator().create(e,t,r=>{const l=new GridComp(e);r.createBean(l)},void 0,i,s)}var nextGridId=1,GridCoreCreator=class{create(e,t,i,o,s,n){const r=GlobalGridOptions.applyGlobalGridOptions(t),l=r.gridId??String(nextGridId++),a=this.getRegisteredModules(s,l,r.rowModelType),d=this.createBeansList(r.rowModelType,a,l),c=this.createProvidedBeans(e,r,s);if(!d)return;const h={providedBeanInstances:c,beanClasses:d,id:l,beanInitComparator:gridBeanInitComparator,beanDestroyComparator:gridBeanDestroyComparator,derivedBeans:[createGridApi],destroyCallback:()=>{_gridElementCache.delete(p),_gridApiCache.delete(e),_unRegisterGridModules(l),n?.()}},g=new AgContext(h);this.registerModuleFeatures(g,a),i(g),g.getBean("syncSvc").start(),o?.(g);const p=g.getBean("gridApi");return _gridApiCache.set(e,p),_gridElementCache.set(p,e),p}getRegisteredModules(e,t,i){return _registerModule(CommunityCoreModule,void 0,!0),e?.modules?.forEach(o=>_registerModule(o,t)),_getRegisteredModules(t,getDefaultRowModelType(i))}registerModuleFeatures(e,t){const i=e.getBean("registry"),o=e.getBean("apiFunctionSvc");for(const s of t){i.registerModule(s);const n=s.apiFunctions;if(n){const r=Object.keys(n);for(const l of r)o?.addFunction(l,n[l])}}}createProvidedBeans(e,t,i){let o=i?i.frameworkOverrides:null;_missing(o)&&(o=new VanillaFrameworkOverrides);const s={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:i?i.globalListener:null,globalSyncListener:i?i.globalSyncListener:null,frameworkOverrides:o};return i?.providedBeanInstances&&Object.assign(s,i.providedBeanInstances),s}createBeansList(e,t,i){const o={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},s=getDefaultRowModelType(e),n=o[s];if(!n){_logPreInitErr(201,{rowModelType:s},`Unknown rowModelType ${s}.`);return}if(!_hasUserRegistered()){_logPreInitErr(272,void 0,NoModulesRegisteredError());return}if(!e){const l=Object.entries(o).filter(([a,d])=>_isModuleRegistered(d,i,a));if(l.length==1){const[a,d]=l[0];if(a!==s){const c={moduleName:d,rowModelType:a};_logPreInitErr(275,c,missingRowModelTypeError(c));return}}}if(!_isModuleRegistered(n,i,s)){const l=_isUmd(),a=`rowModelType = '${s}'`,d=l?`Unable to use ${a} as that requires the ag-grid-enterprise script to be included.
|
|
`:`Missing module ${n}Module for rowModelType ${s}.`;_logPreInitErr(200,{reasonOrId:a,moduleName:n,gridScoped:_areModulesGridScoped(),gridId:i,rowModelType:s,isUmd:l},d);return}const r=new Set;for(const l of t)for(const a of l.beans??[])r.add(a);return Array.from(r)}};function getDefaultRowModelType(e){return e??"clientSide"}function getGridApi(e){if(typeof e=="string")try{e=document.querySelector(`[grid-id="${e}"]`)?.parentElement??document.querySelector(e)?.firstElementChild??document.getElementById(e)?.firstElementChild}catch{e=null}return e?_gridApiCache.get(e):void 0}function getGridElement(e){return _gridElementCache.get(e)}function convertColumnState(e,t=!1){const i=[],o=[],s=[],n=[],r=[],l=[],a=[],d=[],c=[];let u=0;for(let h=0;h<e.length;h++){const{colId:g,sort:p,sortType:f,sortIndex:m,rowGroup:C,rowGroupIndex:v,aggFunc:w,pivot:S,pivotIndex:b,pinned:y,hide:R,width:E,flex:F}=e[h];c.push(g),p&&(i[m??u++]={colId:g,sort:p,type:f}),C&&(o[v??0]=g),typeof w=="string"&&s.push({colId:g,aggFunc:w}),S&&(n[b??0]=g),y&&(y==="right"?l:r).push(g),R&&a.push(g),(F!=null||E)&&d.push({colId:g,flex:F??void 0,width:E===null?void 0:E})}return{sort:i.length?{sortModel:_removeEmptyValues(i)}:void 0,rowGroup:o.length?{groupColIds:_removeEmptyValues(o)}:void 0,aggregation:s.length?{aggregationModel:s}:void 0,pivot:n.length||t?{pivotMode:t,pivotColIds:_removeEmptyValues(n)}:void 0,columnPinning:r.length||l.length?{leftColIds:r,rightColIds:l}:void 0,columnVisibility:a.length?{hiddenColIds:a}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}function _removeEmptyValues(e){return e.filter(t=>t!=null)}function _convertColumnGroupState(e){const t=[];for(const{groupId:i,open:o}of e)o&&t.push(i);return t.length?{openColumnGroupIds:t}:void 0}function convertColumnGroupState(e){return{columnGroup:_convertColumnGroupState(e)}}var AlignedGridsService=class extends BeanStub{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(o=>{if(!o){_error(18),t||_error(20);return}if(this.isGridApi(o))return o;const s=o;return"current"in s?s.current?.api:(s.api||_error(19),s.api)}).filter(o=>!!o&&!o.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const i=[];return e.columns?e.columns.forEach(o=>{i.push(t(o))}):e.column&&i.push(t(e.column)),i}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":_warn(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const i of e.columnGroups){let o=null;i&&(o=t.getProvidedColGroup(i.getGroupId())),!(i&&!o)&&t.setColumnGroupOpened(o,i.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let i=null;const o=this.beans,{colResize:s,ctrlsSvc:n,colModel:r}=o;if(t&&(i=r.getColDefCol(t.getColId())),t&&!i)return;const l=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const u=e.api.getColumnState().map(h=>({colId:h.colId}));_applyColumnState(o,{state:u,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const u=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));_applyColumnState(o,{state:u},"alignedGridChanged")}break;case"columnPinned":{const u=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));_applyColumnState(o,{state:u},"alignedGridChanged")}break;case"columnResized":{const c=e,u={};for(const h of l)u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of c.flexColumns??[])u[h.getId()]&&delete u[h.getId()];s?.setColumnWidths(Object.values(u),!1,c.finished,"alignedGridChanged");break}}const d=n.getGridBodyCtrl().isVerticalScrollShowing();for(const c of this.getAlignedGridApis())c.setGridOption("alwaysShowVerticalScroll",d)}},AlignedGridsModule={moduleName:"AlignedGrids",version:VERSION,beans:[AlignedGridsService],dependsOn:[ColumnApiModule]};function redrawRows(e,t={}){const i=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(i))}function setRowNodeExpanded(e,t,i,o,s){t&&(o&&t.parent&&t.parent.level!==-1&&setRowNodeExpanded(e,t.parent,i,o,s),t.setExpanded(i,void 0,s))}function getRowNode(e,t){return e.rowModel.getRowNode(t)}function addRenderedRowListener(e,t,i,o){e.rowRenderer.addRenderedRowListener(t,i,o)}function getRenderedNodes(e){return e.rowRenderer.getRenderedNodes()}function forEachNode(e,t,i){e.rowModel.forEachNode(t,i)}function getFirstDisplayedRowIndex(e){return e.rowRenderer.firstRenderedRow}function getLastDisplayedRowIndex(e){return e.rowRenderer.lastRenderedRow}function getDisplayedRowAtIndex(e,t){return e.rowModel.getRow(t)}function getDisplayedRowCount(e){return e.rowModel.getRowCount()}function getVerticalPixelRange(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function getHorizontalPixelRange(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function ensureColumnVisible(e,t,i="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,i),"ensureVisible")}function ensureIndexVisible(e,t,i){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,i),"ensureVisible")}function ensureNodeVisible(e,t,i=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,i),"ensureVisible")}var RowApiModule={moduleName:"RowApi",version:VERSION,apiFunctions:{redrawRows,setRowNodeExpanded,getRowNode,addRenderedRowListener,getRenderedNodes,forEachNode,getFirstDisplayedRowIndex,getLastDisplayedRowIndex,getDisplayedRowAtIndex,getDisplayedRowCount}},ScrollApiModule={moduleName:"ScrollApi",version:VERSION,apiFunctions:{getVerticalPixelRange,getHorizontalPixelRange,ensureColumnVisible,ensureIndexVisible,ensureNodeVisible}};function expandAll(e){e.expansionSvc?.expandAll(!0)}function collapseAll(e){e.expansionSvc?.expandAll(!1)}function onRowHeightChanged(e){e.rowModel?.onRowHeightChanged()}function resetRowHeights(e){if(e.rowAutoHeight?.active){_warn(3);return}e.rowModel?.resetRowHeights()}function setRowCount(e,t,i){const o=_getServerSideRowModel(e);if(o){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){_error(238);return}o.setRowCount(t,i);return}_error(28);return}_getInfiniteRowModel(e)?.setRowCount(t,i)}function getCacheBlockState(e){return _isServerSideRowModel(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function isLastRowIndexKnown(e){return e.rowModel.isLastRowIndexKnown()}var CsrmSsrmSharedApiModule={moduleName:"CsrmSsrmSharedApi",version:VERSION,apiFunctions:{expandAll,collapseAll}},RowModelSharedApiModule={moduleName:"RowModelSharedApi",version:VERSION,apiFunctions:{onRowHeightChanged,resetRowHeights}},SsrmInfiniteSharedApiModule={moduleName:"SsrmInfiniteSharedApi",version:VERSION,apiFunctions:{setRowCount,getCacheBlockState,isLastRowIndexKnown}},ClientSideNodeManager=class extends BeanStub{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},initRootNode(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){this.dispatchRowDataUpdateStarted(e),this.destroyAllNodes();const t=initRootNode(this.rootNode),i=new Array(e.length);t._leafs=i;let o=0;const s=this.beans.groupStage?.getNestedDataGetter(),n=s?new Set:null,r=(l,a)=>{const d=l.level+1;for(let c=0,u=a.length;c<u;++c){const h=a[c];if(!h)continue;const g=this.createRowNode(h,d,o);if(i[o++]=g,n&&!n.has(h)){n.add(h),g.treeParent=l;const p=s(h);p&&r(g,p)}}};r(t,e),i.length=o}destroyAllNodes(){const{selectionSvc:e,pinnedRowModel:t,groupStage:i}=this.beans;e?.reset("rowDataChanged"),t?.isManual()&&t.reset(),i?.clearNonLeafs();const o=this.rootNode._leafs;if(o)for(let s=0,n=o.length;s<n;++s)o[s]._destroy(!1);this.allNodesMap=Object.create(null),this.nextId=0}setImmutableRowData(e,t){const{rootNode:i,gos:o}=this;this.dispatchRowDataUpdateStarted(t);const s=_getRowIdCallback(o),n=e.changedRowNodes,{adds:r,updates:l}=n,a=new Set,d=[],c=this.beans.groupStage?.getNestedDataGetter();let u=o.get("suppressMaintainUnsortedOrder")?void 0:!1,h=-1,g=!1;const p=(C,v)=>{if(!u&&u!==void 0){const w=C.sourceRowIndex;u=w<=h,h=w}C.data!==v&&(C.updateData(v),r.has(C)||l.add(C),!C.selectable&&C.isSelected()&&d.push(C))},f=(C,v,w)=>{for(let S=0,b=v.length;S<b;++S){const y=v[S];if(!y)continue;let R=this.getRowNode(s({data:y,level:w}));if(R?(p(R,y),g||(g=!!c&&R.treeParent!==C)):(R=this.createRowNode(y,w),r.add(R)),!c||a.has(R)){a.add(R);continue}a.add(R),R.treeParent=C;const E=c(y);E&&f(R,E,w+1)}};f(i,t,0);const m=this.deleteUnusedNodes(a,n,d,!!e.animate)||u||r.size>0;if(m){const C=i._leafs??(i._leafs=[]);u===void 0?updateRootLeafsKeepOrder(C,a,n):updateRootLeafsOrdered(C,a)&&(n.reordered=!0)}(m||g||l.size)&&(e.rowDataUpdated=!0,this.deselect(d))}deleteUnusedNodes(e,{removals:t},i,o){const s=this.rootNode._leafs;for(let n=0,r=s.length;n<r;n++){const l=s[n];e.has(l)||this.destroyNode(l,o)&&(t.push(l),l.isSelected()&&i.push(l))}return t.length>0}updateRowData(e,t,i){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return _warn(268),{remove:[],update:[],add:[]};const o=[],s=_getRowIdCallback(this.gos),n=this.executeRemove(s,e,t,o,i),r=this.executeUpdate(s,e,t,o),l=this.executeAdd(e,t);return this.deselect(o),{remove:n,update:r,add:l}}executeRemove(e,{remove:t},{adds:i,updates:o,removals:s},n,r){const l=this.rootNode._leafs,a=l?.length,d=t?.length;if(!d||!a)return[];let c=0,u=a,h=0;const g=new Array(d);for(let p=0;p<d;++p){const f=this.lookupNode(e,t[p]);if(!f)continue;const m=f.sourceRowIndex;m<u&&(u=m),m>h&&(h=m),g[c++]=f,this.destroyNode(f,r)&&(f.isSelected()&&n.push(f),i.delete(f)||(o.delete(f),s.push(f)))}return g.length=c,c&&filterRemovedRowNodes(l,u,h),g}executeUpdate(e,{update:t},{adds:i,updates:o},s){const n=t?.length;if(!n)return[];const r=new Array(n);let l=0;for(let a=0;a<n;a++){const d=t[a],c=this.lookupNode(e,d);c&&(c.updateData(d),!c.selectable&&c.isSelected()&&s.push(c),r[l++]=c,i.has(c)||o.add(c))}return r.length=l,r}executeAdd(e,t){var i;const o=(i=this.rootNode)._leafs??(i._leafs=[]),s=o.length,n=e.add,r=n?.length;if(!r)return[];const l=s+r;let a=this.sanitizeAddIndex(o,e.addIndex);if(a<s){for(let u=s-1,h=l-1;u>=a;--u){const g=o[u];g.sourceRowIndex=h,o[h--]=g}t.reordered=!0}o.length=l;const d=new Array(r),c=t.adds;for(let u=0;u<r;u++){const h=this.createRowNode(n[u],0,a);c.add(h),o[a]=h,d[u]=h,a++}return d}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){const t="rowDataChanged",i=this.beans.selectionSvc;e.length&&i?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),i?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:i?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t,i){const o=new RowNode(this.beans);o.parent=this.rootNode,o.level=t,o.group=!1,o.expanded=!1,i!=null&&(o.sourceRowIndex=i),o.setDataAndId(e,String(this.nextId++));const s=o.id,n=this.allNodesMap;return n[s]&&_warn(2,{nodeId:s}),n[s]=o,o}destroyNode(e,t){if(!e._destroy(t))return!1;const i=e.id,o=this.allNodesMap;return o[i]===e&&delete o[i],!0}lookupNode(e,t){if(!e)return lookupNodeByData(this.rootNode._leafs,t);const i=e({data:t,level:0}),o=this.allNodesMap[i];return o||(_error(4,{id:i}),null)}sanitizeAddIndex(e,t){const i=e.length;if(typeof t!="number"||t<0||t>=i||Number.isNaN(t))return i;t=Math.ceil(t);const o=this.gos;return t>0&&o.get("treeData")&&o.get("getDataPath")&&(t=adjustAddIndexForDataPath(e,t)),t}},adjustAddIndexForDataPath=(e,t)=>{for(let i=0,o=e.length;i<o;i++)if(e[i]?.rowIndex==t-1)return i+1;return t},initRootNode=e=>{e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",e._leafs?.length!==0&&(e._leafs=[]);const t=[],i=[],o=[],s=[];e.childrenAfterGroup=t,e.childrenAfterSort=i,e.childrenAfterAggFilter=o,e.childrenAfterFilter=s;const n=e.sibling;return n&&(n.childrenAfterGroup=t,n.childrenAfterSort=i,n.childrenAfterAggFilter=o,n.childrenAfterFilter=s,n.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},lookupNodeByData=(e,t)=>{if(e)for(let i=0,o=e.length;i<o;i++){const s=e[i];if(s.data===t)return s}return _error(5,{data:t}),null},filterRemovedRowNodes=(e,t,i)=>{t=Math.max(0,t);for(let o=t,s=e.length;o<s;++o){const n=e[o];o<=i&&n.destroyed||(n.sourceRowIndex=t,e[t++]=n)}e.length=t},updateRootLeafsOrdered=(e,t)=>{const i=t.size;e.length=i;let o=0,s=!1,n=!1;for(const r of t){const l=r.sourceRowIndex;l===o?n||(n=s):(l>=0?n=!0:s=!0,r.sourceRowIndex=o,e[o]=r),++o}return n},updateRootLeafsKeepOrder=(e,t,{adds:i})=>{const o=e.length,s=t.size;s>o&&(e.length=s);let n=0;for(let r=0;r<o;++r){const l=e[r];l.destroyed||(n!==r&&(l.sourceRowIndex=n,e[n]=l),++n)}for(const r of i)r.sourceRowIndex<0&&(r.sourceRowIndex=n,e[n++]=r);e.length=n};function updateRowNodeAfterFilter(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var FilterStage=class extends BeanStub{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const t=!!this.filterManager?.isChildFilterPresent();this.beans.formula?.active?this.softFilter(t,e):this.filterNodes(t,e)}filterNodes(e,t){const i=(o,s)=>{o.hasChildren()&&e&&!s?o.childrenAfterFilter=o.childrenAfterGroup.filter(n=>{const r=n.childrenAfterFilter&&n.childrenAfterFilter.length>0,l=n.data&&this.filterManager.doesRowPassFilter({rowNode:n});return r||l}):o.childrenAfterFilter=o.childrenAfterGroup,updateRowNodeAfterFilter(o)};if(this.doingTreeDataFiltering()){const o=(n,r)=>{if(n.childrenAfterGroup)for(let l=0;l<n.childrenAfterGroup.length;l++){const a=n.childrenAfterGroup[l],d=r||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?o(n.childrenAfterGroup[l],d):i(a,d)}i(n,r)},s=n=>o(n,!1);t.executeFromRootNode(s)}else{const o=s=>i(s,!1);t.forEachChangedNodeDepthFirst(o,!0)}}softFilter(e,t){const i=o=>{if(o.childrenAfterFilter=o.childrenAfterGroup,o.hasChildren())for(const s of o.childrenAfterGroup)s.softFiltered=e&&!(s.data&&this.filterManager.doesRowPassFilter({rowNode:s}));updateRowNodeAfterFilter(o)};t.forEachChangedNodeDepthFirst(i,!0)}doingTreeDataFiltering(){const{gos:e}=this;return e.get("treeData")&&!e.get("excludeChildrenWhenTreeDataFiltering")}},MIN_DELTA_SORT_ROWS=4,doDeltaSort=(e,t,i,o,s)=>{const n=t.childrenAfterSort,r=t.childrenAfterAggFilter;if(!r)return n&&n.length>0?n:[];const l=r.length;if(l<=1)return n?.length===l&&(l===0||n[0]===r[0])?n:r.slice();if(!n||l<=MIN_DELTA_SORT_ROWS)return e.doFullSortInPlace(r.slice(),s);const a=new Map,{updates:d,adds:c}=i,u=[];for(let g=0;g<l;++g){const p=r[g];d.has(p)||c.has(p)||!o.canSkip(p)?(a.set(p,~g),u.push(p)):a.set(p,g)}const h=u.length;return h===0?l===n.length?n:filterRemovedNodes(n,a,u):(u.sort((g,p)=>e.compareRowNodes(s,g,p)||~a.get(g)-~a.get(p)),h===l?u:mergeDeltaSortedArrays(e,s,u,n,a,l))},mergeDeltaSortedArrays=(e,t,i,o,s,n)=>{const r=new Array(n);let l=0,a=i[l],d,c=-1,u=0,h=0;const g=i.length,p=o.length;for(;;){if(c<0){if(u>=p)break;if(d=o[u++],c=s.get(d)??-1,c<0)continue}if((e.compareRowNodes(t,a,d)||~s.get(a)-c)<0){if(r[h++]=a,++l>=g)break;a=i[l]}else r[h++]=d,c=-1}for(;l<g;)r[h++]=i[l++];if(c<0)return r;for(r[h++]=d;u<p;){const f=o[u++];s.get(f)>=0&&(r[h++]=f)}return r},filterRemovedNodes=(e,t,i)=>{let o=0;i.length=t.size;for(let s=0,n=e.length;s<n;++s){const r=e[s];t.has(r)&&(i[o++]=r)}return i.length=o,i},updateRowNodeAfterSort=e=>{const t=e.childrenAfterSort,i=e.sibling;if(i&&(i.childrenAfterSort=t),!!t)for(let o=0,s=t.length-1;o<=s;o++){const n=t[o],r=o===0,l=o===s;n.firstChild!==r&&(n.firstChild=r,n.dispatchRowEvent("firstChildChanged")),n.lastChild!==l&&(n.lastChild=l,n.dispatchRowEvent("lastChildChanged")),n.childIndex!==o&&(n.childIndex=o,n.dispatchRowEvent("childIndexChanged"))}},SortStage=class extends BeanStub{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e,t){const i=this.beans.sortSvc.getSortOptions(),o=i.length>0&&!!t&&this.gos.get("deltaSort"),{gos:s,colModel:n,rowGroupColsSvc:r,rowNodeSorter:l,rowRenderer:a,showRowGroupCols:d}=this.beans,c=s.get("groupMaintainOrder"),u=n.getCols().some(v=>v.isRowGroupActive()),h=r?.columns,g=n.isPivotMode(),p=s.getCallback("postSortRows");let f=!1,m;const C=v=>{const w=g&&v.leafGroup;let S=c&&u&&!v.leafGroup;S&&(m??(m=this.shouldSortContainsGroupCols(i)),S&&(S=!m));let b=null;if(S){let y=!1;if(h){const R=v.level+1;R<h.length&&(y=h[R].wasSortExplicitlyRemoved)}y||(b=preserveGroupOrder(v))}else!i.length||w||(o&&t?b=doDeltaSort(l,v,t,e,i):b=l.doFullSortInPlace(v.childrenAfterAggFilter.slice(),i));if(b||(b=v.childrenAfterAggFilter?.slice()??[]),f||(f=v.childrenAfterSort?.[0]!==b[0]),v.childrenAfterSort=b,updateRowNodeAfterSort(v),p){const y={nodes:v.childrenAfterSort};p(y)}};if(e?.forEachChangedNodeDepthFirst(C),f&&s.get("groupHideOpenParents")){const v=d?.columns;v?.length&&a.refreshCells({columns:v,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(_isColumnsSortingCoupledToGroup(this.gos)){for(let i=0;i<t;++i){const o=e[i].column;if(o.isPrimary()&&o.isRowGroupActive())return!0}return!1}for(let i=0;i<t;++i)if(e[i].column.getColDef().showRowGroup)return!0;return!1}},preserveGroupOrder=e=>{const t=e.childrenAfterSort,i=e.childrenAfterAggFilter,o=t?.length,s=i?.length;if(!o||!s)return null;const n=new Array(s),r=new Set;for(let a=0;a<s;++a)r.add(i[a]);let l=0;for(let a=0;a<o;++a){const d=t[a];r.delete(d)&&(n[l++]=d)}if(r.size===0&&l===o)return t;for(const a of r)n[l++]=a;return n.length=l,n},ClientSideRowModel=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.formulaRows=[],this.stages=null,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingData=!1,this.rowDataUpdatedPending=!1,this.refreshingModel=!1,this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1,this.rowNodesCountReady=!1,this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=_debounce(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new RowNode(e);this.rootNode=t,this.nodeManager=this.createBean(new ClientSideNodeManager(t));const i=()=>{this.beans.groupStage?.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:i,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:()=>this.refreshModel({step:"pivot"}),columnPivotModeChanged:()=>this.refreshModel({step:"group"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),stylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,i=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(o=>!!o);this.stages=i;for(let o=i.length-1;o>=0;--o){const s=i[o];for(const n of s.refreshProps)t.set(n,o)}this.addManagedPropertyListeners([...t.keys(),"rowData"],o=>{const s=o.changeSet?.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,i,o){let s,n=!1;do{s=!1;const r=this.getRowIndexAtPixel(e),l=this.getRowIndexAtPixel(t),a=Math.max(r,i),d=Math.min(l,o);for(let c=a;c<=d;c++){const u=this.getRow(c);if(u.rowHeightEstimated){const h=_getRowHeightForNode(this.beans,u);u.setRowHeight(h.height),s=!0,n=!0}}s&&this.setRowTopAndRowIndex()}while(s);return n}onPropChange(e){const{nodeManager:t,gos:i,beans:o}=this,s=o.groupStage;if(!t)return;const n=new Set(e),r=s?.onPropChange(n);let l;n.has("rowData")?l=i.get("rowData"):r&&(l=s?.extractData()),l&&!Array.isArray(l)&&(l=null,_warn(1));const a={step:"nothing",changedProps:n};if(l){const c=!r&&!this.isEmpty()&&l.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate");this.refreshingData=!0,c?(a.keepRenderedRows=!0,a.animate=!i.get("suppressAnimationFrame"),a.changedRowNodes=new ChangedRowNodes,t.setImmutableRowData(a,l)):(a.rowDataUpdated=!0,a.newData=!0,t.setNewRowData(l),this.rowNodesCountReady=!0)}const d=a.rowDataUpdated?"group":this.getRefreshedStage(e);d&&(a.step=d,this.refreshModel(a))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:i}=this;if(!t)return null;const o=t.length;let s=o;for(let n=0,r=e.length;n<r&&s;++n)s=Math.min(s,i.get(e[n])??s);return s<o?t[s].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:i}=this,o=t.environment.getDefaultRowHeight();let s=0;const n=_isDomLayout(this.gos,"normal");for(let r=0,l=i.length;r<l;++r){const a=i[r],d=a.id;if(d!=null&&e?.add(d),a.rowHeight==null){const c=_getRowHeightForNode(t,a,n,o);a.setRowHeight(c.height,c.estimated)}a.setRowTop(s),a.setRowIndex(r),s+=a.rowHeight}if(this.beans.formula?.active){const r=this.formulaRows;for(let l=0,a=r.length;l<a;++l){const d=r[l];d.formulaRowIndex=l}}}clearRowTopAndRowIndex(e,t){const i=e.active,o=r=>{r?.id!=null&&!t.has(r.id)&&r.clearRowTopAndRowIndex()},s=r=>{o(r),o(r.detailNode),o(r.sibling);const l=r.childrenAfterGroup;if(!r.hasChildren()||!l)return;const a=r.level==-1;if(!(i&&!a&&!r.expanded))for(let c=0,u=l.length;c<u;++c)s(l[c])},n=this.rootNode;n&&s(n)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const o=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+o}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:i,rowsToDisplay:o}=this;if(!i||!o.length||o[0]===i)return e;const n=i.childrenAfterSort,r=a=>{let d=n[a];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},l=t.footerSvc;return l?l?.getTopDisplayIndex(o,e,n,r):r(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:i}=this;if(!t||!i.length||i[0]===t)return e;let s=this.getRow(e);s.footer&&(s=s.sibling);let n=s.parent;for(;n&&n!==t;)s=n,n=s.parent;const r=t.childrenAfterSort?.indexOf(s)??-1;return r>=0?r:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:_isAnimateRows(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const o=t.length===0||t.some(s=>s.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:o,keepRenderedRows:!0,animate:_isAnimateRows(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:_isAnimateRows(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new ChangedPath(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:i,rowDataUpdated:o}=e;return!(!t||i||!o||t.removals.length||t.adds.size)}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){const{nodeManager:t,eventSvc:i,started:o}=this;if(!t)return;const s=!!e.rowDataUpdated,n=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&s));if(o&&s&&i.dispatchEvent({type:"rowDataUpdated"}),this.deferRefresh(e)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=s);return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let r=!1;this.refreshingModel=!0;try{this.executeRefresh(e,n,s),r=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,r||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),i.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t,i){const{beans:o}=this;switch(o.masterDetailSvc?.refreshModel(e),i&&e.step!=="group"&&o.colFilter?.refreshModel(),e.step){case"group":this.doGrouping(e);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(t,e.changedRowNodes);case"map":this.doRowsToDisplay()}const s=new Set;this.setRowTopAndRowIndex(s),this.clearRowTopAndRowIndex(t,s),this.updateRefreshParams(e)}deferRefresh(e){return this.refreshingModel||this.beans.colModel.changeEventsDispatching?!0:this.isSuppressModelUpdateAfterUpdateTransaction(e)?(this.started&&(this.refreshingData=!1),!0):!this.started}setPendingRefreshFlags(e){this.pendingNewData||(this.pendingNewData=!!e.newData),this.noKeepRenderedRows||(this.noKeepRenderedRows=!e.keepRenderedRows),this.noKeepUndoRedoStack||(this.noKeepUndoRedoStack=!e.keepUndoRedoStack),this.noAnimate||(this.noAnimate=!e.animate)}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(e){e.newData=this.pendingNewData||!!e.newData,e.keepRenderedRows=!this.noKeepRenderedRows&&!!e.keepRenderedRows,e.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!e.keepUndoRedoStack,e.animate=!this.noAnimate&&!!e.animate}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){const{beans:e,gos:t}=this;if(this.rootNode?._leafs?.length){if(e.filterManager?.isAnyFilterPresent()&&this.getRowCount()===0)return"noMatchingRows"}else if(this.rowCountReady||(t.get("rowData")?.length??0)==0)return"noRows";return null}getNodesInRangeForSelection(e,t){let i=!1,o=!1;const s=[],n=_getGroupSelectsDescendants(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(o)return;if(i&&(r===t||r===e)&&(o=!0,n&&r.group)){addAllLeafs(s,r);return}if(!i){if(r!==t&&r!==e)return;i=!0,t===e&&(o=!0)}(!r.group||!n)&&s.push(r)}),s}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,i=t.length;if(this.isEmpty()||i===0)return-1;let o=0,s=i-1;if(e<=0)return 0;if(t[s].rowTop<=e)return s;let r=-1,l=-1;for(;;){const a=Math.floor((o+s)/2),d=t[a];if(this.isRowInPixel(d,e)||(d.rowTop<e?o=a+1:d.rowTop>e&&(s=a-1),r===o&&l===s))return a;r=o,l=s}}isRowInPixel(e,t){const i=e.rowTop,o=i+e.rowHeight;return i<=t&&o>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let i=0,o=t.length;i<o;++i)e(t[i],i)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let i=0,o=t.length;i<o;++i)e(t[i],i)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,i=>i.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,i=>i.childrenAfterSort)}forEachPivotNode(e,t,i){const{colModel:o,rowGroupColsSvc:s}=this.beans;if(!o.isPivotMode())return;if(!s?.columns.length){e(this.rootNode,0);return}const n=i?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,r=>r.leafGroup?null:r[n])}depthFirstSearchRowNodes(e,t=!1,i=n=>n.childrenAfterGroup,o=this.rootNode,s=0){let n=s;if(!o)return n;const r=o===this.rootNode;if(r||e(o,n++),o.hasChildren()&&!o.footer){const l=i(o);if(l){const a=this.beans.footerSvc;n=a?.addTotalRows(n,o,e,t,r,"top")??n;for(const d of l)n=this.depthFirstSearchRowNodes(e,t,i,d,n);return a?.addTotalRows(n,o,e,t,r,"bottom")??n}}return n}doAggregate(e){this.rootNode&&this.beans.aggStage?.execute(e)}doFilterAggregates(e){const t=this.rootNode,i=this.beans.filterAggStage;if(i){i.execute(e);return}t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){const i=this.beans.sortStage;if(i){i.execute(e,t);return}e.forEachChangedNodeDepthFirst(o=>{o.childrenAfterSort=o.childrenAfterAggFilter.slice(0),updateRowNodeAfterSort(o)})}doGrouping(e){const t=this.rootNode;if(!t)return;const o=this.beans.groupStage?.execute(e);if(o===void 0){const s=t._leafs;t.childrenAfterGroup=s,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=s)}(o||e.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute(e);return}e.forEachChangedNodeDepthFirst(i=>{i.childrenAfterFilter=i.childrenAfterGroup,updateRowNodeAfterFilter(i)},!0)}doPivot(e){this.beans.pivotStage?.execute(e)}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return typeof t=="object"?t:this.beans.groupStage?.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const i=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),i)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:i,asyncTransactions:o}=this;if(!e)return;t.valueCache?.onDataChanged();const s=[],n=[],r=new ChangedRowNodes,l=!this.gos.get("suppressAnimationFrame");for(const{rowDataTransaction:a,callback:d}of o??[]){this.rowNodesCountReady=!0,this.refreshingData=!0;const c=e.updateRowData(a,r,l);s.push(c),d&&n.push(d.bind(null,c))}this.commitTransactions(r,l),n.length>0&&setTimeout(()=>{for(let a=0,d=n.length;a<d;a++)n[a]()},0),s.length>0&&i.dispatchEvent({type:"asyncTransactionsFlushed",results:s}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const i=new ChangedRowNodes,o=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;const s=t.updateRowData(e,i,o);return this.commitTransactions(i,o),s}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{rootNode:e,beans:t}=this;if(t.formula?.active){const s=e?.childrenAfterSort??[];this.formulaRows=s,this.rowsToDisplay=s.filter(n=>!n.softFiltered);for(const n of this.rowsToDisplay)n.setUiLevel(0);return}const i=t.flattenStage;if(i){this.rowsToDisplay=i.execute();return}const o=this.rootNode.childrenAfterSort??[];for(const s of o)s.setUiLevel(0);this.rowsToDisplay=o}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const i=e.sibling;i?.setRowHeight(i.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const i=t.detailNode;i?.setRowHeight(i.rowHeight,!0);const o=t.sibling;o?.setRowHeight(o.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},addAllLeafs=(e,t)=>{const i=t.childrenAfterGroup;if(i)for(let o=0,s=i.length;o<s;++o){const n=i[o];n.data&&e.push(n),n.group&&addAllLeafs(e,n)}};function onGroupExpandedOrCollapsed(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function refreshClientSideRowModel(e,t){const i=_getClientSideRowModel(e);i&&((!t||t==="everything")&&(t="group"),i.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function isRowDataEmpty(e){return _getClientSideRowModel(e)?.isEmpty()??!0}function forEachLeafNode(e,t){_getClientSideRowModel(e)?.forEachLeafNode(t)}function forEachNodeAfterFilter(e,t){_getClientSideRowModel(e)?.forEachNodeAfterFilter(t)}function forEachNodeAfterFilterAndSort(e,t){_getClientSideRowModel(e)?.forEachNodeAfterFilterAndSort(t)}function applyTransaction(e,t){return e.frameworkOverrides.wrapIncoming(()=>_getClientSideRowModel(e)?.updateRowData(t))}function applyTransactionAsync(e,t,i){e.frameworkOverrides.wrapIncoming(()=>_getClientSideRowModel(e)?.batchUpdateRowData(t,i))}function flushAsyncTransactions(e){e.frameworkOverrides.wrapIncoming(()=>_getClientSideRowModel(e)?.flushAsyncTransactions())}function getBestCostNodeSelection(e){return e.selectionSvc?.getBestCostNodeSelection()}var ClientSideRowModelModule={moduleName:"ClientSideRowModel",version:VERSION,rowModels:["clientSide"],beans:[ClientSideRowModel,SortStage],dependsOn:[SortModule]},ClientSideRowModelApiModule={moduleName:"ClientSideRowModelApi",version:VERSION,apiFunctions:{onGroupExpandedOrCollapsed,refreshClientSideRowModel,isRowDataEmpty,forEachLeafNode,forEachNodeAfterFilter,forEachNodeAfterFilterAndSort,applyTransaction,applyTransactionAsync,flushAsyncTransactions,getBestCostNodeSelection,resetRowHeights,onRowHeightChanged},dependsOn:[CsrmSsrmSharedApiModule,RowModelSharedApiModule]},columnAutoSizeCSS=":where(.ag-ltr) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,left .2s ease-in-out}}:where(.ag-rtl) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,right .2s ease-in-out}}";function sizeColumnsToFit(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function autoSizeColumns({colAutosize:e,visibleCols:t},i,o){Array.isArray(i)?e?.autoSizeCols({colKeys:i,skipHeader:o,source:"api"}):e?.autoSizeCols({...i,colKeys:i.colIds??t.allCols,source:"api"})}function autoSizeAllColumns(e,t){t&&typeof t=="object"?autoSizeColumns(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}var ColumnAutosizeService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let i=!1;const o=t.type;if(o==="fitGridWidth"||o==="fitProvidedWidth")i=!0;else if(o==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const s=e.get("rowData");i=s!=null&&s.length>0&&_isClientSideRowModel(e)}i&&this.beans.colDelayRenderSvc?.hideColumns(o)}}autoSizeCols(e){const{eventSvc:t,visibleCols:i,colModel:o}=this.beans;setWidthAnimation(this.beans,!0),this.innerAutoSizeCols(e).then(s=>{const n=c=>dispatchColumnResizedEvent(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return setWidthAnimation(this.beans,!1),n(s);const r=getAvailableWidth(this.beans),l=c=>i.leftCols.some(u=>_columnsMatch(u,c)),a=c=>i.rightCols.some(u=>_columnsMatch(u,c)),d=e.colKeys.filter(c=>!o.getCol(c)?.getColDef().suppressAutoSize&&!isRowNumberCol(c)&&!l(c)&&!a(c));this.sizeColumnsToFit(r,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(c=>({...c,key:c.colId})),colKeys:d,onlyScaleUp:!0,animate:!1}),setWidthAnimation(this.beans,!1),n(s)})}innerAutoSizeCols(e){return new Promise((t,i)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,i));const{colKeys:o,skipHeader:s,skipHeaderGroups:n,stopAtGroup:r,defaultMaxWidth:l,defaultMinWidth:a,columnLimits:d=[],source:c="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:g,autoWidthCalc:p,visibleCols:f}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,i)});return}this.timesDelayed=0;const m=new Set;let C=-1;const v=Object.fromEntries(d.map(({colId:b,...y})=>[b,y])),w=s??this.gos.get("skipHeaderOnAutoSize"),S=n??w;for(;C!==0;){C=0;const b=[];for(const y of o){if(!y||isSpecialCol(y))continue;const R=g.getCol(y);if(!R||m.has(R)||R.getColDef().suppressAutoSize)continue;const E=p.getPreferredWidthForColumn(R,w);if(E>0){const F=v[R.colId]??{};F.minWidth??(F.minWidth=a),F.maxWidth??(F.maxWidth=l);const P=normaliseColumnWidth(R,E,F);R.setActualWidth(P,c),m.add(R),C++}b.push(R)}b.length&&f.refresh(c)}S||this.autoSizeColumnGroupsByColumns(o,c,r),t(m)})}autoSizeColumn(e,t,i){this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const{colModel:o,ctrlsSvc:s}=this.beans,n=new Set,r=o.getColsForKeys(e);for(const a of r){let d=a.getParent();for(;d&&d!=i;)d.isPadding()||n.add(d),d=d.getParent()}let l;for(const a of n){for(const d of s.getHeaderRowContainerCtrls())if(l=d.getHeaderCtrlForColumn(a),l)break;l?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const i=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",i)};e.addEventListener("dblclick",o);const s=new TouchListener(e);return s.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),s.destroy()}}addColumnGroupResize(e,t,i){const o=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const n=[],r=t.getDisplayedLeafColumns();for(const l of r)l.getColDef().suppressAutoSize||n.push(l.getColId());n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),i()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const i=getAvailableWidth(this.beans);if(i>0){this.sizeColumnsToFit(i,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):_warn(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",i,o){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,o));return}const{beans:s}=this,n=o?.animate??!0;n&&setWidthAnimation(s,!0);const r={};for(const{key:C,...v}of o?.columnLimits??[])r[typeof C=="string"?C:C.getColId()]=v;const l=s.visibleCols.allCols;if(e<=0||!l.length)return;const a=getWidthOfColsInList(l);if(o?.onlyScaleUp&&a>e||e===a&&l.every(v=>{if(v.colDef.suppressSizeToFit)return!0;const w=r?.[v.getId()],S=w?.minWidth??o?.defaultMinWidth,b=w?.maxWidth??o?.defaultMaxWidth,y=v.getActualWidth();return(S==null||y>=S)&&(b==null||y<=b)}))return;const c=[],u=[];for(const C of l){const v=o?.colKeys?.some(w=>_columnsMatch(C,w))??!0;C.getColDef().suppressSizeToFit||!v?u.push(C):c.push(C)}const h=c.slice(0);let g=!1;const p=C=>{_removeFromArray(c,C),u.push(C)},f={};for(const C of c){o?.onlyScaleUp&&(f[C.getColId()]=C.getActualWidth()),C.resetActualWidth(t);const v=r?.[C.getId()],w=v?.minWidth??o?.defaultMinWidth??-1/0,S=v?.maxWidth??o?.defaultMaxWidth??1/0,b=C.getActualWidth(),y=Math.max(Math.min(b,S),w);y!=b&&C.setActualWidth(y,t,!0)}for(;!g;){g=!0;const C=e-getWidthOfColsInList(u);if(C<=0)for(const v of c){const w=r?.[v.getId()]?.minWidth??o?.defaultMinWidth??v.minWidth;v.setActualWidth(w,t,!0)}else{const v=C/getWidthOfColsInList(c);let w=C;for(let S=c.length-1;S>=0;S--){const b=c[S],y=b.getColId(),R=f[y],E=r?.[y],F=E?.minWidth??o?.defaultMinWidth??R,P=E?.maxWidth??o?.defaultMaxWidth,x=Math.max(F??-1/0,b.getMinWidth()),M=Math.min(P??1/0,b.getMaxWidth());let D=Math.round(b.getActualWidth()*v);D<x?(D=x,p(b),g=!1):D>M?(D=M,p(b),g=!1):S===0&&(D=w),b.setActualWidth(D,t,!0),w-=D}}}for(const C of h)C.fireColumnWidthChangedEvent(t);const m=s.visibleCols;m.setLeftValues(t),m.updateBodyWidths(),!i&&(dispatchColumnResizedEvent(this.eventSvc,h,!0,t),n&&setWidthAnimation(s,!1))}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,i=e.get("autoSizeStrategy");i?.type!=="fitGridWidth"&&i?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const o=i.type;if(o==="fitGridWidth"){const{columnLimits:s,defaultMinWidth:n,defaultMaxWidth:r}=i,l=s?.map(({colId:a,minWidth:d,maxWidth:c})=>({key:a,minWidth:d,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:n,defaultMaxWidth:r,columnLimits:l})}else o==="fitProvidedWidth"&&this.sizeColumnsToFit(i.width,"sizeColumnsToFit");t?.revealColumns(o)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const i="autosizeColumns";e?this.autoSizeCols({...t,source:i,colKeys:e}):this.autoSizeAllColumns({...t,source:i}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function normaliseColumnWidth(e,t,i={}){const o=i.minWidth??e.getMinWidth();t<o&&(t=o);const s=i.maxWidth??e.getMaxWidth();return t>s&&(t=s),t}function getAvailableWidth({ctrlsSvc:e,scrollVisibleSvc:t}){const i=e.getGridBodyCtrl(),s=i.isVerticalScrollShowing()?t.getScrollbarWidth():0;return _getInnerWidth(i.eGridBody)-s}var WIDTH_ANIMATION_CLASS="ag-animate-autosize";function setWidthAnimation({ctrlsSvc:e,gos:t},i){if(!t.get("animateColumnResizing")||t.get("enableRtl")||!e.isAlive())return;const o=e.getGridBodyCtrl().eGridBody.classList;i?o.add(WIDTH_ANIMATION_CLASS):o.remove(WIDTH_ANIMATION_CLASS)}var ColumnAutoSizeModule={moduleName:"ColumnAutoSize",version:VERSION,beans:[ColumnAutosizeService],apiFunctions:{sizeColumnsToFit,autoSizeColumns,autoSizeAllColumns},dependsOn:[AutoWidthModule],css:[columnAutoSizeCSS]};function isColumnHovered(e,t){return!!e.colHover?.isHovered(t)}var HoverFeature=class extends BeanStub{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=i=>{const{beans:o,gos:s,element:n,columns:r}=this,l=o.colHover;if(i??!!s.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:l.setMouseOver.bind(l,r),mouseout:l.clearMouseOver.bind(l)});else{for(const d of this.destroyManagedListeners)d();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},CSS_COLUMN_HOVER="ag-column-hover",ColumnHoverService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,i){const o=()=>{const s=this.isHovered(i);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const i=this.isHovered(e);t.toggleCss(CSS_COLUMN_HOVER,i)}addHeaderFilterColumnHoverListener(e,t,i,o){this.createHoverFeature(e,[i],o);const s=()=>{const n=this.isHovered(i);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,i){e.createManagedBean(new HoverFeature(t,i))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},ColumnHoverModule={moduleName:"ColumnHover",version:VERSION,beans:[ColumnHoverService],apiFunctions:{isColumnHovered}},GridSerializer=class extends BeanStub{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:i,columnKeys:o,skipRowGroups:s,exportRowNumbers:n}=t,r=this.getColumnsToExport({allColumns:i,skipRowGroups:s,columnKeys:o,exportRowNumbers:n});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce((l,a)=>a(l),e).parse()}processRow(e,t,i,o){const s=t.shouldRowBeSkipped||(()=>!1),r=t.rowPositions!=null||!!t.onlySelected,l=this.gos.get("groupHideOpenParents")&&!r,a=this.colModel.isPivotMode()?o.leafGroup:!o.group,d=!!o.footer,c=o.allChildrenCount===1&&o.childrenAfterGroup?.length===1&&_canSkipShowingRowGroup(this.gos,o);if(!a&&!d&&(t.skipRowGroups||c||l)||t.onlySelected&&!o.isSelected()||t.skipPinnedTop&&o.rowPinned==="top"||t.skipPinnedBottom&&o.rowPinned==="bottom"||o.stub||o.level===-1&&!a&&!d||s(_addGridCommonParams(this.gos,{node:o})))return;const g=e.onNewBodyRow(o);if(i.forEach((p,f)=>{g.onColumn(p,f,o)}),t.getCustomContentBelowRow){const p=t.getCustomContentBelowRow(_addGridCommonParams(this.gos,{node:o}));p&&e.addCustomContent(p)}}appendContent(e){return t=>{const i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{const i=e.prependContent;return i&&t.addCustomContent(i),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return i=>{if(!e.skipColumnGroupHeaders){const o=new GroupInstanceIdCreator,{colGroupSvc:s}=this.beans,n=s?s.createColumnGroups({columns:t,idCreator:o,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(n,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){const o=i.onNewHeaderRow();t.forEach((s,n)=>{o.onColumn(s,n,void 0)})}return i}}processPinnedTopRows(e,t){return i=>{const o=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="top").sort((s,n)=>s.rowIndex-n.rowIndex).map(s=>this.pinnedRowModel?.getPinnedTopRow(s.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",o),i}}processRows(e,t){return i=>{const o=this.rowModel,s=_isClientSideRowModel(this.gos,o),n=_isServerSideRowModel(this.gos,o),r=!s&&e.onlySelected,l=this.processRow.bind(this,i,e,t),{exportedRows:a="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(d=>d.rowPinned==null).sort((d,c)=>d.rowIndex-c.rowIndex).map(d=>o.getRow(d.rowIndex)).forEach(l);else if(this.colModel.isPivotMode())s?o.forEachPivotNode(l,!0,a==="filteredAndSorted"):n?o.forEachNodeAfterFilterAndSort(l,!0):o.forEachNode(l);else if(e.onlySelectedAllPages||r){const d=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(d),d.forEach(l)}else a==="all"?o.forEachNode(l):s||n?o.forEachNodeAfterFilterAndSort(l,!0):o.forEachNode(l);return i}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:i}=this.beans;if(!t||!i)return;const o=t.getSortOptions(),s=(n,r)=>n.rowIndex!=null&&r.rowIndex!=null?n.rowIndex-r.rowIndex:n.level===r.level?n.parent?.id===r.parent?.id?i.compareRowNodes(o,n,r)||(n.rowIndex??-1)-(r.rowIndex??-1):s(n.parent,r.parent):n.level>r.level?s(n.parent,r):s(n,r.parent);e.sort(s)}processPinnedBottomRows(e,t){return i=>{const o=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="bottom").sort((s,n)=>s.rowIndex-n.rowIndex).map(s=>this.pinnedRowModel?.getPinnedBottomRow(s.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",o),i}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:i=!1,exportRowNumbers:o=!1,columnKeys:s}=e,{colModel:n,gos:r,visibleCols:l}=this,a=n.isPivotMode(),d=h=>isColumnSelectionCol(h)?!1:!isRowNumberCol(h)||o;if(s?.length)return n.getColsForKeys(s).filter(d);const c=r.get("treeData");let u=[];return t&&!a?u=n.getCols():u=l.allCols,u=u.filter(h=>d(h)&&(i&&!c?!isColumnGroupAutoCol(h):!0)),u}recursivelyAddHeaderGroups(e,t,i){const o=[];for(const s of e){const n=s;if(n.getChildren)for(const r of n.getChildren()??[])o.push(r)}e.length>0&&isColumnGroup(e[0])&&this.doAddHeaderHeader(t,e,i),o&&o.length>0&&this.recursivelyAddHeaderGroups(o,t,i)}doAddHeaderHeader(e,t,i){const o=e.onNewHeaderGroupingRow();let s=0;for(const n of t){const r=n;let l;i?l=i(_addGridCommonParams(this.gos,{columnGroup:r})):l=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const d=(r.isExpandable()?r.getLeafColumns():[]).reduce((c,u,h,g)=>{let p=_last(c);return u.getColumnGroupShow()==="open"?(!p||p[1]!=null)&&(p=[h],c.push(p)):p&&p[1]==null&&(p[1]=h-1),h===g.length-1&&p&&p[1]==null&&(p[1]=h),c},[]);o.onColumn(r,l||"",s++,r.getLeafColumns().length-1,d)}}},SharedExportModule={moduleName:"SharedExport",version:VERSION,beans:[GridSerializer]},BaseCreator=class extends BeanStub{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}};function _downloadFile(e,t){const i=document.defaultView||window;if(!i){_warn(52);return}const o=document.createElement("a"),s=i.URL.createObjectURL(t);o.setAttribute("href",s),o.setAttribute("download",e),o.style.display="none",document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),o.remove(),i.setTimeout(()=>{i.URL.revokeObjectURL(s)},0)}var BaseGridSerializingSession=class{constructor(e){this.valueFrom="data";const{colModel:t,rowGroupColsSvc:i,colNames:o,valueSvc:s,gos:n,processCellCallback:r,processHeaderCallback:l,processGroupHeaderCallback:a,processRowGroupCallback:d,valueFrom:c}=e;this.colModel=t,this.rowGroupColsSvc=i,this.colNames=o,this.valueSvc=s,this.gos=n,this.processCellCallback=r,this.processHeaderCallback=l,this.processGroupHeaderCallback=a,this.processRowGroupCallback=d,c&&(this.valueFrom=c)}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e){const{column:t,node:i,currentColumnIndex:o,accumulatedRowIndex:s,type:n,useRawFormula:r}=e,l=o===0&&_isFullWidthGroupRow(this.gos,i,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||i.group)&&(t.isRowGroupDisplayed(i.rowGroupColumn?.getColId()??"")||l))return{value:this.processRowGroupCallback(_addGridCommonParams(this.gos,{column:t,node:i}))??""};if(this.processCellCallback)return{value:this.processCellCallback(_addGridCommonParams(this.gos,{accumulatedRowIndex:s,column:t,node:i,value:this.valueSvc.getValueForDisplay({column:t,node:i,from:this.valueFrom}).value,type:n,parseValue:p=>this.valueSvc.parseValue(t,i,p,this.valueSvc.getValue(t,i,this.valueFrom)),formatValue:p=>this.valueSvc.formatValue(t,i,p)??p}))??""};const a=this.gos.get("treeData"),d=this.valueSvc,c=i.level===-1&&i.footer,u=t.colDef.showRowGroup===!0&&(i.group||a);if(!c&&(l||u)){let p="",f=i;for(;f&&f.level!==-1;){const{value:m,valueFormatted:C}=d.getValueForDisplay({column:l?void 0:t,node:f,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});p=` -> ${C??m??""}${p}`,f=f.parent}return{value:p,valueFormatted:p}}const{value:h,valueFormatted:g}=d.getValueForDisplay({column:t,node:i,includeValueFormatted:!0,exporting:!0,useRawFormula:r,from:this.valueFrom});return{value:h??"",valueFormatted:g}}getHeaderName(e,t){return e?e(_addGridCommonParams(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},LINE_SEPARATOR=`\r
|
|
`,CsvSerializingSession=class extends BaseGridSerializingSession{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,LINE_SEPARATOR),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((i,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(i.data.value||""),i.mergeAcross&&this.appendEmptyCells(i.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,i,o){i!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue({column:e,node:i,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(o.valueFormatted??o.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(_warn(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=LINE_SEPARATOR),this.isFirstLine=!1}},CsvCreator=class extends BaseCreator{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){_warn(51);return}const t=()=>{const o=this.getMergedParams(e),s=this.getData(o),n=new Blob(["\uFEFF",s],{type:"text/plain"}),r=o.fileName,l=typeof r=="function"?r(_addGridCommonParams(this.gos,{})):r;_downloadFile(this.getFileName(l),n)},{overlays:i}=this.beans;i?i.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:i,rowGroupColsSvc:o,valueSvc:s,gos:n}=this.beans,{processCellCallback:r,processHeaderCallback:l,processGroupHeaderCallback:a,processRowGroupCallback:d,suppressQuotes:c,columnSeparator:u,valueFrom:h}=e;return new CsvSerializingSession({colModel:t,colNames:i,valueSvc:s,gos:n,processCellCallback:r||void 0,processHeaderCallback:l||void 0,processGroupHeaderCallback:a||void 0,processRowGroupCallback:d||void 0,suppressQuotes:c||!1,columnSeparator:u||",",rowGroupColsSvc:o,valueFrom:h})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function getDataAsCsv(e,t){return e.csvCreator?.getDataAsCsv(t)}function exportDataAsCsv(e,t){e.csvCreator?.exportDataAsCsv(t)}var CsvExportModule={moduleName:"CsvExport",version:VERSION,beans:[CsvCreator],apiFunctions:{getDataAsCsv,exportDataAsCsv},dependsOn:[SharedExportModule]},AgTooltipFeature=class extends AgBeanStub{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const i="title",o=this.ctrl.getGui();o&&(e!=null&&(e!=""||t)?o.setAttribute(i,e):o.removeAttribute(i))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},SHOW_SWITCH_TOOLTIP_DIFF=1e3,FADE_OUT_TOOLTIP_TIMEOUT=1e3,INTERACTIVE_HIDE_DELAY=100,lastTooltipHideTime,isLocked=!1,BaseTooltipStateManager=class extends AgBeanStub{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return this.tooltipCtrl[`getTooltip${e}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!_isIOSUserAgent()&&(isLocked?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,i=this.tooltipCtrl.getGui(),o=this.tooltipComp?.getGui();this.isInteractingWithTooltip||i.contains(t)||this.interactionEnabled&&o?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||isLocked)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-lastTooltipHideTime<SHOW_SWITCH_TOOLTIP_DIFF}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!_exists(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const i=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const o=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(i,o)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),lastTooltipHideTime=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const o=t.getGui();this.tooltipComp=t,o.classList.contains("ag-tooltip")||o.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&o.classList.add("ag-tooltip-animate"),this.interactionEnabled&&o.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:o,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:r}),this.setEventHandlers(r)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(o,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(_getDocument(this.beans),{keydown:r=>{o.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(o,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:o,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=_getActiveDomElement(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,i=this.tooltipTrigger===0?FADE_OUT_TOOLTIP_TIMEOUT:0;window.setTimeout(()=>{e(),this.destroyBean(t)},i),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},INTERACTIVE_HIDE_DELAY)}unlockService(){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()}},AgHighlightTooltipFeature=class extends AgTooltipFeature{constructor(e,t,i){super(e,i),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=e==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},AgTooltipComponent=class extends AgPopupComponent{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,i=this.getGui();i.textContent=_toString(t);const o=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();i.classList.add(`ag-${o}-tooltip`)}},tooltipCSS=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip),&:where(.ag-cell-formula-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",instanceIdSeq=0,WAIT_FOR_POPUP_CONTENT_RESIZE=200,BasePopupService=class extends AgBeanStub{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:i,nudgeY:o,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:o,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:i,nudgeY:o,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:l="over",type:a}=e,d=n.getBoundingClientRect(),c=this.getParentRect();this.setAlignedTo(n,t);const u=()=>{let h=d.left-c.left;r==="right"&&(h-=t.offsetWidth-d.width);let g;return l==="over"?(g=d.top-c.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,d,c,e.nudgeY||0)==="under"?g=d.top-c.top+d.height:g=d.top-t.offsetHeight-(o||0)*2-c.top),{x:h,y:g}};this.positionPopup({ePopup:t,nudgeX:i,nudgeY:o,keepWithinBounds:s,updatePosition:u,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,a,t,n,null)})}positionPopupForMenu(e){const{eventSource:t,ePopup:i,event:o}=e,s=t.getBoundingClientRect(),n=this.getParentRect();this.setAlignedTo(t,i);let r=!1;const l=()=>{const a=this.keepXYWithinBounds(i,s.top-n.top,0),d=i.clientWidth>0?i.clientWidth:200;r||(i.style.minWidth=`${d}px`,r=!0);const u=n.right-n.left-d;let h;return this.gos.get("enableRtl")?(h=p(),h<0&&(h=g(),this.setAlignedStyles(i,"left")),h>u&&(h=0,this.setAlignedStyles(i,"right"))):(h=g(),h>u&&(h=p(),this.setAlignedStyles(i,"right")),h<0&&(h=0,this.setAlignedStyles(i,"left"))),{x:h,y:a};function g(){return s.right-n.left-2}function p(){return s.left-n.left-d}};this.positionPopup({ePopup:i,keepWithinBounds:!0,updatePosition:l,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",i,t,o instanceof MouseEvent?o:void 0)})}shouldRenderUnderOrAbove(e,t,i,o){const s=i.bottom-t.bottom,n=t.top-i.top,r=e.offsetHeight+o;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const i=this.getPopupIndex(e);if(i===-1)return;const o=this.popupList[i],{alignedToElement:s}=o;if(!s)return;const n=["right","left","over","above","under"];for(const r of n)s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`);t&&(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const i=this.getPopupIndex(t);if(i!==-1){const o=this.popupList[i];o.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:i,nudgeX:o,nudgeY:s,skipObserver:n,updatePosition:r}=e,l={width:0,height:0},a=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,o&&(c+=o),s&&(u+=s),i&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!n){const d=_observeResize(this.beans,t,()=>a(!0));setTimeout(()=>d(),WAIT_FOR_POPUP_CONTENT_RESIZE)}}getParentRect(){const e=_getDocument(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),_getElementRectWithOffset(t)}keepXYWithinBounds(e,t,i){const o=i===0,s=o?"clientHeight":"clientWidth",n=o?"top":"left",r=o?"height":"width",l=o?"scrollTop":"scrollLeft",a=_getDocument(this.beans),d=a.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=a.documentElement.getBoundingClientRect(),p=c===a.body,f=Math.ceil(u[r]);let C=p?(o?_getAbsoluteHeight:_getAbsoluteWidth)(d)+d[l]:c[s];p&&(C-=Math.abs(g[n]-h[n]));const v=C-f;return Math.min(Math.max(t,0),Math.max(v,0))}addPopup(e){const{eChild:t,ariaLabel:i,ariaOwns:o,alwaysOnTop:s,positionCallback:n,anchorToElement:r}=e,l=this.getPopupIndex(t);if(l!==-1)return{hideFunc:this.popupList[l].hideFunc};this.initialisePopupPosition(t);const a=this.createPopupWrapper(t,!!s,i,o),d=this.addEventListenersToPopup({...e,wrapperEl:a});return n&&n(),this.addPopupToPopupList(t,a,d,r),{hideFunc:d}}initialisePopupPosition(e){const i=this.getPopupParent().getBoundingClientRect();_exists(e.style.top)||(e.style.top=`${i.top*-1}px`),_exists(e.style.left)||(e.style.left=`${i.left*-1}px`)}createPopupWrapper(e,t,i,o){const s=this.getPopupParent(),{environment:n,gos:r}=this.beans,l=_createAgElement({tag:"div"});return n.applyThemeClasses(l),l.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||_setAriaRole(e,"dialog"),i?_setAriaLabel(e,i):o&&(e.id||(e.id=`popup-component-${instanceIdSeq}`),_setAriaOwns(o,e.id)),l.appendChild(e),s.appendChild(l),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),l}addEventListenersToPopup(e){const t=this.beans,i=_getDocument(t),{wrapperEl:o,eChild:s,closedCallback:n,afterGuiAttached:r,closeOnEsc:l,modal:a,ariaOwns:d}=e;let c=!1;const u=f=>{if(!o.contains(_getActiveDomElement(t)))return;f.key===KeyCode.ESCAPE&&!this.isStopPropagation(f)&&p({keyboardEvent:f})},h=f=>p({mouseEvent:f}),g=f=>p({touchEvent:f}),p=(f={})=>{const{mouseEvent:m,touchEvent:C,keyboardEvent:v,forceHide:w}=f;!w&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:C},s)||c)||(c=!0,o.remove(),i.removeEventListener("keydown",u),i.removeEventListener("mousedown",h),i.removeEventListener("touchstart",g),i.removeEventListener("contextmenu",h),this.eventSvc.removeListener("dragStarted",h),n&&n(m||C||v),this.removePopupFromPopupList(s,d))};return r&&r({hidePopup:p}),window.setTimeout(()=>{l&&i.addEventListener("keydown",u),a&&(i.addEventListener("mousedown",h),this.eventSvc.addListener("dragStarted",h),i.addEventListener("touchstart",g),i.addEventListener("contextmenu",h))},0),p}addPopupToPopupList(e,t,i,o){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:instanceIdSeq,isAnchored:!!o}),o&&this.setPopupPositionRelatedToElement(e,o),instanceIdSeq=instanceIdSeq+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const i=this.getPopupIndex(e);if(i===-1)return;const o=this.popupList[i];if(o.stopAnchoringPromise&&o.stopAnchoringPromise.then(n=>n&&n()),o.stopAnchoringPromise=void 0,o.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:o.hideFunc});return o.stopAnchoringPromise=s,o.isAnchored=!0,s}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&_setAriaOwns(t,null),this.popupList=this.popupList.filter(i=>i.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:o,ePopup:s}=e,n=o.getBoundingClientRect(),r=u=>Number.parseInt(u.substring(0,u.length-1),10),l=(u,h)=>{const g=i[u]-n[u],p=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},a=l("top",0),d=l("left",1),c=this.beans.frameworkOverrides;return new AgPromise(u=>{c.wrapIncoming(()=>{_wrapInterval(()=>{const h=t.getBoundingClientRect(),g=o.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const f=(m,C)=>{const v=r(s.style[C]);m.last!==v&&(m.initial=v,m.last=v);const w=h[C]-g[C];if(w!=m.lastDiff){const S=this.keepXYWithinBounds(s,m.initial+m.initialDiff-w,m.direction);s.style[C]=`${S}px`,m.last=S}m.lastDiff=w};f(a,"top"),f(d,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:i,touchEvent:o}=e,s=i||o;if(!s)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;r<this.popupList.length;r++){const l=this.popupList[r];if(_isElementInEventPath(l.element,s))return!0}return this.isElementWithinCustomPopup(s.target)}isElementWithinCustomPopup(e){const t=_getDocument(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const i=this.getWrapper(e);i&&(i.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(i))}bringPopupToFront(e){const t=this.getPopupParent(),i=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),o=i.length,s=this.getWrapper(e);if(!s||o<=1||!t.contains(e))return;const n=[],r=[];for(const h of i)h!==s&&(h.classList.contains("ag-always-on-top")?r.push(h):n.push(h));const l=[],a=r.length,u=s.classList.contains("ag-always-on-top")||!a?[...n,...r,s]:[...n,s,...r];for(let h=0;h<=o;h++){const g=u[h];if(i[h]===u[h]||g===s)continue;const p=g.querySelectorAll("div");for(const f of p)f.scrollTop!==0&&l.push([f,f.scrollTop]);h===0?t.prepend(g):u[h-1].after(g)}for(;l.length;){const h=l.pop();h[0].scrollTop=h[1]}}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const i of this.popupList)t.applyThemeClasses(i.wrapper)}}},PopupService=class extends BasePopupService{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(e,t,i,o,s){const n=this.gos.getCallback("postProcessPopup");if(n){const{column:r,rowNode:l}=e??{};n({column:r,rowNode:l,ePopup:i,type:t,eventSource:o,mouseEvent:s})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return _isStopPropagationForAgGrid(e)}},PopupModule={moduleName:"Popup",version:VERSION,beans:[PopupService]};function _isShowTooltipWhenTruncated(e){return e.get("tooltipShowMode")==="whenTruncated"}function _getShouldDisplayTooltip(e,t){return _isShowTooltipWhenTruncated(e)?_isElementOverflowingCallback(t):void 0}var getErrorTooltipMessage=(e,t)=>{const i=e;return typeof i.getTranslatedMessage=="function"?i.getTranslatedMessage(t):e.message},getEditErrorsForPosition=(e,t,i)=>{const{editModelSvc:o}=e,s=o?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,n=o?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=s||n;return r?.length?r.join(i("tooltipValidationErrorSeparator",". ")):void 0},getCellTruncationCheck=(e,t)=>{if(_isShowTooltipWhenTruncated(e.gos)){if(t.isCellRenderer()){const o=t.column.getColDef();return!!o.showRowGroup||o.cellRenderer==="agGroupCellRenderer"?_isElementOverflowingCallback(()=>{const n=t.eGui;return n.querySelector(".ag-group-value")||n.querySelector(".ag-cell-value")||n}):void 0}return _isElementOverflowingCallback(()=>{const o=t.eGui;return o.children.length===0?o:o.querySelector(".ag-cell-value")})}},buildCellTooltipDisplayFunctions=(e,t,i)=>{const{editSvc:o}=e,{column:s}=t,n=getCellTruncationCheck(e,t),r=()=>o?.isEditing(t)?!1:n?s.isTooltipEnabled()?n():!1:!0;return{shouldDisplayDefault:r,shouldDisplayColumnTooltip:r,shouldDisplayCustomTooltip:i??r}},resolveCellTooltip=({beans:e,ctrl:t,value:i,displayFunctions:o,translate:s})=>{const{editSvc:n,formula:r,gos:l}=e,{column:a,rowNode:d}=t;if(r?.active&&a.isAllowFormula()){const m=r.getFormulaError(a,d);if(m)return{value:getErrorTooltipMessage(m,s),location:"cellFormula",shouldDisplay:()=>!!r?.getFormulaError(a,d)}}if(!!!n?.isEditing(t)){const m=getEditErrorsForPosition(e,t,s);if(m)return{value:m,location:"cellEditor",shouldDisplay:()=>!n?.isEditing(t)&&!!getEditErrorsForPosition(e,t,s)}}const{shouldDisplayCustomTooltip:u,shouldDisplayColumnTooltip:h}=o;if(i!=null)return{value:i,location:"cell",shouldDisplay:u};const g=a.getColDef(),p=d.data;if(g.tooltipField&&_exists(p))return{value:_getValueUsingField(p,g.tooltipField,a.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:h};const f=g.tooltipValueGetter;return f?{value:f(_addGridCommonParams(l,{location:"cell",colDef:a.getColDef(),column:a,rowIndex:t.cellPosition.rowIndex,node:d,data:d.data,value:t.value,valueFormatted:t.valueFormatted})),location:"cell",shouldDisplay:h}:null},TooltipService=class extends BeanStub{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,i,o){e&&t.destroyBean(e);const s=this.gos,n=_isShowTooltipWhenTruncated(s),{column:r,eGui:l}=t,a=r.getColDef();!o&&n&&!a.headerComponent&&(o=_isElementOverflowingCallback(()=>l.querySelector(".ag-header-cell-text")));const d="header",u=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),h=i??u,g={getGui:()=>l,getLocation:()=>d,getTooltipValue:()=>i??a?.headerTooltipValueGetter?.(_addGridCommonParams(s,{location:d,colDef:a,column:r,value:h,valueFormatted:u}))??a?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})};let p=this.createTooltipFeature(g);return p&&(p=t.createBean(p),t.setRefreshFunction("tooltip",()=>p.refreshTooltip())),p}setupHeaderGroupTooltip(e,t,i,o){e&&t.destroyBean(e);const s=this.gos,n=_isShowTooltipWhenTruncated(s),{column:r,eGui:l}=t,a=r.getColGroupDef();!o&&n&&!a?.headerGroupComponent&&(o=_isElementOverflowingCallback(()=>l.querySelector(".ag-header-group-text")));const d="headerGroup",u=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),h=i??u,g={getGui:()=>l,getLocation:()=>d,getTooltipValue:()=>i??a?.headerTooltipValueGetter?.(_addGridCommonParams(s,{location:d,colDef:a,column:r,value:h,valueFormatted:u}))??a?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>{const f={column:r};return a&&(f.colDef=a),f}},p=this.createTooltipFeature(g);return p&&t.createBean(p)}enableCellTooltipFeature(e,t,i){const{beans:o}=this,{column:s,rowNode:n}=e,r=buildCellTooltipDisplayFunctions(o,e,i),l=this.getLocaleTextFunc();let a=null;const d=()=>(a=resolveCellTooltip({beans:o,ctrl:e,value:t,displayFunctions:r,translate:l}),a),u={getGui:()=>e.eGui,getLocation:()=>a?.location??"cell",getTooltipValue:()=>d()?.value,shouldDisplayTooltip:()=>{const h=a??d();return h?h.shouldDisplay?h.shouldDisplay():!0:!1},getAdditionalParams:()=>({column:s,colDef:s.getColDef(),rowIndex:e.cellPosition.rowIndex,node:n,data:n.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(u,o)}setupFullWidthRowTooltip(e,t,i,o){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>i,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:o},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const l=this.createTooltipFeature(s,n);if(l)return t.createBean(l,r)}setupCellEditorTooltip(e,t){const{beans:i}=this,{context:o}=i,s=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>getEditErrorsForPosition(i,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:l}=i,a=l?.getRowValidationModel()?.getRowValidationMap(),d=l?.getCellValidationModel()?.getCellValidationMap(),c=!!a&&a.size>0,u=!!d&&d.size>0;return c||u}},r=this.createTooltipFeature(n,i);if(r)return e.createBean(r,o)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=_exists(t.tooltipField)||_exists(t.tooltipValueGetter)||_exists(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},TooltipStateManager=class extends BaseTooltipStateManager{createTooltipComp(e,t){_getTooltipCompDetails(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},TooltipModule={moduleName:"Tooltip",version:VERSION,beans:[TooltipService],dynamicBeans:{tooltipFeature:AgTooltipFeature,highlightTooltipFeature:AgHighlightTooltipFeature,tooltipStateManager:TooltipStateManager},userComponents:{agTooltipComponent:AgTooltipComponent},dependsOn:[PopupModule],css:[tooltipCSS]},UndoRedoAction=class{constructor(e){this.cellValueChanges=e}},RangeUndoRedoAction=class extends UndoRedoAction{constructor(e,t,i,o){super(e),this.initialRange=t,this.finalRange=i,this.ranges=o}},DEFAULT_STACK_SIZE=10,UndoRedoStack=class{constructor(e){this.actionStack=[],this.maxStackSize=e||DEFAULT_STACK_SIZE,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},UndoRedoService=class extends BeanStub{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=this.activeCellEdit!==null&&_areCellsEqual(this.activeCellEdit,t),o=this.activeRowEdit!==null&&_isSameRow(this.activeRowEdit,t);if(!(i||o||this.isPasting||this.isRangeInAction))return;const{rowPinned:n,rowIndex:r,column:l,oldValue:a,value:d}=e,c={rowPinned:n,rowIndex:r,columnId:l.getColId(),newValue:d,oldValue:a};this.cellValueChanges.push(c)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const i=e.get("undoRedoCellEditingLimit");if(i<=0)return;this.undoStack=new UndoRedoStack(i),this.redoStack=new UndoRedoStack(i),this.addListeners();const o=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:s=>{s.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:o,newColumnsLoaded:o,columnGroupOpened:o,columnRowGroupChanged:o,columnMoved:o,columnPinned:o,columnVisible:o,rowDragEnd:o}),t.whenReady(this,s=>{this.gridBodyCtrl=s.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:i,redoStack:o}=this;t.dispatchEvent({type:"undoStarted",source:e});const s=this.undoRedo(i,o,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:s})}redo(e){const{eventSvc:t,undoStack:i,redoStack:o}=this;t.dispatchEvent({type:"redoStarted",source:e});const s=this.undoRedo(o,i,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:s})}undoRedo(e,t,i,o,s){if(!e)return!1;const n=e.pop();return n?.cellValueChanges?(this.processAction(n,r=>r[o],s),n instanceof RangeUndoRedoAction?this.processRange(n.ranges||[n[i]]):this.processCell(n.cellValueChanges),t.push(n),!0):!1}processAction(e,t,i){for(const o of e.cellValueChanges){const{rowIndex:s,rowPinned:n,columnId:r}=o,l={rowIndex:s,rowPinned:n},a=_getRowNode(this.beans,l);a.displayed&&a.setDataValue(r,t(o),i)}}processRange(e){let t;const i=this.beans.rangeSvc;i.removeAllCellRanges(!0),e.forEach((o,s)=>{if(!o)return;const n=o.startRow,r=o.endRow;s===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:o.startColumn.getColId()},this.setLastFocusedCell(t));const l={rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:o.startColumn,columns:o.columns};i.addCellRange(l)})}processCell(e){const t=e[0],{rowIndex:i,rowPinned:o}=t,s={rowIndex:i,rowPinned:o},n=_getRowNode(this.beans,s),r={rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:i,rowPinned:o}=e,{colModel:s,focusSvc:n,rangeSvc:r}=this.beans,l=s.getCol(i);if(!l)return;const{scrollFeature:a}=this.gridBodyCtrl;a.ensureIndexVisible(t),a.ensureColumnVisible(l);const d={rowIndex:t,column:l,rowPinned:o};n.setFocusedCell({...d,forceBrowserFocus:!0}),r?.setRangeToCell(d)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new UndoRedoAction(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const i=new UndoRedoAction(this.cellValueChanges);this.pushActionsToUndoStack(i)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new UndoRedoAction(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new RangeUndoRedoAction(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:i}=this.beans;t&&_isCellSelectionEnabled(i)?e=new RangeUndoRedoAction(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new UndoRedoAction(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;const i=new UndoRedoAction(t??[]);this.pushActionsToUndoStack(i),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},cellEditingCSS=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) .ag-text-area-input{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",CheckboxCellEditorElement={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},CheckboxCellEditor=class extends AgAbstractCellEditor{constructor(){super(CheckboxCellEditorElement,[AgCheckboxSelector]),this.eEditor=RefPlaceholder}initialiseEditor(e){const t=e.value??void 0,i=this.eEditor;i.setValue(t),i.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(i,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),i=_getAriaCheckboxStateName(t,e),o=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${o} (${i})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,i=this.getValue();return t?t({value:i,internalErrors:null,cellEditorParams:e}):null}},AgInputTextField=class extends AgAbstractInputField{constructor(e,t="ag-text-field",i="text"){super(e,t,i)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const i=this.eInput;return i.value!==e&&(i.value=_exists(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){const t=this.eInput,i=e.length>0;t.setCustomValidity(e),i&&t.reportValidity(),_setAriaInvalid(t,i)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=i=>{_isEventFromPrintableCharacter(i)&&i.key&&!e.test(i.key)&&i.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:i=>{i.clipboardData?.getData("text")?.split("").some(s=>!e.test(s))&&i.preventDefault()}})}},AgInputTextFieldSelector={selector:"AG-INPUT-TEXT-FIELD",component:AgInputTextField},AgInputDateField=class extends AgInputTextField{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=_isBrowserSafari();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){_getActiveDomElement(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?_serialiseDate(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,_addOrRemoveAttribute(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?_serialiseDate(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,_addOrRemoveAttribute(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,_addOrRemoveAttribute(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return _parseDateTimeFromString(this.getValue())??void 0}setDate(e,t){this.setValue(_serialiseDate(e??null,this.includeTime),t)}},AgInputDateFieldSelector={selector:"AG-INPUT-DATE-FIELD",component:AgInputDateField},SimpleCellEditor=class extends AgAbstractCellEditor{constructor(e){super(),this.cellEditorInput=e,this.eEditor=RefPlaceholder}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:i}=this,{cellStartedEdit:o,eventKey:s,suppressPreventDefault:n}=e;i.getInputElement().setAttribute("title",""),t.init(i,e);let r,l=!0;o?(this.focusAfterAttached=!0,s===KeyCode.BACKSPACE||s===KeyCode.DELETE?r="":s&&s.length===1?n?l=!1:r=s:(r=t.getStartValue(),s!==KeyCode.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),l&&r!=null&&i.setStartValue(r),this.addGuiEventListener("keydown",a=>{const{key:d}=a;(d===KeyCode.PAGE_UP||d===KeyCode.PAGE_DOWN)&&a.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;_isBrowserSafari()||t.getFocusableElement().focus();const i=t.getInputElement();this.highlightAllOnFocus?i.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},DateCellElement={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},DateCellEditorInput=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return DateCellElement}getAgComponents(){return[AgInputDateFieldSelector]}init(e,t){this.eEditor=e,this.params=t;const{min:i,max:o,step:s,colDef:n}=t;i!=null&&e.setMin(i),o!=null&&e.setMax(o),s!=null&&e.setStep(s),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:i}=this,{min:o,max:s,getValidationErrors:n}=i;let r=[];const l=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(o){const a=o instanceof Date?o:new Date(o);if(t<a){const d=a.toLocaleDateString();r.push(l("minDateValidation",`Date must be after ${d}`,[d]))}}if(s){const a=s instanceof Date?s:new Date(s);if(t>a){const d=a.toLocaleDateString();r.push(l("maxDateValidation",`Date must be before ${d}`,[d]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:i,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,i=e.getDate();return!_exists(i)&&!_exists(t.value)?t.value:i??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return _serialiseDate(e,this.includeTime??!1)}},DateCellEditor=class extends SimpleCellEditor{constructor(){super(new DateCellEditorInput(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},DateStringCellElement={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},DateStringCellEditorInput=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return DateStringCellElement}getAgComponents(){return[AgInputDateFieldSelector]}init(e,t){this.eEditor=e,this.params=t;const{min:i,max:o,step:s,colDef:n}=t;i!=null&&e.setMin(i),o!=null&&e.setMax(o),s!=null&&e.setStep(s),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,i=e.getInputElement().value,o=this.formatDate(this.parseDate(i??void 0)),{min:s,max:n,getValidationErrors:r}=t;let l=[];if(o){const a=new Date(o),d=this.getLocaleTextFunc();if(s){const c=new Date(s);if(a<c){const u=c.toLocaleDateString();l.push(d("minDateValidation",`Date must be after ${u}`,[u]))}}if(n){const c=new Date(n);if(a>c){const u=c.toLocaleDateString();l.push(d("maxDateValidation",`Date must be before ${u}`,[u]))}}}return l.length||(l=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:l}):l}getValue(){const{params:e,eEditor:t}=this,i=this.formatDate(t.getDate());return!_exists(i)&&!_exists(e.value)?e.value:e.parseValue(i??"")}getStartValue(){return _serialiseDate(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):_parseDateTimeFromString(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):_serialiseDate(e??null,this.includeTime??!1)??void 0}},DateStringCellEditor=class extends SimpleCellEditor{constructor(){super(new DateStringCellEditorInput(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},AgInputTextArea=class extends AgAbstractInputField{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},AgInputTextAreaSelector={selector:"AG-INPUT-TEXT-AREA",component:AgInputTextArea},LargeTextCellElement={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},LargeTextCellEditor=class extends AgAbstractCellEditor{constructor(){super(LargeTextCellElement,[AgInputTextAreaSelector]),this.eEditor=RefPlaceholder}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:i,eventKey:o,maxLength:s,cols:n,rows:r}=e;this.focusAfterAttached=i,t.getInputElement().setAttribute("title",""),t.setMaxLength(s||200).setCols(n||60).setRows(r||10);let l;i?(this.focusAfterAttached=!0,o===KeyCode.BACKSPACE||o===KeyCode.DELETE?l="":o&&o.length===1?l=o:(l=this.getStartValue(e),o!==KeyCode.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,l=this.getStartValue(e)),l!=null&&t.setValue(l,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}onKeyDown(e){const t=e.key;(t===KeyCode.LEFT||t===KeyCode.UP||t===KeyCode.RIGHT||t===KeyCode.DOWN||e.shiftKey&&t===KeyCode.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:i}=this,o=this.getLocaleTextFunc();e.setInputAriaLabel(o("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),i&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:i}=t,o=e.getValue();return!_exists(o)&&!_exists(i)?i:t.parseValue(o)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:i}=e,o=this.getLocaleTextFunc(),s=this.getValue();let n=[];return typeof s=="string"&&t!=null&&s.length>t&&n.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),i?i({value:s,internalErrors:n,cellEditorParams:e}):n}},AgInputNumberField=class extends AgInputTextField{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=Number.parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:i,max:o,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof i=="number"&&this.setMin(i),typeof o=="number"&&this.setMax(o),typeof s=="number"&&this.setStep(s)}onWheel(e){_getActiveDomElement(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const i=this.precision;if(i==null)return e;if(t){const s=Number.parseFloat(e).toFixed(i);return Number.parseFloat(s).toString()}const o=String(e).split(".");if(o.length>1){if(o[1].length<=i)return e;if(i>0)return`${o[0]}.${o[1].slice(0,i)}`}return o[0]}setMin(e){return this.min===e?this:(this.min=e,_addOrRemoveAttribute(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,_addOrRemoveAttribute(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,_addOrRemoveAttribute(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(i=>super.setValue(i,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,i){if(_exists(i)){let o=this.isScientificNotation(i);if(o&&this.eInput.validity.valid)return e(i);if(!o){i=this.adjustPrecision(i);const s=this.normalizeValue(i);o=i!=s}if(o)return t(i)}return e(i)}getValue(e=!1){const t=this.eInput;if(!t.validity.valid&&!e)return;const i=t.value;return this.isScientificNotation(i)?this.adjustPrecision(i,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},AgInputNumberFieldSelector={selector:"AG-INPUT-NUMBER-FIELD",component:AgInputNumberField},NumberCellElement={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},NumberCellEditorInput=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return NumberCellElement}getAgComponents(){return[AgInputNumberFieldSelector]}init(e,t){this.eEditor=e,this.params=t;const{max:i,min:o,precision:s,step:n}=t;i!=null&&e.setMax(i),o!=null&&e.setMin(o),s!=null&&e.setPrecision(s),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:i,getValidationErrors:o}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let l=[];return typeof n=="number"&&(t!=null&&n<t&&l.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),i!=null&&n>i&&l.push(r("maxValueValidation",`Must be less than or equal to ${i}.`,[String(i)]))),l.length||(l=null),o?o({value:n,cellEditorParams:e,internalErrors:l}):l}preventStepping(e){(e.key===KeyCode.UP||e.key===KeyCode.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,i=e.getValue();if(!_exists(i)&&!_exists(t.value))return t.value;let o=t.parseValue(i);if(o==null)return o;if(typeof o=="string"){if(o==="")return null;o=Number(o)}return isNaN(o)?null:o}getStartValue(){return this.params.value}setCaret(){_isBrowserSafari()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},NumberCellEditor=class extends SimpleCellEditor{constructor(){super(new NumberCellEditorInput(()=>this.getLocaleTextFunc()))}},agListCSS=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",ACTIVE_CLASS="ag-active-item",getAgListElement=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${e}-list-item-text`,ref:"eText",children:t}]}),AgListItem=class extends AgComponentStub{constructor(e,t,i){super(getAgListElement(e,t)),this.label=t,this.value=i,this.eText=RefPlaceholder}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(ACTIVE_CLASS,e),_setAriaSelected(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const i=this.getGui();_setAriaPosInSet(i,e),_setAriaSetSize(i,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>_isHorizontalScrollShowing(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},AgList=class extends AgComponentStub{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(agListCSS)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case KeyCode.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const i=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(i)}break;case KeyCode.DOWN:case KeyCode.UP:e.preventDefault(),this.navigate(t);break;case KeyCode.PAGE_DOWN:case KeyCode.PAGE_UP:case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:i}=e,o=i??t;return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();_clearElement(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){const t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const i=this.options.findIndex(o=>o.value===e);if(i!==-1){const o=this.options[i];this.value=o.value,this.displayValue=o.text,this.highlightItem(this.listItems[i]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!_isVisible(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const i=this.getGui(),{scrollTop:o,clientHeight:s}=i,{offsetTop:n,offsetHeight:r}=t;(n+r>o+s||n<o)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const i=new AgListItem(this.cssIdentifier,t,e);i.setParentComponent(this);const o=this.createManagedBean(i);this.listItems.push(o),this.getGui().appendChild(o.getGui())}navigate(e){const t=e===KeyCode.DOWN;let i;const{listItems:o,highlightedItem:s}=this;if(!s)i=t?o[0]:_last(o);else{let r=o.indexOf(s)+(t?1:-1);r=Math.min(Math.max(r,0),o.length-1),i=o[r]}this.highlightItem(i)}navigateToPage(e){const{listItems:t,highlightedItem:i}=this;if(!i||t.length===0)return;const o=t.indexOf(i),s=this.options.length-1,n=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/n);let l=-1;e===KeyCode.PAGE_HOME?l=0:e===KeyCode.PAGE_END?l=s:e===KeyCode.PAGE_DOWN?l=Math.min(o+r,s):e===KeyCode.PAGE_UP&&(l=Math.max(o-r,0)),l!==-1&&this.highlightItem(t[l])}refreshAriaRole(){_setAriaRole(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((i,o)=>{i.setIndex(o+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},agPickerFieldCSS=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}.ag-picker-field-wrapper:disabled{opacity:.5}",AgPickerFieldElement={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},AgPickerField=class extends AgAbstractField{constructor(e){if(super(e,e?.template||AgPickerFieldElement,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=RefPlaceholder,this.eWrapper=RefPlaceholder,this.eDisplayField=RefPlaceholder,this.eIcon=RefPlaceholder,this.registerCSS(agPickerFieldCSS),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:i,variableWidth:o,minPickerWidth:s,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!o,i!=null&&this.setPickerMaxHeight(i),s!=null&&this.setPickerMinWidth(s),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:i,inputWidth:o}=this.config;if(i){const s=this.beans.iconSvc.createIconNoSpan(i);s&&this.eIcon.appendChild(s)}o!=null&&this.setInputWidth(o)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),_setAriaExpanded(e,!1),this.ariaRole&&_setAriaRole(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case KeyCode.UP:case KeyCode.DOWN:case KeyCode.ENTER:case KeyCode.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case KeyCode.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}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.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:i,pickerAriaLabelValue:o,modalPicker:s=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:l,variableWidth:a,beans:d,eWrapper:c}=this,u={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const f=_isNothingFocused(d);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(i,o),anchorToElement:c};e.style.position="absolute";const h=d.popupSvc,g=h.addPopup(u);a?(r&&(e.style.minWidth=r),e.style.width=_formatSize(_getAbsoluteWidth(c)),l&&(e.style.maxWidth=l)):_setElementWidth(e,l??_getAbsoluteWidth(c));const p=n??`${_getInnerHeight(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:i,gos:o},eWrapper:s,pickerComponent:n}=this,r=o.get("enableRtl")?"right":"left";i.positionPopupByComponent({type:t,eventSource:s,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}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){if(!this.isAlive())return;const t=this.getAriaElement();_setAriaExpanded(t,e);const i=this.eWrapper.classList;i.toggle("ag-picker-expanded",e),i.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.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(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return _setElementWidth(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},agSelectCSS=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",AgSelect=class extends AgPickerField{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(agSelectCSS)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:_isElementOverflowingCallback(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:i}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),i&&t==null&&(this.eDisplayField.textContent=i),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new AgList("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),i=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",i),_setAriaControlsAndLabel(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:o=>{o?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch(t===KeyCode.TAB&&this.hidePicker(),t){case KeyCode.ENTER:case KeyCode.UP:case KeyCode.DOWN:case KeyCode.PAGE_UP:case KeyCode.PAGE_DOWN:case KeyCode.PAGE_HOME:case KeyCode.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case KeyCode.ESCAPE:super.onKeyDown(e);break;case KeyCode.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,i){const{listComponent:o,config:{placeholder:s},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!o)return this;if(i||o.setValue(e,!0),o.getValue()===this.getValue())return this;let a=o.getDisplayValue();return a==null&&s&&(a=s),n.textContent=a,r?.setTooltipAndRefresh(a??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},AgSelectSelector={selector:"AG-SELECT",component:AgSelect},SelectCellElement={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},SelectCellEditor=class extends AgAbstractCellEditor{constructor(){super(SelectCellElement,[AgSelectSelector]),this.eEditor=RefPlaceholder,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:i,gos:o}=this,{values:s,value:n,eventKey:r}=e;if(_missing(s)){_warn(58);return}this.startedByEnter=r!=null?r===KeyCode.ENTER:!1;let l=!1;s.forEach(u=>{const h={value:u},g=i.formatValue(e.column,null,u),p=g!=null;h.text=p?g:u,t.addOption(h),l=l||n===u}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:d,valueListMaxHeight:c}=e;a!=null&&t.setPickerGap(a),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d),o.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:i}=e,o=this.getValue();let s=[];if(t&&!t.includes(o)){const n=this.getLocaleTextFunc();s.push(n("invalidSelectionValidation","Invalid selection."))}else s=null;return i?i({value:o,internalErrors:s,cellEditorParams:e}):s}},TextCellEditorElement={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},TextCellEditorInput=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return TextCellEditorElement}getAgComponents(){return[AgInputTextFieldSelector]}init(e,t){this.eEditor=e,this.params=t;const i=t.maxLength;i!=null&&e.setMaxLength(i)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:i}=e,o=this.getValue(),s=this.getLocaleTextFunc();let n=[];return t!=null&&typeof o=="string"&&o.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),i?i({value:o,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,i=e.getValue();return!_exists(i)&&!_exists(t.value)?t.value:t.parseValue(i)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){_isBrowserSafari()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),i=_exists(t)&&t.length||0;i&&e.getInputElement().setSelectionRange(i,i)}},TextCellEditor=class extends SimpleCellEditor{constructor(){super(new TextCellEditorInput(()=>this.getLocaleTextFunc()))}};function undoCellEditing(e){e.undoRedo?.undo("api")}function redoCellEditing(e){e.undoRedo?.redo("api")}function getEditRowValues(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function getEditingCells(e){const t=e.editModelSvc?.getEditMap(),i=[];return t?.forEach((o,s)=>{const{rowIndex:n,rowPinned:r}=s;o.forEach((l,a)=>{const{editorValue:d,pendingValue:c,sourceValue:u,state:h}=l,g=_sourceAndPendingDiffer(l);let p=d??c;p===UNEDITED&&(p=void 0);const f={newValue:p,oldValue:u,state:h,column:a,colId:a.getColId(),colKey:a.getColId(),rowIndex:n,rowPinned:r},m=h==="editing";(m||!m&&g)&&i.push(f)})}),i}function stopEditing(e,t=!1){const{editSvc:i}=e;if(i?.isBatchEditing()){if(t)for(const o of e.editModelSvc?.getEditPositions()??[])o.state==="editing"&&i.revertSingleCellEdit(o);else _syncFromEditors(e,{persist:!0});_destroyEditors(e,void 0,{cancel:t})}else i?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function isEditing(e,t){const i=_getCellCtrl(e,t);return!!e.editSvc?.isEditing(i)}function startEditingCell(e,t){const{key:i,colKey:o,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:l}=e,a=l.getCol(o);if(!a){_warn(12,{colKey:o});return}const c=_getRowNode(e,{rowIndex:s,rowPinned:n||null,column:a});if(!c){_warn(290,{rowIndex:s,rowPinned:n});return}if(!r?.isCellEditable({rowNode:c,column:a},"api"))return;n==null&&ensureIndexVisible(e,s),ensureColumnVisible(e,o),r?.startEditing({rowNode:c,column:a},{event:i?new KeyboardEvent("keydown",{key:i}):void 0,source:"api",editable:!0})}function validateEdit(e){return e.editSvc?.validateEdit()||null}function getCurrentUndoSize(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function getCurrentRedoSize(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var PopupEditorElement={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},PopupEditorWrapper=class extends AgPopupComponent{constructor(e){super(PopupEditorElement),this.params=e}postConstruct(){_setDomData(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,i=o=>{_isUserSuppressingKeyboardEvent(this.gos,o,t.node,t.column,!0)||t.onKeyDown(o)};this.addManagedElementListeners(e,{keydown:i})}};function shouldStartEditing(e,{column:t},i,o,s="ui"){if(i instanceof KeyboardEvent&&(i.key===KeyCode.TAB||i.key===KeyCode.ENTER||i.key===KeyCode.F2||i.key===KeyCode.BACKSPACE&&o))return!0;if(i?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const r=t?.getColDef(),l=deriveClickCount(e.gos,r),a=i?.type;return a==="click"&&i?.detail===1&&l===1||a==="dblclick"&&i?.detail===2&&l===2?!0:s==="api"?!!o:!1}function deriveClickCount(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function existingEditing(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function isCellEditable(e,t){const i=t.column,o=t.rowNode,s=i.getColDef();if(!o)return existingEditing(e,t);const n=s.editable;if(o.group){const r=s.groupRowEditable;if(r!=null)return i.isColumnFunc(o,r)?!0:existingEditing(e,t)}return i.isColumnFunc(o,n)?!0:existingEditing(e,t)}function isFullRowCellEditable(e,t,i="ui"){const o=isCellEditable(e,t);if(o||i==="ui")return o;const{rowNode:s,column:n}=t;for(const r of e.colModel.getCols())if(r!==n&&isCellEditable(e,{rowNode:s,column:r}))return!0;return!1}var editHighlightFn=(e,t=!1)=>{if(e!==void 0)return _sourceAndPendingDiffer(e)||t&&e.state==="editing"};function _hasEdits(e,t,i=!1){return editHighlightFn(e.editModelSvc?.getEdit(t),i)}var nodeHasLeafEdit=(e,t,i)=>{if(e)for(let o=0,s=e.length;o<s;++o){const n=e[o];if(n.data&&(editHighlightFn(t?.getEdit({rowNode:n,column:i}))||editHighlightFn(t?.getEdit({rowNode:n.pinnedSibling,column:i})))||nodeHasLeafEdit(n.childrenAfterGroup,t,i))return!0}};function _hasLeafEdits(e,t){const{column:i,rowNode:o}=t;return e.gos.get("groupTotalRow")&&!o?.footer?!1:nodeHasLeafEdit(o?.childrenAfterGroup,e.editModelSvc,i)}function _hasPinnedEdits(e,{rowNode:t,column:i}){if(t=t.pinnedSibling,!!t)return editHighlightFn(e.editModelSvc?.getEdit({rowNode:t,column:i}))}var CellEditStyleFeature=class extends BeanStub{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){const{cellCtrl:e,editSvc:t,beans:i}=this;if(t?.isBatchEditing()&&t.isEditing()){const s=_hasEdits(i,e)||_hasLeafEdits(i,e)||_hasPinnedEdits(i,e);this.applyBatchingStyle(s)}else this.applyBatchingStyle(!1);const o=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",o)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},RowEditStyleFeature=class extends BeanStub{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){const{rowCtrl:e,editModelSvc:t,beans:i}=this;let o=e.rowNode,s=t?.getEditRow(o);const n=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:o});if(!s&&o.pinnedSibling&&(o=o.pinnedSibling,s=t?.getEditRow(o)),s){const r=Array.from(s.keys()).some(l=>{const a={rowNode:o,column:l};return _hasEdits(i,a,!0)||_hasLeafEdits(i,a)||_hasPinnedEdits(i,a)});this.applyStyle(n,r);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){const i=!!this.editSvc?.isBatchEditing(),o=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:s})=>{s.toggleCss("ag-row-editing",o&&t),s.toggleCss("ag-row-batch-edit",o&&t&&i),s.toggleCss("ag-row-inline-editing",t),s.toggleCss("ag-row-not-inline-editing",!t),s.toggleCss("ag-row-editing-invalid",o&&t&&e)})}},purgeRows=({rowModel:e,pinnedRowModel:t,editModelSvc:i},o)=>{const s=new Set;e.forEachNode(n=>o.has(n)&&s.add(n)),t?.forEachPinnedRow("top",n=>o.has(n)&&s.add(n)),t?.forEachPinnedRow("bottom",n=>o.has(n)&&s.add(n));for(const n of o)s.has(n)||i.removeEdits({rowNode:n});return s},purgeCells=({editModelSvc:e},t,i)=>{for(const o of t)e?.getEditRow(o)?.forEach((s,n)=>!i.has(n)&&e.removeEdits({rowNode:o,column:n}))},_refreshEditCells=e=>()=>{const t=new Set(e.colModel.getCols()),i=e.editModelSvc.getEditMap(!0),o=new Set(i.keys());purgeCells(e,purgeRows(e,o),t)},KEEP_EDITOR_SOURCES=new Set(["undo","redo","paste","bulk","rangeSvc"]),INTERNAL_EDITOR_SOURCES=new Set(["ui","api"]),STOP_EDIT_SOURCE_TRANSFORM={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},STOP_EDIT_SOURCE_TRANSFORM_KEYS=new Set(Object.keys(STOP_EDIT_SOURCE_TRANSFORM)),SET_DATA_SOURCE_AS_API=new Set(["paste","rangeSvc","cellClear","redo","undo"]),CANCEL_PARAMS={cancel:!0,source:"api"},COMMIT_PARAMS={cancel:!1,source:"api"},CHECK_SIBLING={checkSiblings:!0},FORCE_REFRESH={force:!0,suppressFlash:!0},EditService=class extends BeanStub{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:o})=>{this.stopEditing(void 0,CANCEL_PARAMS),this.createStrategy(o)});const t=_refreshEditCells(e),i=()=>{const o=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return o||s?this.stopEditing(void 0,CANCEL_PARAMS):this.isEditing()&&(this.batch?_destroyEditors(e,this.model.getEditPositions()):this.stopEditing(void 0,COMMIT_PARAMS)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:i,filterChanged:i,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,CANCEL_PARAMS))}stopBatchEditing(e){this.batch&&(e&&this.stopEditing(void 0,e),this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1)}ensureBatchStarted(){!this.batch||this.batchStartDispatched||(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){const{beans:t,gos:i,strategy:o}=this,s=getEditType(i,e);if(o){if(o.beanName===s)return o;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,i,o="ui"){const s=shouldStartEditing(this.beans,e,t,i,o);return s&&(this.strategy??(this.strategy=this.createStrategy())),s}shouldStopEditing(e,t,i="ui"){return this.strategy?.shouldStop(e,t,i)??null}shouldCancelEditing(e,t,i="ui"){return this.strategy?.shouldCancel(e,t,i)??null}validateEdit(){return _validateEdit(this.beans)}isEditing(e,t){return this.model.hasEdits(e??void 0,t??CHECK_SIBLING)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get("cellSelection")&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){const{startedEdit:i=!0,event:o=null,source:s="ui",ignoreEventKey:n=!1,silent:r}=t;if(this.strategy??(this.strategy=this.createStrategy()),!(t.editable??this.isCellEditable(e,"api")))return;const a=_getCellCtrl(this.beans,e);if(a&&!a.comp){t.editable=void 0,a.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const d=this.shouldStartEditing(e,o,i,s);if(d===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&!t.continueEditing&&this.stopEditing(void 0,{source:s}),d&&this.ensureBatchStarted(),this.strategy.start({position:e,event:o,source:s,ignoreEventKey:n,startedEdit:i,silent:r})}stopEditing(e,t){const i=this.prepareStopContext(e,t);if(!i)return!1;this.stopping=!0;let o=!1,{edits:s}=i;try{const n=this.processStopRequest(i);return o||(o=n.res),s=n.edits,this.finishStopEditing({...i,edits:s,params:t,position:e,res:o}),o}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:i=null,cancel:o=!1,source:s="ui",forceCancel:n=!1,forceStop:r=!1,commit:l=!1}=t||{};if(STOP_EDIT_SOURCE_TRANSFORM_KEYS.has(s)&&this.batch)return this.bulkRefresh(e),null;const a=this.committing?STOP_EDIT_SOURCE_TRANSFORM[s]:s;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,CHECK_SIBLING))||!this.strategy||this.stopping)return null;const c=_getCellCtrl(this.beans,e);c&&(c.onEditorAttachedFuncs=[]);const u=!o&&(!!this.shouldStopEditing(e,i,a)||(this.committing||s==="paste")&&!this.batch)||r,h=o&&!!this.shouldCancelEditing(e,i,a)||n;return{cancel:o,cellCtrl:c,edits:this.model.getEditMap(!0),event:i??null,forceCancel:n,forceStop:r,commit:l,position:e,source:s,treatAsSource:a,willCancel:h,willStop:u}}processStopRequest(e){const{event:t,position:i,willCancel:o,willStop:s}=e;return s||o?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,i)?{res:!1,edits:this.handleMidBatchKey(t,i,e)}:(_syncFromEditors(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(i),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){const{beans:t,model:i}=this,{cancel:o,commit:s,edits:n,event:r,source:l,willCancel:a,willStop:d}=e,c=!this.batch||!a;_syncFromEditors(t,{persist:c,isCancelling:a||o,isStopping:d});const u=i.getEditMap(),g=!a&&(!this.batch||s)?this.processEdits(u,l):[];o?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(r,s),this.clearValidationIfNoOpenEditors();for(const p of g)i.clearEditValue(p);this.bulkRefresh(void 0,n);for(const p of i.getEditPositions(u)){const f=_getCellCtrl(t,p),m=_sourceAndPendingDiffer(p);f?.refreshCell({force:!0,suppressFlash:!m})}return{res:d,edits:u}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,i){const{beans:o,model:s}=this,{cellCtrl:n,edits:r}=i,{key:l}=e,a=l===KeyCode.ENTER,d=l===KeyCode.ESCAPE,c=l===KeyCode.TAB;if(a||c||d){if(a||c)_syncFromEditors(o,{persist:!0});else if(d&&n){const{rowNode:u,column:h}=n;if(this.batch&&u&&h){const g={rowNode:u,column:h};_destroyEditors(o,[g],{silent:!0}),this.model.stop(g,!0,!0),_getCellCtrl(o,g)?.refreshCell(FORCE_REFRESH)}else this.revertSingleCellEdit(n)}return this.batch?this.strategy?.cleanupEditors():_destroyEditors(o,s.getEditPositions(),{event:e,cancel:d}),e.preventDefault(),this.bulkRefresh(t,r,{suppressFlash:!0}),s.getEditMap()}return r}finishStopEditing({cellCtrl:e,edits:t,params:i,position:o,res:s,commit:n,forceCancel:r,willCancel:l,willStop:a}){const d=this.beans;s&&o&&(!this.batch||n)&&this.model.removeEdits(o),this.navigateAfterEdit(i,e?.cellPosition),_purgeUnchangedEdits(d),this.clearValidationIfNoOpenEditors(),this.bulkRefresh();const{rowRenderer:c,formula:u}=d;if(l&&c.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){u?u.refreshFormulas(!0):c.refreshRows({suppressFlash:!0,force:!0});const h=a&&n;(h||l&&r)&&this.dispatchBatchStopped(t,h)}}dispatchBatchStopped(e,t){let i;t&&(i=_filterChangedEdits(e),i.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",i??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;const{event:i,suppressNavigateAfterEdit:o}=e;if(!(i instanceof KeyboardEvent)||o)return;const{key:n,shiftKey:r}=i,l=this.gos.get("enterNavigatesVerticallyAfterEdit");if(n!==KeyCode.ENTER||!l)return;const a=r?KeyCode.UP:KeyCode.DOWN;this.beans.navigation?.navigateToNextCell(null,a,t,!1)}processEdits(e,t){const i=Array.from(e.keys()),o=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,s=[];for(const n of i){const r=e.get(n);for(const l of r.keys()){const a=r.get(l),d={rowNode:n,column:l};if(_sourceAndPendingDiffer(a)&&!o){const c=_getCellCtrl(this.beans,d);this.setNodeDataValue(n,l,a.pendingValue,c,t)||s.push(d)}}}return s}setNodeDataValue(e,t,i,o,s="edit"){const n=INTERNAL_EDITOR_SOURCES.has(s)?"edit":s;o&&(o.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,i,n)}finally{this.committing=!1,o&&(o.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){const i=this.model.getEdit(e);i&&i.state!=="editing"&&(t?this.beans.editModelSvc?.setEdit(e,{sourceValue:this.valueSvc.getValue(e.column,e.rowNode,"data")}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefresh();let i=FORCE_REFRESH;t?.forceRefreshOfEditCellsOnly&&(i={...getRowColumnsFromMap(e),...FORCE_REFRESH}),this.beans.rowRenderer.refreshCells(i)}dispatchEditValuesChanged({rowNode:e,column:t},i={}){if(!e||!t||!i)return;const{pendingValue:o,sourceValue:s}=i,{rowIndex:n,rowPinned:r,data:l}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:l,newValue:o,oldValue:s,value:o,colDef:t.getColDef()})}bulkRefresh(e={},t,i={}){const{beans:o,gos:s}=this,{editModelSvc:n,rowModel:r}=o;_isClientSideRowModel(s,r)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),i):t&&n?.getEditMap(!1)?.forEach((l,a)=>{for(const d of l.keys())this.refCell({rowNode:a,column:d},l.get(d),i)}))}refCell({rowNode:e,column:t},i,o={}){const{beans:s,gos:n}=this,r=new Set([e]),l=new Set,a=e.pinnedSibling;a&&r.add(a);const d=e.sibling;d&&l.add(d);let c=e.parent;for(;c;)c.sibling?.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?l.add(c.sibling):l.add(c),c=c.parent;for(const u of r)this.dispatchEditValuesChanged({rowNode:u,column:t},i);for(const u of r)_getCellCtrl(s,{rowNode:u,column:t})?.refreshCell(o);for(const u of l)_getCellCtrl(s,{rowNode:u,column:t})?.refreshCell(o)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{gos:i,beans:o}=this,s=e.rowNode,n=e.column.getColDef();if(s.group&&n.groupRowEditable==null){if(i.get("treeData")){if(!s.data&&!i.get("enableGroupEdit"))return!1}else if(!i.get("enableGroupEdit"))return!1}const r=getEditType(i)==="fullRow"?isFullRowCellEditable(o,e,t):isCellEditable(o,e);return r&&(this.strategy??(this.strategy=this.createStrategy())),r}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,i=!0){if(this.hasValidationErrors(e)){const o=_getCellCtrl(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),i&&(o&&!o.hasBrowserFocus()&&o.focusCell(),o?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(o&&this.revertSingleCellEdit(o),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const i=_getCellCtrl(this.beans,e);i?.comp?.getCellEditor()&&(_destroyEditors(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),_setupEditor(this.beans,e,{silent:!0}),_populateModelValidationErrors(this.beans),i?.refreshCell(FORCE_REFRESH),t&&(i?.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){_populateModelValidationErrors(this.beans);const t=_getCellCtrl(this.beans,e);t&&(t.refreshCell(FORCE_REFRESH),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let i=!1;return e?.rowNode?(i||(i=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(i||(i=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(i||(i=this.model.getCellValidationModel().getCellValidationMap().size>0),i||(i=this.model.getRowValidationModel().getRowValidationMap().size>0)),i}moveToNextCell(e,t,i,o="ui"){let s;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,i)==="block-stop";return e instanceof CellCtrl&&n&&(s=this.strategy?.moveToNextEditingCell(e,t,i,o,r)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!r&&this.stopEditing()),s}getPendingEditValue(e,t,i){if(i==="data"||i==="batch"&&!this.batch)return;const o=this.model.getEdit({rowNode:e,column:t},CHECK_SIBLING);if(!o||this.stopping&&!this.batch&&!o.editorState?.cellStartedEditing)return;if(i==="edit"){const n=o.editorValue;if(n!=null&&n!==UNEDITED)return n}const s=o.pendingValue;if(s!==UNEDITED)return s}getCellDataValue(e){const t=this.model.getEdit(e,CHECK_SIBLING);if(t){const i=t.pendingValue;if(i!==UNEDITED)return i;const o=t.sourceValue;if(o!=null)return o}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){_addStopEditingWhenGridLosesFocus(this,this.beans,e)}createPopupEditorWrapper(e){return new PopupEditorWrapper(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:i,sourceValue:o,state:s}=t;return i===o||s==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:o}),this.beans.editModelSvc?.removeEdits(e),this.bulkRefresh(e),!0)}setDataValue(e,t,i){try{const o=this.batch,s=this.isEditing(o?void 0:e);if((!s||this.committing)&&!SET_DATA_SOURCE_AS_API.has(i)||!s&&!o&&i==="paste")return;const n=this.beans;this.strategy??(this.strategy=this.createStrategy());let r;if(o?r="ui":this.committing?r=i??"api":r="api",!i||KEEP_EDITOR_SOURCES.has(i))return this.applyDirectValue(e,t,i);const l=this.applyExistingEdit(e,t,i,r);return l!==void 0?l:(_syncFromEditor(n,e,t,i,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,i,o){const s=this.model.getEdit(e);if(s)return s.pendingValue===t?!1:s.sourceValue!==t?(_syncFromEditor(this.beans,e,t,i,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:o,suppressNavigateAfterEdit:!0}),!0):(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...s,pendingValue:t}),!0)}applyDirectValue(e,t,i){const o=this.beans;if(this.batch)return _syncFromEditor(o,e,t,i,void 0,{persist:!0}),this.cleanupEditors(),_purgeUnchangedEdits(o),this.ensureBatchStarted(),this.bulkRefresh(),!0;_syncFromEditor(o,e,t,i,void 0,{persist:!0});const s=_getCellCtrl(o,e),n=this.setNodeDataValue(e.rowNode,e.column,t,s,i);return this.syncEditAfterCommit(e,n),_getCellCtrl(o,e)?.refreshCell(FORCE_REFRESH),n}handleColDefChanged(e){_refreshEditorOnColDefChanged(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){const{model:i}=this;if(!this.batch||!i.hasRowEdits(e.rowNode,CHECK_SIBLING))return;const{rowNode:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:l}=n;return l.data=i.getEditRowDataValue(s,CHECK_SIBLING),{compDetails:n}}return{valueToDisplay:r}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,i,o){this.strategy?.dispatchCellEvent(e,t,i,o)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return _addGridCommonParams(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},i){if(!i||i.length===0)return;const{beans:o,rangeSvc:s,valueSvc:n}=this,{formula:r}=o;_syncFromEditors(o,{persist:!0});const l=this.model.getEditMap(!0);let a=l.get(e)?.get(t)?.pendingValue,d=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),d=!0);const c=r?.isFormula(a)??!1;i.forEach(h=>{const g=h.columns.some(p=>p?.isAllowFormula());if(s?.forEachRowInRange(h,p=>{const f=_getRowNode(o,p);if(f===void 0)return;const m=l.get(f)??new Map;let C=a;for(const v of h.columns){if(!v)continue;const w=!!c&&v.isAllowFormula();if(this.isCellEditable({rowNode:f,column:v},"api")){const S=n.getValue(v,f,"data",!0);let b=n.parseValue(v,f??null,C,S);Number.isNaN(b)&&(b=null),m.set(v,{editorValue:void 0,pendingValue:b,sourceValue:S,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}w&&(C=r?.updateFormulaByOffset({value:C,columnDelta:1}))}m.size>0&&l.set(f,m),c&&g&&(a=r?.updateFormulaByOffset({value:a,rowDelta:1}))}),this.setEditMap(l),this.batch){this.cleanupEditors(),_purgeUnchangedEdits(o),this.ensureBatchStarted(),this.bulkRefresh();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,d&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(l)})}}),this.bulkRefresh();const u=_getCellCtrl(o,{rowNode:e,column:t});u&&u.focusCell(!0)}createCellStyleFeature(e){return new CellEditStyleFeature(e,this.beans)}createRowStyleFeature(e){return new RowEditStyleFeature(e,this.beans)}setEditingCells(e,t){const{beans:i}=this,{colModel:o,valueSvc:s}=i,n=new Map;for(let{colId:r,column:l,colKey:a,rowIndex:d,rowPinned:c,newValue:u,state:h}of e){const g=r?o.getCol(r):a?o.getCol(a):l;if(!g)continue;const p=_getRowNode(i,{rowIndex:d,rowPinned:c});if(!p)continue;const f=s.getValue(g,p,"data",!0);if(!t?.forceRefreshOfEditCellsOnly&&!_sourceAndPendingDiffer({pendingValue:u,sourceValue:f})&&h!=="editing")continue;let m=n.get(p);m||(m=new Map,n.set(p,m)),u===void 0&&(u=UNEDITED),m.set(g,{editorValue:void 0,pendingValue:u,sourceValue:f,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(n,t)}onCellFocused(e){const t=_getCellCtrl(this.beans,e);if(!t||!this.isEditing(t,CHECK_SIBLING))return;const i=this.model.getEdit(t);if(!i||!_sourceAndPendingDiffer(i))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return _getCellCtrl(this.beans,e)}};function getRowColumnsFromMap(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function getEditType(e,t){return t??e.get("editType")??"singleCell"}var BaseEditStrategy=class extends BeanStub{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const i=e.previousParams,{editSvc:o,beans:s}=this,n=e.type==="cellFocused"?e.sourceEvent:null;i&&(t=_getCellCtrl(s,i));const{gos:r,editModelSvc:l}=s,a=e.type==="cellFocusCleared";if(o.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:_getRowNode(s,{rowIndex:c,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!l?.getCellValidationModel().hasCellValidation(h),m=p&&f;(i||a?o.stopEditing(void 0,{cancel:m,source:a&&p?"api":void 0,event:n}):!0)||(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){const t=this.editSvc.isBatchEditing()&&!e;for(const i of this.model.getEditPositions())_destroyEditor(this.beans,i,{cancel:!0},_getCellCtrl(this.beans,i)),this.model.stop(i,t,!0);return!0}stopCommitted(e,t){const i=this.model.getEditPositions(),o={all:[],pass:[],fail:[]};for(const r of i)o.all.push(r),(this.model.getCellValidationModel().getCellValidation(r)?.errorMessages?.length??0)>0?o.fail.push(r):o.pass.push(r);const s=this.processValidationResults(o),n=this.editSvc.isBatchEditing()&&!t;for(const r of s.destroy)_destroyEditor(this.beans,r,{event:e},_getCellCtrl(this.beans,r)),this.model.stop(r,n,!1);for(const r of s.keep){const l=_getCellCtrl(this.beans,r);!this.editSvc.cellEditingInvalidCommitBlocks()&&l&&this.editSvc.revertSingleCellEdit(l)}return!0}cleanupEditors({rowNode:e}={},t){_syncFromEditors(this.beans,{persist:!1});const i=this.model.getEditPositions(),o=[];if(e)for(const s of i)s.rowNode!==e&&o.push(s);else for(const s of i)o.push(s);_destroyEditors(this.beans,o),_purgeUnchangedEdits(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,i=t?.getCellEditor();if(i?.focusIn)i.focusIn();else{const o=this.beans.gos.get("editType")==="fullRow";e.focusCell(o),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:i=!1,startedEdit:o,position:s,cells:n=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!i&&t.key||void 0;_setupEditors(this.beans,n,s,r,t,o)}dispatchCellEvent(e,t,i,o){const s=_getCellCtrl(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,i),...o})}dispatchRowEvent(e,t,i){if(i)return;const o=_getRowCtrl(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStop(e,t,i="ui"){const o=this.editSvc.isBatchEditing();return o&&i==="api"?!0:o&&(i==="ui"||i==="edit")?!1:i==="api"?!0:t instanceof KeyboardEvent&&!o?t.key===KeyCode.ENTER:null}shouldCancel(e,t,i="ui"){const o=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!o&&t.key===KeyCode.ESCAPE||o&&i==="api"||i==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const i=[];if(e.forEach((o,s)=>{o.forEach((n,r)=>{n.state==="editing"&&i.push({...n,rowNode:s,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),i.length>0){const o=i.at(-1),s=o.pendingValue===UNEDITED?void 0:o.pendingValue;this.start({position:o,event:new KeyboardEvent("keydown",{key:s}),source:"api"});const n=_getCellCtrl(this.beans,o);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},FullRowEditStrategy=class extends BaseEditStrategy{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,i="ui"){const{rowNode:o}=e||{};if(!_getRowCtrl(this.beans,{rowNode:this.rowNode}))return!0;const n=super.shouldStop({rowNode:this.rowNode},t,i);return n!==null?n:this.rowNode?o!==this.rowNode:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:i,startedEdit:o,event:s,ignoreEventKey:n}=e,{rowNode:r}=t;this.rowNode!==r&&super.cleanupEditors(t);const l=this.beans.visibleCols.allCols,a=[],d=[];for(const c of l)c.isCellEditable(r)&&d.push(c);if(d.length!=0){this.dispatchRowEvent({rowNode:r},"rowEditingStarted",i),this.startedRows.push(r);for(const c of d){const u={rowNode:r,column:c};a.push(u),this.model.hasEdits(u)||this.model.start(u)}this.rowNode=r,this.setupEditors({cells:a,position:t,startedEdit:o,event:s,ignoreEventKey:n})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){const{rowNode:t}=this;return t&&!this.model.hasRowEdits(t)?!1:(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){const{rowNode:i}=this;if(i&&!this.model.hasRowEdits(i))return!1;const o=[];if(this.model.getEditMap().forEach((s,n)=>{if(!(!s||s.size===0)){for(const r of s.values())if(_sourceAndPendingDiffer(r)){o.push(n);break}}}),_populateModelValidationErrors(this.beans),this.editSvc.checkNavWithValidation({rowNode:i})==="block-stop")return!1;if(super.stopCommitted(e,t),t||!this.editSvc.isBatchEditing())for(const s of o)this.dispatchRowEvent({rowNode:s},"rowValueChanged");return this.cleanupEditors({rowNode:i},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,i=e.previousParams;if(i?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent||this.beans.editSvc?.isRangeSelectionEnabledWhileEditing())return;const o=_getCellCtrl(this.beans,i);this.gos.get("invalidEditValueMode")==="block"&&o&&(this.model.getCellValidationModel().getCellValidation(o)||this.model.getRowValidationModel().getRowValidation(o))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);for(const i of this.startedRows)this.dispatchRowEvent({rowNode:i},"rowEditingStopped"),this.destroyEditorsForRow(i);this.startedRows.length=0}destroyEditorsForRow(e){const t=_getRowCtrl(this.beans,{rowNode:e});if(!t)return;const i={};for(const o of t.getAllCellCtrls())o.comp?.getCellEditor()&&_destroyEditor(this.beans,o,i,o)}moveToNextEditingCell(e,t,i,o="ui",s=!1){const n=e.cellPosition;let r;this.model.suspend(!0);try{r=this.beans.navigation?.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(r===!1)return null;if(r==null)return!1;const l=r.cellPosition,a=e.isCellEditable(),d=r.isCellEditable(),c=l&&n.rowIndex===l.rowIndex&&n.rowPinned===l.rowPinned;a&&this.setFocusOutOnEditor(e),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return d&&!s?u?r.focusCell(!0,i):(r.comp?.getCellEditor()||_setupEditor(this.beans,r,{event:i,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,i)):(d&&s&&this.setFocusInOnEditor(r),r.focusCell(!0,i)),!c&&!s&&(this.editSvc?.stopEditing({rowNode:e.rowNode},{event:i,forceStop:!0}),this.editSvc?.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(r,!0),u?r.focusCell(!0,i):this.editSvc.startEditing(r,{startedEdit:!0,event:i,source:o,ignoreEventKey:!0,editable:d||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:i},o)=>{if(i!=="editing")return;const s=_getCellCtrl(this.beans,{rowNode:t,column:o});s&&!s.comp?.getCellEditor()&&_setupEditor(this.beans,s,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},SingleCellEditStrategy=class extends BaseEditStrategy{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,i="ui"){const o=super.shouldStop(e,t,i);if(o!==null)return o;const s=e?.rowNode,n=e?.column,r=this.rowNode,l=this.column;return(!r||!l)&&s&&n?null:r!==s||l!==n?!0:!r&&!l?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:i,event:o,ignoreEventKey:s}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:i,event:o,ignoreEventKey:s})}dispatchRowEvent(e,t,i){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){return super.stopCancelled(e),this.clearPosition()}stopCommitted(e,t){return super.stopCommitted(e,t),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:i}=this.beans,{rowIndex:o,column:s,rowPinned:n}=e,r=_getRowNode(this.beans,{rowIndex:o,rowPinned:n}),l=_getColId(s),a=t.getCol(l),d=e.previousParams;if(d){const c=_getColId(d.column);if(d?.rowIndex===o&&c===l&&d?.rowPinned===n)return}e.type=="cellFocused"&&(i?.isRangeSelectionEnabledWhileEditing()||i?.isEditing({rowNode:r,column:a},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,i,o="ui",s=!1){const n=this.beans.focusSvc.getFocusedCell();n&&(e=_getCellByPosition(this.beans,n)??e);const r=e.cellPosition;let l;const a=this.beans.gos.get("editType")==="fullRow";a&&this.model.suspend(!0),s||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:i}));try{l=this.beans.navigation?.findNextCellToFocusOn(r,{backwards:t,startEditing:!0})}finally{a&&this.model.suspend(!1)}if(l===!1)return null;if(l==null)return!1;const d=l.cellPosition,c=e.isCellEditable(),u=l.isCellEditable(),h=d&&r.rowIndex===d.rowIndex&&r.rowPinned===d.rowPinned;c&&!s&&this.setFocusOutOnEditor(e);const g=this.gos.get("suppressStartEditOnTab");if(!h&&!s&&(super.cleanupEditors(l,!0),g?l.focusCell(!0,i):this.editSvc.startEditing(l,{startedEdit:!0,event:i,source:o,ignoreEventKey:!0,editable:u})),u&&!s){if(l.focusCell(!1,i),g)l.focusCell(!0,i);else if(!l.comp?.getCellEditor()){const p=this.editSvc?.isEditing(l,{withOpenEditor:!0});_setupEditor(this.beans,l,{event:i,cellStartedEdit:!0,silent:p}),this.setFocusInOnEditor(l),this.cleanupEditors(l)}}else u&&s&&this.setFocusInOnEditor(l),l.focusCell(!0,i);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},EditCoreModule={moduleName:"EditCore",version:VERSION,beans:[EditModelService,EditService],apiFunctions:{getEditingCells,getEditRowValues,getCellEditorInstances,startEditingCell,stopEditing,isEditing,validateEdit},dynamicBeans:{singleCell:SingleCellEditStrategy,fullRow:FullRowEditStrategy},dependsOn:[PopupModule,TooltipModule],css:[cellEditingCSS]},UndoRedoEditModule={moduleName:"UndoRedoEdit",version:VERSION,beans:[UndoRedoService],apiFunctions:{undoCellEditing,redoCellEditing,getCurrentUndoSize,getCurrentRedoSize},dependsOn:[EditCoreModule]},TextEditorModule={moduleName:"TextEditor",version:VERSION,userComponents:{agCellEditor:TextCellEditor,agTextCellEditor:TextCellEditor},dependsOn:[EditCoreModule]},NumberEditorModule={moduleName:"NumberEditor",version:VERSION,userComponents:{agNumberCellEditor:{classImp:NumberCellEditor}},dependsOn:[EditCoreModule]},DateEditorModule={moduleName:"DateEditor",version:VERSION,userComponents:{agDateCellEditor:DateCellEditor,agDateStringCellEditor:DateStringCellEditor},dependsOn:[EditCoreModule]},CheckboxEditorModule={moduleName:"CheckboxEditor",version:VERSION,userComponents:{agCheckboxCellEditor:CheckboxCellEditor},dependsOn:[EditCoreModule]},SelectEditorModule={moduleName:"SelectEditor",version:VERSION,userComponents:{agSelectCellEditor:SelectCellEditor},dependsOn:[EditCoreModule]},LargeTextEditorModule={moduleName:"LargeTextEditor",version:VERSION,userComponents:{agLargeTextCellEditor:LargeTextCellEditor},dependsOn:[EditCoreModule]},CustomEditorModule={moduleName:"CustomEditor",version:VERSION,dependsOn:[EditCoreModule]},FILTER_HANDLER_MAP={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},FILTER_HANDLERS=new Set(Object.values(FILTER_HANDLER_MAP));function getFilterUiFromWrapper(e,t){const i=e.filterUi;if(!i)return null;if(i.created)return i.promise;if(t)return null;const o=i.create(i.refreshed),s=i;return s.created=!0,s.promise=o,o}function _refreshHandlerAndUi(e,t,i,o,s,n,r){return t.refresh?.({...i,model:o,source:n,additionalEventAttributes:r}),e().then(l=>{if(l){const{filter:a,filterParams:d}=l;_refreshFilterUi(a,d,o,s,n,r)}})}function _refreshFilterUi(e,t,i,o,s,n){e?.refresh?.({...t,model:i,state:o,source:s,additionalEventAttributes:n})}function getAndRefreshFilterUi(e,t,i,o){const s=e();s?.created&&s.promise.then(n=>{const r=t();_refreshFilterUi(n,s.filterParams,r,i()??{model:r},"ui",o)})}function _updateFilterModel(e){let t,i=!1,o;const{action:s,filterParams:n,getFilterUi:r,getModel:l,getState:a,updateState:d,updateModel:c,processModelToApply:u}=e;switch(s){case"apply":{const h=a();o=h?.model??null,u&&(o=u(o)),t={state:h?.state,model:o},i=!0;break}case"clear":{t={model:null},n?.buttons?.includes("apply")||(i=!0,o=null);break}case"reset":{t={model:null},i=!0,o=null;break}case"cancel":{t={model:l()};break}}d(t),i?c(o):getAndRefreshFilterUi(r,l,a,{fromAction:s})}function _getFilterModel(e,t){return e[t]??null}var HeaderFilterCellCtrl=class extends AbstractHeaderCellCtrl{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,i,o,s){this.comp=e;const n=setupCompBean(this,this.beans.context,s);this.eButtonShowMainFilter=i,this.eFloatingFilterBody=o,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n);const r=()=>this.onColDefChanged(n);n.addManagedListeners(this.column,{colDefChanged:r}),n.addManagedEventListeners({filterSwitched:({column:l})=>{l===this.column&&r()}}),n.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.colDef;return _addGridCommonParams(t.gos,{colDef:i,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,i=!!e.floatingFilter;this.active=t&&i}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=_createIconNoSpan("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new ManagedFocusFeature(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.getLocaleTextFunc();_setAriaLabel(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(_getActiveDomElement(t)===this.eGui)return;const s=_findNextFocusableElement(t,this.eGui,null,e.shiftKey);if(s){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),s.focus();return}const n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let i=this.column;do if(i=e?t.getColBefore(i):t.getColAfter(i),!i)break;while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case KeyCode.UP:case KeyCode.DOWN:case KeyCode.LEFT:case KeyCode.RIGHT:if(t)return;_stopPropagationForAgGrid(e);case KeyCode.ENTER:t&&_focusInto(this.eGui)&&e.preventDefault();break;case KeyCode.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const i=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),o=!!e.relatedTarget&&_isElementChildOfClass(e.relatedTarget,"ag-floating-filter");if(i&&o&&e.target===this.eGui){const s=this.lastFocusEvent,n=!!(s&&s.key===KeyCode.TAB);if(s&&n){const r=s.shiftKey;_focusInto(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new SetLeftFeature(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!_isLegacyMenuEnabled(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:i,gos:o}=this,s=n=>{if(n?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const r=this.comp.getFloatingFilterComp();r&&r.then(l=>{if(l){if(o.get("enableFilterHandlers")){const c=n;let u="filter";c?.afterFloatingFilter?u="ui":c?.afterDataChange?u="dataChanged":n?.source==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}const a=t?.getCurrentFloatingFilterParentModel(i),d=n?{...n,columns:n.columns??[],source:n.source==="api"?"api":"columnFilter"}:null;l.onParentModelChanged(a,d)}})};[this.destroySyncListener]=e.addManagedListeners(i,{filterChanged:s}),t?.isFilterActive(i)&&s(null)}setupWidth(e){const t=()=>{const i=`${this.column.getActualWidth()}px`;this.comp.setWidth(i)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged: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(e){const t=this.active;this.setupActive();const i=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const o=this.beans.colFilter,s=this.active?o?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,n=this.comp.getFloatingFilterComp();!n||!s?this.updateCompDetails(e,s,i):n.then(r=>{!r||o?.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,i):this.updateFloatingFilterParams(s,"colDef")})}updateCompDetails(e,t,i){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),i&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let i=e.params;this.comp.getFloatingFilterComp()?.then(o=>{typeof o?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(i={...i,model:_getFilterModel(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),o.refresh(i))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function showColumnMenu(e,t){const i=e.colModel.getCol(t);if(!i){_error(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:i,positionBy:"auto"})}function hidePopupMenu(e){e.menuSvc?.hidePopupMenu()}var MenuService=class extends BeanStub{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(getFilterMenuFactory(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,i)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){getFilterMenuFactory(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(_isLegacyMenuEnabled(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&isColumn(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(_isIOSUserAgent()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!_isLegacyMenuEnabled(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!_isLegacyMenuEnabled(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return _isLegacyMenuEnabled(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,i,o){const{positionBy:s,onClosedCallback:n}=t,r=t.column;if(s==="button"){const{buttonElement:l}=t;e?.showMenuAfterButtonClick(r,l,i,n,o)}else if(s==="mouse"){const{mouseEvent:l}=t;e?.showMenuAfterMouseEvent(r,l,i,n,o)}else if(r){const l=this.beans,a=l.ctrlsSvc;a.getScrollFeature().ensureColumnVisible(r,"auto"),_requestAnimationFrame(l,()=>{const d=a.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);d&&e?.showMenuAfterButtonClick(r,d.getAnchorElementForMenu(o),i,n,o)})}}};function _setColMenuVisible(e,t,i){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",i))}function getFilterMenuFactory(e){const{enterpriseMenuFactory:t,filterMenuFactory:i,gos:o}=e;return t&&_isLegacyMenuEnabled(o)?t:i}var SharedMenuModule={moduleName:"SharedMenu",version:VERSION,beans:[MenuService],apiFunctions:{showColumnMenu,hidePopupMenu}},columnFiltersCSS=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper{min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(.ag-input-field-input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:var(--ag-widget-container-vertical-padding);:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function isColumnFilterPresent(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function getColumnFilterInstance(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function destroyFilter(e,t){const i=e.colModel.getColDefCol(t);if(i)return e.colFilter?.destroyFilter(i,"api")}function setFilterModel(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function getFilterModel(e){return e.filterManager?.getFilterModel()??{}}function getColumnFilterModel(e,t,i){const{gos:o,colModel:s,colFilter:n}=e;i&&!o.get("enableFilterHandlers")&&(_warn(288),i=!1);const r=s.getColDefCol(t);return r?n?.getModelForColumn(r,i)??null:null}function setColumnFilterModel(e,t,i){return e.filterManager?.setColumnFilterModel(t,i)??Promise.resolve()}function showColumnFilter(e,t){const i=e.colModel.getCol(t);if(!i){_error(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:i,containerType:"columnFilter",positionBy:"auto"})}function hideColumnFilter(e){e.menuSvc?.hideFilterMenu()}function getColumnFilterHandler(e,t){const i=e.colModel.getCol(t);if(!i){_error(12,{colKey:t});return}return e.colFilter?.getHandler(i,!0)}function doFilterAction(e,t){const{colModel:i,colFilter:o,gos:s}=e;if(!s.get("enableFilterHandlers")){_warn(287);return}const{colId:n,action:r}=t;if(n){const l=i.getColById(n);l&&o?.updateModel(l,r)}else o?.updateAllModels(r)}var MONTH_LOCALE_TEXT={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},MONTH_KEYS=["january","february","march","april","may","june","july","august","september","october","november","december"];function setFilterNumberComparator(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function setFilterBigIntComparator(e,t){if(e==null)return-1;if(t==null)return 1;const i=_parseBigIntOrNull(e),o=_parseBigIntOrNull(t);return i!=null&&o!=null?i===o?0:i>o?1:-1:String(e).localeCompare(String(t))}function isValidDate(e){return e instanceof Date&&!isNaN(e.getTime())}var filterParamsForEachDataType={number:()=>{},bigint:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate}),dateString:({dataTypeDefinition:e})=>({comparator:(t,i)=>{const o=e.dateParser(i);return i==null||o<t?-1:o>t?1:0},isValidDate:t=>typeof t=="string"&&isValidDate(e.dateParser(t))}),dateTime:e=>filterParamsForEachDataType.date(e),dateTimeString:e=>filterParamsForEachDataType.dateString(e),object:()=>{},text:()=>{}},setFilterParamsForEachDataType={number:()=>({comparator:setFilterNumberComparator}),bigint:()=>({comparator:setFilterBigIntComparator}),boolean:({t:e})=>({valueFormatter:t=>_exists(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:i=>{const o=e(i);return _exists(o)?o:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(i,o)=>{if(i==="NaN")return t("invalidDate","Invalid Date");if(o===1&&i!=null){const s=MONTH_KEYS[Number(i)-1];return t(s,MONTH_LOCALE_TEXT[s])}return i??t("blanks","(Blanks)")},treeListPathGetter:i=>_getDateParts(i,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:i})=>({valueFormatter:o=>{const s=e(o);return _exists(s)?s:i("blanks","(Blanks)")},treeList:!0,treeListPathGetter:o=>_getDateParts(t.dateParser(o??void 0),!1),treeListFormatter:(o,s)=>{if(s===1&&o!=null){const n=MONTH_KEYS[Number(o)-1];return i(n,MONTH_LOCALE_TEXT[n])}return o??i("blanks","(Blanks)")}}),dateTime:e=>{const t=setFilterParamsForEachDataType.date(e);return t.treeListPathGetter=_getDateParts,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,i=setFilterParamsForEachDataType.dateString(e);return i.treeListPathGetter=o=>_getDateParts(t(o??void 0)),i},object:({formatValue:e,t})=>({valueFormatter:i=>{const o=e(i);return _exists(o)?o:t("blanks","(Blanks)")}}),text:()=>{}};function _getFilterParamsForDataType(e,t,i,o,s,n,r){let l=t,a=i;const d=e==="agSetColumnFilter";!a&&o.baseDataType==="object"&&!d&&(a=({column:g,node:p})=>s({column:g,node:p,value:n.valueSvc.getValue(g,p,"data")}));const u=(d?setFilterParamsForEachDataType:filterParamsForEachDataType)[o.baseDataType],h=u({dataTypeDefinition:o,formatValue:s,t:r});return l=typeof t=="object"?{...h,...t}:h,{filterParams:l,filterValueGetter:a}}var defaultFilters={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},defaultFloatingFilters={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function _getDefaultSimpleFilter(e,t=!1){return(t?defaultFloatingFilters:defaultFilters)[e??"text"]}function _getDefaultFloatingFilterType(e,t,i){if(t==null)return null;let o=null;const{compName:s,jsComp:n,fwComp:r}=_getFilterCompKeys(e,t);return s?o={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[s]:n==null&&r==null&&t.filter===!0&&(o=i()),o}var DUMMY_HANDLER={filterHandler:()=>({doesFilterPass:()=>!0})};function isAggFilter(e,t,i,o){if(!e.isPrimary())return!0;const n=!i;return!e.isValueActive()||!n?!1:t?!0:o}var ColumnFilterService=class extends BeanStub{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...FILTER_HANDLER_MAP},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",i){const{colModel:o,dataTypeSvc:s,filterManager:n}=this.beans;if(s?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const r=[],l=this.getModel(!0);if(e){const a=new Set(Object.keys(e));this.allColumnFilters.forEach((d,c)=>{const u=e[c];r.push(this.setModelOnFilterWrapper(d,u)),a.delete(c)}),a.forEach(d=>{const c=o.getColDefCol(d)||o.getCol(d);if(!c){_warn(62,{colId:d});return}if(!c.isFilterAllowed()){_warn(63,{colId:d});return}const u=this.getOrCreateFilterWrapper(c,!0);if(!u){_warn(64,{colId:d});return}r.push(this.setModelOnFilterWrapper(u,e[d],!0))})}else this.model={},this.allColumnFilters.forEach(a=>{r.push(this.setModelOnFilterWrapper(a,null))});AgPromise.all(r).then(()=>{const a=this.getModel(!0),d=[];this.allColumnFilters.forEach((c,u)=>{const h=l?l[u]:null,g=a?a[u]:null;_jsonEquals(h,g)||d.push(c.column)}),d.length>0?n?.onFilterChanged({columns:d,source:t}):i&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:i,initialModel:o,beans:{colModel:s}}=this;if(i.forEach((n,r)=>{const l=this.getModelFromFilterWrapper(n);_exists(l)&&(t[r]=l)}),!e)for(const n of Object.keys(o)){const r=o[n];_exists(r)&&!i.has(n)&&s.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}setState(e,t,i="api"){if(this.state.clear(),t)for(const o of Object.keys(t)){const s=t[o];this.state.set(o,{model:_getFilterModel(this.model,o),state:s})}this.setModel(e,i,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let i=!1;return e.forEach((o,s)=>{const n=o.state;n!=null&&(i=!0,t[s]=n)}),i?t:void 0}getModelFromFilterWrapper(e){const i=e.column.getColId();if(e.isHandler)return _getFilterModel(this.model,i);const o=e.filter;return o?typeof o.getModel!="function"?(_warn(66),null):o.getModel():_getFilterModel(this.initialModel,i)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=a=>a?a.isFilterActive?a.isFilterActive():(_warn(67),!1):!1,{colModel:t,gos:i}=this.beans,o=!!_getGroupAggFiltering(i),s=[],n=[],r=(a,d,c)=>{d&&(isAggFilter(a,t.isPivotMode(),t.isPivotActive(),o)?s.push(c):n.push(c))},l=[];return this.allColumnFilters.forEach(a=>{const d=a.column,c=d.getColId();if(a.isHandler)l.push(AgPromise.resolve().then(()=>{r(d,this.isHandlerActive(d),{colId:c,isHandler:!0,handler:a.handler,handlerParams:a.handlerParams})}));else{const u=getFilterUiFromWrapper(a);u&&l.push(u.then(h=>{r(d,e(h),{colId:c,isHandler:!1,comp:h})}))}}),AgPromise.all(l).then(()=>{this.activeAggregateFilters=s,this.activeColumnFilters=n})}updateFilterFlagInColumns(e,t){const i=[];return this.allColumnFilters.forEach(o=>{const s=o.column;if(o.isHandler)i.push(AgPromise.resolve().then(()=>{this.setColFilterActive(s,this.isHandlerActive(s),e,t)}));else{const n=getFilterUiFromWrapper(o);n&&i.push(n.then(r=>{this.setColFilterActive(s,r.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),AgPromise.all(i)}doFiltersPass(e,t,i){const{data:o,aggData:s}=e,n=i?this.activeAggregateFilters:this.activeColumnFilters,r=i?s:o,l=this.model;for(let a=0;a<n.length;a++){const d=n[a],{colId:c,isHandler:u}=d;if(c!==t)if(u){const{handler:h,handlerParams:g}=d;if(!h.doesFilterPass({node:e,data:r,model:_getFilterModel(l,c),handlerParams:g}))return!1}else{const h=d.comp;if(typeof h.doesFilterPass!="function"){_error(91);continue}if(!h.doesFilterPass({node:e,data:r}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:i}=this.beans,o=()=>{this.isAlive()&&i?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(o,0):o()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:i}=e,o=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",i).then(()=>{this.allColumnFilters.forEach(s=>{const{column:n,isHandler:r}=s;o!==n.getColId()&&(r&&s.handler.onAnyFilterChanged?.(),getFilterUiFromWrapper(s,r)?.then(l=>{typeof l?.onAnyFilterChanged=="function"&&l.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(i=>{const o=i.isHandler;o&&i.handler.onNewRowsLoaded?.();const s=getFilterUiFromWrapper(i,o);s&&t.push(s.then(n=>{n.onNewRowsLoaded?.()}))}),AgPromise.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:i,colModel:o}=this.beans;return(s,n)=>{const r=n?o.getCol(n):e;return r?i.getValue(r,s,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const i=t?.filter;return i?i.isFilterActive():_getFilterModel(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=_exists(_getFilterModel(this.model,e.getColId()));if(t)return t;const i=this.beans.groupFilter;return i?.isGroupFilter(e)?i.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?getFilterUiFromWrapper(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const i=getFilterUiFromWrapper(t);return i?i.then(o=>({comp:o,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const i=this.getOrCreateFilterWrapper(e,t);return i?.isHandler?i.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let i=this.cachedFilter(e);return!i&&t&&(i=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,i)),i}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return _isSetFilterByDefault(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":_getDefaultSimpleFilter(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,i,o,s,n){const r=()=>{const d=this.createFilterCompParams(e,s,n),c=o(d,s);return _getFilterDetails(this.beans.userCompFactory,t,c,i)},l=r();return l?{compDetails:l,createFilterUi:d=>(d?r():l).newAgStackInstance()}:null}createFilterInstance(e,t,i,o){const s=this.beans.selectableFilter;s?.isSelectable(t)&&(t=s.getFilterDef(e,t));const{handler:n,handlerParams:r,handlerGenerator:l}=this.createHandler(e,t,i)??{},a=this.createFilterComp(e,t,i,o,!!n,"init");if(!a)return{compDetails:null,createFilterUi:null,handler:n,handlerGenerator:l,handlerParams:r};const{compDetails:d,createFilterUi:c}=a;return this.isGlobalButtons&&(d.params?.buttons?.length||_warn(281,{colId:e.getColId()})),{compDetails:d,handler:n,handlerGenerator:l,handlerParams:r,createFilterUi:c}}createBaseFilterParams(e,t){const{filterManager:i,rowModel:o}=this.beans;return _addGridCommonParams(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:s=>i?.doesRowPassOtherFilters(e.getColId(),s)??!0,rowModel:o})}createFilterCompParams(e,t,i,o){const s=this.filterChangedCallbackFactory(e),n=this.createBaseFilterParams(e,o);if(n.filterChangedCallback=s,n.filterModifiedCallback=o?()=>{}:r=>this.filterModified(e,r),t){const r=n,l=e.getColId(),a=_getFilterModel(this.model,l);r.model=a,r.state=this.state.get(l)??{model:a},r.onModelChange=(d,c)=>{this.updateStoredModel(l,d),this.refreshHandlerAndUi(e,d,"ui",!1,c).then(()=>{s({...c,source:"columnFilter"})})},r.onStateChange=d=>{this.updateState(e,d),this.updateOrRefreshFilterUi(e)},r.onAction=(d,c,u)=>{this.updateModel(e,d,c),this.dispatchLocalEvent({type:"filterAction",column:e,action:d,event:u})},r.getHandler=()=>this.getHandler(e,!0),r.onUiChange=d=>this.filterUiChanged(e,d),r.source=i}return n}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,i){const o=t(),s={created:!0,create:t,filterParams:e.params,compDetails:e,promise:o};return o.then(i),s}createFilterWrapper(e){const{compDetails:t,handler:i,handlerGenerator:o,handlerParams:s,createFilterUi:n}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),l=>l),r=e.getColId();if(i)return delete this.initialModel[r],i.init?.({...s,source:"init",model:_getFilterModel(this.model,r)}),{column:e,isHandler:!0,handler:i,handlerGenerator:o,handlerParams:s,filterUi:this.createFilterUiForHandler(t,n)};if(n){const l={column:e,filterUi:null,isHandler:!1};return l.filterUi=this.createFilterUiLegacy(t,n,a=>{l.filter=a??void 0}),l}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,i){const{gos:o,frameworkOverrides:s,registry:n}=this.beans;let r;const l=g=>{const p=g.filter;if(isColumnFilterComp(p)){const f=p.handler;return f||(r=p.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return typeof p=="string"?p:void 0},a=o.get("enableFilterHandlers"),d=a?l(t):void 0,c=g=>()=>this.createBean(n.createDynamicBean(g,!0));let u,h;if(typeof d=="string"){const g=o.get("filterHandlers")?.[d];g!=null?u=g:FILTER_HANDLERS.has(d)&&(u=c(d),h=d)}else u=d;if(!u){let g;const{compName:p,jsComp:f,fwComp:m}=_getFilterCompKeys(s,t);p?g=p:f==null&&m==null&&t.filter===!0&&(g=i),h=this.handlerMap[g],h&&(u=c(h))}return u?{filterHandler:u,handlerNameOrCallback:r??h}:a?(_isClientSideRowModel(o)&&_warn(277,{colId:e.getColId()}),DUMMY_HANDLER):void 0}createHandler(e,t,i){const o=this.createHandlerFunc(e,t,i);if(!o)return;const s=_mergeFilterParamsWithApplicationProvidedParams(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:n,filterHandler:r}=o,{handler:l,handlerParams:a}=this.createHandlerFromFunc(e,r,s);return{handler:l,handlerParams:a,handlerGenerator:n??r}}createHandlerFromFunc(e,t,i){const o=e.getColDef(),s=t(_addGridCommonParams(this.gos,{column:e,colDef:o})),n=this.createHandlerParams(e,i);return{handler:s,handlerParams:n}}createHandlerParams(e,t){const i=e.getColDef(),o=e.getColId(),s=this.filterChangedCallbackFactory(e);return _addGridCommonParams(this.gos,{colDef:i,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:n=>this.beans.filterManager?.doesRowPassOtherFilters(o,n)??!0,onModelChange:(n,r)=>{this.updateStoredModel(o,n),this.refreshHandlerAndUi(e,n,"handler",!1,r).then(()=>{s({...r,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:i,groupFilter:o}=this.beans;this.allColumnFilters.forEach((n,r)=>{let l;n.column.isPrimary()?l=t.getColDefCol(r):l=t.getCol(r),!(l&&l===n.column)&&(e.push(n.column),this.disposeFilterWrapper(n,"columnChanged"),this.disposeColumnListener(r))});const s=o&&e.every(n=>o.isGroupFilter(n));e.length>0&&!s&&i?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const i=this.beans.groupFilter;return i?.isGroupFilter(e)?i.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:i,frameworkOverrides:o,selectableFilter:s,gos:n}=this.beans,r=g=>{this.getOrCreateFilterUi(e)?.then(f=>{g(_unwrapUserComp(f))})},l=e.getColDef(),a=s?.isSelectable(l)?s.getFilterDef(e,l):l,d=_getDefaultFloatingFilterType(o,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",c=n.get("enableFilterHandlers"),u=_mergeFilterParamsWithApplicationProvidedParams(i,a,this.createFilterCompParams(e,c,"init",!0)),h=_addGridCommonParams(n,{column:e,filterParams:u,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:r,showParentFilter:t});if(c){const g=h,p=e.getColId(),f=this.filterChangedCallbackFactory(e);g.onUiChange=m=>this.floatingFilterUiChanged(e,m),g.model=_getFilterModel(this.model,p),g.onModelChange=(m,C)=>{this.updateStoredModel(p,m),this.refreshHandlerAndUi(e,m,"floating",!0,C).then(()=>{f({...C,source:"columnFilter"})})},g.getHandler=()=>this.getHandler(e,!0),g.source="init"}return _getFloatingFilterCompDetails(i,l,h,d)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,i,o){const s="paramsUpdated";if(e.isHandler){const n=t.getColId();delete this.initialModel[n],this.state.delete(n);const r=e.filterUi,l=this.createFilterUiForHandler(i,o);e.filterUi=l;const a=this.eventSvc;r?.created?r.promise.then(d=>{this.destroyBean(d),a.dispatchEvent({type:"filterDestroyed",source:s,column:t})}):a.dispatchEvent({type:"filterHandlerDestroyed",source:s,column:t})}else this.destroyFilter(t,s)}destroyFilter(e,t="api"){const i=e.getColId(),o=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialModel[i],o&&this.disposeFilterWrapper(o,t).then(s=>{s&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let i=!1;const{column:o,isHandler:s,filterUi:n}=e,r=o.getColId();s&&(i=this.isHandlerActive(o),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const l=()=>{this.setColFilterActive(o,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:o})};if(n){if(n.created)return n.promise.then(a=>(i=s?i:!!a?.isFilterActive(),this.destroyBean(a),l(),i));l()}return AgPromise.resolve(i)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const i=this.allColumnFilters.get(e);if(!i)return;const o=this.beans,s=i.column,n=s.getColDef(),r=s.isFilterAllowed(),l=this.getDefaultFilter(s),a=o.selectableFilter,d=a?.isSelectable(n)?a.getFilterDef(s,n):n,c=r?this.createHandlerFunc(s,d,this.getDefaultFilter(s)):void 0,u=!!c,h=i.isHandler;if(h!=u){this.destroyFilter(s,"paramsUpdated");return}const{compDetails:g,createFilterUi:p}=(r?this.createFilterComp(s,d,l,m=>m,u,"colDef"):null)??{compDetails:null,createFilterUi:null},f=g?.params??_mergeFilterParamsWithApplicationProvidedParams(o.userCompFactory,d,this.createFilterCompParams(s,u,"colDef"));if(h){const m=c?.handlerNameOrCallback??c?.filterHandler,C=_getFilterModel(this.model,e);if(i.handlerGenerator!=m){const v=i.handler,{handler:w,handlerParams:S}=this.createHandlerFromFunc(s,c.filterHandler,f);i.handler=w,i.handlerParams=S,i.handlerGenerator=m,delete this.model[e],w.init?.({...S,source:"init",model:null}),this.destroyBean(v),C!=null&&this.beans.filterManager?.onFilterChanged({columns:[s],source:t})}else{const v=this.createHandlerParams(s,g?.params);i.handlerParams=v,i.handler.refresh?.({...v,source:"colDef",model:C})}}if(this.areFilterCompsDifferent(i.filterUi?.compDetails??null,g)||!i.filterUi||!g){this.destroyFilterUi(i,s,g,p);return}i.filterUi.filterParams=f,getFilterUiFromWrapper(i,h)?.then(m=>{(m?.refresh?m.refresh(f):!0)===!1?this.destroyFilterUi(i,s,g,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:s,params:f})})}refreshHandlerAndUi(e,t,i,o,s){const n=this.cachedFilter(e);if(!n)return o&&this.getOrCreateFilterWrapper(e,!0),AgPromise.resolve();if(!n.isHandler)return AgPromise.resolve();const{filterUi:r,handler:l,handlerParams:a}=n;return _refreshHandlerAndUi(()=>{if(r){const{created:d,filterParams:c}=r;if(d)return r.promise.then(u=>u?{filter:u,filterParams:c}:void 0);r.refreshed=!0}return AgPromise.resolve(void 0)},l,a,t,this.state.get(e.getColId())??{model:t},i,s)}setColumnFilterWrapper(e,t){const i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(i)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:i}=e,{componentClass:o}=t;return!(i===o||i?.render&&o?.render&&i.render===o.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const i=this.getOrCreateFilterUi(t);return i?new Promise(o=>{i.then(s=>{o(_unwrapUserComp(s))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:i})=>{this.setModelForColumn(e,t).then(()=>i())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:o,model:s}=this,n=e.getColId(),r=o.get(n);return r?r.model??null:_getFilterModel(s,n)}const i=this.cachedFilter(e);return i?this.getModelFromFilterWrapper(i):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let i=()=>{};const o=new Promise(s=>{i=s});return this.columnModelUpdates.push({key:e,model:t,resolve:i}),o}return new Promise(i=>{this.setModelForColumnLegacy(e,t).then(o=>i(o))})}getStateForColumn(e){return this.state.get(e)??{model:_getFilterModel(this.model,e)}}setModelForColumnLegacy(e,t){const i=this.beans.colModel.getColDefCol(e),o=i?this.getOrCreateFilterWrapper(i,!0):null;return o?this.setModelOnFilterWrapper(o,t):AgPromise.resolve()}setColDefPropsForDataType(e,t,i){const o=e.filter,s=o===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):o;if(typeof s!="string")return;let n,r;const l=this.beans,{filterParams:a,filterValueGetter:d}=e;s==="agMultiColumnFilter"?{filterParams:n,filterValueGetter:r}=l.multiFilter?.getParamsForDataType(a,d,t,i)??{}:{filterParams:n,filterValueGetter:r}=_getFilterParamsForDataType(s,a,d,t,i,l,this.getLocaleTextFunc()),e.filterParams=n,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,i,o){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",i)),e.dispatchColEvent("filterChanged",i,o)}setModelOnFilterWrapper(e,t,i){return new AgPromise(o=>{if(e.isHandler){const n=e.column,r=n.getColId(),l=this.model[r];if(this.updateStoredModel(r,t),i&&t===l){o();return}this.refreshHandlerAndUi(n,t,"api").then(()=>o());return}const s=getFilterUiFromWrapper(e);if(s){s.then(n=>{if(typeof n?.setModel!="function"){_warn(65),o();return}(n.setModel(t)||AgPromise.resolve()).then(()=>o())});return}o()})}updateStoredModel(e,t){_exists(t)?this.model[e]=t:delete this.model[e];const i=this.state.get(e),o={model:t,state:i?.state};this.state.set(e,o)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(i=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:i,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,i){const o=e.getColId(),s=this.cachedFilter(e),n=()=>s?.filterUi;_updateFilterModel({action:t,filterParams:s?.filterUi?.filterParams,getFilterUi:n,getModel:()=>_getFilterModel(this.model,o),getState:()=>this.state.get(o),updateState:r=>this.updateState(e,r),updateModel:r=>n()?.filterParams?.onModelChange(r,{...i,fromAction:t}),processModelToApply:s?.isHandler?s.handler.processModelToApply?.bind(s.handler):void 0})}updateAllModels(e,t){const i=[];this.allColumnFilters.forEach((o,s)=>{const n=this.beans.colModel.getColDefCol(s);n&&_updateFilterModel({action:e,filterParams:o.filterUi?.filterParams,getFilterUi:()=>o.filterUi,getModel:()=>_getFilterModel(this.model,s),getState:()=>this.state.get(s),updateState:r=>this.updateState(n,r),updateModel:r=>{this.updateStoredModel(s,r),this.dispatchLocalEvent({type:"filterAction",column:n,action:e}),i.push(this.refreshHandlerAndUi(n,r,"ui"))},processModelToApply:o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0})}),i.length&&AgPromise.all(i).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();getAndRefreshFilterUi(()=>this.cachedFilter(e)?.filterUi,()=>_getFilterModel(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:i}=this;for(const s of i)if(s.source==="COLUMN_MENU")return!1;let o=!1;for(const s of e.keys()){const n=e.get(s);if(n.valid===!1)return!1;(n.model??null)!==_getFilterModel(t,s)&&(o=!0)}return o}hasUnappliedModel(e){const{model:t,state:i}=this;return(i.get(e)?.model??null)!==_getFilterModel(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const i=this.beans.filterPanelSvc;return i?.isActive?!!i.getState(e.getColId()):!1}onPivotModeChanged(e){const{colModel:t,pivotColsSvc:i}=this.beans,o=!!_getGroupAggFiltering(this.gos),s=e.currentValue,n=s?this.activeColumnFilters:this.activeAggregateFilters,r=s?this.activeAggregateFilters:this.activeColumnFilters,l=[];for(const a of n){const d=t.getColById(a.colId),c=s&&!!i?.columns.length;d&&s===isAggFilter(d,s,c,o)&&(r.push(a),l.push(a))}_removeAllFromArray(n,l)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function isAnyFilterPresent(e){return!!e.filterManager?.isAnyFilterPresent()}function onFilterChanged(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var FilterManager=class extends BeanStub{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:o})=>this.onAdvFilterEnabledChanged(o),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:i}=this;this.alwaysPassFilter=i.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=i.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,i="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,i)}setFilterModel(e,t="api",i){if(this.isAdvFilterEnabled()){i||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){_getGroupAggFiltering(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:i,columns:o=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):AgPromise.resolve()).then(()=>{const s={source:t,type:"filterChanged",columns:o};i&&_mergeDeep(s,i),this.eventSvc.dispatchEvent(s),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!_getGroupAggFiltering(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){_warn(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}},FilterMenuFactory=class extends BeanStub{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,i,o){e&&!e.isColumn||this.showPopup(e,s=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:i,mouseEvent:t,ePopup:s})},i,t.target,_isLegacyMenuEnabled(this.gos),o)}showMenuAfterButtonClick(e,t,i,o){if(e&&!e.isColumn)return;let s=-1,n="left";const r=_isLegacyMenuEnabled(this.gos);!r&&this.gos.get("enableRtl")&&(s=1,n="right");const l=r?void 0:4*s,a=r?void 0:4;this.showPopup(e,d=>{this.popupSvc?.positionPopupByComponent({type:i,eventSource:t,ePopup:d,nudgeX:l,nudgeY:a,alignSide:n,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},i,t,r,o)}showPopup(e,t,i,o,s,n){const r=e?this.createBean(new FilterComp(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){_error(57);return}const l=_createElement({tag:"div",cls:`ag-menu${s?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(l,{keydown:f=>this.trapFocusWithin(f,l)}),l.appendChild(r?.getGui());let a;const d=()=>r?.afterGuiDetached(),c=_isColumnMenuAnchoringEnabled(this.gos)?o??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=f=>{_setColMenuVisible(e,!1,"contextMenu");const m=f instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),m&&o&&_isVisible(o)&&_findTabbableParent(o)?.focus({preventScroll:!0}),d(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e),n?.()},h=this.getLocaleTextFunc(),g=s&&i!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),p=this.popupSvc?.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(l),anchorToElement:c,ariaLabel:g});p&&(this.hidePopup=a=p.hideFunc),r.afterInit().then(()=>{t(l),r.afterGuiAttached({container:i,hidePopup:a})}),_setColMenuVisible(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){e.key!==KeyCode.TAB||e.defaultPrevented||_findNextFocusableElement(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),_focusInto(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,i){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:i??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},FilterValueService=class extends BeanStub{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,i){if(!t)return;const o=e.getColDef(),{selectableFilter:s,valueSvc:n,formula:r}=this.beans,l=i??s?.getFilterValueGetter(e.getColId())??o.filterValueGetter;if(l)return this.executeFilterValueGetter(l,t.data,e,t,o);const a=n.getValue(e,t,"data");return e.isAllowFormula()&&r?.isFormula(a)?r.resolveValue(e,t):a}executeFilterValueGetter(e,t,i,o,s){const{expressionSvc:n,valueSvc:r}=this.beans,l=_addGridCommonParams(this.gos,{data:t,node:o,column:i,colDef:s,getValue:r.getValueCallback.bind(r,o)});return typeof e=="function"?e(l):n?.evaluate(e,l)}},ReadOnlyFloatingFilterElement={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},ReadOnlyFloatingFilter=class extends Component{constructor(){super(ReadOnlyFloatingFilterElement,[AgInputTextFieldSelector]),this.eFloatingFilterText=RefPlaceholder}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const i=e,o=i.getHandler();if(o.getModelAsString){const s=o.getModelAsString(i.model);this.eFloatingFilterText.setValue(s)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}})}refresh(e){this.init(e)}},AgRadioButton=class extends AgCheckbox{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},AgRadioButtonSelector={selector:"AG-RADIO-BUTTON",component:AgRadioButton},OptionsFactory=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const i=e.filterOptions??t;this.filterOptions!==i&&(this.filterOptions=i,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const i=[["displayKey"],["displayName"],["predicate","test"]],o=s=>s.some(n=>t[n]!=null)?!0:(_warn(72,{keys:s}),!1);if(!i.every(o)){this.filterOptions=e.filter(s=>s===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const i=t[0];if(typeof i=="string")return i;if(i.displayKey)return i.displayKey;_warn(73)}else _warn(74)}getCustomOption(e){return this.customFilterOptions[e]}};function removeItems(e,t,i){return i==null?e.splice(t):e.splice(t,i)}function isBlank(e){return e==null||typeof e=="string"&&e.trim().length===0}function getDefaultJoinOperator(e){return e==="AND"||e==="OR"?e:"AND"}function evaluateCustomFilter(e,t,i){if(e==null)return;const{predicate:o}=e;if(o!=null&&!t.some(s=>s==null))return o(t,i)}function validateAndUpdateConditions(e,t){let i=e.length;return i>t&&(e.splice(t),_warn(78),i=t),i}var zeroInputTypes=new Set(["empty","notBlank","blank","today","yesterday","tomorrow","thisWeek","lastWeek","nextWeek","thisMonth","lastMonth","nextMonth","thisQuarter","lastQuarter","nextQuarter","thisYear","lastYear","nextYear","yearToDate","last7Days","last30Days","last90Days","last6Months","last12Months","last24Months"]);function getNumberOfInputs(e,t){const i=t.getCustomOption(e);if(i){const{numberOfInputs:o}=i;return o??1}return e&&zeroInputTypes.has(e)?0:e==="inRange"?2:1}var SimpleFilter=class extends ProvidedFilter{constructor(e,t,i){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=i,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new OptionsFactory;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=getDefaultJoinOperator(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),_addOrRemoveAttribute(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,i)=>{const o=i===0?e:this.optionsFactory.defaultOption;t.setValue(o,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const i=!e.operator,o=!t.operator;if(!i&&o||i&&!o)return!1;let n;if(i){const r=e,l=t;n=this.areSimpleModelsEqual(r,l)}else{const r=e,l=t;n=r.operator===l.operator&&_areEqual(r.conditions,l.conditions,(a,d)=>this.areSimpleModelsEqual(a,d))}return n}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),AgPromise.resolve();if(e.operator){const o=e;let s=o.conditions;s==null&&(s=[],_warn(77));const n=validateAndUpdateConditions(s,this.maxNumConditions),r=this.getNumConditions();if(n<r)this.removeConditionsAndOperators(n);else if(n>r)for(let a=r;a<n;a++)this.createJoinOperatorPanel(),this.createOption();const l=o.operator==="OR";this.eJoinAnds.forEach(a=>a.setValue(!l,!0)),this.eJoinOrs.forEach(a=>a.setValue(l,!0)),s.forEach((a,d)=>{this.eTypes[d].setValue(a.type,!0),this.setConditionIntoUi(a,d)})}else{const o=e;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.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),AgPromise.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(_warn(79),t=1),this.maxNumConditions=t;let i=e.numAlwaysVisibleConditions??1;i<1&&(_warn(80),i=1),i>t&&(_warn(81),i=t),this.numAlwaysVisibleConditions=i}createOption(){const e=this.getGui(),t=this.createManagedBean(new AgSelect);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const i=this.createEValue();this.eConditionBodies.push(i),e.appendChild(i),this.putOptionsIntoDropdown(t),this.resetType(t);const o=this.getNumConditions()-1;this.forEachPositionInput(o,s=>this.resetInput(s)),this.addChangedListeners(t,o)}createJoinOperatorPanel(){const e=_createElement({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),i=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const o=this.eJoinPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,o,s),this.resetJoinOperatorOr(i,o,s),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){const o=this.createManagedBean(new AgRadioButton);e.push(o);const s="ag-filter-condition-operator";return o.addCss(s),o.addCss(`${s}-${i}`),t.appendChild(o.getGui()),o}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const i of t)e.addOption(i);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,i=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:i?this.getLocaleTextFunc()(i.displayKey,i.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)?e=i:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const i=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<i){this.removeConditionsAndOperators(i+1);const o=e+1,s=i-o;s>0&&this.removeConditionsAndOperators(o,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((o,s)=>{const n=this.isConditionDisabled(s,e);o.setDisabled(n||this.filterListOptions.length<=1),s===1&&(_setDisabled(this.eJoinPanels[0],n),this.eJoinAnds[0].setDisabled(n),this.eJoinOrs[0].setDisabled(n))}),this.eConditionBodies.forEach((o,s)=>{_setDisplayed(o,this.isConditionBodyVisible(s))});const i=(t??this.getJoinOperator())==="OR";for(const o of this.eJoinAnds)o.setValue(!i,!0);for(const o of this.eJoinOrs)o.setValue(i,!0);this.forEachInput((o,s,n,r)=>{this.setElementDisplayed(o,s<r),this.setElementDisabled(o,this.isConditionDisabled(n,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:i,eConditionBodies:o,eJoinPanels:s,eJoinAnds:n,eJoinOrs:r}=this;this.removeComponents(i,e,t),this.removeElements(o,e,t),this.removeEValues(e,t);const l=Math.max(e-1,0);this.removeElements(s,l,t),this.removeComponents(n,l,t),this.removeComponents(r,l,t)}removeElements(e,t,i){const o=removeItems(e,t,i);for(const s of o)_removeFromParent(s)}removeComponents(e,t,i){const o=removeItems(e,t,i);for(const s of o)_removeFromParent(s.getGui()),this.destroyBean(s)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const i=this.getInputs(0)[0];i instanceof AgAbstractInputField&&this.isConditionBodyVisible(0)?t=i.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,i=-1,o=!1;const s=this.getJoinOperator();for(let r=this.getNumConditions()-1;r>=0;r--)if(this.isConditionUiComplete(r))t===-1&&(t=r,i=r);else{const l=r>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(r-1),a=r<t;(l||a)&&(this.removeConditionsAndOperators(r,1),o=!0,a&&i--)}let n=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(i,s),o&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}resetPlaceholder(){const e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:i}=this;this.forEachInput((o,s,n,r)=>{if(!(o instanceof AgAbstractInputField))return;const l=s===0&&r>1?"inRangeStart":s===0?"filterOoo":"inRangeEnd",a=s===0&&r>1?e("ariaFilterFromValue","Filter from value"):s===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),d=i[n].getValue(),c=getPlaceholderText(this,t,l,d);o.setInputPlaceholder(c),o.setInputAriaLabel(a)})}setElementValue(e,t,i){e instanceof AgAbstractInputField&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){_isComponent(e)&&_setDisplayed(e.getGui(),t)}setElementDisabled(e,t){_isComponent(e)&&_setDisabled(e.getGui(),t)}attachElementOnChange(e,t){e instanceof AgAbstractInputField&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,i)=>{this.forEachPositionTypeInput(i,t,e)})}forEachPositionInput(e,t){const i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)}forEachPositionTypeInput(e,t,i){const o=getNumberOfInputs(t,this.optionsFactory),s=this.getInputs(e);for(let n=0;n<s.length;n++){const r=s[n];r!=null&&i(r,n,e,o)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return getNumberOfInputs(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(i=>i==null)||this.positionHasInvalidInputs(e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,i)=>this.resetJoinOperatorAnd(t,i,this.joinOperatorId+i)),this.eJoinOrs.forEach((t,i)=>this.resetJoinOperatorOr(t,i,this.joinOperatorId+i)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const i=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(i).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),i)}resetJoinOperator(e,t,i,o,s){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(o),t)}updateJoinOperatorsDisabled(){const e=(t,i)=>this.updateJoinOperatorDisabled(t,i);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const i=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((o,s,n)=>{n===t&&this.setElementValue(o,i[s]!=null?i[s]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,i,o)=>{this.setElementValue(t,i===0&&o===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,i=>{this.attachElementOnChange(i,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},DEFAULT_BIGINT_FILTER_OPTIONS=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function getAllowedCharPattern(e){return e?.allowedCharPattern??null}function mapValuesFromBigIntFilterModel(e,t){const{filter:i,filterTo:o,type:s}=e||{};return[_parseBigIntOrNull(i),_parseBigIntOrNull(o)].slice(0,getNumberOfInputs(s,t))}var BigIntFilter=class extends SimpleFilter{constructor(){super("bigintFilter",mapValuesFromBigIntFilterModel,DEFAULT_BIGINT_FILTER_OPTIONS),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!_isBrowserFirefox()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],i=this.eValuesTo[e];this.refreshInputPairValidation(t,i)}}refreshInputPairValidation(e,t,i=!1){const{bigintParser:o}=this.params,s=this.getParsedValue(e,o),n=this.getParsedValue(t,o),r=this.isInvalidValue(e,s),l=this.isInvalidValue(t,n),a=i?e:t,d=i?t:e,c=i?r:l,u=i?l:r;let h="";if(c)h=this.getLocaleTextFunc()("invalidBigInt","Invalid BigInt");else if(!r&&!l){const g=getValidityMessageKey(s,n,i);g&&(h=this.translate(g,[String(i?t.getValue():e.getValue())]))}a.setCustomValidity(h),u||d.setCustomValidity(""),h.length>0&&this.beans.ariaAnnounce.announceValue(h,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:i,additionalEventAttributes:o}=e,s=this.state,n=o?.fromAction;return(n&&n!="apply"||i.model!==s.model||!this.areStatesEqual(i.state,s.state))&&this.refreshInputValidation(),t}setElementValue(e,t,i){super.setElementValue(e,t,i),t===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:i}=this,o=getAllowedCharPattern(e),s=_createElement({tag:"div",cls:"ag-filter-body",role:"presentation"}),n=this.createFromToElement(s,t,"from",o),r=this.createFromToElement(s,i,"to",o),l=(c,u,h)=>()=>this.refreshInputPairValidation(c,u,h),a=l(n,r,!0);n.onValueChange(a),n.addGuiEventListener("focusin",a);const d=l(n,r,!1);return r.onValueChange(d),r.addGuiEventListener("focusin",d),s}createFromToElement(e,t,i,o){const s=this.createManagedBean(o?new AgInputTextField({allowedCharPattern:o}):new AgInputTextField);return s.addCss(`ag-filter-${i}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui()),s}removeEValues(e,t){const i=o=>this.removeComponents(o,e,t);i(this.eValuesFrom),i(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,n)=>{o<n&&t.push(_parseBigIntOrNull(i.getValue()??null))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=String(o[0])),o.length>1&&(i.filterTo=String(o[1])),i}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,i=>t||(t=!i.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){const i=e.getValue();return i==null||typeof i=="string"&&i.trim()===""?null:t?t(i):_parseBigIntOrNull(i)}isInvalidValue(e,t){const i=e.getValue();return i!=null&&String(i).trim()!==""&&t===null}};function getValidityMessageKey(e,t,i){return e!=null&&t!=null&&e>=t?`strict${i?"Max":"Min"}ValueValidation`:null}var SimpleFilterHandler=class extends BeanStub{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,i=new OptionsFactory;this.optionsFactory=i,i.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(i,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,i=this.optionsFactory;i.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:i,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:i}=t,o=[];if(i){const r=t;o.push(...r.conditions??[])}else o.push(t);const s=i&&i==="OR"?"some":"every",n=this.params.getValue(e.node);return o[s](r=>this.individualConditionPasses(e,r,n))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:i,maxNumConditions:o}}=e;if(t==null)return;let n=isCombinedFilterModel(t)?t.conditions:[t];const r=i?.map(c=>typeof c=="string"?c:c.displayKey)??this.defaultOptions;if(!(!n||n.every(c=>r.find(u=>u===c.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let a=!1;const d=this.filterType;if((n&&!n.every(c=>c.filterType===d)||t.filterType!==d)&&(n=n.map(c=>({...c,filterType:d})),a=!0),typeof o=="number"&&n&&n.length>o&&(n=n.slice(0,o),a=!0),a){const c=n.length>1?{...t,filterType:d,conditions:n}:{...n[0],filterType:d};this.params={...e,model:c},e.onModelChange(c)}}individualConditionPasses(e,t,i){const o=this.optionsFactory,s=this.mapValuesFromModel(t,o),n=o.getCustomOption(t.type),r=evaluateCustomFilter(n,s,i);return r??(i==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,i,t,e))}},ScalarFilterHandler=class extends SimpleFilterHandler{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:i,includeBlanksInGreaterThan:o,includeBlanksInLessThan:s,includeBlanksInRange:n}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(i)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(o)return!0;break;case"lessThan":case"lessThanOrEqual":if(s)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,i){const o=i.type;if(!this.isValid(t))return o==="notEqual"||o==="notBlank";const s=this.comparator(),n=e[0]!=null?s(e[0],t):0;switch(o){case"equals":return n===0;case"notEqual":return n!==0;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const r=s(e[1],t);return this.params.filterParams.inRangeInclusive?n>=0&&r<=0:n>0&&r<0}case"blank":return isBlank(t);case"notBlank":return!isBlank(t);default:return _warn(76,{filterModelType:o}),!0}}},SCALAR_FILTER_TYPE_KEYS={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},TEXT_FILTER_TYPE_KEYS={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},SimpleFilterModelFormatter=class extends BeanStub{constructor(e,t,i){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=i}getModelAsString(e,t){const i=this.getLocaleTextFunc(),o=t==="filterToolPanel";if(!e)return o?translateForFilter(this,"filterSummaryInactive"):null;if(e.operator!=null){const n=e,l=(n.conditions??[]).map(d=>this.getModelAsString(d,t)),a=n.operator==="AND"?"andCondition":"orCondition";return l.join(` ${translateForFilter(this,a)} `)}else{if(e.type==="blank"||e.type==="notBlank")return o?translateForFilter(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):i(e.type,e.type);{const n=e,r=this.optionsFactory.getCustomOption(n.type),{displayKey:l,displayName:a,numberOfInputs:d}=r||{};return l&&a&&d===0?i(l,a):this.conditionToString(n,o,n.type==="inRange"||d===2,l,a)}}}updateParams(e){const{optionsFactory:t,filterParams:i}=e;this.optionsFactory=t,this.filterParams=i}conditionForToolPanel(e,t,i,o,s,n){let r;const l=this.getTypeKey(e);return l&&(r=translateForFilter(this,l)),s&&n&&(r=this.getLocaleTextFunc()(s,n)),r!=null?t?`${r} ${translateForFilter(this,"filterSummaryInRangeValues",[i(),o()])}`:`${r} ${i()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},BigIntFilterModelFormatter=class extends SimpleFilterModelFormatter{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=SCALAR_FILTER_TYPE_KEYS}conditionToString(e,t,i,o,s){const{filter:n,filterTo:r,type:l}=e,a=this.formatValue.bind(this),d=_parseBigIntOrNull(n),c=_parseBigIntOrNull(r);if(t){const u=this.conditionForToolPanel(l,i,()=>a(d),()=>a(c),o,s);if(u!=null)return u}return i?`${a(d)}-${a(c)}`:n!=null?a(d):`${l}`}},BigIntFilterHandler=class extends ScalarFilterHandler{constructor(){super(mapValuesFromBigIntFilterModel,DEFAULT_BIGINT_FILTER_OPTIONS),this.filterType="bigint",this.FilterModelFormatterClass=BigIntFilterModelFormatter}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return _parseBigIntOrNull(e)!==null}},FloatingFilterTextInputService=class extends BeanStub{constructor(e){super(),this.params=e,this.eInput=RefPlaceholder,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new AgInputTextField(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const i=o=>this.onValueChanged(o);this.addManagedListeners(t,{input:i,keydown:i})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t,placeholder:i}){const{eInput:o}=this;o.setInputAriaLabel(e),t!==void 0&&o.setAutoComplete(t),o.toggleCss("ag-floating-filter-search-icon",!!i),o.setInputPlaceholder(i)}};function trimInputForFilter(e){const t=e?.trim();return t===""?e:t}function mapValuesFromTextFilterModel(e,t){const{filter:i,filterTo:o,type:s}=e||{};return[i||null,o||null].slice(0,getNumberOfInputs(s,t))}var SimpleFloatingFilter=class extends Component{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let i;t?i=e.conditions[0]:i=e,this.lastType=i.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const i=e;return this.isTypeEditable(i.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const i=e;this.onModelUpdated(i.model)}}setParams(e){const t=new OptionsFactory;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const i=this.optionsFactory.defaultOption;t||(this.lastType=i),this.readOnly=!!e.filterParams.readOnly;const o=this.isTypeEditable(i);this.setEditable(o)}refresh(e){this.params=e;const t=e,i=this.reactive;if((!i||t.source==="colDef")&&this.updateParams(e),i){const{source:o,model:s}=t;if(o==="dataChanged"||o==="ui")return;this.onModelUpdated(s)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&getNumberOfInputs(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},TextInputFloatingFilterElement={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},TextInputFloatingFilter=class extends SimpleFloatingFilter{constructor(){super(...arguments),this.eFloatingFilterInputContainer=RefPlaceholder,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(TextInputFloatingFilterElement)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const{inputSvc:t,defaultDebounceMs:i,readOnly:o}=this,{filterPlaceholder:s,column:n,browserAutoComplete:r,filterParams:l}=e,a=this.lastType??this.optionsFactory.defaultOption,d=e.filterParams.filterPlaceholder,c=s===!0?getPlaceholderText(this,d,"filterOoo",a):s||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(n),autoComplete:r??!1,placeholder:c}),this.applyActive=_isUseApplyButton(l),!o){const u=getDebounceMs(l,i);t.setValueChangedListener(_debounce(this,this.syncUpWithParentFilter.bind(this),u))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,i=t.getValue();_clearElement(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(i,!0)}syncUpWithParentFilter(e){const t=e.key===KeyCode.ENTER,i=this.reactive;if(i&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:o,params:s,lastType:n}=this;let r=o.getValue();if(s.filterParams.trimInput&&(r=trimInputForFilter(r),o.setValue(r,!0)),i){const l=s,a=l.model,d=this.convertValue(r),c=d==null?null:{...a??{filterType:this.filterType,type:n??this.optionsFactory.defaultOption},filter:d};l.onModelChange(c,{afterFloatingFilter:!0})}else s.parentFilterInstance(l=>{l?.onFloatingFilterChanged(n||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},BigIntFloatingFilter=class extends TextInputFloatingFilter{constructor(){super(...arguments),this.FilterModelFormatterClass=BigIntFilterModelFormatter,this.filterType="bigint",this.defaultOptions=DEFAULT_BIGINT_FILTER_OPTIONS}updateParams(e){const t=e.filterParams;getAllowedCharPattern(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams;this.allowedCharPattern=getAllowedCharPattern(t),this.bigintParser=t?.bigintParser;const i=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new FloatingFilterTextInputService({config:i}))}convertValue(e){return e==null||e===""?null:this.bigintParser?this.bigintParser(e):_parseBigIntOrNull(e)}},CLASS_INPUT_FIELD=".ag-input-field-input",DateCompWrapper=class{constructor(e,t,i,o,s,n){this.context=e,this.eParent=s,this.alive=!0,this.debouncedReport=_debounce({isAlive:()=>this.alive},reportValidity,500),this.timeoutHandle=null,_getDateCompDetails(t,i,o)?.newAgStackInstance().then(l=>{if(!this.alive){e.destroyBean(l);return}if(this.dateComp=l,!l)return;s.appendChild(l.getGui()),l?.afterGuiAttached?.();const{tempValue:a,disabled:d}=this;a&&l.setDate(a),d!=null&&l.setDisabled?.(d),n?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){_setDisplayed(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}setCustomValidity(e,t=!1){const i=this.dateComp?.getGui().querySelector(CLASS_INPUT_FIELD);if(i&&"setCustomValidity"in i){const o=e.length>0;i.setCustomValidity(e),o?t?this.timeoutHandle=this.debouncedReport(i):reportValidity(i):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),_setAriaInvalid(i,o)}}getValidity(){return this.dateComp?.getGui().querySelector(CLASS_INPUT_FIELD)?.validity}};function reportValidity(e){e.reportValidity()}var DEFAULT_DATE_FILTER_OPTIONS=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function mapValuesFromDateFilterModel(e,t){const{dateFrom:i,dateTo:o,type:s}=e||{};return[i&&_parseDateTimeFromString(i,void 0,!0)||null,o&&_parseDateTimeFromString(o,void 0,!0)||null].slice(0,getNumberOfInputs(s,t))}var DEFAULT_MIN_YEAR=1e3,DEFAULT_MAX_YEAR=1/0,DateFilter=class extends SimpleFilter{constructor(){super("dateFilter",mapValuesFromDateFilterModel,DEFAULT_DATE_FILTER_OPTIONS),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=DEFAULT_MIN_YEAR,this.maxValidYear=DEFAULT_MAX_YEAR,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!_isBrowserFirefox()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(a,d)=>{const c=e[a];if(c!=null)if(isNaN(c))_warn(82,{param:a});else return c==null?d:Number(c);return d},i=t("minValidYear",DEFAULT_MIN_YEAR),o=t("maxValidYear",DEFAULT_MAX_YEAR);this.minValidYear=i,this.maxValidYear=o,i>o&&_warn(83);const{minValidDate:s,maxValidDate:n}=e,r=s instanceof Date?s:_parseDateTimeFromString(s);this.minValidDate=r;const l=n instanceof Date?n:_parseDateTimeFromString(n);this.maxValidDate=l,r&&l&&r>l&&_warn(84)}refreshInputValidation(){for(let e=0;e<this.dateConditionFromComps.length;e++)this.refreshInputPairValidation(e,!1,!0)}refreshInputPairValidation(e,t=!1,i=!1){const{dateConditionFromComps:o,dateConditionToComps:s,beans:n}=this,r=o[e],l=s[e],a=r.getDate(),d=l.getDate(),c=getValidityMessageKey2(a,d,t),u=c?this.translate(c,[String(t?d:a)]):"",h=!_isBrowserFirefox()&&!i;(t?r:l).setCustomValidity(u,h),(t?l:r).setCustomValidity("",h),u.length>0&&n.ariaAnnounce.announceValue(u,"dateFilter")}createDateCompWrapper(e,t,i){const{beans:{userCompFactory:o,context:s,gos:n},params:r}=this,l=i==="from",a=new DateCompWrapper(s,o,r.colDef,_addGridCommonParams(n,{onDateChanged:()=>{this.refreshInputPairValidation(t,l),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,l),filterParams:r,location:"filter"}),e);return this.addDestroyFunc(()=>a.destroy()),a}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=_createElement({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,i,o){const s=_createElement({tag:"div",cls:`ag-filter-${o} ag-filter-date-${o}`});t.push(s),e.appendChild(s),i.push(this.createDateCompWrapper(s,t.length-1,o))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),removeItems(this.eConditionPanelsFrom,e,t),removeItems(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){const o=removeItems(e,t,i);for(const s of o)s.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:i,minValidYear:o,maxValidYear:s}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<o)return!1;if(i){if(e>i)return!1}else if(e.getUTCFullYear()>s)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=t.getDate()!=null&&!(t.getValidity()?.valid??!0))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,i=>t||(t=!(i.getValidity()?.valid??!0))),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(i,o,s,n)=>{!t||o>=n||t&&(t=this.isValidDateValue(i.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),i={},{params:o,filterType:s}=this,n=this.getValues(e),r=o.useIsoSeparator?"T":" ";return n.length>0&&(i.dateFrom=_serialiseDate(n[0],!0,r)),n.length>1&&(i.dateTo=_serialiseDate(n[1],!0,r)),{dateFrom:null,dateTo:null,filterType:s,type:t,...i}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(o=>{o.setInputPlaceholder(t),o.setInputAriaLabel(i)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,n)=>{o<n&&t.push(i.getDate())}),t}translate(e,t){let i=e;return e==="lessThan"?i="before":e==="greaterThan"&&(i="after"),super.translate(i,t)}};function getValidityMessageKey2(e,t,i){return e!=null&&t!=null&&e>=t?`${i?"max":"min"}DateValidation`:null}var DateFilterModelFormatter=class extends SimpleFilterModelFormatter{constructor(e,t){super(e,t,i=>{const{dataTypeSvc:o,valueSvc:s}=this.beans,n=t.column,r=o?.getDateFormatterFunction(n),l=r?r(i??void 0):i;return s.formatValue(n,null,l)}),this.filterTypeKeys=SCALAR_FILTER_TYPE_KEYS}conditionToString(e,t,i,o,s){const{type:n}=e,r=_parseDateTimeFromString(e.dateFrom),l=_parseDateTimeFromString(e.dateTo),a=this.filterParams.inRangeFloatingFilterDateFormat,d=t?this.formatValue.bind(this):h=>_dateToFormattedString(h,a),c=()=>r!==null?d(r):"null",u=()=>l!==null?d(l):"null";if(r==null&&l==null)return translateForFilter(this,n);if(t){const h=this.conditionForToolPanel(n,i,c,u,o,s);if(h!=null)return h}return i?`${c()}-${u()}`:r!=null?d(r):`${n}`}};function defaultDateComparator(e,t){const i=t;return i<e?-1:i>e?1:0}var DateFilterHandler=class extends ScalarFilterHandler{constructor(){super(mapValuesFromDateFilterModel,DEFAULT_DATE_FILTER_OPTIONS),this.filterType="date",this.FilterModelFormatterClass=DateFilterModelFormatter,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){const{filterTypeToRangeCache:i}=this,o=Date.now();let s=i.get(e);if(s&&s.expires<o&&(s=void 0),!s){const[n,r]=t(new Date(o),new Date(o));s={from:n,to:r,expires:setStartOfNextDay(new Date(o)).getTime()-o},i.set(e,s)}return s}comparator(){return this.params.filterParams.comparator??defaultDateComparator}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,i){const o=i.type,s=this.comparator();if(!this.isValid(t))return o==="notEqual"||o==="notBlank";const n=o,r=presetDateFilterTypeRelativeFromToMap[n];if(r){const{from:l,to:a}=this.getOrRefreshRangeCacheItem(n,r);return s(l,t)>=0&&s(a,t)<0}return super.evaluateNonNullValue(e,t,i)}},DEFAULT_FIRST_DAY_OF_WEEK=1,cachedFirstDayOfWeek=null,getFirstDayOfWeek=()=>{if(cachedFirstDayOfWeek!=null)return cachedFirstDayOfWeek;let e;const t=typeof navigator>"u"?void 0:navigator.languages?.[0]??navigator.language;if(t&&typeof Intl<"u"&&typeof Intl.Locale=="function")try{e=new Intl.Locale(t).getWeekInfo?.()?.firstDay}catch{e=void 0}return cachedFirstDayOfWeek=e==null?DEFAULT_FIRST_DAY_OF_WEEK:e%7,cachedFirstDayOfWeek},setStartOfDay=e=>(e.setHours(0,0,0,0),e),setStartOfWeek=e=>{const t=e.getDay(),i=getFirstDayOfWeek(),o=(t-i+7)%7;return e.setDate(e.getDate()-o),setStartOfDay(e)},setPreviousNDay=(e,t=1)=>(e.setDate(e.getDate()-t),e),setStartOfNextDay=e=>(e.setDate(e.getDate()+1),setStartOfDay(e)),setStartOfNextWeek=e=>(setStartOfWeek(e),e.setDate(e.getDate()+6),setStartOfNextDay(e)),setStartOfMonth=e=>(e.setDate(1),setStartOfDay(e)),setStartOfNextMonth=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),setStartOfDay(e)),setStartOfQuarter=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),setStartOfMonth(e)},setStartOfNextQuarter=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),setStartOfNextMonth(e)},setStartOfYear=e=>(e.setMonth(0,1),setStartOfDay(e)),setStartOfNextYear=e=>(e.setMonth(12,0),setStartOfNextDay(e)),setPreviousDay=e=>setPreviousNDay(e),setPreviousWeek=e=>setPreviousDay(setStartOfWeek(e)),setPreviousMonth=e=>setPreviousDay(setStartOfMonth(e)),setPreviousQuarter=e=>setPreviousDay(setStartOfQuarter(e)),today=(e,t)=>[setStartOfDay(e),setStartOfNextDay(t)],yesterday=(e,t)=>today(setPreviousDay(e),setPreviousDay(t)),thisWeek=(e,t)=>[setStartOfWeek(e),setStartOfNextWeek(t)],lastWeek=(e,t)=>thisWeek(setPreviousWeek(e),setPreviousWeek(t)),thisMonth=(e,t)=>[setStartOfMonth(e),setStartOfNextMonth(t)],lastMonth=(e,t)=>thisMonth(setPreviousMonth(e),setPreviousMonth(t)),thisQuarter=(e,t)=>[setStartOfQuarter(e),setStartOfNextQuarter(t)],lastQuarter=(e,t)=>thisQuarter(setPreviousQuarter(e),setPreviousQuarter(t)),thisYear=(e,t)=>[setStartOfYear(e),setStartOfNextYear(t)],yearToDate=(e,t)=>[setStartOfYear(e),setStartOfNextDay(t)],last7Days=(e,t)=>[setStartOfDay(setPreviousNDay(e,7)),setStartOfNextDay(t)],last30Days=(e,t)=>[setStartOfDay(setPreviousNDay(e,30)),setStartOfNextDay(t)],last90Days=(e,t)=>[setStartOfDay(setPreviousNDay(e,90)),setStartOfNextDay(t)],last6Months=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[setStartOfDay(e),setStartOfNextDay(t)]),last12Months=(e,t)=>(e.setFullYear(e.getFullYear()-1),[setStartOfDay(e),setStartOfNextDay(t)]),last24Months=(e,t)=>(e.setFullYear(e.getFullYear()-2),[setStartOfDay(e),setStartOfNextDay(t)]),lastYear=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),thisYear(e,t)),nextYear=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),thisYear(e,t)),nextQuarter=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),thisQuarter(e,t)),nextMonth=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),thisMonth(e,t)),nextWeek=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),thisWeek(e,t)),tomorrow=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),today(e,t)),presetDateFilterTypeRelativeFromToMap={today,yesterday,tomorrow,thisWeek,lastWeek,nextWeek,thisMonth,lastMonth,nextMonth,thisQuarter,lastQuarter,nextQuarter,thisYear,lastYear,nextYear,yearToDate,last7Days,last30Days,last90Days,last6Months,last12Months,last24Months,setStartOfDay,setStartOfWeek,setStartOfNextDay,setStartOfNextWeek,setStartOfMonth,setStartOfNextMonth,setStartOfQuarter,setStartOfNextQuarter,setStartOfYear,setStartOfNextYear,setPreviousDay,setPreviousWeek,setPreviousMonth,setPreviousQuarter},DateFloatingFilterElement={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},DateFloatingFilter=class extends SimpleFloatingFilter{constructor(){super(DateFloatingFilterElement,[AgInputTextFieldSelector]),this.eReadOnlyText=RefPlaceholder,this.eDateWrapper=RefPlaceholder,this.FilterModelFormatterClass=DateFilterModelFormatter,this.filterType="date",this.defaultOptions=DEFAULT_DATE_FILTER_OPTIONS}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const i=e?_parseDateTimeFromString(e.dateFrom):null;this.dateComp.setDate(i),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){_setDisplayed(this.eDateWrapper,e),_setDisplayed(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const i=t.model,o=_serialiseDate(e),s=o==null?null:{...i??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:o};t.onModelChange(s,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=getDebounceMs(e,this.defaultDebounceMs);return _addGridCommonParams(this.gos,{onDateChanged:_debounce(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:i,params:{column:o}}=this;this.dateComp=new DateCompWrapper(e,t,o.getColDef(),this.getDateComponentParams(),i,s=>{s.setInputAriaLabel(this.getAriaLabel(o))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},DefaultDateElement={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},DefaultDateComponent=class extends Component{constructor(){super(DefaultDateElement,[AgInputTextFieldSelector]),this.eDateInput=RefPlaceholder,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this),focusin:this.handleFocusIn.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){const t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&_isBrowserSafari();const{minValidYear:o,maxValidYear:s,minValidDate:n,maxValidDate:r,buttons:l,includeTime:a,colDef:d}=e.filterParams||{},c=this.beans.dataTypeSvc,u=a??c?.getDateIncludesTimeFlag?.(d.cellDataType)??!1;i?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";const h=parseOrConstructDate(n,o,!0),g=parseOrConstructDate(r,s,!1);h&&g&&h.getTime()>g.getTime()&&_warn(87),h&&(t.min=_serialiseDate(h,u)),g&&(t.max=_serialiseDate(g,u)),this.isApply=e.location==="floatingFilter"&&!!l?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return _parseDateTimeFromString(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,i=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(_serialiseDate(e,i))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}};function parseOrConstructDate(e,t,i){return e&&t&&_warn(i?85:86),e instanceof Date?e:e?_parseDateTimeFromString(e):t?_parseDateTimeFromString(`${t}-${i?"01-01":"12-31"}`):null}var DEFAULT_NUMBER_FILTER_OPTIONS=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function getAllowedCharPattern2(e){return e?.allowedCharPattern??null}function processNumberFilterValue(e){return e==null||isNaN(e)?null:e}function mapValuesFromNumberFilterModel(e,t){const{filter:i,filterTo:o,type:s}=e||{};return[processNumberFilterValue(i),processNumberFilterValue(o)].slice(0,getNumberOfInputs(s,t))}var NumberFilter=class extends SimpleFilter{constructor(){super("numberFilter",mapValuesFromNumberFilterModel,DEFAULT_NUMBER_FILTER_OPTIONS),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!_isBrowserFirefox()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],i=this.eValuesTo[e];this.refreshInputPairValidation(t,i)}}refreshInputPairValidation(e,t,i=!1){const o=this.params.numberParser,s=getNormalisedValue(o,e),n=getNormalisedValue(o,t),r=getValidityMessageKey3(s,n,i),l=r?this.translate(r,[String(i?n:s)]):"";(i?e:t).setCustomValidity(l),(i?t:e).setCustomValidity(""),l.length>0&&this.beans.ariaAnnounce.announceValue(l,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:i,additionalEventAttributes:o}=e,s=this.state,n=o?.fromAction;return(n&&n!="apply"||i.model!==s.model||!this.areStatesEqual(i.state,s.state))&&this.refreshInputValidation(),t}setElementValue(e,t,i){const{numberFormatter:o}=this.params,s=!i&&o?o(t??null):t;super.setElementValue(e,s),s===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:i}=this,o=getAllowedCharPattern2(e),s=_createElement({tag:"div",cls:"ag-filter-body",role:"presentation"}),n=this.createFromToElement(s,t,"from",o),r=this.createFromToElement(s,i,"to",o),l=(c,u,h)=>()=>this.refreshInputPairValidation(c,u,h),a=l(n,r,!0);n.onValueChange(a),n.addGuiEventListener("focusin",a);const d=l(n,r,!1);return r.onValueChange(d),r.addGuiEventListener("focusin",d),s}createFromToElement(e,t,i,o){const s=this.createManagedBean(o?new AgInputTextField({allowedCharPattern:o}):new AgInputNumberField);return s.addCss(`ag-filter-${i}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui()),s}removeEValues(e,t){const i=o=>this.removeComponents(o,e,t);i(this.eValuesFrom),i(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,n)=>{o<n&&t.push(processNumberFilterValue(stringToFloat(this.params.numberParser,i.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[1]),i}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,i=>t||(t=!i.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}};function stringToFloat(e,t){if(typeof t=="number")return t;let i=_makeNull(t);return i!=null&&i.trim()===""&&(i=null),e?e(i):i==null||i.trim()==="-"?null:Number.parseFloat(i)}function getNormalisedValue(e,t){return processNumberFilterValue(stringToFloat(e,t.getValue(!0)))}function getValidityMessageKey3(e,t,i){return e!=null&&t!=null&&e>=t?`strict${i?"Max":"Min"}ValueValidation`:null}var NumberFilterModelFormatter=class extends SimpleFilterModelFormatter{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=SCALAR_FILTER_TYPE_KEYS}conditionToString(e,t,i,o,s){const{filter:n,filterTo:r,type:l}=e,a=this.formatValue.bind(this);if(t){const d=this.conditionForToolPanel(l,i,()=>a(n),()=>a(r),o,s);if(d!=null)return d}return i?`${a(n)}-${a(r)}`:n!=null?a(n):`${l}`}},NumberFilterHandler=class extends ScalarFilterHandler{constructor(){super(mapValuesFromNumberFilterModel,DEFAULT_NUMBER_FILTER_OPTIONS),this.filterType="number",this.FilterModelFormatterClass=NumberFilterModelFormatter}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},FloatingFilterNumberInputService=class extends BeanStub{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new AgInputNumberField),this.eTextInput=this.createManagedBean(new AgInputTextField),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),i=this.eTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,o=>this.onValueChanged(o)),this.setupListeners(i,o=>this.onValueChanged(o))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:i}){this.setAriaLabel(e),t!==void 0&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,i),this.setPlaceholder(this.eTextInput,i)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},NumberFloatingFilter=class extends TextInputFloatingFilter{constructor(){super(...arguments),this.FilterModelFormatterClass=NumberFilterModelFormatter,this.filterType="number",this.defaultOptions=DEFAULT_NUMBER_FILTER_OPTIONS}updateParams(e){getAllowedCharPattern2(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=getAllowedCharPattern2(e.filterParams),this.allowedCharPattern?this.createManagedBean(new FloatingFilterTextInputService({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new FloatingFilterNumberInputService)}convertValue(e){return e?Number(e):null}},DEFAULT_TEXT_FILTER_OPTIONS=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],TextFilter=class extends SimpleFilter{constructor(){super("textFilter",mapValuesFromTextFilterModel,DEFAULT_TEXT_FILTER_OPTIONS),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[1]),i}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,n)=>{o<n&&t.push(_makeNull(i.getValue()))}),t}createEValue(){const e=_createElement({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:i}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,i,"to"),e}createFromToElement(e,t,i){const o=this.createManagedBean(new AgInputTextField);o.addCss(`ag-filter-${i}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeEValues(e,t){const i=n=>this.removeComponents(n,e,t),{eValuesFrom:o,eValuesTo:s}=this;i(o),i(s)}},TextFilterModelFormatter=class extends SimpleFilterModelFormatter{constructor(){super(...arguments),this.filterTypeKeys=TEXT_FILTER_TYPE_KEYS}conditionToString(e,t,i,o,s){const{filter:n,filterTo:r,type:l}=e;if(t){const a=c=>()=>translateForFilter(this,"filterSummaryTextQuote",[c]),d=this.conditionForToolPanel(l,i,a(n),a(r),o,s);if(d!=null)return d}return i?`${n}-${r}`:n!=null?`${n}`:`${l}`}},defaultMatcher=({filterOption:e,value:t,filterText:i})=>{if(i==null)return!1;switch(e){case"contains":return t.includes(i);case"notContains":return!t.includes(i);case"equals":return t===i;case"notEqual":return t!=i;case"startsWith":return t.indexOf(i)===0;case"endsWith":{const o=t.lastIndexOf(i);return o>=0&&o===t.length-i.length}default:return!1}},defaultFormatter=e=>e,defaultLowercaseFormatter=e=>e==null?null:e.toString().toLowerCase(),TextFilterHandler=class extends SimpleFilterHandler{constructor(){super(mapValuesFromTextFilterModel,DEFAULT_TEXT_FILTER_OPTIONS),this.filterType="text",this.FilterModelFormatterClass=TextFilterModelFormatter}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??defaultMatcher,this.formatter=t.textFormatter??(t.caseSensitive?defaultFormatter:defaultLowercaseFormatter)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,i,o){const s=e.map(h=>this.formatter(h))||[],n=this.formatter(t),{api:r,colDef:l,column:a,context:d,filterParams:{textFormatter:c}}=this.params;if(i.type==="blank")return isBlank(t);if(i.type==="notBlank")return!isBlank(t);const u={api:r,colDef:l,column:a,context:d,node:o.node,data:o.data,filterOption:i.type,value:n,textFormatter:c};return s.some(h=>this.matcher({...u,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=i=>{const o={...i},{filter:s,filterTo:n}=i;return s&&(o.filter=trimInputForFilter(s)??null),n&&(o.filterTo=trimInputForFilter(n)??null),o};return isCombinedFilterModel(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},TextFloatingFilter=class extends TextInputFloatingFilter{constructor(){super(...arguments),this.FilterModelFormatterClass=TextFilterModelFormatter,this.filterType="text",this.defaultOptions=DEFAULT_TEXT_FILTER_OPTIONS}createFloatingFilterInputService(){return this.createManagedBean(new FloatingFilterTextInputService)}};function isQuickFilterPresent(e){return!!e.quickFilter?.isFilterPresent()}function getQuickFilter(e){return e.quickFilter?.getText()}function resetQuickFilter(e){e.quickFilter?.resetCache()}var QuickFilterService=class extends BeanStub{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",i=>this.setFilter(i.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:i,pivotResultCols:o}=this.beans,s=t.isPivotMode(),n=e?.getColumns(),r=t.getColDefCols();let l=(s&&!i.get("applyQuickFilterBeforePivotOrAgg")?o?.getPivotResultCols()?.list:r)??[];n&&(l=l.concat(n)),this.colsToUse=i.get("includeHiddenColumnsInQuickFilter")?l:l.filter(a=>a.isVisible()||a.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassCache(e,i):this.doesRowPassNoCache(e,i))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return _exists(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){_warn(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(i=>{const o=this.getTextForColumn(i,e);return _exists(o)&&o.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let i;e?(this.checkGenerateAggText(t),i=t.quickFilterAggregateText):i=this.getAggText(t);const{quickFilterParts:o,matcher:s}=this;return s(o,i)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let i=this.beans.filterValueSvc.getValue(e,t);const o=e.getColDef();if(o.getQuickFilterText){const s=_addGridCommonParams(this.gos,{value:i,node:t,data:t.data,column:e,colDef:o});i=o.getQuickFilterText(s)}return _exists(i)?i.toString().toUpperCase():null}getAggText(e){const t=[];for(const i of this.colsToUse){const o=this.getTextForColumn(i,e);_exists(o)&&t.push(o)}return t.join(`
|
|
`)}},ClientSideRowModelFilterModule={moduleName:"ClientSideRowModelFilter",version:VERSION,rowModels:["clientSide"],beans:[FilterStage]},FilterCoreModule={moduleName:"FilterCore",version:VERSION,beans:[FilterManager],apiFunctions:{isAnyFilterPresent,onFilterChanged},css:[columnFiltersCSS],dependsOn:[ClientSideRowModelFilterModule]},FilterValueModule={moduleName:"FilterValue",version:VERSION,beans:[FilterValueService]},ColumnFilterModule={moduleName:"ColumnFilter",version:VERSION,beans:[ColumnFilterService,FilterMenuFactory],dynamicBeans:{headerFilterCellCtrl:HeaderFilterCellCtrl},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent,getColumnFilterInstance,destroyFilter,setFilterModel,getFilterModel,getColumnFilterModel,setColumnFilterModel,showColumnFilter,hideColumnFilter,getColumnFilterHandler,doFilterAction},dependsOn:[FilterCoreModule,PopupModule,FilterValueModule,SharedMenuModule]},CustomFilterModule={moduleName:"CustomFilter",version:VERSION,userComponents:{agReadOnlyFloatingFilter:ReadOnlyFloatingFilter},dependsOn:[ColumnFilterModule]},TextFilterModule={moduleName:"TextFilter",version:VERSION,dependsOn:[ColumnFilterModule],userComponents:{agTextColumnFilter:{classImp:TextFilter,params:{useForm:!0}},agTextColumnFloatingFilter:TextFloatingFilter},dynamicBeans:{agTextColumnFilterHandler:TextFilterHandler}},NumberFilterModule={moduleName:"NumberFilter",version:VERSION,dependsOn:[ColumnFilterModule],userComponents:{agNumberColumnFilter:{classImp:NumberFilter,params:{useForm:!0}},agNumberColumnFloatingFilter:NumberFloatingFilter},dynamicBeans:{agNumberColumnFilterHandler:NumberFilterHandler}},BigIntFilterModule={moduleName:"BigIntFilter",version:VERSION,dependsOn:[ColumnFilterModule],userComponents:{agBigIntColumnFilter:{classImp:BigIntFilter,params:{useForm:!0}},agBigIntColumnFloatingFilter:BigIntFloatingFilter},dynamicBeans:{agBigIntColumnFilterHandler:BigIntFilterHandler}},DateFilterModule={moduleName:"DateFilter",version:VERSION,dependsOn:[ColumnFilterModule],userComponents:{agDateColumnFilter:{classImp:DateFilter,params:{useForm:!0}},agDateInput:DefaultDateComponent,agDateColumnFloatingFilter:DateFloatingFilter},dynamicBeans:{agDateColumnFilterHandler:DateFilterHandler}},QuickFilterCoreModule={moduleName:"QuickFilterCore",version:VERSION,rowModels:["clientSide"],beans:[QuickFilterService],dependsOn:[FilterCoreModule,FilterValueModule]},QuickFilterModule={moduleName:"QuickFilter",version:VERSION,apiFunctions:{isQuickFilterPresent,getQuickFilter,resetQuickFilter},dependsOn:[QuickFilterCoreModule]},ExternalFilterModule={moduleName:"ExternalFilter",version:VERSION,dependsOn:[FilterCoreModule]},InfiniteBlock=class extends BeanStub{constructor(e,t,i){super(),this.id=e,this.parentCache=t,this.params=i,this.state="needsLoading",this.version=0,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})}isRequestMostRecentAndLive(e){const t=e===this.version,i=this.isAlive();return t&&i}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:i,beans:o,rowNodes:s}=this;for(let n=0;n<e;n++){const r=i+n,l=new RowNode(o);l.setRowHeight(t),l.uiLevel=0,l.setRowIndex(r),l.setRowTop(t*r),s.push(l)}}getBlockStateJson(){const{id:e,startRow:t,endRow:i,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:i,pageStatus:o}}}setDataAndId(e,t,i){_exists(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(_missing(this.params.datasource.getRows)){_warn(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:i,params:{sortModel:o,filterModel:s},gos:n}=this;return _addGridCommonParams(n,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,i),failCallback:this.pageLoadFailed.bind(this,i),sortModel:o,filterModel:s})}forEachNode(e,t,i){this.rowNodes.forEach((o,s)=>{this.startRow+s<i&&e(o,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const i=e-this.startRow;return this.rowNodes[i]}processServerResult(e){const{rowNodes:t,beans:i}=this;t.forEach((s,n)=>{const r=e.rowData?e.rowData[n]:void 0;!s.id&&s.alreadyRendered&&r&&(t[n]=new RowNode(i),t[n].setRowIndex(s.rowIndex),t[n].setRowTop(s.rowTop),t[n].setRowHeight(s.rowHeight),s._destroy(!0)),this.setDataAndId(t[n],r,this.startRow+n)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){const e=this.rowNodes;for(let t=0,i=e.length;t<i;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},MAX_EMPTY_BLOCKS_TO_KEEP=2,InfiniteCache=class extends BeanStub{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const i=Math.floor(e/this.params.blockSize);let o=this.blocks[i];if(!o){if(t)return;o=this.createBlock(i)}return o.getRow(e)}createBlock(e){const t=this.params,i=this.createBean(new InfiniteBlock(e,this,t));return this.blocks[i.id]=i,this.blockCount++,this.purgeBlocksIfNeeded(i),t.rowNodeBlockLoader.addBlock(i),i}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(_logIfDebug(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e),i=(r,l)=>l.lastAccessed-r.lastAccessed;t.sort(i);const o=this.params.maxBlocksInCache>0,s=o?this.params.maxBlocksInCache-1:null,n=MAX_EMPTY_BLOCKS_TO_KEEP-1;t.forEach((r,l)=>{const a=r.state==="needsLoading"&&l>=n,d=o?l>=s:!1;if(a||d){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:i,endRow:o}=e;return t.rowIndex>=i&&t.rowIndex<o}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:i}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,i-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:i,overflowSize:o}=this.params,n=(e.id+1)*i+o;this.rowCount<n&&(this.rowCount=n)}}setRowCount(e,t){this.rowCount=e,_exists(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const i of this.getBlocksInOrder())i.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(i,o)=>i.id-o.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const i=[];let o=-1,s=!1;const n={value:0};let r=!1;for(const a of this.getBlocksInOrder())if(!r){if(s&&o+1!==a.id){r=!0;continue}o=a.id,a.forEachNode(d=>{const c=d===e||d===t;(s||c)&&i.push(d),c&&(s=!s)},n,this.rowCount)}return r||s?[]:i}},InfiniteRowModel=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new RowNode(e);this.rootNode=t,t.level=-1,this.rowHeight=_getRowHeightAsNumber(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=_getRowHeightAsNumber(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!_jsonEquals(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getOverlayType(){return this.infiniteCache?.getRowCount()===0?this.beans.filterManager?.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;_getRowIdCallback(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:i,rowNodeBlockLoader:o,eventSvc:s,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:i?.getSortModel()??[],rowNodeBlockLoader:o,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:_getRowHeightAsNumber(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new InfiniteCache(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function refreshInfiniteCache(e){_getInfiniteRowModel(e)?.refreshCache()}function purgeInfiniteCache(e){_getInfiniteRowModel(e)?.purgeCache()}function getInfiniteRowCount(e){return _getInfiniteRowModel(e)?.getRowCount()}var RowNodeBlockLoader=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=_getMaxConcurrentDatasourceRequests(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=_debounce(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){_removeFromArray(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){_logIfDebug(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(i=>i.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const i of t)i.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:i,state:o}=t.getBlockStateJson();e[i]=o}),e}printCacheStatus(){_logIfDebug(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},InfiniteRowModelCoreModule={moduleName:"InfiniteRowModelCore",version:VERSION,rowModels:["infinite"],beans:[InfiniteRowModel,RowNodeBlockLoader]},InfiniteRowModelModule={moduleName:"InfiniteRowModel",version:VERSION,apiFunctions:{refreshInfiniteCache,purgeInfiniteCache,getInfiniteRowCount},dependsOn:[InfiniteRowModelCoreModule,SsrmInfiniteSharedApiModule]},ApiEventService=class extends BeanStub{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const i=this.wrapSvc?.wrap(e,t)??t,o=!ALWAYS_SYNC_GLOBAL_EVENTS.has(e),s=o?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(i),this.eventSvc.addListener(e,i,o)}removeListener(e,t){const i=this.wrapSvc?.unwrap(e,t)??t,s=!!this.asyncListeners.get(e)?.delete(i);s||this.syncListeners.get(e)?.delete(i),this.eventSvc.removeListener(e,i,s)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,i=(n,r)=>{ALWAYS_SYNC_GLOBAL_EVENTS.has(n)&&t(n,r)},o=(n,r)=>{ALWAYS_SYNC_GLOBAL_EVENTS.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:i,asyncListener:o});const s=this.eventSvc;s.addGlobalListener(i,!1),s.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:i,globalListenerPairs:o}=this,s=i?.unwrapGlobal(e)??e;if(o.has(s)){const{syncListener:r,asyncListener:l}=o.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(l,!0),o.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((i,o)=>{i.forEach(s=>this.eventSvc.removeListener(o,s,t)),i.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const i of e)this.eventSvc.removeGlobalListener(i,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:i,asyncListener:o})=>{t.removeGlobalListener(i,!1),t.removeGlobalListener(o,!0)}),e.clear()}};function addEventListener(e,t,i){e.apiEventSvc?.addListener(t,i)}function removeEventListener(e,t,i){e.apiEventSvc?.removeListener(t,i)}function addGlobalListener(e,t){e.apiEventSvc?.addGlobalListener(t)}function removeGlobalListener(e,t){e.apiEventSvc?.removeGlobalListener(t)}var EventApiModule={moduleName:"EventApi",version:VERSION,apiFunctions:{addEventListener,addGlobalListener,removeEventListener,removeGlobalListener},beans:[ApiEventService]},LocaleService=class extends BeanStub{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?_getLocaleTextFromFunc(t):_getLocaleTextFromMap(e.get("localeText"))}},LocaleModule={moduleName:"Locale",version:VERSION,beans:[LocaleService]};function getState(e){return e.stateSvc?.getState()??{}}function setState(e,t,i){return e.stateSvc?.setState(t,i)}function migrateGridStateModel(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=migrateV32_1(e)),e.version=VERSION,e}function migrateV32_1(e){return e.cellSelection=jsonGet(e,"rangeSelection"),e}function jsonGet(e,t){if(e&&typeof e=="object")return e[t]}var StateService=class extends BeanStub{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=_debounce(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=_debounce(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=_debounce(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:i}=this.beans;this.isClientSideRowModel=_isClientSideRowModel(e);const o=migrateGridStateModel(e.get("initialState")??{}),s=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>n(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&i?.hideColumns("columnState");const[r,l,a]=this.addManagedEventListeners({newColumnsLoaded:({source:d})=>{d==="gridInitializing"&&(r(),n(()=>{this.setupStateOnColumnsInitialised(o,!!s),i?.revealColumns("columnState")}))},rowCountReady:()=>{l?.(),n(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{a?.(),n(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const i=migrateGridStateModel(e);delete i.partialColumnState,this.cachedState=i,this.startSuppressEvents();const o="api",s=t?new Set(t):void 0;this.setGridReadyState(i,o,s),this.setColumnsInitialisedState(i,o,!!s,s),this.setRowCountState(i,o,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(i,o,s),this.stopSuppressEvents(o)})}setGridReadyState(e,t,i){t==="api"&&!i?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,i,o){this.setColumnState(e,t,i,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const i=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:i("aggregation"),columnMoved:i("columnOrder"),columnPinned:i("columnPinning"),columnResized:i("columnSizing"),columnVisible:i("columnVisibility"),columnPivotChanged:i("pivot"),columnPivotModeChanged:i("pivot"),columnRowGroupChanged:i("rowGroup"),sortChanged:i("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,i){const{filter:o,rowGroupExpansion:s,ssrmRowGroupExpansion:n,rowSelection:r,pagination:l,rowPinning:a}=e,d=(u,h)=>!i?.has(u)&&(h||t==="api");d("filter",o)&&this.setFilterState(o),d("rowGroupExpansion",s)&&this.setRowGroupExpansionState(n,s,t),d("rowSelection",r)&&this.setRowSelectionState(r,t),d("pagination",l)&&this.setPaginationState(l,t),d("rowPinning",a)&&this.setRowPinningState(a);const c=this.updateCachedState.bind(this);c("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(c("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),c("rowGroupExpansion",void 0)):(c("rowGroupExpansion",this.getRowGroupExpansionState()),c("ssrmRowGroupExpansion",void 0)),c("rowSelection",this.getRowSelectionState()),c("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),i=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},o=()=>t("filter",this.getFilterState()),{gos:s,colFilter:n,selectableFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:i,columnRowGroupChanged:i,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(i)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:l=>{(l.newPage||l.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),n&&this.addManagedListeners(n,{filterStateChanged:o}),r&&this.addManagedListeners(r,{selectedFilterChanged:o})}setFirstDataRenderedState(e,t,i){const{scroll:o,cellSelection:s,focusedCell:n,columnOrder:r}=e,l=(c,u)=>!i?.has(c)&&(u||t==="api");l("focusedCell",n)&&this.setFocusedCellState(n),l("cellSelection",s)&&this.setCellSelectionState(s),l("scroll",o)&&this.setScrollState(o),this.setColumnPivotState(!!r?.orderedColIds,t);const a=this.updateCachedState.bind(this);a("sideBar",this.getSideBarState()),a("focusedCell",this.getFocusedCellState());const d=this.getRangeSelectionState();a("rangeSelection",d),a("cellSelection",d),a("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),i=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:i,cellFocusCleared:i,cellSelectionChanged:o=>{if(o.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){const e=this.beans;return convertColumnState(_getColumnState(e),e.colModel.isPivotMode())}setColumnState(e,t,i,o){const{sort:s,rowGroup:n,aggregation:r,pivot:l,columnPinning:a,columnVisibility:d,columnSizing:c,columnOrder:u}=e;let h=!1;const g=(x,M)=>{const D=!o?.has(x)&&!!(M||t==="api");return h||(h=D),D},p={},f=x=>{let M=p[x];return M||(M={colId:x},p[x]=M,M)},m={},C=g("sort",s);C&&s?.sortModel.forEach(({colId:x,sort:M},D)=>{const T=f(x);T.sort=M,T.sortIndex=D}),(C||!i)&&(m.sort=null,m.sortIndex=null);const v=g("rowGroup",n);v&&n?.groupColIds.forEach((x,M)=>{const D=f(x);D.rowGroup=!0,D.rowGroupIndex=M}),(v||!i)&&(m.rowGroup=null,m.rowGroupIndex=null);const w=g("aggregation",r);w&&r?.aggregationModel.forEach(({colId:x,aggFunc:M})=>{f(x).aggFunc=M}),(w||!i)&&(m.aggFunc=null);const S=g("pivot",l);S&&(l?.pivotColIds.forEach((x,M)=>{const D=f(x);D.pivot=!0,D.pivotIndex=M}),this.gos.updateGridOptions({options:{pivotMode:!!l?.pivotMode},source:t})),(S||!i)&&(m.pivot=null,m.pivotIndex=null);const b=g("columnPinning",a);if(b){for(const x of a?.leftColIds??[])f(x).pinned="left";for(const x of a?.rightColIds??[])f(x).pinned="right"}(b||!i)&&(m.pinned=null);const y=g("columnVisibility",d);if(y)for(const x of d?.hiddenColIds??[])f(x).hide=!0;(y||!i)&&(m.hide=null);const R=g("columnSizing",c);if(R)for(const{colId:x,flex:M,width:D}of c?.columnSizingModel??[]){const T=f(x);T.flex=M??null,T.width=D}(R||!i)&&(m.flex=null);const E=u?.orderedColIds,F=!!E?.length&&!o?.has("columnOrder"),P=F?E.map(x=>f(x)):Object.values(p);(P.length||h)&&(this.columnStates=P,_applyColumnState(this.beans,{state:P,applyOrder:F,defaultState:m},t))}setColumnPivotState(e,t){const i=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:r}=s;if(n?.isPivotResultColsPresent()){if(i){const l=[];for(const a of i)n.getPivotResultCol(a.colId)&&l.push(a);_applyColumnState(s,{state:l,applyOrder:e},t)}o&&r?.setColumnGroupState(o,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return _convertColumnGroupState(t)}setColumnGroupState(e,t,i){const o=this.beans.colGroupSvc;if(!o||i?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set(e.columnGroup?.openColumnGroupIds),r=o.getColumnGroupState().map(({groupId:l})=>{const a=s.has(l);return a&&s.delete(l),{groupId:l,open:a}});for(const l of s)r.push({groupId:l,open:!0});r.length&&(this.columnGroupStates=r),o.setColumnGroupState(r,t)}getFilterState(){const{filterManager:e,selectableFilter:t}=this.beans;let i=e?.getFilterModel();i&&Object.keys(i).length===0&&(i=void 0);const o=e?.getFilterState(),s=e?.getAdvFilterModel()??void 0,n=t?.getState();return i||s||o||n?{filterModel:i,columnFilterState:o,advancedFilterModel:s,selectableFilters:n}:void 0}setFilterState(e){const{filterManager:t,selectableFilter:i}=this.beans,{filterModel:o,columnFilterState:s,advancedFilterModel:n,selectableFilters:r}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};r!==void 0&&i?.setState(r??{}),(o!==void 0||s!==void 0)&&t?.setFilterState(o??null,s??null,"columnFilter"),n!==void 0&&t?.setAdvFilterModel(n??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:i,type:o,startRow:s,endRow:n,columns:r,startColumn:l}=t;return{id:i,type:o,startRow:s,endRow:n,colIds:r.map(a=>a.getColId()),startColId:l.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:i,colModel:o,visibleCols:s}=this.beans;if(!_isCellSelectionEnabled(t)||!i)return;const n=[];for(const r of e?.cellRanges??[]){const l=[];for(const d of r.colIds){const c=o.getCol(d);c&&l.push(c)}if(!l.length)continue;let a=o.getCol(r.startColId);if(!a){const d=s.allCols,c=new Set(l);a=d.find(u=>c.has(u))}n.push({...r,columns:l,startColumn:a})}i.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:i}=e?.getVScrollPosition()??{top:0};return i||t?{top:i,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:i}=e??{top:0,left:0},{frameworkOverrides:o,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;o.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(i),r.getScrollFeature()?.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:i,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:i}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:i.getCol(o),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const i=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!i&&!o))return{page:i,pageSize:o}}setPaginationState(e,t){const{pagination:i,gos:o}=this.beans;if(!i)return;const{pageSize:s,page:n}=e??{page:0,pageSize:o.get("paginationPageSize")},r=t==="gridInitializing";s&&!o.get("paginationAutoPageSize")&&i.setPageSize(s,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?i.setPage(n):i.goToPage(n))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}getRowGroupExpansionState(){const{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,i){const o=this.beans.expansionSvc;if(!o)return;const s=t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};o.setExpansionState(s,i)}updateColumnState(e){const t=this.getColumnState();let i=!1;const o=this.cachedState;for(const s of Object.keys(t)){const n=t[s];_jsonEquals(n,o[s])||(i=!0)}this.cachedState={...o,...t},i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const i=this.cachedState[e];this.setCachedStateValue(e,t),_jsonEquals(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},GridStateModule={moduleName:"GridState",version:VERSION,beans:[StateService],apiFunctions:{getState,setState}};function paginationIsLastPageFound(e){return e.rowModel.isLastRowIndexKnown()}function paginationGetPageSize(e){return e.pagination?.getPageSize()??100}function paginationGetCurrentPage(e){return e.pagination?.getCurrentPage()??0}function paginationGetTotalPages(e){return e.pagination?.getTotalPages()??1}function paginationGetRowCount(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function paginationGoToNextPage(e){e.pagination?.goToNextPage()}function paginationGoToPreviousPage(e){e.pagination?.goToPreviousPage()}function paginationGoToFirstPage(e){e.pagination?.goToFirstPage()}function paginationGoToLastPage(e){e.pagination?.goToLastPage()}function paginationGoToPage(e,t){e.pagination?.goToPage(t)}var PaginationAutoPageSizeService=class extends BeanStub{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,i=()=>{const o=Math.max(_getRowHeightAsNumber(t),1),s=Math.floor(e/o);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?_debounce(this,i,50)():(i(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function _formatNumberCommas(e,t){if(typeof e!="number")return"";const i=t(),o=i("thousandSeparator",","),s=i("decimalSeparator",".");return e.toString().replace(".",s).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${o}`)}var paginationPageSizeSelector="paginationPageSizeSelector",PageSizeSelectorCompElement={tag:"span",cls:"ag-paging-page-size"},PageSizeSelectorComp=class extends Component{constructor(){super(PageSizeSelectorCompElement),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(paginationPageSizeSelector,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){_clearElement(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(paginationPageSizeSelector)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),i=!t||!e.includes(t);if(i){const s=this.gos.exists("paginationPageSize"),n=this.gos.get(paginationPageSizeSelector)!==!0;_warn(94,{pageSizeSet:s,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||_warn(95,{paginationPageSizeOption:t,paginationPageSizeSelector}),e.unshift("")}const o=String(i?"":t);this.selectPageSizeComp?(_areEqual(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=i}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const i=this.getLocaleTextFunc(),o=i("pageSizeSelectorLabel","Page Size:"),s=i("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new AgSelect).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(paginationPageSizeSelector);return!Array.isArray(t)||!t?.length?e:[...t].sort((i,o)=>i-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},PageSizeSelectorSelector={selector:"AG-PAGE-SIZE-SELECTOR",component:PageSizeSelectorComp},paginationCompCSS=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;flex-wrap:wrap-reverse;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-height:var(--ag-pagination-panel-height);padding:calc(var(--ag-spacing)*.5) var(--ag-cell-horizontal-padding);row-gap:calc(var(--ag-spacing)*.5);@container (width < 600px){justify-content:center}}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel,.ag-paging-row-summary-panel{margin:calc(var(--ag-spacing)*.5)}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-paging-description{line-height:0}",PaginationComp=class extends TabGuardComp{constructor(){super(),this.btFirst=RefPlaceholder,this.btPrevious=RefPlaceholder,this.btNext=RefPlaceholder,this.btLast=RefPlaceholder,this.lbRecordCount=RefPlaceholder,this.lbFirstRowOnPage=RefPlaceholder,this.lbLastRowOnPage=RefPlaceholder,this.lbCurrent=RefPlaceholder,this.lbTotal=RefPlaceholder,this.pageSizeComp=RefPlaceholder,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(paginationCompCSS)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[PageSizeSelectorSelector]);const{btFirst:t,btPrevious:i,btNext:o,btLast:s}=this;this.activateTabIndex([t,i,o,s]),t.insertAdjacentElement("afterbegin",_createIconNoSpan(e?"last":"first",this.beans)),i.insertAdjacentElement("afterbegin",_createIconNoSpan(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",_createIconNoSpan(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",_createIconNoSpan(e?"first":"last",this.beans)),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.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):_focusGridInnerElement(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{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)}]){const{el:t,fn:i}=e;this.addManagedListeners(t,{click:i,keydown:o=>{(o.key===KeyCode.ENTER||o.key===KeyCode.SPACE)&&(o.preventDefault(),i())}})}_addFocusableContainerListener(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):_formatNumberCommas(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),i=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=this.isZeroPagesToDisplay(),s=e===i-1;this.nextButtonDisabled=s||o,this.lastButtonDisabled=!t||o||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){_setAriaDisabled(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),i=this.pagination.getMasterRowCount(),o=e?i:null,s=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,l;this.isZeroPagesToDisplay()?r=l=0:(r=n*s+1,l=r+n-1,e&&l>o&&(l=o));const a=r+n-1,d=!e&&i<a,c=this.formatNumber(r);this.lbFirstRowOnPage.textContent=c;let u;const h=this.getLocaleTextFunc();d?u=h("pageLastRowUnknown","?"):u=this.formatNumber(l),this.lbLastRowOnPage.textContent=u;const p=t>0?s+1:0,f=this.formatNumber(p);this.lbCurrent.textContent=f;let m,C;if(e)m=this.formatNumber(t),C=this.formatNumber(o);else{const v=h("more","more");m=v,C=v}this.lbTotal.textContent=m,this.lbRecordCount.textContent=C,this.announceAriaStatus(c,u,C,f,m)}announceAriaStatus(e,t,i,o,s){const n=this.getLocaleTextFunc(),r=n("page","Page"),l=n("to","to"),a=n("of","of"),d=`${e} ${l} ${t} ${a} ${i}`,c=`${r} ${o} ${a} ${s}`;d!==this.ariaRowStatus&&(this.ariaRowStatus=d,this.ariaAnnounce?.announceValue(d,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,this.ariaAnnounce?.announceValue(c,"paginationPage"))}},PaginationSelector={selector:"AG-PAGINATION",component:PaginationComp},DEFAULT_PAGE_SIZE=100,PaginationService=class extends BeanStub{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return PaginationSelector}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:i}=this.beans;i?.isEditing()&&(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return _exists(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:_exists(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:_exists(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:_exists(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:DEFAULT_PAGE_SIZE}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}i!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const i=this.pageSize,o=t-1;this.totalPages=Math.floor(o/i)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,n=i*s;let r=i*(s+1)-1;if(r>o&&(r=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const l=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=l-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:i}=this,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*i,this.bottomDisplayedRowIndex=t*(i+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:i=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:i,newPageSize:o,keepRenderedRows:t})}},PaginationModule={moduleName:"Pagination",version:VERSION,beans:[PaginationService,PaginationAutoPageSizeService],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound,paginationGetPageSize,paginationGetCurrentPage,paginationGetTotalPages,paginationGetRowCount,paginationGoToNextPage,paginationGoToPreviousPage,paginationGoToFirstPage,paginationGoToLastPage,paginationGoToPage},dependsOn:[PopupModule]},manualPinnedRowCSS=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function getPinnedTopRowCount(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function getPinnedBottomRowCount(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function getPinnedTopRow(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function getPinnedBottomRow(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function forEachPinnedRow(e,t,i){return e.pinnedRowModel?.forEachPinnedRow(t,i)}var PinnedRowModule={moduleName:"PinnedRow",version:VERSION,beans:[PinnedRowModel],css:[manualPinnedRowCSS],apiFunctions:{getPinnedTopRowCount,getPinnedBottomRowCount,getPinnedTopRow,getPinnedBottomRow,forEachPinnedRow},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},ARROW_UP="\u2191",ARROW_DOWN="\u2193",AnimateShowChangeCellRendererElement={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},AnimateShowChangeCellRenderer=class extends Component{constructor(){super(AnimateShowChangeCellRendererElement),this.eValue=RefPlaceholder,this.eDelta=RefPlaceholder,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const i=Math.abs(t),o=e.formatValue(i),s=_exists(o)?o:i,n=t>=0,r=this.eDelta;n?r.textContent=ARROW_UP+s:r.textContent=ARROW_DOWN+s,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),_clearElement(this.eDelta)}refresh(e,t=!1){const{value:i,valueFormatted:o}=e,{eValue:s,lastValue:n,beans:r}=this;if(i===n||(_exists(o)?s.textContent=o:_exists(i)?s.textContent=i:_clearElement(s),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const l=i&&typeof i=="object"&&"toNumber"in i?i.toNumber():i,a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(l===a)return!1;if(typeof l=="number"&&typeof a=="number"){const d=l-a;this.showDelta(e,d)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}},animateSlideCellRendererCSS=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",AnimateSlideCellRendererElement={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},AnimateSlideCellRenderer=class extends Component{constructor(){super(AnimateSlideCellRendererElement),this.eCurrent=RefPlaceholder,this.refreshCount=0,this.registerCSS(animateSlideCellRendererCSS)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:i}=this,o=_createElement({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=i.textContent,this.getGui().insertBefore(o,i),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let i=e.value;if(_missing(i)&&(i=""),i===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=i;const o=this.eCurrent;return _exists(e.valueFormatted)?o.textContent=e.valueFormatted:_exists(e.value)?o.textContent=i:_clearElement(o),!0}},CellFlashService=class extends BeanStub{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,i=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),r=n+i,l=n+i+o,a={phase:"flash",flashEndTime:r,fadeEndTime:l};s.set(e,a);const d=`ag-cell-${t}`,c=`${d}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(d,!0),u.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),i)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const i of Object.keys(this.animations)){const o=this.animations[i],s=`ag-cell-${i}`,n=`${s}-animation`;for(const[r,l]of o){if(!r.isAlive()||!r.comp){o.delete(r);continue}const{phase:a,flashEndTime:d,fadeEndTime:c}=l,u=a==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=r;switch(a){case"flash":g.toggleCss(s,!1),g.toggleCss(n,!0),p.transition=`background-color ${c-d}ms`,p.transitionDelay=`${d-e}ms`,t=Math.min(c,t??1/0),l.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(n,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),o.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const i=_createCellId(e.cellPosition);t.cells[i]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function flashCells(e,t={}){const{cellFlashSvc:i}=e;i&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))i.flashCell(o,t)})}var HighlightChangesModule={moduleName:"HighlightChanges",version:VERSION,beans:[CellFlashService],userComponents:{agAnimateShowChangeCellRenderer:AnimateShowChangeCellRenderer,agAnimateSlideCellRenderer:AnimateSlideCellRenderer},apiFunctions:{flashCells}};function setGridAriaProperty(e,t,i){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;i===null?o.removeAttribute(s):o.setAttribute(s,i)}function refreshCells(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function refreshHeader(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function isAnimationFrameQueueEmpty(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function flushAllAnimationFrames(e){e.animationFrameSvc?.flushAllFrames()}function getSizesForCurrentTheme(e){return{rowHeight:_getRowHeightAsNumber(e),headerHeight:getHeaderHeight(e)}}function getCellRendererInstances(e,t={}){const i=[];for(const n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const r=n.getCellRenderer();r!=null&&i.push(_unwrapUserComp(r))}if(t.columns?.length)return i;const o=[],s=mapRowNodes(t.rowNodes);for(const n of e.rowRenderer.getAllRowCtrls()){if(s&&!isRowInMap(n.rowNode,s)||!n.isFullWidth())continue;const r=n.getFullWidthCellRenderers();for(let l=0;l<r.length;l++){const a=r[l];a!=null&&o.push(_unwrapUserComp(a))}}return[...o,...i]}var RenderApiModule={moduleName:"RenderApi",version:VERSION,apiFunctions:{setGridAriaProperty,refreshCells,refreshHeader,isAnimationFrameQueueEmpty,flushAllAnimationFrames,getSizesForCurrentTheme,getCellRendererInstances}},RowAutoHeightService=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=_debounce(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:i,pinnedRowModel:o}=this.beans,s=e.autoHeightCols;let n=!1;const r=l=>{const a=l.__autoHeights;let d=_getRowHeightForNode(this.beans,l).height;for(const c of s){let u=a?.[c.getColId()];const h=i?.getCellSpan(c,l);if(h){if(h.getLastNode()!==l)continue;if(u=i?.getCellSpan(c,l)?.getLastNodeAutoHeight(),!u)return}if(u==null){if(this.colSpanSkipCell(c,l))continue;return}d=Math.max(u,d)}d!==l.rowHeight&&(l.setRowHeight(d),n=!0)};o?.forEachPinnedRow?.("top",r),o?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),n&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,i){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[i.getId()];return}const o=e.__autoHeights[i.getId()];e.__autoHeights[i.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:i,colViewport:o,visibleCols:s}=this.beans;if(!i.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=s.getLeftColsForRow(t);break;case"right":n=s.getRightColsForRow(t);break;case null:n=o.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,i){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:s,column:n}=e,r=this.beans,l=c=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!i.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=_getElementSize(o),f=u+h+g+p,C=t.offsetHeight+f;if(c<5){const w=!_getDocument(r)?.contains(t),S=C==0;if(w||S){window.setTimeout(()=>l(c+1),0);return}}this.setRowAutoHeight(s,C,n)},a=()=>l(0);a();const d=_observeResize(r,t,a);return i.addDestroyFunc(()=>{d(),this.setRowAutoHeight(s,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:i}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(i).filter(s=>s.isAutoHeight())),t.length!==0){if(!i.__autoHeights)return!1;for(const o of t){const s=i.__autoHeights[o.getColId()];if(!s||i.rowHeight<s)return!1}}return!0}},RowAutoHeightModule={moduleName:"RowAutoHeight",version:VERSION,beans:[RowAutoHeightService]},CellSpan=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(const i of this.spannedNodes)i!==this.lastNode&&(t+=i.rowHeight);return e-t}},RowSpanCache=class extends BeanStub{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:i,pinnedRowModel:o,rowModel:s,valueSvc:n,pagination:r}}=this,{colDef:l}=t,a=this.getNodeMap(e),d=new Map,c=i.getCallback("isFullWidthRow"),u=l.equals,h=l.spanRows,g=typeof h=="function";let p=null,f=null,m;const C=(w,S)=>{p=w,f=null,m=S},v=w=>{const S=!w.isExpandable()&&!w.group&&!w.detail&&(c?!c({rowNode:w}):!0);if(w.rowIndex==null||!S){C(null,null);return}if(p==null||w.level!==p.level||w.footer||f&&w.rowIndex-1!==f?.getLastNode().rowIndex){C(w,n.getValue(t,w,"data"));return}const b=n.getValue(t,w,"data");if(g){const y=_addGridCommonParams(i,{valueA:m,nodeA:p,valueB:b,nodeB:w,column:t,colDef:l});if(!h(y)){C(w,b);return}}else if(u?!u(m,b):m!==b){C(w,b);return}if(!f){const y=a?.get(p);y?.firstNode===p?(y.reset(),f=y):f=new CellSpan(t,p),d.set(p,f)}f.addSpannedNode(w),d.set(w,f)};switch(e){case"center":s.forEachDisplayedNode?.(w=>{(!r||r.isRowInPage(w.rowIndex))&&v(w)}),this.centerValueNodeMap=d;break;case"top":o?.forEachPinnedRow("top",v),this.topValueNodeMap=d;break;case"bottom":o?.forEachPinnedRow("bottom",v),this.bottomValueNodeMap=d;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},RowSpanService=class extends BeanStub{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=_debounce(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=_debounce(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const i=this.createManagedBean(new RowSpanCache(e));this.spanningColumns.set(e,i),i.buildCache("top"),i.buildCache("bottom"),i.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const i=this.spanningColumns.get(e);return i?i.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:i}=this.beans,o=e.column,s=e.rowIndex,n=this.spanningColumns.get(o);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(s);break;case"bottom":r=t?.getPinnedBottomRow(s);break;default:r=i.getRow(s)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const i=this.spanningColumns.get(e);if(i)return i.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[i,o]of this.spanningColumns)if(o.isCellSpanning(e)){const s=o.getCellSpan(e);t(i,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},SpannedCellCtrl=class extends CellCtrl{constructor(e,t,i){super(e.col,e.firstNode,i,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,i,o,s,n,r){this.eWrapper=i,super.setComp(e,t,i,o,s,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||_setAriaRowIndex(e,t.rowIndex)}setAriaRowSpan(){_setAriaRowSpan(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(_isCellFocusSuppressed(t)){this.focusedCellPosition=void 0;return}const i=this.isCellFocused();i||(this.focusedCellPosition=void 0),e&&i&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},SpannedRowCtrl=class extends RowCtrl{onRowIndexChanged(){super.onRowIndexChanged();for(const e of this.getAllCellCtrls())e.refreshAriaRowIndex()}getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new SpannedCellCtrl(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},SpannedRowRenderer=class extends BeanStub{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,i=this.getCtrlsMap(e),o=i.size,s=this.getAllRelevantRowControls(e),n=new Map;let r=!1;for(const a of s)a.isAlive()&&t?.forEachSpannedColumn(a.rowNode,(d,c)=>{if(n.has(c.firstNode))return;const u=i.get(c.firstNode);if(u){n.set(c.firstNode,u),i.delete(c.firstNode);return}r=!0;const h=new SpannedRowCtrl(c.firstNode,this.beans,!1,!1,!1);n.set(c.firstNode,h)});this.setCtrlsMap(e,n);const l=n.size===o;if(!(!r&&l)){for(const a of i.values())a.destroyFirstPass(!0),a.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,i=t?.getCellSpanByPosition(e);if(!i)return;const o=this.getCtrlsMap(e.rowPinned).get(i.firstNode);if(o)return o.getAllCellCtrls().find(s=>s.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},CellSpanModule={moduleName:"CellSpan",version:VERSION,beans:[RowSpanService,SpannedRowRenderer]},SelectionColService=class extends BeanStub{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,_convertColumnEventSourceType(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),_updateColsMap(e))}createColumns(e,t){const i=()=>{_destroyColumnTree(this.beans,this.columns?.tree),this.columns=null},o=e.treeDepth,n=(this.columns?.treeDepth??-1)==o,r=this.generateSelectionCols();if(_areColIdsEqual(r,this.columns?.list??[])&&n)return;i();const{colGroupSvc:a}=this.beans,d=a?.findDepth(e.tree)??0,c=a?.balanceTreeForAutoCols(r,d)??[];this.columns={list:r,tree:c,treeDepth:d,map:{}},t(h=>{if(!h)return null;const g=h.filter(p=>!isColumnSelectionCol(p));return[...r,...g]})}updateColumns(e){const t=_convertColumnEventSourceType(e.source),{beans:i}=this;for(const o of this.columns?.list??[]){const s=this.createSelectionColDef(e.currentValue);o.setColDef(s,null,t),_applyColumnState(i,{state:[_getColumnStateFromColDef(s,o.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>_columnsMatch(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,i=e.get("rowSelection");if(typeof i!="object"||!_isRowSelection(e))return!1;const o=(t.autoColSvc?.getColumns()?.length??0)>0;if(i.checkboxLocation==="autoGroupColumn"&&o)return!1;const s=!!_getCheckboxes(i),n=_getHeaderCheckbox(i);return s||n}createSelectionColDef(e){const{gos:t}=this,i=e??t.get("selectionColumnDef"),o=t.get("enableRtl"),{rowSpan:s,spanRows:n,...r}=i??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:o?"right":"left",comparator(l,a,d,c){const u=d.isSelected(),h=c.isSelected();return u===h?0:u?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...r,colId:SELECTION_COLUMN_ID,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const i=new AgColumn(e,null,t,!1);return this.createBean(i),[i]}onSelectionOptionsChanged(e,t,i){const o=t&&typeof t!="string"?_getCheckboxes(t):void 0,s=e&&typeof e!="string"?_getCheckboxes(e):void 0,n=o!==s,r=t&&typeof t!="string"?_getHeaderCheckbox(t):void 0,l=e&&typeof e!="string"?_getHeaderCheckbox(e):void 0,a=r!==l,d=_getCheckboxLocation(e),c=_getCheckboxLocation(t);(n||a||d!==c)&&this.beans.colModel.refreshAll(i)}destroy(){_destroyColumnTree(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,i){if(!this.columns?.list.length)return;const o=e.length+t.length+i.length;if(o===0)return;const s=this.columns.list[0];if(!s.isVisible())return;const n=()=>{let a;switch(s.pinned){case"left":case!0:a=e;break;case"right":a=i;break;default:a=t}a&&_removeFromArray(a,s)};(this.beans.rowNumbersSvc?.getColumn(ROW_NUMBERS_COLUMN_ID)?2:1)===o&&n()}},rowSelectionCSS=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function setNodesSelected(e,t){if(!t.nodes.every(r=>r.rowPinned&&!_isManualPinnedRow(r)?(_warn(59),!1):r.id===void 0?(_warn(60),!1):!0))return;const{nodes:o,source:s,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:o,source:s??"api",newValue:n})}function selectAll(e,t,i="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:i,selectAll:t})}function deselectAll(e,t,i="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:i,selectAll:t})}function selectAllFiltered(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function deselectAllFiltered(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function selectAllOnCurrentPage(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function deselectAllOnCurrentPage(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function getSelectedNodes(e){return e.selectionSvc?.getSelectedNodes()??[]}function getSelectedRows(e){return e.selectionSvc?.getSelectedRows()??[]}var CheckboxSelectionComponentElement={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},CheckboxSelectionComponent=class extends Component{constructor(){super(CheckboxSelectionComponentElement,[AgCheckboxSelector]),this.eCheckbox=RefPlaceholder}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:i}=this,o=t.isSelected(),s=_getAriaCheckboxStateName(e,o),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],l=e(n,r);i.setValue(o,!0),i.setInputAriaLabel(`${l} (${s})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:_stopPropagationForAgGrid,click:o=>{_stopPropagationForAgGrid(o),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(o,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:s})=>{const n=typeof o=="object"?_getHideDisabledCheckboxes(o):void 0,r=typeof s=="object"?_getHideDisabledCheckboxes(s):void 0;n!==r&&this.onSelectableChanged()}),_getIsRowSelectable(this.gos)||typeof this.getIsVisible()=="function"){const o=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o}),this.addManagedListeners(this.rowNode,{dataChanged:o,cellChanged:o}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:i,gos:o}=this,s=t.selectable,n=this.getIsVisible();let r;if(typeof n=="function"){const u=i?.callbackParams;if(!e)r=n({...u,node:t,data:t.data});else{const h=e.createColumnFunctionCallbackParams(t);r=n({...u,...h})}}else r=n??!1;const l=s&&!r||!s&&r,a=s||r,d=o.get("rowSelection"),c=d&&typeof d!="string"?!_getHideDisabledCheckboxes(d):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(a&&(l?c:!0)),this.setDisplayed(a&&(l?c:!0)),a&&this.eCheckbox.setDisabled(l),i?.removeHidden&&this.setDisplayed(a)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?_getCheckboxes(t):this.column?.getColDef()?.checkboxSelection}},RowRangeSelectionContext=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:i,pinnedRowModel:o}=this;return t??(t=i.getRowNode(e)),o?.isManual()&&(t??(t=o.getPinnedRowById(e,"top")),t??(t=o.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const i=t[0].id===this.rootId,o=t.findIndex(s=>s.id===e.id);if(o>-1){const s=t.slice(0,o),n=t.slice(o+1);return this.setEndRange(e),i?{keep:s,discard:n}:{keep:n,discard:s}}else return{keep:t,discard:[]}}extend(e,t=!1){const i=this.getRoot();if(i==null){const s=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&s.push(n)),s.push(e),this.setRoot(e),{keep:s,discard:[]}}const o=this.getNodesInRange(i,e);if(!o)return this.setRoot(e),{keep:[e],discard:[]};if(o.find(s=>s.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const s=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:s}}}getNodesInRange(e,t){const{pinnedRowModel:i,rowModel:o}=this;if(!i?.isManual())return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return _getNodesInRangeForSelection(i,"top",e,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const s=_getNodesInRangeForSelection(i,"bottom",void 0,e),n=o.getRowCount(),r=o.getRow(n-1);return(o.getNodesInRangeForSelection(t,r)??[]).concat(s)}if(!e.rowPinned&&!t.rowPinned)return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return _getNodesInRangeForSelection(i,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const s=_getNodesInRangeForSelection(i,"top",t,void 0),n=_getNodesInRangeForSelection(i,"bottom",void 0,e),r=o.getRow(0),l=o.getRow(o.getRowCount()-1);return s.concat(o.getNodesInRangeForSelection(r,l)??[]).concat(n)}if(!e.rowPinned&&t.rowPinned==="top")return _getNodesInRangeForSelection(i,"top",t,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const s=_getNodesInRangeForSelection(i,"top",e,void 0),n=_getNodesInRangeForSelection(i,"bottom",void 0,t),r=o.getRow(0),l=o.getRow(o.getRowCount()-1);return s.concat(o.getNodesInRangeForSelection(r,l)??[]).concat(n)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return _getNodesInRangeForSelection(i,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const s=_getNodesInRangeForSelection(i,"bottom",void 0,t),n=o.getRow(o.getRowCount());return(o.getNodesInRangeForSelection(e,n)??[]).concat(s)}return null}},SelectAllFeature=class extends BeanStub{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(_getActiveDomElement(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new AgCheckbox);this.cbSelectAll=t,t.addCss("ag-header-select-all"),_setAriaRole(t.getGui(),"presentation"),this.showOrHideSelectAll();const i=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:i,paginationChanged:i,modelUpdated:i}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:s})=>{const n=r=>typeof r=="string"||!r||r.mode==="singleRow"?void 0:r.selectAll;n(o)!==n(s)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,i=this.cbSelectAll,o=t.getSelectAllState(e);i.setValue(o);const s=t.hasNodesToSelect(e);i.setDisabled(!s),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:i,cbSelectAll:o,cbSelectAllVisible:s}=this,n=o.getValue(),r=_getAriaCheckboxStateName(t,n),l=t("ariaRowSelectAll","Press Space to toggle all rows selection");i.setAriaDescriptionProperty("selectAll",s?`${l} (${r})`:null),o.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||i.announceAriaDescription()}checkSelectionType(e){return _isMultiRowSelection(this.gos)?!0:(_warn(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:i}=this.beans;return _isClientSideRowModel(t)||_isServerSideRowModel(t)?!0:(_warn(129,{feature:e,rowModel:i.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let i="uiSelectAll";t==="currentPage"?i="uiSelectAllCurrentPage":t==="filtered"&&(i="uiSelectAllFiltered");const o={source:i,selectAll:t},s=this.beans.selectionSvc;e?s.selectAllRowNodes(o):s.deselectAllRowNodes(o)}isCheckboxSelection(){const{column:e,gos:t,beans:i}=this,n=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return isCheckboxSelection(i,e)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const e=_getSelectAll(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:i}=this.column.getColDef();return t?"currentPage":i?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function isCheckboxSelection({gos:e,selectionColSvc:t},i){const o=e.get("rowSelection"),s=i.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;if(typeof o=="object"){const a=isColumnSelectionCol(i),d=isColumnGroupAutoCol(i);(_getCheckboxLocation(o)==="autoGroupColumn"&&d||a&&t?.isSelectionColumnEnabled())&&(r=_getHeaderCheckbox(o))}else typeof n=="function"?r=n(_addGridCommonParams(e,{column:i,colDef:s})):r=!!n;return r}var BaseSelectionService=class extends BeanStub{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new RowRangeSelectionContext(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const i=_getIsRowSelectable(e);i!==this.isRowSelectable&&(this.isRowSelectable=i,this.updateSelectable())}),this.isRowSelectable=_getIsRowSelectable(e),this.addManagedEventListeners({cellValueChanged:i=>this.updateRowSelectable(i.node),rowNodeDataChanged:i=>this.updateRowSelectable(i.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new CheckboxSelectionComponent}createSelectAllFeature(e){if(isCheckboxSelection(this.beans,e))return new SelectAllFeature(e)}isMultiSelect(){return _isMultiRowSelection(this.gos)}onRowCtrlSelected(e,t,i){const o=!!e.rowNode.isSelected();e.forEachGui(i,s=>{s.rowComp.toggleCss("ag-row-selected",o);const n=s.element;_setAriaSelected(n,o),n.contains(_getActiveDomElement(this.beans))&&t(s)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),i=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||i)return;const s=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(s,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!_isManualPinnedRow(e)||!_isRowSelection(this.gos)}updateRowSelectable(e,t){const i=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,i,t),i}setRowSelectable(e,t,i){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),i)return;if(_getGroupSelectsDescendants(this.gos)){const s=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:s??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,i=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let o=0;o<e.childrenAfterGroup.length;o++){const s=e.childrenAfterGroup[o];let n=s.isSelected();if(!s.selectable){const r=this.calculateSelectedFromChildren(s);if(r===null)continue;n=r}switch(n){case!0:t=!0;break;case!1:i=!0;break;default:return}}if(!(t&&i))return t?!0:i?!1:e.selectable?e.__selected:null}selectRowNode(e,t,i,o="api"){if(t&&e.destroyed)return!1;const s=!e.selectable&&t,n=e.__selected===t;if(s||n)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected");const l=e.pinnedSibling;return l?.rowPinned&&l.__localEventService&&l.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({..._createGlobalRowEvent(e,this.gos,"rowSelected"),event:i||null,source:o}),!0}isCellCheckboxSelection(e,t){const i=this.gos.get("rowSelection");if(i&&typeof i!="string"){const o=isColumnSelectionCol(e)&&_getCheckboxes(i);return e.isColumnFunc(t,o)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,i,o){const{gos:s,selectionCtx:n}=this,r=e.isSelected(),l=_getGroupSelectsDescendants(s),a=_getEnableSelection(s),d=_getEnableDeselection(s),c=this.isMultiSelect(),u=o==="rowClicked";if(u&&!(a||d))return null;if(t&&i&&c){const h=n.getRoot();if(h)if(h.isSelected()){const g=n.isInRange(e)?n.truncate(e):n.extend(e,l);return{deselect:g.discard,select:g.keep,reset:!1}}else{const g=n.extend(e,l);return{select:[],deselect:g.keep,reset:!1}}else return null}else if(t&&c){const h=n.selectAll?this.beans.rowModel.getRow(0):void 0,g=n.getRoot(h),p=n.isInRange(e)?n.truncate(e):n.extend(e,l);return{select:p.keep,deselect:p.discard,reset:n.selectAll||!!(g&&!g.isSelected())}}else if(i){if(u){const h=!r;return h&&!a||!h&&!d?null:(n.setRoot(e),{node:e,newValue:h,clearSelection:!1})}return n.setRoot(e),{node:e,newValue:!r,clearSelection:!c}}else{n.setRoot(e);const h=_getEnableSelectionWithoutKeys(s),g=_getGroupSelection(s)==="filteredDescendants",p=u&&(!h||!a);if(g&&r===void 0&&_isClientSideRowModel(s))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!c||p};if(u){const f=r?!h:a;return f===r&&!p||f&&!a||!f&&!d?null:{node:e,newValue:f,clearSelection:!c||p,keepDescendants:e.group&&l}}return{node:e,newValue:!r,clearSelection:!c||p}}}},SelectionService=class extends BaseSelectionService{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=_getRowSelectionMode(e),this.groupSelectsDescendants=_getGroupSelectsDescendants(e),this.groupSelectsFiltered=_getGroupSelection(e)==="filteredDescendants",this.masterSelectsDetail=_getMasterSelects(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=_getGroupSelectsDescendants(e),i=_getRowSelectionMode(e),o=_getGroupSelection(e)==="filteredDescendants";this.masterSelectsDetail=_getMasterSelects(e)==="detail",(t!==this.groupSelectsDescendants||o!==this.groupSelectsFiltered||i!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=o,this.mode=i)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,i){if(this.isRowSelectionBlocked(t))return 0;const o=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,i);if(o==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in o)return o.reset?this.resetNodes():this.selectRange(o.deselect,!1,i),this.selectRange(o.select,!0,i);{const s=o.checkFilteredNodes?recursiveCanNodesBeSelected(o.node):o.newValue;return this.setNodesSelected({nodes:[o.node],newValue:s,clearSelection:o.clearSelection,keepDescendants:o.keepDescendants,event:e,source:i})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:i,nodes:o,event:s,source:n,keepDescendants:r=!1}){if(o.length===0)return 0;const{gos:l}=this;if(!_isRowSelection(l)&&e)return _warn(132),0;if(o.length>1&&!this.isMultiSelect())return _warn(130),0;let a=0;for(let d=0;d<o.length;d++){const c=o[d],u=_normaliseSiblingRef(c);if(u.rowPinned&&!_isManualPinnedRow(u)){_warn(59);continue}if(u.id===void 0){_warn(60);continue}if(e&&c.destroyed)continue;this.groupSelectsFiltered&&u.group&&!l.get("treeData")||this.selectRowNode(u,e,s,n)&&(this.detailSelection.delete(u.id),a++),this.groupSelectsDescendants&&u.childrenAfterGroup?.length&&(a+=this.selectChildren(u,e,n))}return i||(o.length===1&&n==="api"&&this.selectionCtx.setRoot(_normaliseSiblingRef(o[0])),e&&(t||!this.isMultiSelect())&&(a+=this.clearOtherNodes(_normaliseSiblingRef(o[0]),r,n)),a>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),a}selectRange(e,t,i){let o=0;return e.forEach(s=>{const n=_normaliseSiblingRef(s);if(n.group&&this.groupSelectsDescendants)return;this.selectRowNode(n,t,void 0,i)&&o++}),o>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)),o}selectChildren(e,t,i){const o=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return o?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:i,nodes:o}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((i,o)=>{e(i)&&t.set(o,i)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:i,rowModel:o}=this.beans;if(!_isClientSideRowModel(i,o))return!1;const s=o.rootNode;if(!s)return!1;t||(t=new ChangedPath(!0,s),t.active=!1);let n=!1;return t.forEachChangedNodeDepthFirst(r=>{if(r!==s){const l=this.calculateSelectedFromChildren(r);n=this.selectRowNode(r,l===null?!1:l,void 0,e)||n}}),n}clearOtherNodes(e,t,i){const o=new Map;let s=0;return this.selectedNodes.forEach(n=>{const r=n.id==e.id;if((t?!isDescendantOf(e,n):!0)&&!r){const a=this.selectedNodes.get(n.id);s+=this.setNodesSelected({nodes:[a],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:i}),this.groupSelectsDescendants&&n.parent&&o.set(n.parent.id,n.parent)}}),o.forEach(n=>{const r=this.calculateSelectedFromChildren(n);this.selectRowNode(n,r===null?!1:r,void 0,i)}),s}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new RowNode(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!_isClientSideRowModel(e,t))return;const i=t.getTopLevelNodes();if(i===null)return;const o=[];function s(n){for(let r=0,l=n.length;r<l;r++){const a=n[r];a.isSelected()?o.push(a):a.group&&a.childrenAfterGroup&&s(a.childrenAfterGroup)}}return s(i),o}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const i=_isClientSideRowModel(this.gos);let o=!1;const s=n=>{const r=this.selectRowNode(_normaliseSiblingRef(n),!1,void 0,e);o||(o=r)};if(t==="currentPage"||t==="filtered"){if(!i){_error(102);return}this.getNodesToSelect(t).forEach(s)}else this.selectedNodes.forEach(s),this.reset(e);if(this.selectionCtx.selectAll=!1,i&&this.groupSelectsDescendants){const n=this.updateGroupsFromChildrenSelections(e);o||(o=n)}o&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,i=0;return this.getNodesToSelect(e).forEach(o=>{this.groupSelectsDescendants&&o.group||(o.isSelected()?t++:o.selectable&&i++)}),{selectedCount:t,notSelectedCount:i}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:i}=this.getSelectedCounts(e);return _calculateSelectAllState(t,i)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],i=s=>t.push(s);if(e==="currentPage")return this.forEachNodeOnPage(s=>{if(!s.group){i(s);return}if(!s.expanded&&!s.footer){const n=r=>{i(r),r.childrenAfterFilter?.forEach(n)};n(s);return}this.groupSelectsDescendants||i(s)}),t;const o=this.beans.rowModel;return e==="filtered"?(o.forEachNodeAfterFilter(i),t):(o.forEachNode(i),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:i}=this.beans,o=t.getFirstRow(),s=t.getLastRow();for(let n=o;n<=s;n++){const r=i.getRow(n);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:i}=this;if(!_isRowSelection(t)){_warn(132);return}if(_isUsingNewRowSelectionAPI(t)&&!_isMultiRowSelection(t)){_warn(130);return}if(!this.canSelectAll())return;const{source:o,selectAll:s}=e;let n=!1;if(this.getNodesToSelect(s).forEach(r=>{const l=this.selectRowNode(_normaliseSiblingRef(r),!0,void 0,o);n||(n=l)}),i.selectAll=!0,_isClientSideRowModel(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(o);n||(n=r)}n&&this.dispatchSelectionChanged(o)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,i){if(e||(e=[]),!Array.isArray(e)){_error(103);return}const o=new Set(e),s=[];this.beans.rowModel.forEachNode(n=>{o.has(n.id)&&s.push(n)}),i&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:s,source:t})}canSelectAll(){return _isClientSideRowModel(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:i}=this.beans;if(!_isRowSelection(t))return;const o="selectableChanged",s=e!==void 0,n=_isClientSideRowModel(t)&&this.groupSelectsDescendants,r=[],l=a=>{if(s&&!a.group)return;if(n&&a.group){const c=a.childrenAfterGroup?.some(u=>u.selectable)??!1;this.setRowSelectable(a,c,!0);return}!this.updateRowSelectable(a,!0)&&a.isSelected()&&r.push(a)};if(n){if(e===void 0){const a=i.rootNode;e=a?new ChangedPath(!1,a):void 0}e?.forEachChangedNodeDepthFirst(l,!s,!s)}else i.forEachNode(l);r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:o}),!s&&n&&this.updateGroupsFromChildrenSelections?.(o)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const i=e.detailNode?.detailGridInfo?.api;if(!i)return;const o=_isAllSelected(i);e.isSelected()!==o&&this.selectRowNode(e,o,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),o||this.detailSelection.set(e.id,new Set(i.getSelectedNodes().map(n=>n.id)))}setDetailSelectionState(e,t,i){if(this.masterSelectsDetail){if(!_isMultiRowSelection(t)){_warn(269);return}switch(e.isSelected()){case!0:{i.selectAll();break}case!1:{i.deselectAll();break}case void 0:{const o=this.detailSelection.get(e.id);if(o){const s=[];for(const n of o){const r=i.getRowNode(n);r&&s.push(r)}i.setNodesSelected({nodes:s,newValue:!0,source:"masterDetail"})}break}default:break}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function _normaliseSiblingRef(e){return _isManualPinnedRow(e)?e.pinnedSibling:e.footer?e.sibling:e}function _isAllSelected(e){let t=0,i=0;return e.forEachNode(o=>{o.isSelected()?t++:o.selectable&&i++}),_calculateSelectAllState(t,i)}function _calculateSelectAllState(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function isDescendantOf(e,t){let i=t.parent;for(;i;){if(i===e)return!0;i=i.parent}return!1}function recursiveCanNodesBeSelected(e){const t=e.isSelected()===!1,i=e.childrenAfterFilter?.some(recursiveCanNodesBeSelected)??!1;return t||i}var SharedRowSelectionModule={moduleName:"SharedRowSelection",version:VERSION,beans:[SelectionColService],css:[rowSelectionCSS],apiFunctions:{setNodesSelected,selectAll,deselectAll,selectAllFiltered,deselectAllFiltered,selectAllOnCurrentPage,deselectAllOnCurrentPage,getSelectedNodes,getSelectedRows}},RowSelectionModule={moduleName:"RowSelection",version:VERSION,rowModels:["clientSide","infinite","viewport"],beans:[SelectionService],dependsOn:[SharedRowSelectionModule]},CellCustomStyleFeature=class extends BeanStub{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,i=e.colDef,o=i.cellClassRules,s=this.getCellClassParams(e,i);processClassRules(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,s,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=o}applyUserStyles(){const e=this.column,t=e.colDef,i=t.cellStyle;if(!i)return;let o;if(typeof i=="function"){const s=this.getCellClassParams(e,t);o=i(s)}else o=i;o&&this.cellComp.setUserStyles(o)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,i=e.colDef,o=this.getCellClassParams(e,i);for(const n of this.staticClasses)t.toggleCss(n,!1);const s=this.beans.cellStyles.getStaticCellClasses(i,o);this.staticClasses=s;for(const n of s)t.toggleCss(n,!0)}getCellClassParams(e,t){const{value:i,rowNode:o}=this.cellCtrl;return _addGridCommonParams(this.beans.gos,{value:i,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},CellStyleService=class extends BeanStub{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,i,o){processClassRules(this.beans.expressionSvc,void 0,e.cellClassRules,t,i,o),this.processStaticCellClasses(e,t,i)}getStaticCellClasses(e,t){const{cellClass:i}=e;if(!i)return[];let o;return typeof i=="function"?o=i(t):o=i,typeof o=="string"&&(o=[o]),o||[]}createCellCustomStyleFeature(e){return new CellCustomStyleFeature(e,this.beans)}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(s=>{i(s)})}},CellStyleModule={moduleName:"CellStyle",version:VERSION,beans:[CellStyleService]},RowStyleModule={moduleName:"RowStyle",version:VERSION,beans:[RowStyleService]},INITIAL_GRID_OPTION_KEYS={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,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,overlayComponent:!0,suppressOverlays:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!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,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},clientSide="clientSide",serverSide="serverSide",infinite="infinite",functionRowModels={onGroupExpandedOrCollapsed:[clientSide],refreshClientSideRowModel:[clientSide],isRowDataEmpty:[clientSide],forEachLeafNode:[clientSide],forEachNodeAfterFilter:[clientSide],forEachNodeAfterFilterAndSort:[clientSide],resetRowHeights:[clientSide,serverSide],applyTransaction:[clientSide],applyTransactionAsync:[clientSide],flushAsyncTransactions:[clientSide],getBestCostNodeSelection:[clientSide],getServerSideSelectionState:[serverSide],setServerSideSelectionState:[serverSide],applyServerSideTransaction:[serverSide],applyServerSideTransactionAsync:[serverSide],applyServerSideRowData:[serverSide],retryServerSideLoads:[serverSide],flushServerSideAsyncTransactions:[serverSide],refreshServerSide:[serverSide],getServerSideGroupLevelState:[serverSide],refreshInfiniteCache:[infinite],purgeInfiniteCache:[infinite],getInfiniteRowCount:[infinite],isLastRowIndexKnown:[infinite,serverSide],expandAll:[clientSide,serverSide],collapseAll:[clientSide,serverSide],onRowHeightChanged:[clientSide,serverSide],setRowCount:[infinite,serverSide],getCacheBlockState:[infinite,serverSide]},deprecatedFunctions={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function validateApiFunction(e,t,i){const o=deprecatedFunctions[e];if(o){const{version:n,new:r,old:l,message:a}=o,d=l??e;return(...c)=>{const u=r?`Please use ${r} instead. `:"";return _warnOnce(`Since ${n} api.${d} is deprecated. ${u}${a??""}`),t.apply(t,c)}}const s=functionRowModels[e];return s?(...n)=>{const r=i.rowModel.getType();if(!s.includes(r)){_errorOnce(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`);return}return t.apply(t,n)}:t}var DYNAMIC_BEAN_MODULES={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},ICON_VALUES={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,aasc:1,adesc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},ICON_MODULES={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",overlayLoading:"Overlay",overlayExporting:"Overlay",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},DEPRECATED_ICONS_V33=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),ValidationService=class extends BeanStub{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,provideValidationServiceLogger(getError)}warnOnInitialPropertyUpdate(e,t){e==="api"&&INITIAL_GRID_OPTION_KEYS[t]&&_warn(22,{key:t})}processGridOptions(e){this.processOptions(e,GRID_OPTIONS_VALIDATORS())}validateApiFunction(e,t){return validateApiFunction(e,t,this.beans)}missingUserComponent(e,t,i,o){const s=USER_COMP_MODULES[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):_warn(101,{propertyName:e,componentName:t,agGridDefaults:i,jsComps:o})}missingDynamicBean(e){const t=DYNAMIC_BEAN_MODULES[e];return t?_errMsg(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){DEPRECATED_ROW_NODE_EVENTS.has(e)&&_warn(10,{eventType:e})}validateIcon(e){if(DEPRECATED_ICONS_V33.has(e)&&_warn(43,{iconName:e}),ICON_VALUES[e])return;const t=ICON_MODULES[e];if(t){_error(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:_areModulesGridScoped(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}_warn(134,{iconName:e})}isProvidedUserComp(e){return!!USER_COMP_MODULES[e]}validateColDef(e){this.processOptions(e,COL_DEF_VALIDATORS())}processOptions(e,t){const{validations:i,deprecations:o,allProperties:s,propertyExceptions:n,objectName:r,docsUrl:l}=t;s&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(o)],s,r,l);const a=new Set;if(Object.keys(e).forEach(c=>{const u=o[c];if(u){const{message:v,version:w}=u;a.add(`As of v${w}, ${String(c)} is deprecated. ${v??""}`)}const h=e[c];if(h==null||h===!1)return;const g=i[c];if(!g)return;const{dependencies:p,validate:f,supportedRowModels:m,expectedType:C}=g;if(C){const v=typeof h;if(v!==C){a.add(`${String(c)} should be of type '${C}' but received '${v}' (${h}).`);return}}if(m){const v=this.gridOptions.rowModelType??"clientSide";if(!m.includes(v)){a.add(`${String(c)} is not supported with the '${v}' row model. It is only valid with: ${m.join(", ")}.`);return}}if(p){const v=this.checkForRequiredDependencies(c,p,e);if(v){a.add(v);return}}if(f){const v=f(e,this.gridOptions,this.beans);if(v){a.add(v);return}}}),a.size>0)for(const c of a)_warnOnce(c)}checkForRequiredDependencies(e,t,i){const s=Object.entries(t).filter(([n,r])=>{const l=i[n];return!r.required.includes(l)});return s.length===0?null:s.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(l=>l===null?"null":l===void 0?"undefined":l).join(", ")}]. ${r.reason??""}`).join(`
|
|
`)}checkProperties(e,t,i,o,s){const n=["__ob__","__v_skip","__metadata__"],r=_fuzzyCheckStrings(Object.getOwnPropertyNames(e),[...n,...t,...i],i),l=Object.keys(r);for(const a of l){const d=r[a];let c=`invalid ${o} property '${a}' did you mean any of these: ${d.slice(0,8).join(", ")}.`;i.includes("context")&&(c+=`
|
|
If you are trying to annotate ${o} with application data, use the '${o}.context' property instead.`),_warnOnce(c)}if(l.length>0&&s){const a=this.beans.frameworkOverrides.getDocLink(s);_warnOnce(`to see all the valid ${o} properties please check: ${a}`)}}};function _fuzzyCheckStrings(e,t,i){const o={},s=e.filter(n=>!t.some(r=>r===n));if(s.length>0)for(const n of s)o[n]=_fuzzySuggestions({inputValue:n,allSuggestions:i}).values;return o}var DEPRECATED_ROW_NODE_EVENTS=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),ValidationModule={moduleName:"Validation",version:VERSION,beans:[ValidationService]},AllCommunityModule={moduleName:"AllCommunity",version:VERSION,dependsOn:[ClientSideRowModelModule,CsvExportModule,InfiniteRowModelModule,ValidationModule,TextEditorModule,NumberEditorModule,DateEditorModule,CheckboxEditorModule,SelectEditorModule,LargeTextEditorModule,CustomEditorModule,UndoRedoEditModule,TextFilterModule,NumberFilterModule,BigIntFilterModule,DateFilterModule,CustomFilterModule,QuickFilterModule,ExternalFilterModule,GridStateModule,AlignedGridsModule,PaginationModule,ColumnApiModule,RowApiModule,ScrollApiModule,RenderApiModule,ColumnAutoSizeModule,RowDragModule,PinnedRowModule,RowSelectionModule,ValueCacheModule,CellStyleModule,ColumnHoverModule,RowStyleModule,EventApiModule,CellApiModule,HighlightChangesModule,TooltipModule,LocaleModule,RowAutoHeightModule,DragAndDropModule,ClientSideRowModelApiModule,CellSpanModule]};function formatTestId(e,t={}){const i=Object.keys(t).map(o=>{const s=t[o];return s!=null?`${o}=${s}`:null}).filter(Boolean).join(";");return[e,i].filter(o=>o.length>0).join(":")}var agTestIdFor={grid(e){return formatTestId("ag-grid-root",{gridId:e})},headerGroupCell(e){return formatTestId("ag-header-group-cell",{colId:e})},headerCell(e){return formatTestId("ag-header-cell",{colId:e})},headerCheckbox(e){return formatTestId("ag-header-selection-checkbox",{colId:e})},headerFilterButton(e){return formatTestId("ag-header-cell-filter-button",{colId:e})},floatingFilter(e){return formatTestId("ag-floating-filter",{colId:e})},floatingFilterButton(e){return formatTestId("ag-floating-filter-button",{colId:e})},headerCellMenuButton(e){return formatTestId("ag-header-cell-menu-button",{colId:e})},headerResizeHandle(e){return formatTestId("ag-header-cell-resize",{colId:e})},filterInstancePickerDisplay(e){return formatTestId(`ag-${e.source}-picker-display`,prepFilterSpec(e))},numberFilterInstanceInput(e){return formatTestId(`ag-${e.source}-number-input`,prepFilterSpec(e))},textFilterInstanceInput(e){return formatTestId(`ag-${e.source}-text-input`,prepFilterSpec(e))},dateFilterInstanceInput(e){return formatTestId(`ag-${e.source}-date-input`,prepFilterSpec(e))},setFilterInstanceMiniFilterInput(e){return formatTestId(`ag-${e.source}-set-filter-mini-filter-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceItem(e,t){return formatTestId(`ag-${e.source}-set-filter-item`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,itemLabel:t}:{colId:e.colId,itemLabel:t})},setFilterApplyPanelButton(e,t){return formatTestId(`ag-${e.source}-set-filter-apply-panel-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},filterConditionRadioButton(e,t){return formatTestId(`ag-${e.source}-filter-condition-radio-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},advancedFilterInput(){return formatTestId("ag-advanced-filter-input")},advancedFilterButton(e){return formatTestId("ag-advanced-filter-button",{label:e})},advancedFilterBuilderButton(){return formatTestId("ag-advanced-filter-builder-button")},advancedFilterPanelMaximiseButton(){return formatTestId("ag-advanced-filter-builder-panel-maximise")},advancedFilterPanelCloseButton(){return formatTestId("ag-advanced-filter-builder-panel-close")},advancedFilterPill(e){return formatTestId("ag-advanced-filter-builder-pill",{label:e})},advancedFilterBuilderAddItemButton(){return formatTestId("ag-advanced-filter-builder-add-item-button")},rowNode(e){return formatTestId("ag-row",{"row-id":e})},cell(e,t){return formatTestId("ag-cell",{"row-id":e,colId:t})},autoGroupCell(e){return agTestIdFor.cell(e,GROUP_AUTO_COLUMN_ID)},checkbox(e,t){return formatTestId("ag-selection-checkbox",{"row-id":e,colId:t})},selectionColumnCheckbox(e){return agTestIdFor.checkbox(e,SELECTION_COLUMN_ID)},autoGroupColumnCheckbox(e){return agTestIdFor.checkbox(e,GROUP_AUTO_COLUMN_ID)},dragHandle(e,t){return formatTestId("ag-drag-handle",{"row-id":e,colId:t})},groupContracted(e,t){return formatTestId("ag-group-contracted",{"row-id":e,colId:t})},groupExpanded(e,t){return formatTestId("ag-group-expanded",{"row-id":e,colId:t})},autoGroupContracted(e){return agTestIdFor.groupContracted(e,GROUP_AUTO_COLUMN_ID)},autoGroupExpanded(e){return agTestIdFor.groupExpanded(e,GROUP_AUTO_COLUMN_ID)},rowNumber(e){return agTestIdFor.cell(e,ROW_NUMBERS_COLUMN_ID)},menu(){return formatTestId("ag-menu")},menuOption(e){return formatTestId("ag-menu-option",{option:e})},sideBar(){return formatTestId("ag-side-bar")},sideBarButton(e){return formatTestId("ag-side-button",{label:e})},columnToolPanel(){return formatTestId("ag-column-panel")},pivotModeSelect(){return formatTestId("ag-pivot-mode-select")},columnPanelSelectHeaderCheckbox(){return formatTestId("ag-column-panel-select-header-checkbox")},columnPanelSelectHeaderFilter(){return formatTestId("ag-column-panel-select-header-filter")},columnSelectListItemGroupClosedIcon(e){return formatTestId("ag-column-select-list-item-group-closed-icon",{label:e})},columnSelectListItemCheckbox(e){return formatTestId("ag-column-select-list-item-checkbox",{label:e})},columnSelectListItemDragHandle(e){return formatTestId("ag-column-select-list-item-drag-handle",{label:e})},columnDropCellDragHandle(e,t,i){return formatTestId("ag-column-drop-cell-drag-handle",{source:e,area:t,label:i})},columnDropCellCancelButton(e,t,i){return formatTestId("ag-column-drop-cell-cancel",{source:e,area:t,label:i})},columnDropArea(e,t){return formatTestId("ag-column-drop-area",{source:e,name:t})},filterToolPanel(){return formatTestId("ag-filter-panel")},filterToolPanelAddFilterButton(){return formatTestId("ag-filter-panel-add-filter-button")},filterToolPanelFilterTypeSelector(e){return formatTestId("ag-filter-panel-filter-type-selector",{colLabel:e})},filterToolPanelSearchInput(){return formatTestId("ag-filter-toolpanel-search-input")},filterToolPanelGroup(e){return formatTestId("ag-filter-toolpanel-group",{title:e})},filterToolPanelGroupCollapsedIcon(e){return formatTestId("ag-filter-toolpanel-group-collapsed-icon",{title:e})},statusBarTotalAndFilteredRowCount(){return formatTestId("ag-status-bar-total-and-filtered-row-count")},statusBarTotalRowCount(){return formatTestId("ag-status-bar-total-row-count")},statusBarFilteredRowCount(){return formatTestId("ag-status-bar-filtered-row-count")},statusBarSelectedRowCount(){return formatTestId("ag-status-bar-selected-row-count")},statusBarAggregations(){return formatTestId("ag-status-bar-aggregations")},paginationPanelSizePickerDisplay(e){return formatTestId("ag-pagination-page-size-picker-field-display",{value:e})},paginationPanelFirstRowOnPage(e){return formatTestId("ag-paging-row-summary-panel-first-row-on-page",{value:e})},paginationPanelLastRowOnPage(e){return formatTestId("ag-paging-row-summary-panel-last-row-on-page",{value:e})},paginationPanelRecordCount(e){return formatTestId("ag-paging-row-summary-panel-record-count",{value:e})},paginationSummaryPanelButton(e){return formatTestId("ag-paging-page-summary-panel-btn",{label:e})},paginationSummaryPanelCurrentPage(e){return formatTestId("ag-paging-page-summary-panel-current-page",{value:e})},paginationSummaryPanelTotalPage(e){return formatTestId("ag-paging-page-summary-panel-total-page",{value:e})},fillHandle(){return formatTestId("ag-fill-handle")},columnChooserCloseButton(){return formatTestId("ag-column-chooser-close-button")},columnChooserSearchBarCheckbox(){return formatTestId("ag-column-chooser-header-checkbox")},columnChooserSearchBarFilter(){return formatTestId("ag-column-chooser-searchbar-filter")},columnChooserListItemGroupClosedIcon(e){return formatTestId("ag-column-chooser-list-item-group-closed-icon",{label:e})},columnChooserListItemCheckbox(e){return formatTestId("ag-column-chooser-list-item-checkbox",{label:e})},columnChooserListItemDragHandle(e){return formatTestId("ag-column-chooser-list-item-drag-handle",{label:e})},overlay(){return formatTestId("ag-overlay")}},wrapAgTestIdFor=e=>{const t={},i=Object.keys(agTestIdFor);for(const o of i)t[o]=(...s)=>e(agTestIdFor[o](...s));return t};function mapKeys(e,t){return Object.fromEntries(Object.entries(e).reduce((i,[o,s])=>(t[o]!==null&&i.push([t[o]??o,s]),i),[]))}function applySpecDefaults(e){return e.source!=="floating-filter"?{index:0,...e}:e}function prepFilterSpec(e){return mapKeys(applySpecDefaults(e),{colLabel:"label"})}var TEST_ID_ATTR="data-testid";function setTestId(e,t){e?.setAttribute(TEST_ID_ATTR,t)}function setTestIdAttribute(e){TEST_ID_ATTR=e}var TestIdService=class extends BeanStub{constructor(){super(...arguments),this.beanName="testIdSvc"}postConstruct(){const e=_debounce(this,()=>this.setupAllTestIds(),500),t=_debounce(this,()=>{this.setupAllTestIds(),e()},0);this.addManagedEventListeners({firstDataRendered:t,displayedRowsChanged:t,displayedColumnsChanged:t,displayedColumnsWidthChanged:t,virtualColumnsChanged:t,columnMenuVisibleChanged:t,contextMenuVisibleChanged:t,advancedFilterBuilderVisibleChanged:t,fieldPickerValueSelected:t,modelUpdated:t,sideBarUpdated:t,pinnedHeightChanged:t,gridReady:t,overlayExclusiveChanged:t,rowGroupOpened:t,scrollVisibilityChanged:t,gridSizeChanged:t,filterOpened:t,filterChanged:t,cellSelectionChanged:t})}setupAllTestIds(){const e=_getRootNode(this.beans),t=getGridId(this.beans),i=e.querySelector(`[grid-id="${t}"]`);setTestId(i,agTestIdFor.grid(t)),e.querySelectorAll(".ag-header-group-cell").forEach(n=>{setTestId(n,agTestIdFor.headerGroupCell(n.getAttribute("col-id")))}),e.querySelectorAll(".ag-header-cell").forEach(n=>{const r=n.getAttribute("col-id"),a=n.classList.contains("ag-floating-filter")?agTestIdFor.floatingFilter(r):agTestIdFor.headerCell(r);setTestId(n,a),setTestId(n.querySelector(".ag-header-cell-filter-button"),agTestIdFor.headerFilterButton(r)),setTestId(n.querySelector(".ag-header-cell-menu-button"),agTestIdFor.headerCellMenuButton(r)),setTestId(n.querySelector(".ag-header-cell-resize"),agTestIdFor.headerResizeHandle(r)),setTestId(n.querySelector(".ag-checkbox input[type=checkbox]"),agTestIdFor.headerCheckbox(r)),setTestId(n.querySelector(".ag-floating-filter-button button"),agTestIdFor.floatingFilterButton(r)),this.setupFilterInstance(n.querySelector(".ag-floating-filter-body"),{source:"floating-filter",colId:r})});const o=e.querySelector(".ag-filter-menu");this.setupFilterInstance(o,{source:"column-filter"}),setTestId(e.querySelector(".ag-advanced-filter input[type=text]"),agTestIdFor.advancedFilterInput()),e.querySelectorAll(".ag-advanced-filter-buttons button").forEach(n=>{setTestId(n,agTestIdFor.advancedFilterButton(n.textContent))}),setTestId(e.querySelector("button.ag-advanced-filter-builder-button"),agTestIdFor.advancedFilterBuilderButton()),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-panel-title-bar-button').forEach((n,r)=>{setTestId(n,r===0?agTestIdFor.advancedFilterPanelMaximiseButton():agTestIdFor.advancedFilterPanelCloseButton())}),e.querySelectorAll('.ag-panel[aria-lable="Advanced Filter"] .ag-advanced-filter-builder-pill').forEach(n=>{setTestId(n,agTestIdFor.advancedFilterPill(n.querySelector(".ag-picker-field-display")?.textContent))}),setTestId(e.querySelector('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-item-button'),agTestIdFor.advancedFilterBuilderAddItemButton()),e.querySelectorAll(".ag-row").forEach(n=>{const r=n.getAttribute("row-id");setTestId(n,agTestIdFor.rowNode(r)),n.querySelectorAll(".ag-cell").forEach(l=>{const a=l.getAttribute("col-id");setTestId(l,agTestIdFor.cell(r,a)),setTestId(l.querySelector(".ag-selection-checkbox input[type=checkbox]"),agTestIdFor.checkbox(r,a)),setTestId(l.querySelector(".ag-drag-handle"),agTestIdFor.dragHandle(r,a)),setTestId(l.querySelector(".ag-group-contracted"),agTestIdFor.groupContracted(r,a)),setTestId(l.querySelector(".ag-group-expanded"),agTestIdFor.groupExpanded(r,a))})}),e.querySelectorAll(".ag-menu-list").forEach(n=>{setTestId(n,agTestIdFor.menu()),n.querySelectorAll(".ag-menu-option").forEach(r=>{setTestId(r,agTestIdFor.menuOption(r.querySelector(".ag-menu-option-text")?.textContent))})}),e.querySelectorAll(".ag-side-bar").forEach(n=>{setTestId(n,agTestIdFor.sideBar()),n.querySelectorAll(".ag-side-button button").forEach(r=>{setTestId(r,agTestIdFor.sideBarButton(r.querySelector(".ag-side-button-label")?.textContent))}),n.querySelectorAll(".ag-column-panel").forEach(r=>{setTestId(r,agTestIdFor.columnToolPanel()),setTestId(r.querySelector(".ag-pivot-mode-select input[type=checkbox]"),agTestIdFor.pivotModeSelect()),setTestId(r.querySelector(".ag-column-select-header-checkbox input[type=checkbox]"),agTestIdFor.columnPanelSelectHeaderCheckbox()),setTestId(r.querySelector(".ag-column-select-header-filter-wrapper input[type=text]"),agTestIdFor.columnPanelSelectHeaderFilter()),r.querySelectorAll(".ag-column-select-list").forEach(l=>{l.querySelectorAll(".ag-column-select-virtual-list-item").forEach(a=>{const d=a.getAttribute("aria-label");setTestId(a.querySelector(".ag-column-group-closed-icon"),agTestIdFor.columnSelectListItemGroupClosedIcon(d)),setTestId(a.querySelector(".ag-column-select-checkbox input[type=checkbox]"),agTestIdFor.columnSelectListItemCheckbox(d)),setTestId(a.querySelector(".ag-drag-handle"),agTestIdFor.columnSelectListItemDragHandle(d))})}),this.setupColumnDropArea(r,"toolbar")}),n.querySelectorAll(".ag-filter-panel").forEach(r=>{setTestId(r,agTestIdFor.filterToolPanel()),setTestId(r.querySelector("button.ag-filter-add-button"),agTestIdFor.filterToolPanelAddFilterButton()),r.querySelectorAll(".ag-filter-card").forEach(l=>{const a=l.querySelector(".ag-filter-card-title")?.textContent,d=l.querySelector(".ag-filter-type-select");setTestId(d,agTestIdFor.filterToolPanelFilterTypeSelector(a)),l.querySelectorAll(".ag-filter").forEach(c=>this.setupFilterInstance(c,{source:"filter-toolpanel",colLabel:a}))})}),n.querySelectorAll(".ag-filter-toolpanel").forEach(r=>{setTestId(r.querySelector(".ag-filter-toolpanel-search-input input[type=text]"),agTestIdFor.filterToolPanelSearchInput()),r.querySelectorAll(".ag-filter-toolpanel-group").forEach(l=>{const a=l.querySelector(".ag-filter-toolpanel-group-title")?.textContent;setTestId(l,agTestIdFor.filterToolPanelGroup(a)),setTestId(l.querySelector(".ag-filter-toolpanel-group-title-bar-icon .ag-icon-tree-closed"),agTestIdFor.filterToolPanelGroupCollapsedIcon(a));const d=l.querySelector(".ag-filter-toolpanel-instance-filter");d&&this.setupFilterInstance(d,{source:"filter-toolpanel",colLabel:a})})})}),setTestId(e.querySelector(".ag-status-bar .ag-status-panel-total-and-filtered-row-count"),agTestIdFor.statusBarTotalAndFilteredRowCount()),setTestId(e.querySelector(".ag-status-bar .ag-status-panel-total-row-count"),agTestIdFor.statusBarTotalRowCount()),setTestId(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),agTestIdFor.statusBarFilteredRowCount()),setTestId(e.querySelector(".ag-status-bar .ag-status-panel-selected-row-count"),agTestIdFor.statusBarSelectedRowCount()),setTestId(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),agTestIdFor.statusBarAggregations()),e.querySelectorAll(".ag-paging-panel").forEach(n=>{setTestId(n.querySelector(".ag-paging-page-size .ag-picker-field-display"),agTestIdFor.paginationPanelSizePickerDisplay(n.querySelector(".ag-paging-page-size .ag-picker-field-display")?.textContent)),n.querySelectorAll(".ag-paging-row-summary-panel-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbFirstRowOnPage":setTestId(r,agTestIdFor.paginationPanelFirstRowOnPage(r.textContent));break;case"lbLastRowOnPage":setTestId(r,agTestIdFor.paginationPanelLastRowOnPage(r.textContent));break;case"lbRecordCount":setTestId(r,agTestIdFor.paginationPanelRecordCount(r.textContent));break}}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-button").forEach(r=>{setTestId(r,agTestIdFor.paginationSummaryPanelButton(r.getAttribute("aria-label")?.toLowerCase()))}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-paging-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbCurrent":setTestId(r,agTestIdFor.paginationSummaryPanelCurrentPage(r.textContent));break;case"lbTotal":setTestId(r,agTestIdFor.paginationSummaryPanelTotalPage(r.textContent));break}})}),setTestId(e.querySelector(".ag-fill-handle"),agTestIdFor.fillHandle()),e.querySelectorAll('.ag-panel[aria-label="Choose Columns"]').forEach(n=>{setTestId(n.querySelector(".ag-panel-title-bar-button-icon"),agTestIdFor.columnChooserCloseButton()),setTestId(n.querySelector('.ag-column-select-header-checkbox input[type="checkbox"]'),agTestIdFor.columnChooserSearchBarCheckbox()),setTestId(n.querySelector('.ag-column-select-header-filter-wrapper input[type="text"]'),agTestIdFor.columnChooserSearchBarFilter()),n.querySelectorAll(".ag-column-select-list").forEach(r=>{r.querySelectorAll(".ag-column-select-virtual-list-item").forEach(l=>{const a=l.getAttribute("aria-label");setTestId(l.querySelector(".ag-column-group-closed-icon"),agTestIdFor.columnChooserListItemGroupClosedIcon(a)),setTestId(l.querySelector(".ag-column-select-checkbox input[type=checkbox]"),agTestIdFor.columnChooserListItemCheckbox(a)),setTestId(l.querySelector(".ag-drag-handle"),agTestIdFor.columnChooserListItemDragHandle(a))})})}),setTestId(e.querySelector(".ag-overlay-wrapper"),agTestIdFor.overlay());const s=e.querySelector(".ag-column-drop-wrapper");s&&this.setupColumnDropArea(s,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(s=>{setTestId(s,agTestIdFor.filterInstancePickerDisplay(t))});const i=t.source==="floating-filter"?".ag-floating-filter-body":".ag-filter-body";e.querySelectorAll(`${i} .ag-input-field:not(.ag-hidden) input[type="number"]`).forEach((s,n,r)=>{const a=r.length>1?{...t,index:n}:t;setTestId(s,agTestIdFor.numberFilterInstanceInput(a))}),e.querySelectorAll(`${i} .ag-input-field:not(.ag-hidden) input[type="text"]`).forEach((s,n,r)=>{const a=r.length>1?{...t,index:n}:t;setTestId(s,agTestIdFor.textFilterInstanceInput(a))}),e.querySelectorAll(`${i} .ag-input-field:not(.ag-hidden) input[type="date"]`).forEach((s,n,r)=>{const a=r.length>1?{...t,index:n}:t;setTestId(s,agTestIdFor.dateFilterInstanceInput(a))});const o=e.querySelector('.ag-mini-filter input[type="text"]');setTestId(o,agTestIdFor.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(s=>{const n=s.querySelector(".ag-checkbox-label")?.textContent,r=s.querySelector('input[type="checkbox"]');setTestId(r,agTestIdFor.setFilterInstanceItem(t,n))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(s=>{setTestId(s,agTestIdFor.setFilterApplyPanelButton(t,s.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(s=>{const n=s.querySelector(".ag-radio-button-label")?.textContent;setTestId(s.querySelector("input[type=radio]"),agTestIdFor.filterConditionRadioButton(t,n))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(i=>{const o=i.querySelector(".ag-column-drop-list")?.getAttribute("aria-label");setTestId(i,agTestIdFor.columnDropArea(t,o)),i.querySelectorAll(".ag-column-drop-cell").forEach(s=>{const n=s.querySelector(".ag-column-drop-cell-text")?.textContent;setTestId(s.querySelector(".ag-drag-handle"),agTestIdFor.columnDropCellDragHandle(t,o,n)),setTestId(s.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),agTestIdFor.columnDropCellCancelButton(t,o,n))})})}},TestingModule={moduleName:"Testing",version:VERSION,beans:[TestIdService]};function setupAgTestIds({testIdAttribute:e}={}){e&&setTestIdAttribute(e),ModuleRegistry.registerModules([TestingModule])}var BaseColsService=class extends BeanStub{constructor(){super(...arguments),this.dispatchColumnChangedEvent=dispatchColumnChangedEvent,this.columns=[],this.columnIndexMap={},this.updateIndexMap=()=>{this.columnIndexMap={},this.columns.forEach((e,t)=>this.columnIndexMap[e.getId()]=t)}}wireBeans(e){this.colModel=e.colModel,this.aggFuncSvc=e.aggFuncSvc,this.visibleCols=e.visibleCols,this.groupHierarchCols=e.groupHierarchyColSvc}sortColumns(e){const{groupHierarchCols:t}=this;this.columns.sort((i,o)=>t?.compareVirtualColumns(i,o)??e(i,o)),this.updateIndexMap()}setColumns(e,t){this.setColList(e,this.columns,this.eventName,!0,!0,this.columnProcessors.set,t)}addColumns(e,t){this.updateColList(e,this.columns,!0,!0,this.columnProcessors.add,this.eventName,t)}removeColumns(e,t){this.updateColList(e,this.columns,!1,!0,this.columnProcessors.remove,this.eventName,t)}getColumnIndex(e){return this.columnIndexMap[e]}setColList(e=[],t,i,o,s,n,r){const l=this.colModel.getCols();if(!l||l.length===0)return;const a=new Map;t.forEach((c,u)=>a.set(c,u)),t.length=0;for(const c of e){const u=this.colModel.getColDefCol(c);u&&t.push(u)}t.forEach((c,u)=>{const h=a.get(c);if(h===void 0){a.set(c,0);return}o&&h!==u||a.delete(c)}),this.updateIndexMap();const d=this.colModel.getColDefCols();for(const c of d??[]){const u=t.indexOf(c)>=0;n(c,u,r)}s&&this.colModel.refreshCols(!1,r),this.visibleCols.refresh(r),this.dispatchColumnChangedEvent(this.eventSvc,i,[...a.keys()],r)}updateColList(e=[],t,i,o,s,n,r){if(!e||e.length===0)return;let l=!1;const a=new Set;for(const c of e){if(!c)continue;const u=this.colModel.getColDefCol(c);if(u){if(a.add(u),i){if(t.indexOf(u)>=0)continue;t.push(u)}else{const h=t.indexOf(u);if(h<0)continue;for(let g=h+1;g<t.length;g++)a.add(t[g]);_removeFromArray(t,u)}s(u,i,r),l=!0}}if(!l)return;this.updateIndexMap(),o&&this.colModel.refreshCols(!1,r),this.visibleCols.refresh(r);const d=Array.from(a);this.eventSvc.dispatchEvent({type:n,columns:d,column:d.length===1?d[0]:null,source:r})}extractCols(e,t=[]){const i=this.columns,o=[],s=[],{setFlagFunc:n,getIndexFunc:r,getInitialIndexFunc:l,getValueFunc:a,getInitialValueFunc:d}=this.columnExtractors,c=this.colModel.getColDefCols();for(const f of c??[]){const m=!t.includes(f),C=f.getColDef(),v=a(C),w=d(C),S=r(C),b=l(C);let y;v!==void 0?y=v:S!==void 0?S===null?y=!1:y=S>=0:m?w!==void 0?y=w:b!==void 0?y=b!=null&&b>=0:y=!1:y=i.indexOf(f)>=0,y&&((m?S!=null||b!=null:S!=null)?o.push(f):s.push(f))}const u=f=>{const m=f.getColDef();return r(m)??l(m)};o.sort((f,m)=>u(f)-u(m));const h=[],g=this.groupHierarchCols,p=f=>{g?g.expandColumnInto(h,f):h.push(f)};o.forEach(p);for(const f of i)s.indexOf(f)>=0&&p(f);for(const f of s)h.indexOf(f)<0&&p(f);for(const f of i)h.indexOf(f)<0&&n(f,!1,e);for(const f of h)i.indexOf(f)<0&&n(f,!0,e);return this.columns=h,this.updateIndexMap(),this.columns}restoreColumnOrder(e,t){const i=this.columns,o=this.colModel.getColDefCols();if(!i.length||!o)return e;const s=Object.keys(t),n=new Set(s),r=new Set(s),l=new Set(i.map(w=>{const S=w.getColId();return r.delete(S),S}).concat(s)),a=[],d={};let c=0;for(let w=0;w<o.length;w++){const S=o[w].getColId();l.has(S)&&(a.push(S),d[S]=c++)}let u=1e3,h=!1,g=0;const p=this.columnOrdering.enableProp,f=this.columnOrdering.initialEnableProp,m=this.columnOrdering.indexProp,C=this.columnOrdering.initialIndexProp,v=w=>{const S=d[w];for(let b=g;b<S;b++){const y=a[b];r.has(y)&&(t[y][m]=u++,r.delete(y))}g=S};for(const w of i){const S=w.getColId();if(n.has(S))v(S),t[S][m]=u++;else{const b=w.getColDef();if(b[m]===null||b[m]===void 0&&b[C]==null){if(!h)if(b[p]||b[p]===void 0&&b[f])v(S);else{for(const E of r)t[E][m]=u+d[E];u+=a.length,h=!0}e[S]||(e[S]={colId:S}),e[S][m]=u++}}}return e}},BaseComponentWrapper=class{wrap(e,t,i,o){const s=this.createWrapper(e,o);for(const n of t??[])this.createMethod(s,n,!0);for(const n of i??[])this.createMethod(s,n,!1);return s}createMethod(e,t,i){e.addMethod(t,this.createMethodProxy(e,t,i))}createMethodProxy(e,t,i){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(i&&_warn(49,{methodName:t}),null)}}},TabGuardCtrl=class extends AgTabGuardCtrl{constructor(e){super(e,STOP_PROPAGATION_CALLBACKS)}},TabGuardFeature=class extends AgTabGuardFeature{constructor(e){super(e,STOP_PROPAGATION_CALLBACKS)}},agContentEditableFieldCSS=".ag-content-editable-field{align-items:center;display:flex}.ag-content-editable-field-input{background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);cursor:text;display:block;flex:1 1 auto;line-height:normal;outline:none;overflow:auto;overflow-y:hidden;padding:0 var(--ag-input-padding-start);white-space:nowrap;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-content-editable-field-input::-webkit-scrollbar{display:none!important}.ag-wrapper.ag-content-editable-field-input{line-height:var(--ag-internal-content-line-height)}.ag-content-editable-field-input:where(:focus,:focus-within){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color)}:where(.ag-content-editable-field.ag-disabled .ag-content-editable-field-input){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}.ag-content-editable-field-input:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}",AgContentEditableFieldElement={tag:"div",cls:"ag-content-editable-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-content-editable-field-input",attrs:{contenteditable:"plaintext-only"}}]},AgContentEditableField=class extends AgAbstractField{constructor(e){super(e,AgContentEditableFieldElement,[],e?.className),this.eLabel=RefPlaceholder,this.eWrapper=RefPlaceholder,this.renderValueToElement=e?.renderValueToElement??!0,this.registerCSS(agContentEditableFieldCSS)}postConstruct(){super.postConstruct(),this.setupEditable(),this.setupAria(),this.addManagedElementListeners(this.eWrapper,{input:()=>this.syncValueFromDom(),blur:()=>this.syncValueFromDom(!0)}),this.renderValueToElement&&this.value!=null&&this.refreshDisplayedValue(this.value)}setupAria(){const e=this.getAriaElement();_setAriaRole(e,this.config.ariaRole??"textbox"),e.setAttribute("tabindex",this.gos.get("tabIndex").toString())}setupEditable(){const e=this.config.contentEditable??"plaintext-only";e===!1?this.eWrapper.removeAttribute("contenteditable"):e===!0?this.eWrapper.setAttribute("contenteditable","true"):this.eWrapper.setAttribute("contenteditable",e)}setValue(e,t){const i=super.setValue(e,t);return this.renderValueToElement&&!t&&this.refreshDisplayedValue(e),i}setRenderValueToElement(e){this.renderValueToElement=e}setDisplayedValue(e){this.refreshDisplayedValue(e??"")}getContentElement(){return this.eWrapper}refreshDisplayedValue(e){this.eWrapper.textContent=e??""}syncValueFromDom(e){super.setValue(this.eWrapper.textContent??"",e)}getFocusableElement(){return this.eWrapper}},AgContentEditableFieldSelector={selector:"AG-CONTENT-EDITABLE-FIELD",component:AgContentEditableField},agToggleButtonCSS='.ag-toggle-button{flex:none;min-width:unset;width:unset}.ag-toggle-button-input-wrapper{background-color:var(--ag-toggle-button-off-background-color);border-radius:calc(var(--ag-toggle-button-height)*.5);flex:none;height:var(--ag-toggle-button-height);max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);position:relative;transition:background-color .1s;:where(.ag-toggle-button-input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-toggle-button-height);margin:0;max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);opacity:0}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color)}&.ag-disabled{opacity:.5}}.ag-toggle-button-input-wrapper:before{background-color:var(--ag-toggle-button-switch-background-color);border-radius:100%;content:"";display:block;height:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2);left:var(--ag-toggle-button-switch-inset);pointer-events:none;position:absolute;top:var(--ag-toggle-button-switch-inset);transition:left .1s;width:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2)}.ag-toggle-button-input-wrapper.ag-checked:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-switch-inset))}.ag-toggle-button-input-wrapper:focus-within{box-shadow:var(--ag-focus-shadow)}',AgToggleButton=class extends AgCheckbox{constructor(e){super(e,"ag-toggle-button"),this.registerCSS(agToggleButtonCSS)}setValue(e,t){return super.setValue(e,t),this.toggleCss("ag-selected",this.getValue()),this}},AgToggleButtonSelector={selector:"AG-TOGGLE-BUTTON",component:AgToggleButton};
|