ag-grid-community 33.2.0 → 33.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55961,7 +55961,7 @@ exports.VanillaFrameworkOverrides = VanillaFrameworkOverrides;
55961
55961
  Object.defineProperty(exports, "__esModule", ({ value: true }));
55962
55962
  exports.VERSION = void 0;
55963
55963
  // DO NOT UPDATE MANUALLY: Generated from script during build time
55964
- exports.VERSION = '33.2.0';
55964
+ exports.VERSION = '33.2.1';
55965
55965
 
55966
55966
 
55967
55967
  /***/ }),
@@ -1278,7 +1278,7 @@ function _waitUntil(condition, callback, timeout = 100, timeoutMessage) {
1278
1278
  }
1279
1279
 
1280
1280
  // packages/ag-grid-community/src/version.ts
1281
- var VERSION = "33.2.0";
1281
+ var VERSION = "33.2.1";
1282
1282
 
1283
1283
  // packages/ag-grid-community/src/validation/logging.ts
1284
1284
  var MAX_URL_LENGTH = 2e3;
@@ -1,7 +1,7 @@
1
1
  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,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of __getOwnPropNames(t))!__hasOwnProp.call(e,o)&&o!==i&&__defProp(e,o,{get:()=>t[o],enumerable:!(s=__getOwnPropDesc(t,o))||s.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),main_exports={};__export(main_exports,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>ALWAYS_SYNC_GLOBAL_EVENTS,AbstractClientSideNodeManager:()=>AbstractClientSideNodeManager,AgAbstractInputField:()=>AgAbstractInputField,AgAbstractLabel:()=>AgAbstractLabel,AgCheckbox:()=>AgCheckbox,AgCheckboxSelector:()=>AgCheckboxSelector,AgColumn:()=>AgColumn,AgColumnGroup:()=>AgColumnGroup,AgInputDateField:()=>AgInputDateField,AgInputNumberField:()=>AgInputNumberField,AgInputNumberFieldSelector:()=>AgInputNumberFieldSelector,AgInputTextArea:()=>AgInputTextArea,AgInputTextField:()=>AgInputTextField,AgInputTextFieldSelector:()=>AgInputTextFieldSelector,AgPickerField:()=>AgPickerField,AgPromise:()=>AgPromise,AgProvidedColumnGroup:()=>AgProvidedColumnGroup,AgRadioButton:()=>AgRadioButton,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,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,DragAndDropModule:()=>DragAndDropModule,DragSourceType:()=>DragSourceType,EventApiModule:()=>EventApiModule,ExternalFilterModule:()=>ExternalFilterModule,FakeHScrollComp:()=>FakeHScrollComp,FakeVScrollComp:()=>FakeVScrollComp,FilterWrapperComp:()=>FilterWrapperComp,GROUP_AUTO_COLUMN_ID:()=>GROUP_AUTO_COLUMN_ID,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,PinnedRowModule:()=>PinnedRowModule,PopupComponent:()=>PopupComponent,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,ScrollApiModule:()=>ScrollApiModule,SelectEditorModule:()=>SelectEditorModule,ServerSideTransactionResultStatus:()=>ServerSideTransactionResultStatus,TabGuardClassNames:()=>TabGuardClassNames,TabGuardComp:()=>TabGuardComp,TabGuardCtrl:()=>TabGuardCtrl,TabGuardFeature:()=>TabGuardFeature,TextEditorModule:()=>TextEditorModule,TextFilterModule:()=>TextFilterModule,TooltipFeature:()=>TooltipFeature,TooltipModule:()=>TooltipModule,TouchListener:()=>TouchListener,UndoRedoEditModule:()=>UndoRedoEditModule,ValidationModule:()=>ValidationModule,ValueCacheModule:()=>ValueCacheModule,VanillaFrameworkOverrides:()=>VanillaFrameworkOverrides,_ALL_EVENTS:()=>_ALL_EVENTS,_ALL_GRID_OPTIONS:()=>_ALL_GRID_OPTIONS,_BOOLEAN_MIXED_GRID_OPTIONS:()=>_BOOLEAN_MIXED_GRID_OPTIONS,_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,_HeaderComp:()=>HeaderComp,_HorizontalResizeModule:()=>HorizontalResizeModule,_KeyboardNavigationModule:()=>KeyboardNavigationModule,_PUBLIC_EVENTS:()=>_PUBLIC_EVENTS,_PopupModule:()=>PopupModule,_ROW_ID_PREFIX_ROW_GROUP:()=>ROW_ID_PREFIX_ROW_GROUP,_SharedDragAndDropModule:()=>SharedDragAndDropModule,_SharedExportModule:()=>SharedExportModule,_SharedMenuModule:()=>SharedMenuModule,_SharedRowSelectionModule:()=>SharedRowSelectionModule,_SortModule:()=>SortModule,_SsrmInfiniteSharedApiModule:()=>SsrmInfiniteSharedApiModule,_addColumnDefaultAndTypes:()=>_addColumnDefaultAndTypes,_addFocusableContainerListener:()=>_addFocusableContainerListener,_addGridCommonParams:()=>_addGridCommonParams,_anchorElementToMouseMoveEvent:()=>_anchorElementToMouseMoveEvent,_applyColumnState:()=>_applyColumnState,_areCellsEqual:()=>_areCellsEqual,_areColIdsEqual:()=>_areColIdsEqual,_areEqual:()=>_areEqual,_asThemeImpl:()=>_asThemeImpl,_batchCall:()=>_batchCall,_canSkipShowingRowGroup:()=>_canSkipShowingRowGroup,_clearElement:()=>_clearElement,_columnsMatch:()=>_columnsMatch,_combineAttributesAndGridOptions:()=>_combineAttributesAndGridOptions,_convertColumnEventSourceType:()=>_convertColumnEventSourceType,_createCellId:()=>_createCellId,_createColumnTree:()=>_createColumnTree,_createElement:()=>_createElement,_createGlobalRowEvent:()=>_createGlobalRowEvent,_createIcon:()=>_createIcon,_createIconNoSpan:()=>_createIconNoSpan,_debounce:()=>_debounce,_defaultComparator:()=>_defaultComparator,_destroyColumnTree:()=>_destroyColumnTree,_doOnce:()=>_doOnce,_downloadFile:()=>_downloadFile,_errMsg:()=>_errMsg,_error:()=>_error,_escapeString:()=>_escapeString,_exists:()=>_exists,_findFocusableElements:()=>_findFocusableElements,_findNextFocusableElement:()=>_findNextFocusableElement,_findTabbableParent:()=>_findTabbableParent,_flatten:()=>_flatten,_focusGridInnerElement:()=>_focusGridInnerElement,_focusInto:()=>_focusInto,_focusNextGridCoreContainer:()=>_focusNextGridCoreContainer,_formatNumberCommas:()=>_formatNumberCommas,_fuzzySuggestions:()=>_fuzzySuggestions,_getAbsoluteHeight:()=>_getAbsoluteHeight,_getAbsoluteWidth:()=>_getAbsoluteWidth,_getActiveDomElement:()=>_getActiveDomElement,_getAriaPosInSet:()=>_getAriaPosInSet,_getCallbackForEvent:()=>_getCallbackForEvent,_getCellByPosition:()=>_getCellByPosition,_getCellCtrlForEventTarget:()=>_getCellCtrlForEventTarget,_getCellPositionForEvent:()=>_getCellPositionForEvent,_getCellRendererDetails:()=>_getCellRendererDetails,_getCheckboxLocation:()=>_getCheckboxLocation,_getCheckboxes:()=>_getCheckboxes,_getClientSideRowModel:()=>_getClientSideRowModel,_getColumnState:()=>_getColumnState,_getColumnsFromTree:()=>_getColumnsFromTree,_getDefaultFloatingFilterType:()=>_getDefaultFloatingFilterType,_getDocument:()=>_getDocument,_getEditorRendererDetails:()=>_getEditorRendererDetails,_getFillHandle:()=>_getFillHandle,_getFilterDetails:()=>_getFilterDetails,_getFloatingFilterCompDetails:()=>_getFloatingFilterCompDetails,_getFloatingFiltersHeight:()=>getFloatingFiltersHeight,_getGlobalGridOption:()=>_getGlobalGridOption,_getGrandTotalRow:()=>_getGrandTotalRow,_getGridRegisteredModules:()=>_getGridRegisteredModules,_getGroupAggFiltering:()=>_getGroupAggFiltering,_getGroupSelection:()=>_getGroupSelection,_getGroupSelectsDescendants:()=>_getGroupSelectsDescendants,_getGroupTotalRowCallback:()=>_getGroupTotalRowCallback,_getGroupingApproach:()=>_getGroupingApproach,_getHeaderCheckbox:()=>_getHeaderCheckbox,_getHeaderClassesFromColDef:()=>_getHeaderClassesFromColDef,_getHeaderRowCount:()=>getHeaderRowCount,_getInnerCellRendererDetails:()=>_getInnerCellRendererDetails,_getInnerHeight:()=>_getInnerHeight,_getInnerWidth:()=>_getInnerWidth,_getIsRowSelectable:()=>_getIsRowSelectable,_getLocaleTextFunc:()=>_getLocaleTextFunc,_getMaxConcurrentDatasourceRequests:()=>_getMaxConcurrentDatasourceRequests,_getNormalisedMousePosition:()=>_getNormalisedMousePosition,_getPageBody:()=>_getPageBody,_getRootNode:()=>_getRootNode,_getRowAbove:()=>_getRowAbove,_getRowBelow:()=>_getRowBelow,_getRowContainerClass:()=>_getRowContainerClass,_getRowContainerOptions:()=>_getRowContainerOptions,_getRowHeightAsNumber:()=>_getRowHeightAsNumber,_getRowHeightForNode:()=>_getRowHeightForNode,_getRowIdCallback:()=>_getRowIdCallback,_getRowNode:()=>_getRowNode,_getRowSelectionMode:()=>_getRowSelectionMode,_getRowSpanContainerClass:()=>_getRowSpanContainerClass,_getRowViewportClass:()=>_getRowViewportClass,_getServerSideRowModel:()=>_getServerSideRowModel,_getShouldDisplayTooltip:()=>_getShouldDisplayTooltip,_getSuppressMultiRanges:()=>_getSuppressMultiRanges,_getToolPanelClassesFromColDef:()=>_getToolPanelClassesFromColDef,_isAnimateRows:()=>_isAnimateRows,_isCellSelectionEnabled:()=>_isCellSelectionEnabled,_isClientSideRowModel:()=>_isClientSideRowModel,_isColumnMenuAnchoringEnabled:()=>_isColumnMenuAnchoringEnabled,_isColumnsSortingCoupledToGroup:()=>_isColumnsSortingCoupledToGroup,_isDomLayout:()=>_isDomLayout,_isElementInEventPath:()=>_isElementInEventPath,_isEventFromPrintableCharacter:()=>_isEventFromPrintableCharacter,_isGetRowHeightFunction:()=>_isGetRowHeightFunction,_isGroupMultiAutoColumn:()=>_isGroupMultiAutoColumn,_isGroupRowsSticky:()=>_isGroupRowsSticky,_isGroupUseEntireRow:()=>_isGroupUseEntireRow,_isIOSUserAgent:()=>_isIOSUserAgent,_isKeyboardMode:()=>_isKeyboardMode,_isLegacyMenuEnabled:()=>_isLegacyMenuEnabled,_isMultiRowSelection:()=>_isMultiRowSelection,_isNodeOrElement:()=>_isNodeOrElement,_isNothingFocused:()=>_isNothingFocused,_isPromise:()=>_isPromise,_isRowBefore:()=>_isRowBefore,_isRowSelection:()=>_isRowSelection,_isSameRow:()=>_isSameRow,_isServerSideRowModel:()=>_isServerSideRowModel,_isShowTooltipWhenTruncated:()=>_isShowTooltipWhenTruncated,_isStopPropagationForAgGrid:()=>_isStopPropagationForAgGrid,_isUsingNewCellSelectionAPI:()=>_isUsingNewCellSelectionAPI,_isUsingNewRowSelectionAPI:()=>_isUsingNewRowSelectionAPI,_isVisible:()=>_isVisible,_jsonEquals:()=>_jsonEquals,_last:()=>_last,_loadTemplate:()=>_loadTemplate,_makeNull:()=>_makeNull,_mergeDeep:()=>_mergeDeep,_missing:()=>_missing,_observeResize:()=>_observeResize,_parseDateTimeFromString:()=>_parseDateTimeFromString,_preInitErrMsg:()=>_preInitErrMsg,_preserveRangesWhile:()=>_preserveRangesWhile,_processOnChange:()=>_processOnChange,_radioCssClass:()=>_radioCssClass,_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,_setAriaDescribedBy:()=>_setAriaDescribedBy,_setAriaDisabled:()=>_setAriaDisabled,_setAriaExpanded:()=>_setAriaExpanded,_setAriaHasPopup:()=>_setAriaHasPopup,_setAriaHidden:()=>_setAriaHidden,_setAriaLabel:()=>_setAriaLabel,_setAriaLabelledBy:()=>_setAriaLabelledBy,_setAriaLevel:()=>_setAriaLevel,_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,_shouldDisplayTooltip:()=>_shouldDisplayTooltip,_shouldUpdateColVisibilityAfterGroup:()=>_shouldUpdateColVisibilityAfterGroup,_stopPropagationForAgGrid:()=>_stopPropagationForAgGrid,_toStringOrNull:()=>_toStringOrNull,_unwrapUserComp:()=>_unwrapUserComp,_updateColsMap:()=>_updateColsMap,_updateColumnState:()=>_updateColumnState,_waitUntil:()=>_waitUntil,_warn:()=>_warn,_warnOnce:()=>_warnOnce,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,createGrid:()=>createGrid,createPart:()=>createPart,createTheme:()=>createTheme,iconOverrides:()=>iconOverrides,iconSetAlpine:()=>iconSetAlpine,iconSetMaterial:()=>iconSetMaterial,iconSetQuartz:()=>iconSetQuartz,iconSetQuartzBold:()=>iconSetQuartzBold,iconSetQuartzLight:()=>iconSetQuartzLight,iconSetQuartzRegular:()=>iconSetQuartzRegular,inputStyleBase:()=>inputStyleBase,inputStyleBordered:()=>inputStyleBordered,inputStyleUnderlined:()=>inputStyleUnderlined,isColumn:()=>isColumn,isColumnGroup:()=>isColumnGroup2,isColumnGroupAutoCol:()=>isColumnGroupAutoCol,isColumnSelectionCol:()=>isColumnSelectionCol,isProvidedColumnGroup:()=>isProvidedColumnGroup,isRowNumberCol:()=>isRowNumberCol,provideGlobalGridOptions:()=>provideGlobalGridOptions,styleMaterial:()=>styleMaterial,tabStyleAlpine:()=>tabStyleAlpine,tabStyleBase:()=>tabStyleBase,tabStyleMaterial:()=>tabStyleMaterial,tabStyleQuartz:()=>tabStyleQuartz,tabStyleRolodex:()=>tabStyleRolodex,themeAlpine:()=>themeAlpine,themeBalham:()=>themeBalham,themeMaterial:()=>themeMaterial,themeQuartz:()=>themeQuartz}),module.exports=__toCommonJS(main_exports);var 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 s=t?this.allAsyncListeners:this.allSyncListeners;let o=s.get(e);return!o&&i&&(o=new Set,s.set(e,o)),o}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 s=this.getListeners(e,i,!1);s&&(s.delete(t),s.size===0&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const s=(a,l)=>a.forEach(d=>{if(!l.has(d))return;const c=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>d(e)):()=>d(e);t?this.dispatchAsync(c):c()}),o=this.getListeners(i,t,!1)??new Set,n=new Set(o);n.size>0&&s(n,o),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(i,e)):()=>a(i,e);t?this.dispatchAsync(l):l()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};function defaultLocaleTextFunc(e,t){return t}function _getLocaleTextFunc(e){return e?.getLocaleTextFunc()??defaultLocaleTextFunc}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){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function _getAriaPosInSet(e){return 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 _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.id),_setAriaLabelledBy(t,e.id)}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")}var isSafari,isChrome,isFirefox,isMacOs,isIOS,invisibleScrollbar,browserScrollbarWidth,maxDivHeight;function _isBrowserSafari(){return isSafari===void 0&&(isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),isSafari}function _isBrowserChrome(){if(isChrome===void 0){const e=window;isChrome=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return isChrome}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 s=e*2;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),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.parentNode.removeChild(t),i!=null&&(browserScrollbarWidth=i,invisibleScrollbar=i===0)}function _isInvisibleScrollbar(){return invisibleScrollbar==null&&initScrollbarWidthAndVisibility(),invisibleScrollbar}var rtlNegativeScroll;function _radioCssClass(e,t,i){const s=e.parentElement;let o=s&&s.firstChild;for(;o;)t&&o.classList.toggle(t,o===e),i&&o.classList.toggle(i,o!==e),o=o.nextSibling}var FOCUSABLE_SELECTOR="[tabindex], input, select, button, textarea, [href]",FOCUSABLE_EXCLUDE="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function _isFocusableFormField(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),o=t.call(e,FOCUSABLE_EXCLUDE),n=_isVisible(e);return s&&!o&&n}function _setDisplayed(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||_setAriaHidden(e,!t)}function _setVisible(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||_setAriaHidden(e,!t)}function _setDisabled(e,t){const i="disabled",s=t?n=>n.setAttribute(i,""):n=>n.removeAttribute(i);s(e);const o=e.querySelectorAll("input")??[];for(const n of o)s(n)}function _isElementChildOfClass(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++s>i)break}else if(e===i)break}return!1}function _getElementSize(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:o,borderBottomWidth:n,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:h,marginBottom:g,marginLeft:p,boxSizing:f}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(o||"0"),borderBottomWidth:parseFloat(n||"0"),borderLeftWidth:parseFloat(r||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(d||"0"),paddingLeft:parseFloat(c||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(p||"0"),boxSizing:f}}function _getInnerHeight(e){const t=_getElementSize(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function _getInnerWidth(e){const t=_getElementSize(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function _getAbsoluteHeight(e){const{height:t,marginBottom:i,marginTop:s}=_getElementSize(e);return Math.floor(t+i+s)}function _getAbsoluteWidth(e){const{width:t,marginLeft:i,marginRight:s}=_getElementSize(e);return Math.floor(t+i+s)}function _getElementRectWithOffset(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:n}=_getElementSize(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(o||0),bottom:t.bottom+(n||0)}}function _isRtlNegativeScroll(){if(typeof rtlNegativeScroll=="boolean")return rtlNegativeScroll;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML=`<div style="width: 2px">
2
2
  <span style="display: inline-block; width: 1px"></span>
3
3
  <span style="display: inline-block; width: 1px"></span>
4
- </div>`,document.body.appendChild(e),e.scrollLeft=1,rtlNegativeScroll=Math.floor(e.scrollLeft)===0,document.body.removeChild(e),rtlNegativeScroll}function _getScrollLeft(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),_isBrowserChrome()&&!_isRtlNegativeScroll()&&(i=e.scrollWidth-e.getBoundingClientRect().width-i)),i}function _setScrollLeft(e,t,i){i&&(_isRtlNegativeScroll()?t*=-1:(_isBrowserSafari()||_isBrowserChrome())&&(t=e.scrollWidth-e.getBoundingClientRect().width-t)),e.scrollLeft=t}function _clearElement(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function _removeFromParent(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _isInDOM(e){return!!e.offsetParent}function _isVisible(e){const t=e;return t.checkVisibility?t.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.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function _setDomChildOrder(e,t){for(let i=0;i<t.length;i++){const s=t[i],o=e.children[i];o!==s&&e.insertBefore(s,o)}}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 s=t[i];if(!i||!i.length||s==null)continue;const o=_camelCaseToHyphenated(i),n=s.toString(),r=n.replace(/\s*!important/g,""),a=r.length!=n.length?"important":void 0;e.style.setProperty(o,r,a)}}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 _observeResize(e,t,i){const o=_getWindow(e).ResizeObserver,n=o?new o(i):null;return n?.observe(t),()=>n?.disconnect()}function _getTextSelectionRanges(e){const t=_getRootNode(e),i="getSelection"in t?t.getSelection():null,s=[];for(let o=0;o<(i?.rangeCount??0);o++){const n=i?.getRangeAt(o);n&&s.push(n)}return{selection:i,ranges:s}}function _preserveRangesWhile(e,t){if(!e.gos.get("enableCellTextSelection")||!_isBrowserFirefox()&&!_isBrowserSafari())return t();const{selection:s,ranges:o}=_getTextSelectionRanges(e);t(),s?.removeAllRanges();for(const n of o)s?.addRange(n)}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 _createElement(e){const{attrs:t,children:i,cls:s,ref:o,role:n,tag:r}=e,a=document.createElement(r);if(s&&(a.className=s),o&&a.setAttribute(DataRefAttribute,o),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(i)if(typeof i=="string")a.textContent=i;else{let l=!0;for(const d of i)d&&(typeof d=="string"?(a.appendChild(document.createTextNode(d)),l=!1):(l&&(a.appendChild(getWhitespaceNode()),l=!1),a.append(_createElement(d)),a.appendChild(getWhitespaceNode())))}return a}function _makeNull(e){return e==null||e===""?null:e}function _exists(e){return e!=null&&e!==""}function _missing(e){return!_exists(e)}function _toStringOrNull(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function _jsonEquals(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function _defaultComparator(e,t,i=!1){const s=e==null,o=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function n(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!i)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var BASE_URL="https://www.ag-grid.com",doOnceFlags={};function _doOnce(e,t){doOnceFlags[t]||(e(),doOnceFlags[t]=!0)}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 batchedCallsSetTimeout={pending:!1,funcs:[]},batchedCallsRaf={pending:!1,funcs:[]};function _batchCall(e,t="setTimeout",i){const s=t==="raf"?batchedCallsRaf:batchedCallsSetTimeout;if(s.funcs.push(e),s.pending)return;s.pending=!0;const o=()=>{const n=s.funcs.slice();s.funcs.length=0,s.pending=!1,n.forEach(r=>r())};t==="raf"?_requestAnimationFrame(i,o):window.setTimeout(o,0)}function _debounce(e,t,i){let s;return function(...o){const n=this;window.clearTimeout(s),s=window.setTimeout(function(){e.isAlive()&&t.apply(n,o)},i)}}function _throttle(e,t){let i=0;return function(...s){const o=this,n=Date.now();n-i<t||(i=n,e.apply(o,s))}}function _waitUntil(e,t,i=100,s){const o=Date.now();let n=null,r=!1;const a=()=>{const l=Date.now()-o>i;(e()||l)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null),l&&s&&_warnOnce(s))};a(),r||(n=window.setInterval(a,10))}var VERSION="33.2.0",MAX_URL_LENGTH=2e3,MIN_PARAM_LENGTH=100,VERSION_PARAM_NAME="_version_",validation=null,suppressAllLogging=!1,baseDocLink=`${BASE_URL}/javascript-data-grid`;function provideValidationServiceLogger(e){validation=e}function setValidationDocLink(e){baseDocLink=e}function getErrorParts(e,t,i){return validation?.getConsoleMessage(e,t)??[minifiedLog(e,t,i)]}function getMsgOrDefault(e,t,i,s){suppressAllLogging||e(`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 s=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let o=getParamsUrl(e,t);for(const[n,r]of s){if(n===VERSION_PARAM_NAME)continue;const a=o.length-i;if(a<=0)break;const l="...",d=a+l.length,c=r.length-d>MIN_PARAM_LENGTH?r.slice(0,r.length-d)+l:r.slice(0,MIN_PARAM_LENGTH)+l;t.set(n,c),o=getParamsUrl(e,t)}return o}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 s=`${baseDocLink}/errors/${e}`,o=getParamsUrl(s,i);return o.length<=MAX_URL_LENGTH?o:truncateUrl(s,i,MAX_URL_LENGTH)}var minifiedLog=(e,t,i)=>{const s=getErrorLink(e,t);return`${i?i+`
4
+ </div>`,document.body.appendChild(e),e.scrollLeft=1,rtlNegativeScroll=Math.floor(e.scrollLeft)===0,document.body.removeChild(e),rtlNegativeScroll}function _getScrollLeft(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),_isBrowserChrome()&&!_isRtlNegativeScroll()&&(i=e.scrollWidth-e.getBoundingClientRect().width-i)),i}function _setScrollLeft(e,t,i){i&&(_isRtlNegativeScroll()?t*=-1:(_isBrowserSafari()||_isBrowserChrome())&&(t=e.scrollWidth-e.getBoundingClientRect().width-t)),e.scrollLeft=t}function _clearElement(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function _removeFromParent(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _isInDOM(e){return!!e.offsetParent}function _isVisible(e){const t=e;return t.checkVisibility?t.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.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function _setDomChildOrder(e,t){for(let i=0;i<t.length;i++){const s=t[i],o=e.children[i];o!==s&&e.insertBefore(s,o)}}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 s=t[i];if(!i||!i.length||s==null)continue;const o=_camelCaseToHyphenated(i),n=s.toString(),r=n.replace(/\s*!important/g,""),a=r.length!=n.length?"important":void 0;e.style.setProperty(o,r,a)}}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 _observeResize(e,t,i){const o=_getWindow(e).ResizeObserver,n=o?new o(i):null;return n?.observe(t),()=>n?.disconnect()}function _getTextSelectionRanges(e){const t=_getRootNode(e),i="getSelection"in t?t.getSelection():null,s=[];for(let o=0;o<(i?.rangeCount??0);o++){const n=i?.getRangeAt(o);n&&s.push(n)}return{selection:i,ranges:s}}function _preserveRangesWhile(e,t){if(!e.gos.get("enableCellTextSelection")||!_isBrowserFirefox()&&!_isBrowserSafari())return t();const{selection:s,ranges:o}=_getTextSelectionRanges(e);t(),s?.removeAllRanges();for(const n of o)s?.addRange(n)}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 _createElement(e){const{attrs:t,children:i,cls:s,ref:o,role:n,tag:r}=e,a=document.createElement(r);if(s&&(a.className=s),o&&a.setAttribute(DataRefAttribute,o),n&&a.setAttribute("role",n),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(i)if(typeof i=="string")a.textContent=i;else{let l=!0;for(const d of i)d&&(typeof d=="string"?(a.appendChild(document.createTextNode(d)),l=!1):(l&&(a.appendChild(getWhitespaceNode()),l=!1),a.append(_createElement(d)),a.appendChild(getWhitespaceNode())))}return a}function _makeNull(e){return e==null||e===""?null:e}function _exists(e){return e!=null&&e!==""}function _missing(e){return!_exists(e)}function _toStringOrNull(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function _jsonEquals(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function _defaultComparator(e,t,i=!1){const s=e==null,o=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function n(r,a){return r>a?1:r<a?-1:0}if(typeof e!="string"||!i)return n(e,t);try{return e.localeCompare(t)}catch{return n(e,t)}}var BASE_URL="https://www.ag-grid.com",doOnceFlags={};function _doOnce(e,t){doOnceFlags[t]||(e(),doOnceFlags[t]=!0)}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 batchedCallsSetTimeout={pending:!1,funcs:[]},batchedCallsRaf={pending:!1,funcs:[]};function _batchCall(e,t="setTimeout",i){const s=t==="raf"?batchedCallsRaf:batchedCallsSetTimeout;if(s.funcs.push(e),s.pending)return;s.pending=!0;const o=()=>{const n=s.funcs.slice();s.funcs.length=0,s.pending=!1,n.forEach(r=>r())};t==="raf"?_requestAnimationFrame(i,o):window.setTimeout(o,0)}function _debounce(e,t,i){let s;return function(...o){const n=this;window.clearTimeout(s),s=window.setTimeout(function(){e.isAlive()&&t.apply(n,o)},i)}}function _throttle(e,t){let i=0;return function(...s){const o=this,n=Date.now();n-i<t||(i=n,e.apply(o,s))}}function _waitUntil(e,t,i=100,s){const o=Date.now();let n=null,r=!1;const a=()=>{const l=Date.now()-o>i;(e()||l)&&(t(),r=!0,n!=null&&(window.clearInterval(n),n=null),l&&s&&_warnOnce(s))};a(),r||(n=window.setInterval(a,10))}var VERSION="33.2.1",MAX_URL_LENGTH=2e3,MIN_PARAM_LENGTH=100,VERSION_PARAM_NAME="_version_",validation=null,suppressAllLogging=!1,baseDocLink=`${BASE_URL}/javascript-data-grid`;function provideValidationServiceLogger(e){validation=e}function setValidationDocLink(e){baseDocLink=e}function getErrorParts(e,t,i){return validation?.getConsoleMessage(e,t)??[minifiedLog(e,t,i)]}function getMsgOrDefault(e,t,i,s){suppressAllLogging||e(`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 s=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let o=getParamsUrl(e,t);for(const[n,r]of s){if(n===VERSION_PARAM_NAME)continue;const a=o.length-i;if(a<=0)break;const l="...",d=a+l.length,c=r.length-d>MIN_PARAM_LENGTH?r.slice(0,r.length-d)+l:r.slice(0,MIN_PARAM_LENGTH)+l;t.set(n,c),o=getParamsUrl(e,t)}return o}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 s=`${baseDocLink}/errors/${e}`,o=getParamsUrl(s,i);return o.length<=MAX_URL_LENGTH?o:truncateUrl(s,i,MAX_URL_LENGTH)}var minifiedLog=(e,t,i)=>{const s=getErrorLink(e,t);return`${i?i+`
5
5
  `:""}Visit ${s}${i?"":`
6
6
  Alternatively register the ValidationModule to see the full message in the console.`}`};function _warn(...e){getMsgOrDefault(_warnOnce,e[0],e[1])}function _error(...e){getMsgOrDefault(_errorOnce,e[0],e[1])}function _logPreInitErr(e,t,i){getMsgOrDefault(_errorOnce,e,t,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(`
7
7
  `,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 _getRowHeightForNode(e,t,i=!1,s){const{gos:o,environment:n}=e;if(s==null&&(s=n.getDefaultRowHeight()),_isGetRowHeightFunction(o)){if(i)return{height:s,estimated:!0};const l={node:t,data:t.data},d=o.getCallback("getRowHeight")(l);if(isNumeric(d))return d===0&&_warn(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&o.get("masterDetail"))return getMasterDetailRowHeight(o);const r=o.get("rowHeight");return{height:r&&isNumeric(r)?r:s,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,s=i.get("rowHeight");if(!s||_missing(s))return t.getDefaultRowHeight();const o=t.refreshRowHeightVariable();return o!==-1?o:(_warn(24),t.getDefaultRowHeight())}function isNumeric(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function _getDomData(e,t,i){const s=t[e.getDomDataKey()];return s?s[i]:void 0}function _setDomData(e,t,i,s){const o=e.getDomDataKey();let n=t[o];_missing(n)&&(n={},t[o]=n),n[i]=s}function _getDocument(e){const{gos:t,eGridDiv:i}=e;let s=null;const o=t.get("getDocument");return o&&_exists(o)?s=o():i&&(s=i.ownerDocument),s&&_exists(s)?s:document}function _getWindow(e){return _getDocument(e).defaultView||window}function _getRootNode(e){return e.eGridDiv.getRootNode()}function _getActiveDomElement(e){return _getRootNode(e).activeElement}function _getPageBody(e){let t=null,i=null;try{t=_getDocument(e).fullscreenElement}catch{}finally{t||(t=_getRootNode(e));const s=t.querySelector("body");s?i=s:t instanceof ShadowRoot?i=t:t instanceof Document?i=t?.documentElement:i=t}return i}function _getBodyWidth(e){return _getPageBody(e)?.clientWidth??(window.innerHeight||-1)}function _getBodyHeight(e){return _getPageBody(e)?.clientHeight??(window.innerHeight||-1)}function _anchorElementToMouseMoveEvent(e,t,i){const o=e.getBoundingClientRect().height,n=_getBodyWidth(i)-2,r=_getBodyHeight(i)-2;if(!e.offsetParent)return;const l=_getElementRectWithOffset(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-l.top-o/2,h=c-l.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`}function _isNothingFocused(e){const t=_getDocument(e),i=_getActiveDomElement(e);return i===null||i===t.body}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 _getRowIdCallback(e){const t=e.getCallback("getRowId");return t===void 0?t:i=>{let s=t(i);return typeof s!="string"&&(_warn(25,{id:s}),s=String(s)),s}}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 s=e.get("suppressRowGroupHidesColumns");if(t&&s===!0)return!1;const o=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&o===!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 _getEnableClickSelection(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),s=e.get("suppressRowDeselection");return i&&s?!1:i?"enableDeselection":s?"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"),s=e.get("groupSelectsFiltered");return i&&s?"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 _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 s={...e};return i.forEach(o=>{const n=t[o];typeof n<"u"&&(s[o]=n)}),s}function _processOnChange(e,t){if(!e)return;const i={};let s=!1;if(Object.keys(e).forEach(r=>{i[r]=e[r],s=!0}),!s)return;const o={type:"gridOptionsChanged",options:i};t.dispatchEvent(o);const n={type:"componentStateChanged",...i};t.dispatchEvent(n)}function _addGridCommonParams(e,t){return e.addGridCommonParams(t)}function _getGroupingApproach(e){return e.get("treeData")?e.get("treeDataParentIdField")?"treeSelfRef":e.get("treeDataChildrenField")?"treeNested":"treePath":"group"}var AG_GRID_STOP_PROPAGATION="__ag_Grid_Stop_Propagation",PASSIVE_EVENTS=["touchstart","touchend","touchmove","touchcancel","scroll"],NON_PASSIVE_EVENTS=["wheel"],supports={};function _stopPropagationForAgGrid(e){e[AG_GRID_STOP_PROPAGATION]=!0}function _isStopPropagationForAgGrid(e){return e[AG_GRID_STOP_PROPAGATION]===!0}var _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 s=document.createElement(e[i]||"div");return i="on"+i,supports[i]=i in s}})();function _getCtrlForEventTarget(e,t,i){let s=t;for(;s;){const o=_getDomData(e,s,i);if(o)return o;s=s.parentElement}return null}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,s){const o=getPassiveStateForEvent(i);let n;o!=null&&(n={passive:o}),e&&e.addEventListener&&e.addEventListener(t,i,s,n)}var getPassiveStateForEvent=e=>{const t=PASSIVE_EVENTS.includes(e),i=NON_PASSIVE_EVENTS.includes(e);if(t)return!0;if(i)return!1},BeanStub=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 s of Object.keys(t)){const o=t[s];o&&i.push(this._setupListener(e,s,o))}return i}_setupListener(e,t,i){if(this.destroyed)return()=>null;let s;return isAgEventEmitter(e)?(e.__addEventListener(t,i),s=()=>(e.__removeEventListener(t,i),null)):(e instanceof HTMLElement?_addSafePassiveEventListener(this.beans.frameworkOverrides,e,t,i):e.addEventListener(t,i),s=()=>(e.removeEventListener(t,i),null)),this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),null)}setupGridOptionListener(e,t){const{gos:i}=this;i.addPropertyEventListener(e,t);const s=()=>(i.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,s=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=o.changeSet.id}const n={type:"gridPropertyChanged",changeSet:o.changeSet,source:o.source};t(n)};e.forEach(o=>this.setupGridOptionListener(o,s))}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}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))t(i,e[i])}}function _mergeDeep(e,t,i=!0,s=!1){_exists(t)&&_iterateObject(t,(o,n)=>{if(SKIP_JS_BUILTINS.has(o))return;let r=e[o];r!==n&&(s&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[o]=r),_isNonNullObject(n)&&_isNonNullObject(r)&&!Array.isArray(r)?_mergeDeep(r,n,i,s):(i||n!==void 0)&&(e[o]=n))})}function _getValueUsingField(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let o=e;for(let n=0;n<s.length;n++){if(o==null)return;o=o[s[n]]}return o}function _isNonNullObject(e){return typeof e=="object"&&e!==null}var reUnescapedHtml=/[&<>"']/g,HTML_ESCAPES={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function _escapeString(e,t){if(e==null)return null;const i=e.toString().toString();return t?i:i.replace(reUnescapedHtml,s=>HTML_ESCAPES[s])}var COL_DEF_DEFAULTS={resizable:!0,sortable:!0},instanceIdSequence=0;function getNextColInstanceId(){return instanceIdSequence++}function isColumn(e){return e instanceof AgColumn}var AgColumn=class extends BeanStub{constructor(e,t,i,s){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=s,this.isColumn=!0,this.instanceId=getNextColInstanceId(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,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}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:i,colFlex:s}}=this;t?.initCol(this);const o=e.hide;o!==void 0?this.visible=!o:this.visible=!e.initialHide,i?.initCol(this),s?.initCol(this)}setColDef(e,t,i){const s=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),s&&(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.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:i}}=this,s=e.get("suppressFieldDotNotation");this.fieldContainsDots=_exists(t)&&t.indexOf(".")>=0&&!s,this.tooltipFieldContainsDots=_exists(i)&&i.indexOf(".")>=0&&!s}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)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const i=e.width,s=e.initialWidth;return i!=null?t=i:s!=null?t=s:t=200,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(t)??t;this.colEventSvc.addEventListener(e,i)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(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(this,e)??!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.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return _missing(this.sort)}isSorting(){return _exists(this.sort)}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}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!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}dispatchColEvent(e,t,i){const s=this.createColumnEvent(e,t);i&&_mergeDeep(s,i),this.colEventSvc.dispatchEvent(s)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function isProvidedColumnGroup(e){return e instanceof AgProvidedColumnGroup}var AgProvidedColumnGroup=class extends BeanStub{constructor(e,t,i,s){super(),this.colGroupDef=e,this.groupId=t,this.padding=i,this.level=s,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}addLeafColumns(e){this.children&&this.children.forEach(t=>{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);this.getLeafColumns().forEach(t=>t.__addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.__removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const s=this.findChildrenRemovingPadding();for(let n=0,r=s.length;n<r;n++){const a=s[n];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,i=!0):l==="closed"?(t=!0,i=!0):(e=!0,t=!0)}const o=e&&t&&i;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=i=>{i.forEach(s=>{isProvidedColumnGroup(s)&&s.isPadding()?t(s.children):e.push(s)})};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"}},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 s=e??t;if(s?i!==0&&(s+="_"+i):s=i,!this.existingKeys[s])return this.existingKeys[s]=!0,String(s);i++}}},_EmptyArray=Object.freeze([]);function _last(e){if(e?.length)return e[e.length-1]}function _areEqual(e,t,i){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((s,o)=>i?i(s,t[o]):t[o]===s)}function _forAll(e,t){if(e)for(const i of e)t(i)}function _removeFromArray(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function _moveInArray(e,t,i){for(let s=0;s<t.length;s++)_removeFromArray(e,t[s]);for(let s=t.length-1;s>=0;s--)e.splice(i,0,t[s])}function _flatten(e){return[].concat.apply([],e)}var GROUP_AUTO_COLUMN_ID="ag-Grid-AutoColumn",SELECTION_COLUMN_ID="ag-Grid-SelectionColumn",ROW_NUMBERS_COLUMN_ID="ag-Grid-RowNumbersColumn";function _getColumnsFromTree(e){const t=[],i=s=>{for(let o=0;o<s.length;o++){const n=s[o];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 s={};if(!t)return;depthFirstOriginalTreeSearch(null,t,n=>{s[n.getInstanceId()]=n}),i&&depthFirstOriginalTreeSearch(null,i,n=>{s[n.getInstanceId()]=null});const o=Object.values(s).filter(n=>n!=null);e.context.destroyBeans(o)}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 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,s)=>i.getColId()===s.getColId())}function _updateColsMap(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function _convertColumnEventSourceType(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function _columnsMatch(e,t){const i=e===t,s=e.getColDef()===t,o=e.getColId()==t;return i||s||o}var getValueFactory=(e,t)=>(i,s)=>{const o={value1:void 0,value2:void 0};let n=!1;return e&&(e[i]!==void 0&&(o.value1=e[i],n=!0),_exists(s)&&e[s]!==void 0&&(o.value2=e[s],n=!0)),!n&&t&&(t[i]!==void 0&&(o.value1=t[i]),_exists(s)&&t[s]!==void 0&&(o.value2=t[s])),o};function _createColumnTree(e,t=null,i,s,o){const n=new ColumnKeyCreator,{existingCols:r,existingGroups:a,existingColKeys:l}=extractExistingTreeData(s);n.addExistingKeys(l);const d=_recursivelyCreateColumns(e,t,0,i,r,n,a,o),{colGroupSvc:c}=e,u=c?.findMaxDepth(d,0)??0,h=c?c.balanceColumnTree(d,0,u,n):d;return depthFirstOriginalTreeSearch(null,h,(p,f)=>{isProvidedColumnGroup(p)&&p.setupExpandable(),p.originalParent=f}),{columnTree:h,treeDept:u}}function extractExistingTreeData(e){const t=[],i=[],s=[];return e&&depthFirstOriginalTreeSearch(null,e,o=>{if(isProvidedColumnGroup(o)){const n=o;i.push(n)}else{const n=o;s.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}function _recursivelyCreateColumns(e,t,i,s,o,n,r,a){if(!t)return[];const{colGroupSvc:l}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){const u=t[c];l&&isColumnGroup(u)?d[c]=l.createProvidedColumnGroup(s,u,i,o,n,r,a):d[c]=createColumn(e,s,u,o,n,a)}return d}function createColumn(e,t,i,s,o,n){const r=findExistingColumn(i,s);r&&s?.splice(r.idx,1);let a=r?.column;if(a){const l=_addColumnDefaultAndTypes(e,i,a.getColId());a.setColDef(l,i,n),_updateColumnState(e,a,l,n)}else{const l=o.getUniqueKey(i.colId,i.field),d=_addColumnDefaultAndTypes(e,i,l);a=new AgColumn(d,i,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function updateSomeColumnState(e,t,i,s,o,n,r,a){const{sortSvc:l,pinnedCols:d,colFlex:c}=e;i!==void 0&&t.setVisible(!i,a),l&&(l.updateColSort(t,s,a),o!==void 0&&l.setColSortIndex(t,o)),n!==void 0&&d?.setColPinned(t,n),r!==void 0&&c?.setColFlex(t,r)}function _updateColumnState(e,t,i,s){updateSomeColumnState(e,t,i.hide,i.sort,i.sortIndex,i.pinned,i.flex,s);const o=t.getFlex();if(!(o!=null&&o>0))if(i.width!=null)t.setActualWidth(i.width,s);else{const n=t.getActualWidth();t.setActualWidth(n,s)}}function findExistingColumn(e,t){if(t)for(let i=0;i<t.length;i++){const s=t[i].getUserProvidedColDef();if(!s)continue;if(e.colId!=null){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(e.field!=null){if(s.field===e.field)return{idx:i,column:t[i]};continue}if(s===e)return{idx:i,column:t[i]}}}function _addColumnDefaultAndTypes(e,t,i,s){const{gos:o,dataTypeSvc:n,validation:r}=e,a={},l=o.get("defaultColDef");_mergeDeep(a,l,!1,!0);const d=updateColDefAndGetColumnType(e,a,t,i);d&&assignColumnTypes(e,d,a),_mergeDeep(a,t,!1,!0);const c=o.get("autoGroupColumnDef"),u=_isColumnsSortingCoupledToGroup(o);return t.rowGroup&&c&&u&&_mergeDeep(a,{sort:c.sort,initialSort:c.initialSort},!1,!0),n?.validateColDef(a),r?.validateColDef(a,i,s),a}function updateColDefAndGetColumnType(e,t,i,s){const o=e.dataTypeSvc?.updateColDefAndGetColumnType(t,i,s),n=i.type??o??t.type;return t.type=n,n?convertColumnTypes(n):void 0}function assignColumnTypes(e,t,i){if(!t.length)return;const s=Object.assign({},DefaultColumnTypes),o=e.gos.get("columnTypes")||{};for(const n of Object.keys(o)){const r=o[n];n in s?_warn(34,{key:n}):(r.type&&_warn(35),s[n]=r)}t.forEach(n=>{const r=s[n.trim()];r?_mergeDeep(i,r,!1,!0):_warn(36,{t:n})})}function isColumnGroup(e){return e.children!==void 0}function depthFirstOriginalTreeSearch(e,t,i){if(t)for(let s=0;s<t.length;s++){const o=t[s];isProvidedColumnGroup(o)&&depthFirstOriginalTreeSearch(o,o.getChildren(),i),i(o,e)}}function placeLockedColumns(e,t){const i=[],s=[],o=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?o.push(r):a==="left"||a===!0?i.push(r):s.push(r)}),t.get("enableRtl")?[...o,...s,...i]:[...i,...s,...o]}function doesMovePassMarryChildren(e,t){let i=!0;return depthFirstOriginalTreeSearch(null,t,s=>{if(!isProvidedColumnGroup(s))return;const o=s,n=o.getColGroupDef();if(!(n&&n.marryChildren))return;const a=[];o.getLeafColumns().forEach(h=>{const g=e.indexOf(h);a.push(g)});const l=Math.max.apply(Math,a),d=Math.min.apply(Math,a),c=l-d,u=o.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 s=1;s<e.length;s++)if(i!==t(e[s]))return;return i}function dispatchColumnPinnedEvent(e,t,i){if(!t.length)return;const s=t.length===1?t[0]:null,o=getCommonValue(t,n=>n.getPinned());e.dispatchEvent({type:"columnPinned",pinned:o??null,columns:t,column:s,source:i})}function dispatchColumnVisibleEvent(e,t,i){if(!t.length)return;const s=t.length===1?t[0]:null,o=getCommonValue(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:o,columns:t,column:s,source:i})}function dispatchColumnChangedEvent(e,t,i,s){e.dispatchEvent({type:t,columns:i,column:i&&i.length==1?i[0]:null,source:s})}function dispatchColumnResizedEvent(e,t,i,s,o=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:o,finished:i,source:s})}function _applyColumnState(e,t,i){const{colModel:s,rowGroupColsSvc:o,pivotColsSvc:n,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:g,gos:p}=e,f=s.getColDefCols()||[];if(!f?.length)return!1;if(t?.state&&!t.state.forEach)return _warn(32),!1;const m=(b,y,S,x,F)=>{if(!b)return;const R=getValueFactory(y,t.defaultState),E=R("flex").value1;if(updateSomeColumnState(e,b,R("hide").value1,R("sort").value1,R("sortIndex").value1,R("pinned").value1,E,i),E==null){const D=R("width").value1;if(D!=null){const A=b.getColDef().minWidth??u.getDefaultColumnMinWidth();A!=null&&D>=A&&b.setActualWidth(D,i)}}F||!b.isPrimary()||(h?.syncColumnWithState(b,i,R),o?.syncColumnWithState(b,i,R,S),n?.syncColumnWithState(b,i,R,x))},C=(b,y,S)=>{const x=_compareColumnStatesAndDispatchEvents(e,i),F=y.slice(),R={},E={},D=[],A=[],T=[];let M=0;const G=o?.columns.slice()??[],W=n?.columns.slice()??[];b.forEach(P=>{const L=P.colId;if(L.startsWith(GROUP_AUTO_COLUMN_ID)){D.push(P),T.push(P);return}if(isColumnSelectionCol(L)){A.push(P),T.push(P);return}const k=S(L);k?(m(k,P,R,E,!1),_removeFromArray(F,k)):(T.push(P),M+=1)});const B=P=>m(P,null,R,E,!1);F.forEach(B),o?.sortColumns(comparatorByIndex.bind(o,R,G)),n?.sortColumns(comparatorByIndex.bind(n,E,W)),s.refreshCols(!1);const V=(P,L,H=[])=>{L.forEach(k=>{const N=P(k.colId);_removeFromArray(H,N),m(N,k,null,null,!0)}),H.forEach(B)};return V(P=>r?.getColumn(P)??null,D,r?.getColumns()?.slice()),V(P=>a?.getColumn(P)??null,A,a?.getColumns()?.slice()),orderLiveColsLikeState(t,s,p),d.refresh(i),g.dispatchEvent({type:"columnEverythingChanged",source:i}),x(),{unmatchedAndAutoStates:T,unmatchedCount:M}};l?.start();let{unmatchedAndAutoStates:w,unmatchedCount:v}=C(t.state||[],f,b=>s.getColDefCol(b));if(w.length>0||_exists(t.defaultState)){const b=c?.getPivotResultCols()?.list??[];v=C(w,b,y=>c?.getPivotResultCol(y)??null).unmatchedCount}return l?.finish(),v===0}function _resetColumnState(e,t){const{colModel:i,autoColSvc:s,selectionColSvc:o}=e,n=i.getColDefCols();if(!n?.length)return;const r=i.getColDefColTree(),a=_getColumnsFromTree(r),l=[];let d=1e3,c=1e3;const u=m=>{const C=getColumnStateFromColDef(m);_missing(C.rowGroupIndex)&&C.rowGroup&&(C.rowGroupIndex=d++),_missing(C.pivotIndex)&&C.pivot&&(C.pivotIndex=c++),l.push(C)};s?.getColumns()?.forEach(u),o?.getColumns()?.forEach(u),a?.forEach(u),_applyColumnState(e,{state:l},t);const h=s?.getColumns()??[],f=[...o?.getColumns()??[],...h,...n].map(m=>({colId:m.colId}));_applyColumnState(e,{state:f,applyOrder:!0},t)}function _compareColumnStatesAndDispatchEvents(e,t){const{rowGroupColsSvc:i,pivotColsSvc:s,valueColsSvc:o,colModel:n,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:i?.columns.slice()??[],pivotColumns:s?.columns.slice()??[],valueColumns:o?.columns.slice()??[]},d=_getColumnState(e),c={};return d.forEach(u=>{c[u.colId]=u}),()=>{const u=(S,x,F,R)=>{const E=x.map(R),D=F.map(R);if(_areEqual(E,D))return;const T=new Set(x);F.forEach(G=>{T.delete(G)||T.add(G)});const M=[...T];a.dispatchEvent({type:S,columns:M,column:M.length===1?M[0]:null,source:t})},h=S=>{const x=[];return n.forAllCols(F=>{const R=c[F.getColId()];R&&S(R,F)&&x.push(F)}),x},g=S=>S.getColId();u("columnRowGroupChanged",l.rowGroupColumns,i?.columns??[],g),u("columnPivotChanged",l.pivotColumns,s?.columns??[],g);const f=h((S,x)=>{const F=S.aggFunc!=null,R=F!=x.isValueActive(),E=F&&S.aggFunc!=x.getAggFunc();return R||E});f.length>0&&dispatchColumnChangedEvent(a,"columnValueChanged",f,t),dispatchColumnResizedEvent(a,h((S,x)=>S.width!=x.getActualWidth()),!0,t),dispatchColumnPinnedEvent(a,h((S,x)=>S.pinned!=x.getPinned()),t),dispatchColumnVisibleEvent(a,h((S,x)=>S.hide==x.isVisible()),t);const b=h((S,x)=>S.sort!=x.getSort()||S.sortIndex!=x.getSortIndex());b.length>0&&r?.dispatchSortChangedEvents(t,b);const y=_getColumnState(e);normaliseColumnMovedEventForColumnState(d,y,t,n,a)}}function _getColumnState(e){const{colModel:t,rowGroupColsSvc:i,pivotColsSvc:s}=e,o=t.getColDefCols();if(_missing(o)||!t.isAlive())return[];const n=i?.columns,r=s?.columns,a=[],l=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.getSort()!=null?c.getSort():null,f=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:p,sortIndex:f,aggFunc:g,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return a.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}),a}function getColumnStateFromColDef(e){const t=(p,f)=>p??f??null,i=e.getColDef(),s=t(i.sort,i.initialSort),o=t(i.sortIndex,i.initialSortIndex),n=t(i.hide,i.initialHide),r=t(i.pinned,i.initialPinned),a=t(i.width,i.initialWidth),l=t(i.flex,i.initialFlex);let d=t(i.rowGroupIndex,i.initialRowGroupIndex),c=t(i.rowGroup,i.initialRowGroup);d==null&&(c==null||c==!1)&&(d=null,c=null);let u=t(i.pivotIndex,i.initialPivotIndex),h=t(i.pivot,i.initialPivot);u==null&&(h==null||h==!1)&&(u=null,h=null);const g=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:o,hide:n,pinned:r,width:a,flex:l,rowGroup:c,rowGroupIndex:d,pivot:h,pivotIndex:u,aggFunc:g}}function orderLiveColsLikeState(e,t,i){if(!e.applyOrder||!e.state)return;const s=[];e.state.forEach(o=>{o.colId!=null&&s.push(o.colId)}),sortColsLikeKeys(t.cols,s,t,i)}function sortColsLikeKeys(e,t,i,s){if(e==null)return;let o=[];const n={};t.forEach(a=>{if(n[a])return;const l=e.map[a];l&&(o.push(l),n[a]=!0)});let r=0;if(e.list.forEach(a=>{const l=a.getColId();if(n[l]!=null)return;l.startsWith(GROUP_AUTO_COLUMN_ID)?o.splice(r++,0,a):o.push(a)}),o=placeLockedColumns(o,s),!doesMovePassMarryChildren(o,i.getColTree())){_warn(39);return}e.list=o}function normaliseColumnMovedEventForColumnState(e,t,i,s,o){const n={};t.forEach(c=>n[c.colId]=c);const r={};e.forEach(c=>{n[c.colId]&&(r[c.colId]=!0)});const a=e.filter(c=>r[c.colId]),l=t.filter(c=>r[c.colId]),d=[];l.forEach((c,u)=>{const h=a&&a[u];if(h&&h.colId!==c.colId){const g=s.getCol(h.colId);g&&d.push(g)}}),d.length&&o.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:i})}var comparatorByIndex=(e,t,i,s)=>{const o=e[i.getId()],n=e[s.getId()],r=o!=null,a=n!=null;if(r&&a)return o-n;if(r)return-1;if(a)return 1;const l=t.indexOf(i),d=t.indexOf(s),c=l>=0,u=d>=0;return c&&u?l-d:c?-1:1},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"],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:s,rowGroupColsSvc:o,pivotColsSvc:n,valueColsSvc:r,visibleCols:a,colViewport:l,eventSvc: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.treeDept,m=_getColumnsFromTree(p),C={};m.forEach(w=>C[w.getId()]=w),this.colDefCols={tree:p,treeDepth:f,list:m,map:C},o?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.refreshCols(!0),a.refresh(e),l.checkViewportColumns(),d.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),d.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&s?.applyAutosizeStrategy()}refreshCols(e){if(!this.colDefCols)return;const t=this.cols?.tree;this.saveColOrder();const{autoColSvc:i,selectionColSvc:s,rowNumbersSvc:o,quickFilter:n,pivotResultCols:r,showRowGroupCols:a,rowAutoHeight:l,visibleCols:d,colViewport:c,eventSvc:u}=this.beans,h=this.selectCols(r,this.colDefCols);this.createColumnsForService([i,s,o],h);const g=_shouldMaintainColumnOrder(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(h),this.positionLockedCols(h),a?.refresh(),n?.refreshCols(),this.setColSpanActive(),l?.setAutoHeightActive(h),d.clear(),c.clear(),!_areEqual(t,this.cols.tree)&&u.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t){for(const i of e)i&&(i.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)}),i.addColumns(t))}selectCols(e,t){const i=e?.getPivotResultCols()??null;this.showingPivotResult=i!=null;const{map:s,list:o,tree:n,treeDepth:r}=i??t;return this.cols={list:o.slice(),map:{...s},tree:n.slice(),treeDepth:r},i&&(i.list.some(l=>this.cols?.map[l.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const e=this.isPivotMode()&&!this.showingPivotResult,t=this.beans.valueColsSvc?.columns;return this.cols.list.filter(s=>{const o=isColumnGroupAutoCol(s);if(e){const n=t?.includes(s);return o||n}else return o||s.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,i){_applyColumnState(this.beans,{state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},i)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const i=new Map(t.map((d,c)=>[d,c]));if(!e.list.some(d=>i.has(d)))return;const o=new Map(e.list.map(d=>[d,!0])),n=t.filter(d=>o.has(d)),r=new Map(n.map(d=>[d,!0])),a=e.list.filter(d=>!r.has(d)),l=n.slice();a.forEach(d=>{let c=d.getOriginalParent();if(!c){l.push(d);return}const u=[];for(;!u.length&&c;)c.getLeafColumns().forEach(f=>{const m=l.indexOf(f)>=0,C=u.indexOf(f)<0;m&&C&&u.push(f)}),c=c.getOriginalParent();if(!u.length){l.push(d);return}const h=u.map(p=>l.indexOf(p)),g=Math.max(...h);l.splice(g+1,0,d)}),e.list=l}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(){return this.colDefCols?this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[]):void 0}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);const{visibleCols:i,eventSvc:s}=this.beans;i.refresh(t),s.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:s}=this.beans;_forAll(this.colDefCols?.list,e),_forAll(i?.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)}getColFromCollection(e,t){if(t==null)return null;const{map:i,list:s}=t;if(typeof e=="string"&&i[e])return i[e];for(let o=0;o<s.length;o++)if(_columnsMatch(s[o],e))return s[o];return this.beans.autoColSvc?.getColumn(e)??this.beans.selectionColSvc?.getColumn(e)??null}},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}sortColumns(e){this.columns.sort(e),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,s,o,n,r){const a=this.colModel.getCols();if(!a||a.length===0)return;const l=new Map;t.forEach((c,u)=>l.set(c,u)),t.length=0,_exists(e)&&e.forEach(c=>{const u=this.colModel.getColDefCol(c);u&&t.push(u)}),t.forEach((c,u)=>{const h=l.get(c);if(h===void 0){l.set(c,0);return}s&&h!==u||l.delete(c)}),this.updateIndexMap(),(this.colModel.getColDefCols()||[]).forEach(c=>{const u=t.indexOf(c)>=0;n(c,u,r)}),o&&this.colModel.refreshCols(!1),this.visibleCols.refresh(r),this.dispatchColumnChangedEvent(this.eventSvc,i,[...l.keys()],r)}updateColList(e=[],t,i,s,o,n,r){if(!e||e.length===0)return;let a=!1;const l=new Set;if(e.forEach(c=>{if(!c)return;const u=this.colModel.getColDefCol(c);if(u){if(l.add(u),i){if(t.indexOf(u)>=0)return;t.push(u)}else{const h=t.indexOf(u);if(h<0)return;for(let g=h+1;g<t.length;g++)l.add(t[g]);_removeFromArray(t,u)}o(u,i,r),a=!0}}),!a)return;this.updateIndexMap(),s&&this.colModel.refreshCols(!1),this.visibleCols.refresh(r);const d=Array.from(l);this.eventSvc.dispatchEvent({type:n,columns:d,column:d.length===1?d[0]:null,source:r})}extractCols(e,t=[]){const i=this.columns,s=[],o=[],{setFlagFunc:n,getIndexFunc:r,getInitialIndexFunc:a,getValueFunc:l,getInitialValueFunc:d}=this.columnExtractors;(this.colModel.getColDefCols()||[]).forEach(g=>{const p=t.indexOf(g)<0,f=g.getColDef(),m=l(f),C=d(f),w=r(f),v=a(f);let b;m!==void 0?b=m:w!==void 0?w===null?b=!1:b=w>=0:p?C!==void 0?b=C:v!==void 0?b=v!=null&&v>=0:b=!1:b=i.indexOf(g)>=0,b&&((p?w!=null||v!=null:w!=null)?s.push(g):o.push(g))});const u=g=>{const p=r(g.getColDef()),f=a(g.getColDef());return p??f};s.sort((g,p)=>{const f=u(g),m=u(p);return f===m?0:f<m?-1:1});const h=[].concat(s);return i.forEach(g=>{o.indexOf(g)>=0&&h.push(g)}),o.forEach(g=>{h.indexOf(g)<0&&h.push(g)}),i.forEach(g=>{h.indexOf(g)<0&&n(g,!1,e)}),h.forEach(g=>{i.indexOf(g)<0&&n(g,!0,e)}),this.columns=h,this.updateIndexMap(),this.columns}restoreColumnOrder(e,t){const i=this.columns,s=this.colModel.getColDefCols();if(!i.length||!s)return e;const o=Object.keys(t),n=new Set(o),r=new Set(o),a=new Set(i.map(v=>{const b=v.getColId();return r.delete(b),b}).concat(o)),l=[],d={};let c=0;for(let v=0;v<s.length;v++){const b=s[v].getColId();a.has(b)&&(l.push(b),d[b]=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,w=v=>{const b=d[v];for(let y=g;y<b;y++){const S=l[y];r.has(S)&&(t[S][m]=u++,r.delete(S))}g=b};return i.forEach(v=>{const b=v.getColId();if(n.has(b))w(b),t[b][m]=u++;else{const y=v.getColDef();(y[m]===null||y[m]===void 0&&y[C]==null)&&(h||(y[p]||y[p]===void 0&&y[f]?w(b):(r.forEach(F=>{t[F][m]=u+d[F]}),u+=l.length,h=!0)),e[b]||(e[b]={colId:b}),e[b][m]=u++)}}),e}},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}},EmptyBean=class extends BeanStub{};function setupCompBean(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var CssClassManager=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){this.addOrRemoveCssClass(e,!0)}removeCssClass(e){this.addOrRemoveCssClass(e,!1)}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(o=>this.addOrRemoveCssClass(o,t));return}}if(this.cssClassStates[e]!==t&&e.length){const s=this.getGui();s&&s.classList.toggle(e,t),this.cssClassStates[e]=t}}},compIdSequence=0,RefPlaceholder=null,Component=class extends BeanStub{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=compIdSequence++,this.cssClassManager=new CssClassManager(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(i=>[i.selector,i])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui());const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;this.css?.forEach(t=>this.beans.environment.addGlobalCSS(t,e))}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,s=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const o=this[t];if(o===RefPlaceholder)this[t]=s??e;else{const n=i&&i[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${o}`)}}}createChildComponentsFromTags(e,t){const i=[];for(const s of e.childNodes??[])i.push(s);i.forEach(s=>{if(!(s instanceof HTMLElement))return;const o=this.createComponentFromElement(s,n=>{const r=n.getGui();if(r)for(const a of s.attributes??[])r.setAttribute(a.name,a.value)},t);if(o){if(o.addItems&&s.children.length){this.createChildComponentsFromTags(s,t);const n=Array.prototype.slice.call(s.children);o.addItems(n)}this.swapComponentForNode(o,e,s)}else s.childNodes&&this.createChildComponentsFromTags(s,t)})}createComponentFromElement(e,t,i){const s=e.nodeName,o=this.getDataRefAttribute(e),n=s.indexOf("AG-")===0,r=n?this.componentSelectors.get(s):null;let a=null;if(r){const l=i&&o?i[o]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(n)throw new Error(`selector: ${s}`);return this.applyElementsToComponent(e,o,i,a),a}swapComponentForNode(e,t,i){const s=e.getGui();t.replaceChild(s,i),t.insertBefore(document.createComment(i.nodeName),s),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(i=>i.setAttribute("tabindex",t.toString()))}setTemplate(e,t,i){let s;typeof e=="string"||e==null?s=_loadTemplate(e):s=_createElement(e),this.setTemplateFromElement(s,t,i)}setTemplateFromElement(e,t,i,s=!1){if(this.eGui=e,this.suppressDataRefValidation=s,t)for(let o=0;o<t.length;o++){const n=t[o];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:s}=this.getContainerAndElement(e,t)||{};!i||!s||s.insertAdjacentElement("afterbegin",i)}appendChild(e,t){const{element:i,parent:s}=this.getContainerAndElement(e,t)||{};!i||!s||s.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 s={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(s)}}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))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}};function _isPromise(e){return typeof e.then=="function"}var AgPromise=class O{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 O(i=>{let s=t.length;const o=new Array(s);t.forEach((n,r)=>{n.then(a=>{o[r]=a,s--,s===0&&i(o)})})}):O.resolve()}static resolve(t=null){return new O(i=>i(t))}then(t){return new O(i=>{this.status===1?i(t(this.resolution)):this.waiters.push(s=>i(t(s)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(i=>i(t))}onReject(t){}};function doesImplementIComponent(e){return e?e.prototype&&"getGui"in e.prototype:!1}function _getUserCompKeys(e,t,i,s){const{name:o}=i;let n,r,a,l,d,c;if(t){const u=t,h=u[o+"Selector"],g=h?h(s):null,p=f=>{typeof f=="string"?n=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?a=f:r=f)};g?(p(g.component),l=g.params,d=g.popup,c=g.popupPosition):p(u[o])}return{compName:n,jsComp:r,fwComp:a,paramsFromSelector:l,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,s=!1){return this.getCompDetails(this.gridOptions,e,t,i,s)}getCompDetails(e,t,i,s,o=!1){const{name:n,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=_getUserCompKeys(this.beans.frameworkOverrides,e,t,s),g;const p=w=>{const v=this.registry.getUserComponent(n,w);v&&(l=v.componentFromFramework?void 0:v.component,d=v.componentFromFramework?v.component:void 0,g=v.params)};if(a!=null&&p(a),l==null&&d==null&&i!=null&&p(i),l&&r&&!doesImplementIComponent(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!d){const{validation:w}=this.beans;o&&(a!==i||!i)?a?w?.isProvidedUserComp(a)||_error(50,{compName:a}):i?w||_error(260,{...this.gos.getModuleErrorParams(),propName:n,compName:i}):_error(216,{name:n}):i&&!w&&_error(146,{comp:i});return}const f=this.mergeParams(e,t,s,c,g),m=l==null,C=l??d;return{componentFromFramework:m,componentClass:C,params:f,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(C,m,f,t)}}newAgStackInstance(e,t,i,s){const o=!t;let n;o?n=new e:n=this.frameworkCompWrapper.wrap(e,s.mandatoryMethods,s.optionalMethods,s),this.createBean(n);const r=n.init?.(i);return r==null?AgPromise.resolve(n):r.then(()=>n)}mergeParams(e,t,i,s=null,o){const n={...i,...o},r=e,a=r&&r[t.name+"Params"];if(typeof a=="function"){const l=a(i);_mergeDeep(n,l)}else typeof a=="object"&&_mergeDeep(n,a);return _mergeDeep(n,s),n}},DateComponent={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},DragAndDropImageComponent={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"]},LoadingOverlayComponent={name:"loadingOverlayComponent",optionalMethods:["refresh"]},NoRowsOverlayComponent={name:"noRowsOverlayComponent",optionalMethods:["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(DragAndDropImageComponent,"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,s){return e.getCompDetails(t,FilterComponent,s,i,!0)}function _getDateCompDetails(e,t,i){return e.getCompDetails(t,DateComponent,"agDateInput",i,!0)}function _getLoadingOverlayCompDetails(e,t){return e.getCompDetailsFromGridOptions(LoadingOverlayComponent,"agLoadingOverlay",t,!0)}function _getNoRowsOverlayCompDetails(e,t){return e.getCompDetailsFromGridOptions(NoRowsOverlayComponent,"agNoRowsOverlay",t,!0)}function _getTooltipCompDetails(e,t){return e.getCompDetails(t.colDef,TooltipComponent,"agTooltipComponent",t,!0)}function _getFloatingFilterCompDetails(e,t,i,s){return e.getCompDetails(t,FloatingFilterComponent,s,i)}function _getFilterCompKeys(e,t){return _getUserCompKeys(e,t,FilterComponent)}function _mergeFilterParamsWithApplicationProvidedParams(e,t,i){return e.mergeParams(t,FilterComponent,i)}function _unwrapUserComp(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var allRegisteredModules=new Set,globalModulesMap={},gridModulesMap={},currentModuleVersion,areGridScopedModules=!1,isUmd=!1;function isValidModuleVersion(e){const[t,i]=e.version.split(".")||[],[s,o]=currentModuleVersion.split(".")||[];return t===s&&i===o}function runVersionChecks(e){currentModuleVersion||(currentModuleVersion=e.version);const t=i=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${i} Please update all modules to the same version.`;if(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.`)),e.validate){const i=e.validate();i.isValid||_errorOnce(`${i.message}`)}}function _registerModule(e,t){runVersionChecks(e);const i=e.rowModels??["all"];allRegisteredModules.add(e);let s;t!==void 0?(areGridScopedModules=!0,gridModulesMap[t]===void 0&&(gridModulesMap[t]={}),s=gridModulesMap[t]):s=globalModulesMap,i.forEach(o=>{s[o]===void 0&&(s[o]={}),s[o][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(o=>_registerModule(o,t))}function _unRegisterGridModules(e){delete gridModulesMap[e]}function _isModuleRegistered(e,t,i){const s=o=>!!globalModulesMap[o]?.[e]||!!gridModulesMap[t]?.[o]?.[e];return s(i)||s("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 _isUmd(){return isUmd}function _setUmd(){isUmd=!0}var ModuleRegistry=class{static register(e){_registerModule(e,void 0)}static registerModules(e){e.forEach(t=>_registerModule(t,void 0))}},GenericContext=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];e.beanClasses.forEach(t=>{const i=new t;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(i)}),e.derivedBeans?.forEach(t=>{const{beanName:i,bean:s}=t(this);this.beans[i]=s,this.createdBeans.push(s)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){if(!e)throw Error("null bean");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(i=>{i.preWireBeans?.(this.beans),i.wireBeans?.(this.beans)}),e.forEach(i=>i.preConstruct?.()),t&&e.forEach(t),e.forEach(i=>i.postConstruct?.())}getBeans(){return this.beans}getBean(e){return this.beans[e]}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=[]}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}},Context=class extends GenericContext{init(e){this.gridId=e.gridId,this.beans.context=this,this.destroyCallback=e.destroyCallback,super.init(e)}destroy(){super.destroy(),_unRegisterGridModules(this.gridId),this.destroyCallback?.()}getGridId(){return this.gridId}},CSS_FIRST_COLUMN="ag-column-first",CSS_LAST_COLUMN="ag-column-last";function _getHeaderClassesFromColDef(e,t,i,s){return _missing(e)?[]:getColumnClassesFromCollDef(e.headerClass,e,t,i,s)}function _getToolPanelClassesFromColDef(e,t,i,s){return _missing(e)?[]:getColumnClassesFromCollDef(e.toolPanelClass,e,t,i,s)}function refreshFirstAndLastStyles(e,t,i){e.addOrRemoveCssClass(CSS_FIRST_COLUMN,i.isColAtEdge(t,"first")),e.addOrRemoveCssClass(CSS_LAST_COLUMN,i.isColAtEdge(t,"last"))}function getClassParams(e,t,i,s){return _addGridCommonParams(t,{colDef:e,column:i,columnGroup:s})}function getColumnClassesFromCollDef(e,t,i,s,o){if(_missing(e))return[];let n;if(typeof e=="function"){const r=getClassParams(t,i,s,o);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}var 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"},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 _addFocusableContainerListener(e,t,i){t.addManagedElementListeners(i,{keydown:s=>{if(!s.defaultPrevented&&s.key===KeyCode.TAB){const o=s.shiftKey;_findNextFocusableElement(e,i,!1,o)||_focusNextGridCoreContainer(e,o)&&s.preventDefault()}}})}function _findFocusableElements(e,t,i=!1){const s=FOCUSABLE_SELECTOR;let o=FOCUSABLE_EXCLUDE;t&&(o+=", "+t),i&&(o+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(s)).filter(l=>_isVisible(l)),r=Array.prototype.slice.apply(e.querySelectorAll(o));return r.length?((l,d)=>l.filter(c=>d.indexOf(c)===-1))(n,r):n}function _focusInto(e,t=!1,i=!1,s=!1){const o=_findFocusableElements(e,s?".ag-tab-guard":null,i),n=t?_last(o):o[0];return n?(n.focus({preventScroll:!0}),!0):!1}function _findNextFocusableElement(e,t,i,s){const o=_findFocusableElements(t,i?':not([tabindex="-1"])':null),n=_getActiveDomElement(e);let r;i?r=o.findIndex(l=>l.contains(n)):r=o.indexOf(n);const a=r+(s?-1:1);return a<0||a>=o.length?null:o[a]}function _findTabbableParent(e,t=5){let i=0;for(;e&&_getTabIndex(e)===null&&++i<=t;)e=e.parentElement;return _getTabIndex(e)===null?null:e}function _focusGridInnerElement(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function _isHeaderFocusSuppressed(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function _isCellFocusSuppressed(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function _focusNextGridCoreContainer(e,t,i=!1){const s=e.ctrlsSvc.get("gridCtrl");return!i&&s.focusNextInnerContainer(t)?!0:((i||!t&&!s.isDetailGrid())&&s.forceFocusOutOfContainer(t),!1)}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,s){super(),this.cellCtrl=e,this.rowNode=i,this.rowCtrl=s,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){if(!this.cellCtrl.editing){if(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const i=this.cellCtrl.getFocusedCellPosition();this.beans.navigation?.navigateToNextCell(e,t,i,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:i}=this.beans;if(!t)return;const s=t.extendLatestRangeInDirection(e);s&&i?.ensureCellVisible(s)}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:i,beans:s,rowNode:o}=this,{gos:n,rangeSvc:r,eventSvc:a}=s;if(!i.editing){if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),_isDeleteKey(e,n.get("enableCellEditingOnBackspace"))){if(r&&_isCellSelectionEnabled(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(i.isCellEditable()){const{column:l}=i,d=this.beans.valueSvc.getDeleteValue(l,o);o.setDataValue(l,d,"cellClear")}}else s.editSvc?.startRowOrCellEdit(i,e,t);a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){const{cellCtrl:t,beans:i}=this;if(t.editing||this.rowCtrl.editing)this.beans.editSvc?.stopRowOrCellEdit(t,!1,!1,e.shiftKey);else if(i.gos.get("enterNavigatesVertically")){const s=e.shiftKey?KeyCode.UP:KeyCode.DOWN;i.navigation?.navigateToNextCell(null,s,t.cellPosition,!1)}else i.editSvc?.startRowOrCellEdit(t,KeyCode.ENTER,e),t.editing&&e.preventDefault()}onF2KeyDown(e){const{cellCtrl:t,beans:i}=this;t.editing||i.editSvc?.startRowOrCellEdit(t,KeyCode.F2,e)}onEscapeKeyDown(e){const{cellCtrl:t,beans:i}=this;t.editing&&i.editSvc?.stopRowOrCellEdit(t,!0)}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.editing)return;const s=e.key;s===KeyCode.SPACE?this.onSpaceKeyDown(e):this.beans.editSvc?.startRowOrCellEdit(this.cellCtrl,s,e)&&e.preventDefault()}onSpaceKeyDown(e){const{gos:t}=this.beans;!this.cellCtrl.editing&&_isRowSelection(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,this.rowNode,"spaceKey"),e.preventDefault()}destroy(){super.destroy()}},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"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,gos:s,editSvc:o}=this.beans,n=e.ctrlKey||e.metaKey;i&&n&&i.getCellRangeCount(this.cellCtrl.cellPosition)>1&&i.intersectLastRange(!0);const r=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(r);const a=this.column.getColDef();a.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{a.onCellClicked(r)})},0),(s.get("singleClickEdit")||a.singleClickEdit)&&!s.get("suppressClickEdit")&&!(e.shiftKey&&i?.getCellRanges().length!=0)&&o?.startRowOrCellEdit(this.cellCtrl,void 0,e)}onCellDoubleClicked(e){const{column:t,beans:i,cellCtrl:s}=this,{eventSvc:o,frameworkOverrides:n,gos:r,editSvc:a}=i,l=t.getColDef(),d=s.createEvent(e,"cellDoubleClicked");o.dispatchEvent(d),typeof l.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{l.onCellDoubleClicked(d)})},0),!r.get("singleClickEdit")&&!r.get("suppressClickEdit")&&a?.startRowOrCellEdit(s,null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:i,shiftKey:s}=e,o=e.target,{cellCtrl:n,beans:r}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:d,focusSvc:c,gos:u}=r;if(this.isRightClickInExistingRange(e))return;const h=l&&!l.isEmpty(),g=this.containsWidget(o),{cellPosition:p}=n,f=isRowNumberCol(p.column);if(d&&f&&!d.handleMouseDownOnCell(p,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!s||!h){const C=u.get("enableCellTextSelection")&&e.defaultPrevented,w=(_isBrowserSafari()||C)&&!n.editing&&!_isFocusableFormField(o)&&!g;n.focusCell(w)}if(s&&h&&!c.isCellFocused(p)){e.preventDefault();const m=c.getFocusedCell();if(m){const{column:C,rowIndex:w,rowPinned:v}=m,y=r.rowRenderer.getRowByPosition({rowIndex:w,rowPinned:v})?.getCellCtrl(C);y?.editing&&y.stopEditing(),c.setFocusedCell({column:C,rowIndex:w,rowPinned:v,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!g){if(l)if(f&&e.preventDefault(),s)l.extendLatestRangeToCell(p);else{const m=t||i;l.setRangeToCell(p,m)}a.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const i=t.isCellInAnyRange(this.cellCtrl.cellPosition),s=e.button===2||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(i&&s)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),s=t.contains(e.relatedTarget);return i&&s}destroy(){super.destroy()}},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();e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e&&(this.refreshSpanHeight(e),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:this.refreshSpanHeight.bind(this,e),recalculateRowBounds:this.refreshSpanHeight.bind(this,e)}))}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),s=[];if(i===1)s.push(e);else{let o=e;const n=e.getPinned();for(let r=0;o&&r<i&&(s.push(o),o=this.beans.visibleCols.getColAfter(o),!(!o||_missing(o)||n!==o.getPinned()));r++);}return s}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 s=t.bodyWidth;return i+s+(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",DOM_DATA_KEY_CELL_CTRL="cellCtrl";function _getCellCtrlForEventTarget(e,t){return _getCtrlForEventTarget(e,t,DOM_DATA_KEY_CELL_CTRL)}var instanceIdSequence2=0,CellCtrl=class extends BeanStub{constructor(e,t,i,s){super(),this.column=e,this.rowNode=t,this.rowCtrl=s,this.rangeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.tooltipFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.beans=i;const{colId:o,colIdSanitised:n}=e;this.instanceId=o+"-"+instanceIdSequence2++,this.colIdSanitised=n,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new CellPositionFeature(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.mouseListener=new CellMouseListenerFeature(this,e,this.column),this.keyboardListener=new CellKeyboardListenerFeature(this,e,this.rowNode,this.rowCtrl),this.column.isTooltipEnabled()&&this.enableTooltipFeature();const{rangeSvc:t}=e;t&&_isCellSelectionEnabled(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}setComp(e,t,i,s,o,n,r){this.comp=e,this.eGui=t,this.printLayout=o,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(s,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),n&&this.isCellEditable()?this.beans.editSvc?.startEditing(this):this.showValue(!1,!0),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(a=>a()),this.onCompAttachedFuncs=[])}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}showValue(e,t){const{beans:i,column:s,rowNode:o,rangeFeature:n}=this,{userCompFactory:r}=i,a=this.getValueToDisplay();let l;const d=o.stub&&o.groupData?.[s.getId()]==null,c=s.getColDef();if(d||this.isCellRenderer()){const u=this.createCellRendererParams();!d||isRowNumberCol(s)?l=_getCellRendererDetails(r,c,u):l=_getLoadingCellRendererDetails(r,c,u)}if(!l&&!d&&i.findSvc?.isMatch(o,s)){const u=this.createCellRendererParams();l=_getCellRendererDetails(r,{...s.getColDef(),cellRenderer:"agFindCellRenderer"},u)}this.comp.setRenderDetails(l,a,e),!t&&n&&_requestAnimationFrame(i,()=>n?.refreshHandle())}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e)),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()}isIncludeControl(e){return this.rowNode.rowPinned!=null?!1:typeof e=="function"||e===!0}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:i}=this.beans.gridOptions,s=_getCheckboxLocation(t),o=isColumnSelectionCol(this.column);return i==="custom"&&s!=="selectionColumn"&&o?!1:e.checkboxSelection||o&&typeof t=="object"&&_getCheckboxes(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e)),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),s=this.includeDndSource!=this.isIncludeControl(e.dndSource),o=this.isAutoHeight!=this.column.isAutoHeight();return t||i||s||o}onPopupEditorClosed(){this.editing&&this.beans.editSvc?.stopRowOrCellEdit(this)}stopEditing(e=!1){return this.beans.editSvc?.stopEditing(this,e)??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:i,rowNode:s,comp:o,eGui:n,beans:{valueSvc:r,gos:a}}=this;return _addGridCommonParams(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay(i,s),setValue:d=>r.setValue(s,i,d),formatValue:this.formatValue.bind(this),data:s.data,node:s,pinned:i.getPinned(),colDef:i.getColDef(),column:i,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:o.getParentOfValue(),registerRowDragger:(d,c,u,h)=>this.registerRowDragger(d,c,h),setTooltip:(d,c)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,c),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e)}refreshCell(e){if(this.suppressRefreshCell||this.editing)return;const t=this.column.getColDef(),i=e!=null&&!!e.newData,s=e!=null&&!!e.suppressFlash,o=t.field==null&&t.valueGetter==null&&t.showRowGroup==null,n=e&&e.forceRefresh||o||i,r=!!this.comp,a=this.updateAndFormatValue(r),l=n||a;if(r){if(l){this.showValue(i,!1);const d=this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering();!s&&!d&&t.enableCellChangeFlash&&this.beans.cellFlashSvc?.flashCell(this),this.customStyleFeature?.applyUserStyles(),this.customStyleFeature?.applyClassesFromColDef()}this.tooltipFeature?.refreshTooltip(),this.customStyleFeature?.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;return this.value=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode),this.valueFormatted=this.callValueFormatter(this.value),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:s,value:o,beans:n}=this;return _addGridCommonParams(n.gos,{type:t,node:i,data:i.data,value:o,column:s,colDef:s.getColDef(),rowPinned:i.rowPinned,event:e,rowIndex:i.rowIndex})}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){this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e})}restoreFocus(e=!1){if(!this.comp||this.editing||!this.isCellFocused()||!this.beans.focusSvc.shouldTakeFocus())return;const t=()=>{if(!this.isAlive())return;const i=this.comp.getFocusableElement();this.isCellFocused()&&i.focus({preventScroll:!0})};if(e){setTimeout(t,0);return}t()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged()}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.addOrRemoveCssClass(CSS_CELL_FIRST_RIGHT_PINNED,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.addOrRemoveCssClass(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();if(this.comp.addOrRemoveCssClass(CSS_CELL_FOCUS,i),i&&e&&e.forceBrowserFocus){let o=this.comp.getFocusableElement();if(this.editing){const n=_findFocusableElements(o,null,!0);n.length&&(o=n[0])}o.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}const s=t.gos.get("editType")==="fullRow";!i&&!s&&this.editing&&t.editSvc?.stopRowOrCellEdit(this),i&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:_makeNull(t),column:this.column}}setInlineEditingCss(){this.beans.editSvc?.setInlineEditingCss(this.rowCtrl)}applyStaticCssClasses(){const{comp:e}=this;e.addOrRemoveCssClass(CSS_CELL,!0),e.addOrRemoveCssClass(CSS_CELL_NOT_INLINE_EDITING,!0);const t=this.column.isAutoHeight()==!0;e.addOrRemoveCssClass(CSS_AUTO_HEIGHT,t),e.addOrRemoveCssClass(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.editing?this.beans.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.addOrRemoveCssClass(CSS_CELL_WRAP_TEXT,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),i=this.createEvent(e,"cellContextMenu"),{beans:s}=this;s.eventSvc.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{s.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 s=this.createRowDragComp(e,t,i);s&&(this.customRowDragComp=s,this.addDestroyFunc(()=>{this.beans.context.destroyBean(s),this.customRowDragComp=null}))}createRowDragComp(e,t,i){const s=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,i);if(s)return this.beans.context.createBean(s),s}cellEditorAttached(){this.onEditorAttachedFuncs.forEach(e=>e()),this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}},GRID_DOM_KEY="__ag_grid_instance";function _stampTopLevelGridCompWithGridInstance(e,t){t[GRID_DOM_KEY]=e.gridInstanceId}function _isEventFromThisGrid(e,t){return _isElementInThisGrid(e,t.target)}function _isElementInThisGrid(e,t){let i=t;for(;i;){const s=i[GRID_DOM_KEY];if(_exists(s))return s===e.gridInstanceId;i=i.parentElement}return!1}function _getCellPositionForEvent(e,t){return _getCellCtrlForEventTarget(e,t.target)?.getFocusedCellPosition()??null}function _getNormalisedMousePosition(e,t){const i=_isDomLayout(e.gos,"normal"),s=t;let o,n;if(s.clientX!=null||s.clientY!=null?(o=s.clientX,n=s.clientY):(o=s.x,n=s.y),i){const r=e.ctrlsSvc.getScrollFeature(),a=r.getVScrollPosition(),l=r.getHScrollPosition();o+=l.left,n+=a.top}return{x:o,y:n}}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 BeanStub{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.dragSvc=e.dragSvc,this.environment=e.environment,this.userCompFactory=e.userCompFactory}addDragSource(e,t=!1){const i={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:i,dragSource:e}),this.dragSvc.addDragSource(i)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){const{dragSourceAndParamsList:t,dragSvc:i}=this,s=t.find(o=>o.dragSource===e);s&&(i.removeDragSource(s.params),_removeFromArray(t,s))}destroy(){const{dragSourceAndParamsList:e,dragSvc:t,dropTargets:i}=this;e.forEach(s=>t.removeDragSource(s.params)),e.length=0,i.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),e.onDragStarted?.(),this.createDragAndDropImageComponent()}onDragStop(e){this.dragSource?.onDragStopped?.();const{lastDropTarget:t}=this;if(t?.onDragStop){const i=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(i)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t}=this;e?.onDragCancelled?.(),t?.onDragCancel&&t.onDragCancel(this.createDropTargetEvent(t,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){const i=this.getHorizontalDirection(e),s=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const o=this.dropTargets.filter(c=>this.isMouseOnDropTarget(e,c)),n=this.findCurrentDropTarget(e,o),{lastDropTarget:r,dragSource:a,dragAndDropImageComp:l,dragItem:d}=this;if(n!==r){if(this.leaveLastTargetIfExists(e,i,s,t),r!==null&&n===null&&a?.onGridExit?.(d),r===null&&n!==null&&a?.onGridEnter?.(d),this.enterDragTargetIfExists(n,e,i,s,t),n&&l){const{comp:c,promise:u}=l;c?c.setIcon(n.getIconName?n.getIconName():null,!1):u.then(h=>{h&&h.setIcon(n.getIconName?n.getIconName():null,!1)})}this.lastDropTarget=n}else if(n&&n.onDragging){const c=this.createDropTargetEvent(n,e,i,s,t);n.onDragging(c)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,i=[[e.getContainer()]];return t?i.concat(t):i}isMouseOnDropTarget(e,t){const i=this.getAllContainersFromDropTarget(t);let s=!1;const o=(a,l)=>{for(const d of l){const{width:c,height:u,left:h,right:g,top:p,bottom:f}=d.getBoundingClientRect();if(c===0||u===0)return!1;const m=a.clientX>=h&&a.clientX<g,C=a.clientY>=p&&a.clientY<f;if(!m||!C)return!1}return!0};for(const a of i)if(o(e,a)){s=!0;break}const{eElement:n,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(n)?!1:s&&t.isInterestedIn(r,n)}findCurrentDropTarget(e,t){const i=t.length;if(i===0)return null;if(i===1)return t[0];const o=_getRootNode(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const n of o)for(const r of t)if(this.getAllContainersFromDropTarget(r).flatMap(l=>l).indexOf(n)!==-1)return r;return null}enterDragTargetIfExists(e,t,i,s,o){if(e&&e.onDragEnter){const n=this.createDropTargetEvent(e,t,i,s,o);e.onDragEnter(n)}}leaveLastTargetIfExists(e,t,i,s){const{lastDropTarget:o}=this;if(!o)return;if(o.onDragLeave){const r=this.createDropTargetEvent(o,e,t,i,s);o.onDragLeave(r)}const n=this.getDragAndDropImageComponent();n&&n.setIcon(null,!1)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(i=>i.external).find(i=>i.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){const i=this.ctrlsSvc.getGridBodyCtrl().eGridBody,{dropZoneTarget:s}=e;return i.contains(s)}getHorizontalDirection(e){const t=this.eventLastTime?.clientX,i=e.clientX;return t===i?null:t>i?"left":"right"}getVerticalDirection(e){const t=this.eventLastTime?.clientY,i=e.clientY;return t===i?null:t>i?"up":"down"}createDropTargetEvent(e,t,i,s,o){const n=e.getContainer(),r=n.getBoundingClientRect(),{dragItem:a,dragSource:l,gos:d}=this,c=t.clientX-r.left,u=t.clientY-r.top;return _addGridCommonParams(d,{event:t,x:c,y:u,vDirection:s,hDirection:i,dragSource:l,fromNudge:o,dragItem:a,dropZoneTarget:n})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&_anchorElementToMouseMoveEvent(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;if(e){const{comp:t}=e;if(t){const i=t.getGui();this.dragAndDropImageParent?.removeChild(i),this.destroyBean(t)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e,gos:t,userCompFactory:i}=this;if(!e)return;const s=_getDragAndDropImageCompDetails(i,_addGridCommonParams(t,{dragSource:e}));if(!s)return;const o=s.newAgStackInstance();this.dragAndDropImageComp={promise:o},o.then(n=>{!n||!this.isAlive()||(this.processDragAndDropImageComponent(n),this.dragAndDropImageComp.comp=n)})}processDragAndDropImageComponent(e){const{dragSource:t,environment:i}=this;if(!t)return;const s=e.getGui();s.style.setProperty("position","absolute"),s.style.setProperty("z-index","9999"),_stampTopLevelGridCompWithGridInstance(this.gos,s),i.applyThemeClasses(s),e.setIcon(null,!1);let{dragItemName:o}=t;typeof o=="function"&&(o=o()),e.setLabel(o||""),s.style.top="20px",s.style.left="20px";const n=_getPageBody(this.beans);this.dragAndDropImageParent=n,n?n.appendChild(s):_warn(54)}registerGridDropTarget(e,t){const i={getContainer:e,isInterestedIn:s=>s===1||s===0,getIconName:()=>"notAllowed"};this.addDropTarget(i),t.addDestroyFunc(()=>this.removeDropTarget(i))}},AutoScrollService=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.indexOf("x")!==-1,this.scrollVertically=e.scrollAxis.indexOf("y")!==-1,this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){const i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;const s=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=e.clientX<s.left+o,this.tickRight=e.clientX>s.right-o,this.tickUp=e.clientY<s.top+o&&!i,this.tickDown=e.clientY>s.bottom-o&&!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)}};function _createCellId(e){const{rowIndex:t,rowPinned:i,column:s}=e;return`${t}.${i??"null"}.${s.getId()}`}function _areCellsEqual(e,t){const i=e.column===t.column,s=e.rowPinned===t.rowPinned,o=e.rowIndex===t.rowIndex;return i&&s&&o}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||!e&&t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function _getFirstRow(e){let t=0,i;const{pinnedRowModel:s,rowModel:o,pageBounds:n}=e;return s?.getPinnedTopRowCount()?i="top":o.getRowCount()?(i=null,t=n.getFirstRow()):s?.getPinnedBottomRowCount()&&(i="bottom"),i===void 0?null:{rowIndex:t,rowPinned:i}}function _getLastRow(e){let t,i=null;const{pinnedRowModel:s,pageBounds:o}=e,n=s?.getPinnedBottomRowCount(),r=s?.getPinnedTopRowCount();return n?(i="bottom",t=n-1):e.rowModel.getRowCount()?(i=null,t=o.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 s=e.rowRenderer.getRowByPosition(t);return s?s.getCellCtrl(t.column):null}function _getRowAbove(e,t){const{rowIndex:i,rowPinned:s}=t,{pageBounds:o,pinnedRowModel:n,rowModel:r}=e;if(i===0)return s==="top"?null:s==="bottom"&&r.isRowsToRender()?{rowIndex:o.getLastRow(),rowPinned:null}:n?.isRowsToRender("top")?{rowIndex:n.getPinnedTopRowCount()-1,rowPinned:"top"}:null;const a=s?void 0:r.getRow(i);return getNextStickyPosition(e,a,!0)??{rowIndex:i-1,rowPinned:s}}function _getRowBelow(e,t){const{rowIndex:i,rowPinned:s}=t,{pageBounds:o,pinnedRowModel:n,rowModel:r}=e;if(isLastRowInContainer(e,t))return s==="bottom"?null:s==="top"&&r.isRowsToRender()?{rowIndex:o.getFirstRow(),rowPinned:null}:n?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;const a=s?void 0:r.getRow(i);return getNextStickyPosition(e,a)??{rowIndex:i+1,rowPinned:s}}function getNextStickyPosition(e,t,i){const{gos:s,rowRenderer:o}=e;if(!t?.sticky||!_isGroupRowsSticky(s))return;const n=i?o.getStickyTopRowCtrls():o.getStickyBottomRowCtrls();let r;for(let a=0;a<n.length;a++)if(n[a].rowNode.rowIndex===t.rowIndex){r=n[a+(i?-1:1)];break}return r?{rowIndex:r.rowNode.rowIndex,rowPinned:null}:void 0}function isLastRowInContainer(e,t){const{rowPinned:i,rowIndex:s}=t,{pinnedRowModel:o,pageBounds:n}=e;return i==="top"?(o?.getPinnedTopRowCount()??0)-1<=s:i==="bottom"?(o?.getPinnedBottomRowCount()??0)-1<=s:n.getLastRow()<=s}var RowDragFeature=class extends BeanStub{constructor(e){super(),this.eContainer=e}postConstruct(){const{rowModel:e,gos:t,ctrlsSvc:i}=this.beans;_isClientSideRowModel(t,e)&&(this.clientSideRowModel=e),i.whenReady(this,s=>{const o=s.gridBodyCtrl;this.autoScrollService=new AutoScrollService({scrollContainer:o.eBodyViewport,scrollAxis:"y",getVerticalPosition:()=>o.scrollFeature.getVScrollPosition().top,setVerticalPosition:n=>o.scrollFeature.setVerticalScrollPosition(n),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){const{rowGroupColsSvc:e,filterManager:t,sortSvc:i}=this.beans;return!!((e?.columns??[]).length||t?.isAnyFilterPresent()||i?.isSortActive())}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const s=[...this.beans.selectionSvc?.getSelectedNodes()??[]].sort((o,n)=>o.rowIndex==null||n.rowIndex==null?0:this.getRowIndexNumber(o)-this.getRowIndexNumber(n));if(s.indexOf(t)!==-1)return s}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent("rowDragEnter",e),this.getRowNodes(e).forEach(t=>{this.setRowNodeDragging(t,!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){const{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}onEnterOrDragging(e){this.dispatchGridEvent("rowDragMove",e),this.lastDraggingEvent=e;const t=_getNormalisedMousePosition(this.beans,e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){const{dragAndDrop:i,gos:s}=this.beans,o=this.isFromThisGrid(e),n=s.get("rowDragManaged"),r=e.dragItem.rowNodes;n&&this.shouldPreventRowMove()||(s.get("suppressMoveWhenRowDragging")||!o?i.isDropZoneWithinThisGrid(e)&&this.clientSideRowModel.highlightRowAtPixel(r[0],t):this.moveRows(r,t))}getRowIndexNumber(e){const t=e.getRowIndexString();return parseInt(_last(t.split("-")),10)}moveRowAndClearHighlight(e){const t=this.clientSideRowModel,i=t.getLastHighlightedRowNode(),s=i&&i.highlighted==="Below",o=_getNormalisedMousePosition(this.beans,e).y,n=e.dragItem.rowNodes;let r=s?1:0;if(this.isFromThisGrid(e))n.forEach(a=>{a.rowTop<o&&(r-=1)}),this.moveRows(n,o,r);else{const a=_getRowIdCallback(this.gos);let l=t.getRowIndexAtPixel(o)+1;t.getHighlightPosition(o)==="Above"&&l--,t.updateRowData({add:n.filter(d=>!t.getRowNode(a?.({data:d.data,level:0,rowPinned:d.rowPinned})??d.data.id)).map(d=>d.data),addIndex:l})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,i=0){const s=this.beans.focusSvc,o=s.getFocusedCell(),n=o&&_getCellByPosition(this.beans,o);this.clientSideRowModel.ensureRowsAtPixel(e,t,i)&&(n?n.focusCell():s.clearFocusedCell())}addRowDropZone(e){if(!e.getContainer()){_warn(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e)){_warn(56);return}let i={getContainer:e.getContainer};e.fromGrid?i=e:(e.onDragEnter&&(i.onDragEnter=o=>{e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",o))}),e.onDragLeave&&(i.onDragLeave=o=>{e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",o))}),e.onDragging&&(i.onDragging=o=>{e.onDragging(this.draggingToRowDragEvent("rowDragMove",o))}),e.onDragStop&&(i.onDragStop=o=>{e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",o))}),e.onDragCancel&&(i.onDragCancel=o=>{e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",o))}));const s={isInterestedIn:o=>o===2,getIconName:()=>"move",external:!0,...i};t.addDropTarget(s),this.addDestroyFunc(()=>t.removeDropTarget(s))}getRowDropZone(e){const t=this.getContainer.bind(this),i=this.onDragEnter.bind(this),s=this.onDragLeave.bind(this),o=this.onDragging.bind(this),n=this.onDragStop.bind(this),r=this.onDragCancel.bind(this);let a;return e?a={getContainer:t,onDragEnter:e.onDragEnter?l=>{i(l),e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",l))}:i,onDragLeave:e.onDragLeave?l=>{s(l),e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",l))}:s,onDragging:e.onDragging?l=>{o(l),e.onDragging(this.draggingToRowDragEvent("rowDragMove",l))}:o,onDragStop:e.onDragStop?l=>{n(l),e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",l))}:n,onDragCancel:e.onDragCancel?l=>{r(l),e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",l))}:r,fromGrid:!0}:a={getContainer:t,onDragEnter:i,onDragLeave:s,onDragging:o,onDragStop:n,onDragCancel:r,fromGrid:!0},a}draggingToRowDragEvent(e,t){const i=this.beans,{pageBounds:s,rowModel:o,gos:n}=i,r=_getNormalisedMousePosition(i,t).y,a=r>s.getCurrentPageHeight();let l=-1,d;return a||(l=o.getRowIndexAtPixel(r),d=o.getRow(l)),_addGridCommonParams(n,{type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:l,overNode:d,y:r,vDirection:t.vDirection})}dispatchGridEvent(e,t){const i=this.draggingToRowDragEvent(e,t);this.eventSvc.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent("rowDragEnd",e),this.stopDragging(e);const{dragAndDrop:t,gos:i}=this.beans;i.get("rowDragManaged")&&(i.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&t.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e);const{dragAndDrop:t,gos:i}=this.beans;i.get("rowDragManaged")&&(i.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&t.isDropZoneWithinThisGrid(e)&&this.clearRowHighlight()}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(t=>{this.setRowNodeDragging(t,!1)})}setRowNodeDragging(e,t){e.dragging!==t&&(e.dragging=t,e.dispatchRowEvent("draggingChanged"))}};function _areEventsNear(e,t,i){if(i===0)return!1;const s=Math.abs(e.clientX-t.clientX),o=Math.abs(e.clientY-t.clientY);return Math.max(s,o)<=i}var DragService=class extends BeanStub{constructor(){super(...arguments),this.beanName="dragSvc",this.dragEndFunctions=[],this.dragSources=[]}destroy(){const{dragSources:e}=this;e.forEach(this.removeListener.bind(this)),e.length=0,super.destroy()}removeListener(e){const t=e.dragSource.eElement,i=e.mouseDownListener;if(t.removeEventListener("mousedown",i),e.touchEnabled){const s=e.touchStartListener;t.removeEventListener("touchstart",s,{passive:!0})}}removeDragSource(e){const{dragSources:t}=this,i=t.find(s=>s.dragSource===e);i&&(this.removeListener(i),_removeFromArray(t,i))}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:i,includeTouch:s,stopPropagationForTouch:o}=e;i.addEventListener("mousedown",t);let n=null;const r=this.gos.get("suppressTouch");s&&!r&&(n=a=>{_isFocusableFormField(a.target)||(o&&a.stopPropagation(),this.onTouchStart(e,a))},i.addEventListener("touchstart",n,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:n,touchEnabled:!!s})}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const i=t.touches[0];this.touchLastTime=i,this.touchStart=i;const s=l=>this.onTouchMove(l,e.eElement),o=l=>this.onTouchUp(l,e.eElement),n=l=>{l.cancelable&&l.preventDefault()},r=t.target,a=[{target:_getRootNode(this.beans),type:"touchmove",listener:n,options:{passive:!1}},{target:r,type:"touchmove",listener:s,options:{passive:!0}},{target:r,type:"touchend",listener:o,options:{passive:!0}},{target:r,type:"touchcancel",listener:o,options:{passive:!0}}];this.addTemporaryEvents(a),e.dragStartPixels===0&&this.onCommonMove(i,this.touchStart,e.eElement)}onMouseDown(e,t){const i=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||i._alreadyProcessedByDragService||(i._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const s=d=>this.onMouseMove(d,e.eElement),o=d=>this.onMouseUp(d,e.eElement),n=d=>d.preventDefault(),r=d=>{d.key===KeyCode.ESCAPE&&this.cancelDrag(e.eElement)},a=_getRootNode(this.beans),l=[{target:a,type:"mousemove",listener:s},{target:a,type:"mouseup",listener:o},{target:a,type:"contextmenu",listener:n},{target:a,type:"keydown",listener:r}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:i,type:s,listener:o,options:n}=t;i.addEventListener(s,o,n)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:i,type:s,listener:o,options:n}=t;i.removeEventListener(s,o,n)})})}isEventNearStartEvent(e,t){const{dragStartPixels:i}=this.currentDragParams,s=_exists(i)?i:4;return _areEventsNear(e,t,s)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,i){if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventSvc.dispatchEvent({type:"dragStarted",target:i}),this.currentDragParams.onDragStart(t),!this.currentDragParams){this.dragging=!1;return}this.currentDragParams.onDragging(t)}this.currentDragParams?.onDragging(e)}onTouchMove(e,t){const i=this.getFirstActiveTouch(e.touches);i&&this.onCommonMove(i,this.touchStart,t)}onMouseMove(e,t){_isBrowserSafari()&&_getDocument(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const{gos:t}=this,i=t.get("enableCellTextSelection"),s=e.type==="mousemove",o=n=>!!n.target?.tagName.toLocaleLowerCase()?.match("^a$|textarea|input|select|button");return i&&s&&e.cancelable&&_isEventFromThisGrid(t,e)&&!o(e)}onTouchUp(e,t){let i=this.getFirstActiveTouch(e.changedTouches);i||(i=this.touchLastTime),this.onUpCommon(i,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),this.currentDragParams?.onDragCancel?.(),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null;const{dragEndFunctions:e}=this;e.forEach(t=>t()),e.length=0}};function createUniqueColumnGroupId(e,t){return e+"_"+t}function isColumnGroup2(e){return e instanceof AgColumnGroup}var AgColumnGroup=class extends BeanStub{constructor(e,t,i,s){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=i,this.pinned=s,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null}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(){if(this.displayedChildren.forEach(e=>{isColumnGroup2(e)&&e.checkLeft()}),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;return this.displayedChildren?.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),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){this.displayedChildren.forEach(t=>{isColumn(t)?e.push(t):isColumnGroup2(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{isColumn(t)?e.push(t):isColumnGroup2(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||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(i=>{if(isColumnGroup2(i)&&(!i.displayedChildren||!i.displayedChildren.length))return;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"})}},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.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=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.highlighted=null,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:i,selectionSvc:s,eventSvc:o}=this.beans,n=this.data;this.data=e,i?.onDataChanged(),this.updateDataOnDetailNode(),s?.updateRowSelectable(this),this.resetQuickFilterAggregateText();const r=this.createDataChangedEvent(e,n,t);this.__localEventService?.dispatchEvent(r),o.dispatchEvent({type:"rowNodeDataChanged",node:this})}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.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,s=i?.createDaemonNode?.(this),o=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),i&&(i.updateRowSelectable(this),i.syncInRowNode(this,s));const n=this.createDataChangedEvent(e,o,!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){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(e!==null))}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:s,valueSvc:o,gos:n,selectionSvc:r}=this.beans,a=typeof e!="string"?e:s.getCol(e)??s.getColDefCol(e);if(!a)return!1;const l=o.getValueForDisplay(a,this);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:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:i}),!1}const d=o.setValue(this,a,t,i);return this.dispatchCellChangedEvent(a,t,l),r?.updateRowSelectable(this),d}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;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 s={type:"cellChanged",node:this,column:e,newValue:t,oldValue:i};this.__localEventService?.dispatchEvent(s)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){return this.footer?this.sibling.isSelected():this.__selected}depthFirstSearch(e){this.childrenAfterGroup?.forEach(t=>t.depthFirstSearch(e)),e(this)}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),this.__localEventService.addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e),this.__localEventService||(this.__localEventService=new LocalEventService),this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.__localEventService);const i=this.frameworkEventListenerService?.wrap(t)??t;this.__localEventService.addEventListener(e,i)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(t)??t;this.removeLocalListener(e,i)}removeLocalListener(e,t){this.__localEventService?.removeEventListener(e,t),this.__localEventService?.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&&t.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}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"))}};function _createGlobalRowEvent(e,t,i){return _addGridCommonParams(t,{type:i,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var FilterWrapperElement={tag:"div",cls:"ag-filter"},FilterWrapperComp=class extends Component{constructor(e,t){super(FilterWrapperElement),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){return this.filterWrapper?.filterPromise??null}afterInit(){return this.filterWrapper?.filterPromise?.then(()=>{})??AgPromise.resolve()}afterGuiAttached(e){this.filterWrapper?.filterPromise?.then(t=>{t?.afterGuiAttached?.(e)})}afterGuiDetached(){this.filterWrapper?.filterPromise?.then(e=>{e?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:i}=this;this.filterWrapper=this.beans.filterManager?.getOrCreateFilterWrapper(t)??null,this.filterWrapper?.filterPromise&&this.filterWrapper.filterPromise.then(s=>{const o=s.getGui();_exists(o)||_warn(69,{guiFromFilter:o}),this.appendChild(o),e&&this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:i,eGui:this.getGui()})})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(_clearElement(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},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")]},PositionableFeature=class extends BeanStub{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=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,i=t/2-this.getWidth()/2,s=e/2-this.getHeight()/2;this.offsetElement(i,s)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:i,width:s,minHeight:o,height:n,x:r,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,d=0;const c=_isVisible(this.element);if(c){const u=this.findBoundaryElement(),h=window.getComputedStyle(u);if(h.minWidth!=null){const g=u.offsetWidth-this.element.offsetWidth;d=parseInt(h.minWidth,10)-g}if(h.minHeight!=null){const g=u.offsetHeight-this.element.offsetHeight;l=parseInt(h.minHeight,10)-g}}if(this.minHeight=o||l,this.minWidth=i||d,s&&this.setWidth(s),n&&this.setHeight(n),(!s||!n)&&this.refreshSize(),e)this.center();else if(r||a)this.offsetElement(r,a);else if(c&&t){let u=this.boundaryEl,h=!0;if(u||(u=this.findBoundaryElement(),h=!1),u){const g=parseFloat(u.style.top),p=parseFloat(u.style.left);h?this.offsetElement(isNaN(p)?0:p,isNaN(g)?0:g):this.setPosition(p,g)}}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}}Object.keys(e).forEach(t=>{const s=!!e[t],o=this.getResizerElement(t),n={dragStartPixels:0,eElement:o,onDragStart:r=>this.onResizeStart(r,t),onDragging:this.onResize.bind(this),onDragStop:r=>this.onResizeEnd(r,t)};(s||!this.isAlive()&&!s)&&(s?(this.dragSvc?.addDragSource(n),this.resizeListeners.push(n),o.style.pointerEvents="all"):o.style.pointerEvents="none",this.resizable[t]=s)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width: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 s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)_setFixedHeight(i,e),e=_getAbsoluteHeight(i),s=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const o=this.getAvailableHeight();o&&e>o&&(e=o)}this.getHeight()!==e&&(s?(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:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:i}=this.offsetParent;if(!i)return null;const s=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:s.top,r=e?0:o.top;let a=0;if(t){const d=this.element.parentElement;if(d){const{bottom:c}=d.getBoundingClientRect();a=c-s.bottom}}return i+r-n-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:i}=this.config;let s=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)_setFixedWidth(t,e),e=_getAbsoluteWidth(t),s=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:o}=this.offsetParent,n=i?this.position.x:this.element.getBoundingClientRect().left;o&&e+n>o&&(e=o-n)}this.getWidth()!==e&&(s?(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:parseFloat(e)))}offsetElement(e=0,t=0){const{forcePopupParentAsOffsetParent:i}=this.config,s=i?this.boundaryEl:this.element;s&&(this.popupSvc?.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(s.style.left),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=_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:s,anywhereWithin:o,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!i,!!o,r)?0:r,d=this.shouldSkipY(t,!!s,n,a)?0:a;return{movementX:l,movementY:d}}shouldSkipX(e,t,i,s){const o=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:o.left;let l=a<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return l?!0:(t?l=s<0&&e.clientX>a+n.left||s>0&&e.clientX<a+n.left:i?l=s<0&&e.clientX>r.right||s>0&&e.clientX<a+n.left:l=s<0&&e.clientX>r.right||s>0&&e.clientX<r.right,l)}shouldSkipY(e,t,i=0,s){const o=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:o.top;let l=a<=0&&n.top>=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return l?!0:(t?l=s<0&&e.clientY>a+n.top+i||s>0&&e.clientY<a+n.top:l=s<0&&e.clientY>r.bottom||s>0&&e.clientY<r.bottom,l)}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(_createElement(RESIZE_TEMPLATE)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${RESIZE_CONTAINER_STYLE}`);e&&this.element.removeChild(e),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:s}=this.config;!i&&!s&&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(let s=0;s<e.length;s++){const o=e[s],n=!!o.style.flex&&o.style.flex!=="0 0 auto";if(o===this.element)continue;let r=this.minHeight||0,a=this.minWidth||0;if(n){const l=window.getComputedStyle(o);l.minHeight&&(r=parseInt(l.minHeight,10)),l.minWidth&&(a=parseInt(l.minWidth,10))}else r=o.offsetHeight,a=o.offsetWidth;t+=r,i+=a}return{height:t,width:i}}applySizeToSiblings(e){let t=null;const i=this.getSiblings();if(i){for(let s=0;s<i.length;s++){const o=i[s];o!==t&&(e?o.style.height=`${o.offsetHeight}px`:o.style.width=`${o.offsetWidth}px`,o.style.flex="0 0 auto",o===this.element&&(t=i[s+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:s,isRight:o,isBottom:n,isLeft:r}=this.currentResizer,a=o||r,l=n||s,{movementX:d,movementY:c}=this.calculateMouseMovement({e,isLeft:r,isTop:s}),u=this.position.x,h=this.position.y;let g=0,p=0;if(a&&d){const f=r?-1:1,m=this.getWidth(),C=m+d*f;let w=!1;r&&(g=m-C,(u+g<=0||C<=this.minWidth)&&(w=!0,g=0)),w||this.setWidth(C)}if(l&&c){const f=s?-1:1,m=this.getHeight(),C=m+c*f;let w=!1;s?(p=m-C,(h+p<=0||C<=this.minHeight)&&(w=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&m<C&&this.getMinSizeOfSiblings().height+C>this.element.parentElement.offsetHeight&&(w=!0),w||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 s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());const{movementX:o,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(t+o,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()}},FOCUS_MANAGED_CLASS="ag-focus-managed",ManagedFocusFeature=class extends BeanStub{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:i=>{if(i.defaultPrevented)return;const s=_findNextFocusableElement(this.beans,this.eFocusable,!1,i.shiftKey);s&&(s.focus(),i.preventDefault())},...t}}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||_isStopPropagationForAgGrid(t))return;const{callbacks:i}=this;if(i.shouldStopEventPropagation(t)){_stopPropagationForAgGrid(t);return}t.key===KeyCode.TAB?i.onTabKeyDown(t):i.handleKeyDown&&i.handleKeyDown(t)}})}},FILTER_LOCALE_TEXT={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};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}var ProvidedFilter=class extends Component{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=RefPlaceholder,this.buttonListeners=[],this.defaultDebounceMs=0}postConstruct(){this.resetTemplate(),this.createManagedBean(new ManagedFocusFeature(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new PositionableFeature(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t?.removeEventListener("submit",this.onFormSubmit);const i={tag:"form",cls:"ag-filter-wrapper",children:[{tag:"div",ref:"eFilterBody",cls:`ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper`,children:[this.createBodyTemplate()]}]};this.setTemplate(i,this.getAgComponents(),e),t=this.getGui(),t?.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.params.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.params=e,this.applyActive=isUseApplyButton(e),this.resetButtonsPanel(e)}updateParams(e){this.params=e,this.applyActive=isUseApplyButton(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){const{buttons:i,readOnly:s}=t??{},{buttons:o,readOnly:n}=e;if(s===n&&_jsonEquals(i,o))return;const r=o&&o.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(_clearElement(this.eButtonsPanel),this.buttonListeners.forEach(d=>d()),this.buttonListeners=[]):r&&(this.eButtonsPanel=_createElement({tag:"div",cls:"ag-filter-apply-panel"})),!r){this.eButtonsPanel&&_removeFromParent(this.eButtonsPanel);return}const a=document.createDocumentFragment(),l=d=>{let c;const u=d?this.translate(`${d}Filter`):void 0;switch(d){case"apply":c=p=>this.onBtApply(!1,!1,p);break;case"clear":c=()=>this.onBtClear();break;case"reset":c=()=>this.onBtReset();break;case"cancel":c=p=>{this.onBtCancel(p)};break;default:_warn(75);return}const g=_loadTemplate(`<button