(function(Zi,$e){typeof exports=="object"&&typeof module=="object"?module.exports=$e():typeof define=="function"&&define.amd?define("agGrid",[],$e):typeof exports=="object"?exports.agGrid=$e():Zi.agGrid=$e()})(typeof self<"u"?self:typeof globalThis<"u"?globalThis:this,()=>{var Zi={},$e={exports:Zi};if(typeof nD>"u")var nD=function(t){throw new Error("Unknown module: "+t)};var Pn=Object.defineProperty,am=Object.getOwnPropertyDescriptor,dm=Object.getOwnPropertyNames,cm=Object.prototype.hasOwnProperty,um=(e,t)=>{for(var i in t)Pn(e,i,{get:t[i],enumerable:!0})},hm=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of dm(t))!cm.call(e,s)&&s!==i&&Pn(e,s,{get:()=>t[s],enumerable:!(o=am(t,s))||o.enumerable});return e},gm=e=>hm(Pn({},"__esModule",{value:!0}),e),Ga={};um(Ga,{ALWAYS_SYNC_GLOBAL_EVENTS:()=>Vo,AgAbstractCellEditor:()=>wo,AgAbstractInputField:()=>Bt,AgAbstractLabel:()=>mh,AgCheckbox:()=>Ao,AgCheckboxSelector:()=>qs,AgColumn:()=>ut,AgColumnGroup:()=>ki,AgContentEditableField:()=>sm,AgContentEditableFieldSelector:()=>tD,AgFilterButtonSelector:()=>_F,AgInputDateField:()=>Rp,AgInputNumberField:()=>pn,AgInputNumberFieldSelector:()=>xp,AgInputTextArea:()=>Fp,AgInputTextField:()=>rt,AgInputTextFieldSelector:()=>Ko,AgPickerField:()=>Pp,AgPopupComponent:()=>Ps,AgPromise:()=>Y,AgProvidedColumnGroup:()=>Ai,AgRadioButton:()=>ca,AgRadioButtonSelector:()=>QF,AgSelect:()=>fn,AgSelectSelector:()=>Dp,AgToggleButton:()=>nm,AgToggleButtonSelector:()=>oD,AlignedGridsModule:()=>qg,AllCommunityModule:()=>im,AutoScrollService:()=>$u,BaseColsService:()=>YP,BaseComponentWrapper:()=>QP,BaseCreator:()=>hp,BaseGridSerializingSession:()=>pp,BaseSelectionService:()=>jf,BeanStub:()=>S,BigIntFilterModule:()=>Tf,CellApiModule:()=>Lg,CellRangeType:()=>jc,CellSpanModule:()=>$f,CellStyleModule:()=>Jf,CheckboxEditorModule:()=>zp,ClientSideRowModelApiModule:()=>np,ClientSideRowModelModule:()=>sp,ColumnApiModule:()=>Cl,ColumnAutoSizeModule:()=>dp,ColumnHoverModule:()=>cp,ColumnKeyCreator:()=>ic,Component:()=>U,CssClassManager:()=>ar,CsvExportModule:()=>mp,CustomEditorModule:()=>Up,CustomFilterModule:()=>Pf,DateEditorModule:()=>Np,DateFilterModule:()=>Af,Direction:()=>Cu,DragAndDropModule:()=>Zu,DragSourceType:()=>Rc,EventApiModule:()=>Bf,ExternalFilterModule:()=>kf,FakeHScrollComp:()=>pu,FakeVScrollComp:()=>mu,FilterButtonComp:()=>da,FilterComp:()=>nf,FilterWrapperComp:()=>sf,GROUP_AUTO_COLUMN_ID:()=>gt,GROUP_HIERARCHY_COLUMN_ID_PREFIX:()=>BC,GridBodyCtrl:()=>Au,GridCoreCreator:()=>zg,GridCtrl:()=>Hu,GridHeaderCtrl:()=>lu,GridStateModule:()=>Vf,GroupInstanceIdCreator:()=>al,HeaderRowContainerCtrl:()=>hu,HighlightChangesModule:()=>_f,InfiniteRowModelModule:()=>Lf,KeyCode:()=>b,LargeTextEditorModule:()=>_p,LocalEventService:()=>bt,LocaleModule:()=>Of,LocaleService:()=>Hf,ManagedFocusFeature:()=>Li,ModuleRegistry:()=>Un,NumberEditorModule:()=>Vp,NumberFilterModule:()=>Mf,PaginationModule:()=>zf,PinnedRowModel:()=>$c,PinnedRowModule:()=>Wf,PositionableFeature:()=>xc,ProvidedFilter:()=>Bc,QuickFilterModule:()=>If,ROW_NUMBERS_COLUMN_ID:()=>ys,RefPlaceholder:()=>x,RenderApiModule:()=>Uf,RowApiModule:()=>Yg,RowAutoHeightModule:()=>qf,RowContainerCtrl:()=>Mu,RowDragModule:()=>Xu,RowNode:()=>Ct,RowSelectionModule:()=>Xf,RowStyleModule:()=>em,SELECTION_COLUMN_ID:()=>Ss,STRUCTURED_SCHEMA_FEATURES:()=>Av,ScrollApiModule:()=>Qg,SelectEditorModule:()=>Wp,ServerSideTransactionResultStatus:()=>Kc,TabGuardClassNames:()=>Ws,TabGuardComp:()=>Zr,TabGuardCtrl:()=>ZP,TabGuardFeature:()=>XP,TextEditorModule:()=>Gp,TextFilterModule:()=>Df,TooltipModule:()=>Jl,TouchListener:()=>It,UndoRedoEditModule:()=>Op,ValidationModule:()=>tm,ValueCacheModule:()=>kg,VanillaFrameworkOverrides:()=>Ng,_AgBeanStub:()=>he,_AgComponentStub:()=>ni,_AgContext:()=>Yc,_AgPositionableFeature:()=>Fc,_AgTabGuardComp:()=>ku,_AgTabGuardFeature:()=>Qr,_AgTooltipComponent:()=>bp,_AgTooltipFeature:()=>Zl,_BOOLEAN_MIXED_GRID_OPTIONS:()=>kl,_BaseDragAndDropService:()=>fc,_BaseDragService:()=>Uu,_BaseEnvironment:()=>Hh,_BaseEventService:()=>hg,_BasePopupService:()=>Sp,_BaseRegistry:()=>Sh,_BaseTooltipStateManager:()=>wp,_ChangedRowNodes:()=>Do,_ColumnFilterModule:()=>Ki,_ColumnGroupModule:()=>uh,_ColumnMoveModule:()=>rh,_CsrmSsrmSharedApiModule:()=>Zg,_DragModule:()=>ol,_EditCoreModule:()=>vt,_EmptyBean:()=>pw,_FOCUS_MANAGED_CLASS:()=>Ac,_FilterCoreModule:()=>Fn,_FilterValueModule:()=>La,_GET_ALL_EVENTS:()=>Sy,_GET_ALL_GRID_OPTIONS:()=>mg,_GET_SHALLOW_GRID_OPTIONS:()=>Ay,_HeaderComp:()=>vg,_HorizontalResizeModule:()=>Ju,_KeyboardNavigationModule:()=>Dg,_MONTHS:()=>pl,_PUBLIC_EVENTS:()=>Al,_PUBLIC_EVENT_HANDLERS_MAP:()=>on,_PopupModule:()=>qo,_ROW_ID_PREFIX_BOTTOM_PINNED:()=>Ts,_ROW_ID_PREFIX_ROW_GROUP:()=>yr,_ROW_ID_PREFIX_TOP_PINNED:()=>Ms,_RowModelSharedApiModule:()=>Xg,_STOP_PROPAGATION_CALLBACKS:()=>Co,_SharedDragAndDropModule:()=>sl,_SharedExportModule:()=>up,_SharedMenuModule:()=>Yp,_SharedRowSelectionModule:()=>Zf,_SortModule:()=>_l,_SsrmInfiniteSharedApiModule:()=>Jg,_addAdditionalCss:()=>ug,_addColumnDefaultAndTypes:()=>fo,_addFocusableContainerListener:()=>tu,_addGridCommonParams:()=>k,_addOrRemoveAttribute:()=>we,_anchorElementToMouseMoveEvent:()=>pd,_applyColumnState:()=>He,_areCellsEqual:()=>ks,_areColIdsEqual:()=>cc,_areEqual:()=>lt,_areSortDefsEqual:()=>go,_asThemeImpl:()=>jb,_attemptToRestoreCellFocus:()=>ou,_batchCall:()=>ps,_camelCaseToHumanText:()=>Wa,_canSkipShowingRowGroup:()=>Ud,_clearElement:()=>le,_columnsMatch:()=>Ii,_combineAttributesAndGridOptions:()=>yC,_consoleError:()=>Ed,_convertColumnEventSourceType:()=>si,_coreThemeDefaults:()=>Oh,_createAgElement:()=>St,_createCellId:()=>Zc,_createColumnTree:()=>sc,_createColumnTreeWithIds:()=>TC,_createElement:()=>se,_createGlobalRowEvent:()=>Oc,_createIcon:()=>zu,_createIconNoSpan:()=>Se,_createRowNodeSibling:()=>Gc,_createSharedTheme:()=>Ih,_csrmFirstLeaf:()=>Mo,_csrmReorderAllLeafs:()=>Ku,_debounce:()=>te,_defaultComparator:()=>za,_destroyColumnTree:()=>mo,_doOnce:()=>so,_downloadFile:()=>gp,_errMsg:()=>Ne,_error:()=>z,_escapeString:()=>Ci,_exists:()=>M,_findEnterpriseCoreModule:()=>Ad,_findFocusableElements:()=>Dt,_findNextFocusableElement:()=>Tt,_findTabbableParent:()=>br,_flatten:()=>pm,_focusGridInnerElement:()=>iu,_focusInto:()=>Mt,_focusNextGridCoreContainer:()=>ai,_forEachChangedGroupDepthFirst:()=>Wt,_formatNumberCommas:()=>Nf,_fuzzySuggestions:()=>cn,_getAbsoluteHeight:()=>In,_getAbsoluteRowIndex:()=>Qv,_getAbsoluteWidth:()=>Ji,_getActiveDomElement:()=>j,_getAriaPosInSet:()=>bm,_getCallbackForEvent:()=>Xd,_getCellByPosition:()=>li,_getCellCtrlForEventTarget:()=>Bs,_getCellPositionForEvent:()=>ju,_getCellRendererDetails:()=>sr,_getCheckboxLocation:()=>co,_getCheckboxes:()=>ii,_getClientSideRowModel:()=>ze,_getColumnState:()=>To,_getColumnStateFromColDef:()=>hc,_getColumnsFromTree:()=>tr,_getDateParts:()=>Io,_getDefaultFloatingFilterType:()=>tf,_getDefaultSimpleFilter:()=>ef,_getDisplaySortForColumn:()=>tc,_getDocument:()=>oe,_getEditorRendererDetails:()=>bv,_getEnableColumnSelection:()=>oi,_getFillHandle:()=>CC,_getFilterDetails:()=>bc,_getFilterModel:()=>re,_getFilterParamsForDataType:()=>Jp,_getFirstRow:()=>Pr,_getFloatingFilterCompDetails:()=>Sc,_getFloatingFiltersHeight:()=>Ir,_getGlobalGridOption:()=>Nn,_getGrandTotalRow:()=>Yn,_getGridOption:()=>EC,_getGridRegisteredModules:()=>tC,_getGroupAggFiltering:()=>lo,_getGroupSelection:()=>ho,_getGroupSelectsDescendants:()=>Mi,_getGroupTotalRowCallback:()=>gC,_getHeaderCheckbox:()=>ao,_getHeaderClassesFromColDef:()=>Hr,_getHeaderRowCount:()=>tw,_getInnerCellRendererDetails:()=>uv,_getInnerHeight:()=>ls,_getInnerWidth:()=>yi,_getIsRowSelectable:()=>ws,_getLastRow:()=>Dr,_getLocaleTextFromFunc:()=>md,_getLocaleTextFromMap:()=>Cd,_getLocaleTextFunc:()=>On,_getMaxConcurrentDatasourceRequests:()=>qd,_getNormalisedMousePosition:()=>il,_getPageBody:()=>is,_getParamType:()=>xh,_getRootNode:()=>ke,_getRowAbove:()=>yo,_getRowBelow:()=>Mr,_getRowContainerClass:()=>Yr,_getRowContainerOptions:()=>Bi,_getRowCtrlForEventTarget:()=>Eu,_getRowHeightAsNumber:()=>Ft,_getRowHeightForNode:()=>dt,_getRowIdCallback:()=>ti,_getRowNode:()=>We,_getRowSelectionMode:()=>uo,_getRowSpanContainerClass:()=>xu,_getRowViewportClass:()=>jr,_getServerSideRowModel:()=>Hc,_getShouldDisplayTooltip:()=>sE,_getSortDefFromColDef:()=>ir,_getSortDefFromInput:()=>Me,_getSuppressMultiRanges:()=>mC,_getToolPanelClassesFromColDef:()=>Cw,_getViewportRowModel:()=>Iv,_getWindow:()=>ts,_interpretAsRightClick:()=>Jd,_isAnimateRows:()=>ei,_isBrowserFirefox:()=>ri,_isBrowserSafari:()=>mt,_isCellSelectionEnabled:()=>Ze,_isClientSideRowModel:()=>J,_isColumnMenuAnchoringEnabled:()=>Zd,_isColumnsSortingCoupledToGroup:()=>Qe,_isComponent:()=>lr,_isDomLayout:()=>ae,_isElementInEventPath:()=>hd,_isElementOverflowingCallback:()=>Qt,_isEventFromPrintableCharacter:()=>_r,_isExpressionString:()=>Dn,_isFocusableFormField:()=>bi,_isFullWidthGroupRow:()=>Zn,_isGetRowHeightFunction:()=>$n,_isGroupHideColumnsUntilExpanded:()=>_d,_isGroupMultiAutoColumn:()=>Wd,_isGroupRowsSticky:()=>jn,_isGroupUseEntireRow:()=>Qn,_isIOSUserAgent:()=>Pt,_isKeyboardMode:()=>wr,_isLegacyMenuEnabled:()=>be,_isMultiRowSelection:()=>Di,_isNodeOrElement:()=>us,_isNothingFocused:()=>es,_isPromise:()=>_C,_isRowBefore:()=>Xc,_isRowNumbers:()=>Nd,_isRowSelection:()=>Et,_isSameRow:()=>Jc,_isServerSideRowModel:()=>Pi,_isSetFilterByDefault:()=>Qd,_isShowTooltipWhenTruncated:()=>$o,_isSortDirectionValid:()=>ht,_isSortTypeValid:()=>bs,_isStopPropagationForAgGrid:()=>et,_isUseApplyButton:()=>vo,_isUsingNewCellSelectionAPI:()=>fC,_isUsingNewRowSelectionAPI:()=>$d,_isVisible:()=>De,_jsonEquals:()=>mi,_last:()=>q,_loadTemplate:()=>ds,_logPreInitWarn:()=>dC,_makeNull:()=>Ke,_mergeDeep:()=>ge,_missing:()=>K,_normalizeSortDirection:()=>po,_normalizeSortType:()=>Xe,_observeResize:()=>at,_paramToVariableName:()=>js,_paramValueToCss:()=>Ah,_parseBigIntOrNull:()=>ye,_parseDateTimeFromString:()=>me,_placeCaretAtEnd:()=>dd,_preInitErrMsg:()=>cC,_prevOrNextDisplayedRow:()=>As,_processOnChange:()=>RC,_radioCssClass:()=>km,_refreshFilterUi:()=>sa,_refreshHandlerAndUi:()=>$p,_registerModule:()=>Fi,_removeAllFromArray:()=>Va,_removeAriaExpanded:()=>Pm,_removeAriaSort:()=>Xa,_removeFromArray:()=>Ie,_removeFromParent:()=>Pe,_requestAnimationFrame:()=>Ye,_resetColumnState:()=>hh,_selectAllCells:()=>Fu,_serialiseDate:()=>fe,_setAriaActiveDescendant:()=>xm,_setAriaChecked:()=>Tm,_setAriaColCount:()=>Ya,_setAriaColIndex:()=>Tn,_setAriaColSpan:()=>Qa,_setAriaControls:()=>Ja,_setAriaControlsAndLabel:()=>ed,_setAriaDescribedBy:()=>ym,_setAriaDisabled:()=>qa,_setAriaExpanded:()=>ns,_setAriaHasPopup:()=>Am,_setAriaHidden:()=>Mn,_setAriaInvalid:()=>ss,_setAriaLabel:()=>Kt,_setAriaLabelledBy:()=>vi,_setAriaLevel:()=>Fm,_setAriaOrientation:()=>Im,_setAriaPosInSet:()=>Ka,_setAriaRole:()=>je,_setAriaRowCount:()=>ja,_setAriaRowIndex:()=>wi,_setAriaSelected:()=>An,_setAriaSetSize:()=>$a,_setAriaSort:()=>Za,_setColMenuVisible:()=>ra,_setDisabled:()=>Si,_setDisplayed:()=>_,_setFixedWidth:()=>Ve,_setScrollLeft:()=>eo,_setUmd:()=>Td,_setVisible:()=>od,_sharedThemeDefaults:()=>Fh,_shouldUpdateColVisibilityAfterGroup:()=>pC,_skipFocusableContainerListenerForAgGrid:()=>Jv,_stopPropagationForAgGrid:()=>At,_suppressCellMouseEvent:()=>xo,_themeAlpineParams:()=>sg,_themeBalhamParams:()=>ng,_themeMaterialParams:()=>lg,_themeQuartzParams:()=>ig,_toString:()=>$t,_toStringOrNull:()=>Jo,_translate:()=>fd,_translateForFilter:()=>Le,_unwrapUserComp:()=>Gt,_updateColsMap:()=>uc,_updateColumnState:()=>er,_updateFilterModel:()=>na,_waitUntil:()=>wd,_warn:()=>F,_warnOnce:()=>Zt,agTestIdFor:()=>T,buttonStyleAlpine:()=>zh,buttonStyleBalham:()=>Wh,buttonStyleBase:()=>Vh,buttonStyleQuartz:()=>Nh,checkboxStyleDefault:()=>Bo,colorSchemeDark:()=>xS,colorSchemeDarkBlue:()=>TS,colorSchemeDarkWarm:()=>DS,colorSchemeLight:()=>bS,colorSchemeLightCold:()=>ES,colorSchemeLightWarm:()=>yS,colorSchemeVariable:()=>Ho,columnDropStyleBordered:()=>Js,columnDropStylePlain:()=>Fl,convertColumnGroupState:()=>j2,convertColumnState:()=>_g,createGrid:()=>U2,createPart:()=>N,createTheme:()=>Lo,getGridApi:()=>$2,getGridElement:()=>K2,iconOverrides:()=>BS,iconSetAlpine:()=>qh,iconSetBalham:()=>Uh,iconSetMaterial:()=>$h,iconSetQuartz:()=>en,iconSetQuartzBold:()=>VS,iconSetQuartzLight:()=>GS,iconSetQuartzRegular:()=>Qh,inputStyleBase:()=>_S,inputStyleBordered:()=>tn,inputStyleUnderlined:()=>Zh,isColumn:()=>ct,isColumnGroup:()=>ee,isColumnGroupAutoCol:()=>Rs,isColumnSelectionCol:()=>ft,isCombinedFilterModel:()=>rr,isProvidedColumnGroup:()=>ce,isRowNumberCol:()=>pe,isSpecialCol:()=>dc,onRowHeightChanged:()=>jl,provideGlobalGridOptions:()=>Ym,resetRowHeights:()=>Yl,setupAgTestIds:()=>jP,styleMaterial:()=>rg,tabStyleAlpine:()=>eg,tabStyleBase:()=>jS,tabStyleMaterial:()=>Jh,tabStyleQuartz:()=>Xh,tabStyleRolodex:()=>tg,themeAlpine:()=>iy,themeBalham:()=>sy,themeMaterial:()=>ly,themeQuartz:()=>og,wrapAgTestIdFor:()=>WP}),$e.exports=gm(Ga);function q(e){if(e?.length)return e[e.length-1]}function lt(e,t,i){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const o=e.length;if(o!==t.length)return!1;for(let s=0;s=0&&e.splice(i,1)}function Va(e,t){let i=0,o=0;for(;i=0;o--)e.splice(i,0,t[o])}function pm(e){return[].concat.apply([],e)}var Ke=e=>e==null||e===""?null:e;function M(e){return e!=null&&e!==""}function K(e){return!M(e)}var Jo=e=>e!=null&&typeof e.toString=="function"?e.toString():null,mi=(e,t)=>{const i=e?JSON.stringify(e):null,o=t?JSON.stringify(t):null;return i===o},za=(e,t,i=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e=="object"&&e.toNumber&&(e=e.toNumber()),typeof t=="object"&&t.toNumber&&(t=t.toNumber()),!i||typeof e!="string"?e>t?1:e{const a=o?()=>o.wrapIncoming(l):l;t?this.dispatchAsync(a):a()},n=this.getListeners(i,t,!1);if((n?.size??0)>0){const l=new Set(n);for(const a of l)n?.has(a)&&s(()=>a(e))}const r=this.getGlobalListeners(t);if(r.size>0){const l=new Set(r);for(const a of l)s(()=>a(i,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},i=this.frameworkOverrides;i?i.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}},fm=/[&<>"']/g,mm={"&":"&","<":"<",">":">",'"':""","'":"'"};function $t(e){return e?.toString().toString()??null}function Ci(e){return $t(e)?.replace(fm,t=>mm[t])??null}function Dn(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function Wa(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,i=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(i,"$1 $2$3").replace(/\./g," ").split(" ").map(s=>s.substring(0,1).toUpperCase()+(s.length>1?s.substring(1,s.length):"")).join(" ")}function ke(e){return e.eRootDiv.getRootNode()}function j(e){return ke(e).activeElement}function oe(e){const{gos:t,eRootDiv:i}=e;let o=null;const s=t.get("getDocument");return s&&M(s)?o=s():i&&(o=i.ownerDocument),o&&M(o)?o:document}function es(e){const t=j(e);return t===null||t===oe(e).body}function ts(e){return oe(e).defaultView||window}function is(e){let t=null,i=null;try{t=oe(e).fullscreenElement}catch{}finally{t||(t=ke(e));const o=t.querySelector("body");o?i=o:t instanceof ShadowRoot?i=t:t instanceof Document?i=t?.documentElement:i=t}return i}function Cm(e){return is(e)?.clientWidth??(window.innerWidth||-1)}function vm(e){return is(e)?.clientHeight??(window.innerHeight||-1)}function ve(e,t,i){i==null||typeof i=="string"&&i==""?os(e,t):Ee(e,t,i)}function Ee(e,t,i){e.setAttribute(_a(t),i.toString())}function os(e,t){e.removeAttribute(_a(t))}function _a(e){return`aria-${e}`}function je(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function wm(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function bm(e){return Number.parseInt(e.getAttribute("aria-posinset"),10)}function Sm(e){return e.getAttribute("aria-label")}function Kt(e,t){ve(e,"label",t)}function vi(e,t){ve(e,"labelledby",t)}function ym(e,t){ve(e,"describedby",t)}function Ua(e,t){ve(e,"live",t)}function Rm(e,t){ve(e,"atomic",t)}function Em(e,t){ve(e,"relevant",t)}function ss(e,t){ve(e,"invalid",t)}function Fm(e,t){ve(e,"level",t)}function qa(e,t){ve(e,"disabled",t)}function Mn(e,t){ve(e,"hidden",t)}function xm(e,t){ve(e,"activedescendant",t)}function ns(e,t){Ee(e,"expanded",t)}function Pm(e){os(e,"expanded")}function $a(e,t){Ee(e,"setsize",t)}function Ka(e,t){Ee(e,"posinset",t)}function Dm(e,t){Ee(e,"multiselectable",t)}function ja(e,t){Ee(e,"rowcount",t)}function wi(e,t){Ee(e,"rowindex",t)}function Mm(e,t){Ee(e,"rowspan",t)}function Ya(e,t){Ee(e,"colcount",t)}function Tn(e,t){Ee(e,"colindex",t)}function Qa(e,t){Ee(e,"colspan",t)}function Za(e,t){Ee(e,"sort",t)}function Xa(e){os(e,"sort")}function An(e,t){ve(e,"selected",t)}function Tm(e,t){Ee(e,"checked",t===void 0?"mixed":t)}function Ja(e,t){ve(e,"controls",t)}function ed(e,t){Ja(e,t.id),vi(t,e.id)}function td(e,t){ve(e,"owns",t)}function Am(e,t){ve(e,"haspopup",t===!1?null:t)}function rs(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}function Im(e,t){t?Ee(e,"orientation",t):os(e,"orientation")}function km(e,t,i){const o=e.parentElement;let s=o&&o.firstChild;for(;s;)t&&s.classList.toggle(t,s===e),i&&s.classList.toggle(i,s!==e),s=s.nextSibling}var Lm="[tabindex], input, select, button, textarea, [href]",id="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function bi(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(id)?!1:De(e)}function _(e,t,i={}){const{skipAriaHidden:o}=i;e.classList.toggle("ag-hidden",!t),o||Mn(e,!t)}function od(e,t,i={}){const{skipAriaHidden:o}=i;e.classList.toggle("ag-invisible",!t),o||Mn(e,!t)}function Si(e,t){const i="disabled",o=t?n=>n.setAttribute(i,""):n=>n.removeAttribute(i);o(e);const s=e.querySelectorAll("input")??[];for(const n of s)o(n)}function jt(e,t,i){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++o>i)break}else if(e===i)break}return!1}function Yt(e){const{height:t,width:i,borderTopWidth:o,borderRightWidth:s,borderBottomWidth:n,borderLeftWidth:r,paddingTop:l,paddingRight:a,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:h,marginBottom:g,marginLeft:p,boxSizing:f}=window.getComputedStyle(e),m=Number.parseFloat;return{height:m(t||"0"),width:m(i||"0"),borderTopWidth:m(o||"0"),borderRightWidth:m(s||"0"),borderBottomWidth:m(n||"0"),borderLeftWidth:m(r||"0"),paddingTop:m(l||"0"),paddingRight:m(a||"0"),paddingBottom:m(d||"0"),paddingLeft:m(c||"0"),marginTop:m(u||"0"),marginRight:m(h||"0"),marginBottom:m(g||"0"),marginLeft:m(p||"0"),boxSizing:f}}function ls(e){const t=Yt(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function yi(e){const t=Yt(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function In(e){const{height:t,marginBottom:i,marginTop:o}=Yt(e);return Math.floor(t+i+o)}function Ji(e){const{width:t,marginLeft:i,marginRight:o}=Yt(e);return Math.floor(t+i+o)}function sd(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:o,borderRightWidth:s,borderBottomWidth:n}=Yt(e);return{top:t.top+(i||0),left:t.left+(o||0),right:t.right+(s||0),bottom:t.bottom+(n||0)}}function as(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i)),i}function eo(e,t,i){i&&(t*=-1),e.scrollLeft=t}function le(e){for(;e?.firstChild;)e.firstChild.remove()}function Pe(e){e?.parentNode&&e.remove()}function nd(e){return!!e.offsetParent}function De(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!nd(e)||window.getComputedStyle(e).visibility!=="visible")}function ds(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function rd(e,t,i){i&&i.nextSibling===t||(e.firstChild?i?i.nextSibling?e.insertBefore(t,i.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.prepend(t):e.appendChild(t))}function ld(e,t){for(let i=0;i`-${t.toLocaleLowerCase()}`)}function to(e,t){if(t)for(const i of Object.keys(t)){const o=t[i];if(!i?.length||o==null)continue;const s=Bm(i),n=o.toString(),r=n.replace(/\s*!important/g,""),l=r.length!=n.length?"important":void 0;e.style.setProperty(s,r,l)}}function Qt(e){return()=>{const t=e();return t?ad(t)||Hm(t):!0}}function ad(e){return e.clientWidthn?.disconnect()}function Ye(e,t){const i=ts(e);i.requestAnimationFrame?i.requestAnimationFrame(t):i.webkitRequestAnimationFrame?i.webkitRequestAnimationFrame(t):i.setTimeout(t,0)}var cd="data-ref",Ln;function ud(){return Ln??(Ln=document.createTextNode(" ")),Ln.cloneNode()}function St(e){const{attrs:t,children:i,cls:o,ref:s,role:n,tag:r}=e,l=document.createElement(r);if(o&&(l.className=o),s&&l.setAttribute(cd,s),n&&l.setAttribute("role",n),t)for(const a of Object.keys(t))l.setAttribute(a,t[a]);if(i)if(typeof i=="string")l.textContent=i;else{let a=!0;for(const d of i)d&&(typeof d=="string"?(l.appendChild(document.createTextNode(d)),a=!1):typeof d=="function"?l.appendChild(d()):(a&&(l.appendChild(ud()),a=!1),l.append(St(d)),l.appendChild(ud())))}return l}var Om=["touchstart","touchend","touchmove","touchcancel","scroll"],Gm=["wheel"],Bn={},hs=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof Bn[i]=="boolean")return Bn[i];const o=document.createElement(e[i]||"div");return i="on"+i,Bn[i]=i in o}})();function hd(e,t){return!t||!e?!1:Nm(t).indexOf(e)>=0}function Vm(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function Nm(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Vm(t)}function zm(e,t,i){const o=Wm(t);let s;o!=null&&(s={passive:o}),e.addEventListener(t,i,s)}var Wm=e=>{const t=Om.includes(e),i=Gm.includes(e);if(t)return!0;if(i)return!1};function gd(e,t,i){if(i===0)return!1;const o=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(o,s)<=i}var Ri=(e,t)=>{const i=e.identifier;for(let o=0,s=t.length;o0&&h+e.clientWidth>n+m&&(h=n+m-e.clientWidth),h<0&&(h=0),r>0&&u+e.clientHeight>r+f&&(u=r+f-e.clientHeight),u<0&&(u=0),e.style.left=`${h}px`,e.style.top=`${u}px`}var gs=(e,...t)=>{for(const i of t){const[o,s,n,r]=i;o.addEventListener(s,n,r),e.push(i)}},Hn=e=>{if(e){for(const[t,i,o,s]of e)t.removeEventListener(i,o,s);e.length=0}},yt=e=>{e.cancelable&&e.preventDefault()};function _m(e,t){return t}function On(e){return e?.getLocaleTextFunc()??_m}function fd(e,t,i,o){const s=t[i];return e.getLocaleTextFunc()(i,typeof s=="function"?s(o):s,o)}function md(e){return(t,i,o)=>e({key:t,defaultValue:i,variableValues:o})}function Cd(e){return(t,i,o)=>{let s=e?.[t];if(s&&o?.length){let n=0;for(;!(n>=o.length||s.indexOf("${variable}")===-1);)s=s.replace("${variable}",o[n++])}return s??i}}var he=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;tnull;let o;if(Um(e))e.__addEventListener(t,i),o=()=>(e.__removeEventListener(t,i),null);else{const s=qm(e);e instanceof HTMLElement?zm(e,t,i):s?e.addListener(t,i):e.addEventListener(t,i),o=s?()=>(e.removeListener(t,i),null):()=>(e.removeEventListener(t,i),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}setupPropertyListener(e,t){const{gos:i}=this;i.addPropertyEventListener(e,t);const o=()=>(i.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,o=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=s.changeSet.id}const n={type:"propertyChanged",changeSet:s.changeSet,source:s.source};t(n)};for(const s of e)this.setupPropertyListener(s,o)}getLocaleTextFunc(){return On(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 Um(e){return e.__addEventListener!==void 0}function qm(e){return e.eventServiceType==="global"}var S=class extends he{},Gn=new Set,so=(e,t)=>{Gn.has(t)||(Gn.add(t),e())};so._set=Gn;var $m={pending:!1,funcs:[]},Km={pending:!1,funcs:[]};function ps(e,t="setTimeout",i){const o=t==="raf"?Km:$m;if(o.funcs.push(e),o.pending)return;o.pending=!0;const s=()=>{const n=o.funcs.slice();o.funcs.length=0,o.pending=!1;for(const r of n)r()};t==="raf"?Ye(i,s):window.setTimeout(s,0)}function te(e,t,i){let o;return function(...s){const n=this;return window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(n,s)},i),o}}function vd(e,t){let i=0;return function(...o){const s=this,n=Date.now();n-i{n!=null&&(window.clearInterval(n),n=null)};e.addDestroyFunc(l);const a=()=>{const d=Date.now()-s>o;(t()||d)&&(i(),r=!0,l())};a(),r||(n=window.setInterval(a,10))}var bd=new Set(["__proto__","constructor","prototype"]);function jm(e,t){if(e!=null){if(Array.isArray(e)){for(let i=0;i!bd.has(o)))t(i,e[i])}}function ge(e,t,i=!0,o=!1){M(t)&&jm(t,(s,n)=>{let r=e[s];r!==n&&(o&&r==null&&n!=null&&typeof n=="object"&&n.constructor===Object&&(r={},e[s]=r),Sd(n)&&Sd(r)&&!Array.isArray(r)?ge(r,n,i,o):(i||n!==void 0)&&(e[s]=n))})}function Sd(e){return typeof e=="object"&&e!==null}var Vn=class wt{static applyGlobalGridOptions(t){if(!wt.gridOptions)return{...t};let i={};return ge(i,wt.gridOptions,!0,!0),wt.mergeStrategy==="deep"?ge(i,t,!0,!0):i={...i,...t},wt.gridOptions.context&&(i.context=wt.gridOptions.context),t.context&&(wt.mergeStrategy==="deep"&&i.context&&ge(t.context,i.context,!0,!0),i.context=t.context),i}static applyGlobalGridOption(t,i){if(wt.mergeStrategy==="deep"){const o=Nn(t);if(o&&typeof o=="object"&&typeof i=="object")return wt.applyGlobalGridOptions({[t]:i})[t]}return i}};Vn.gridOptions=void 0,Vn.mergeStrategy="shallow";var no=Vn;function Ym(e,t="shallow"){no.gridOptions=e,no.mergeStrategy=t}function Nn(e){return no.gridOptions?.[e]}var yd={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,refreshAfterGroupEdit:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupHideColumnsUntilExpanded:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,enableFilterHandlers:!1},Rd="https://www.ag-grid.com";function Rt(e,t,...i){e.get("debug")&&console.log("AG Grid: "+t,...i)}function Zt(e,...t){so(()=>Fd(e,...t),e+t?.join(""))}function Ei(e,...t){so(()=>Ed(e,...t),e+t?.join(""))}function Ed(e,...t){console.error("AG Grid: "+e,...t)}function Fd(e,...t){console.warn("AG Grid: "+e,...t)}var xd=new Set,fs={},Xt={},ms,Pd=!1,Dd=!1,Md=!1;function Qm(e){const[t,i]=e.version.split(".")||[],[o,s]=ms.split(".")||[];return t===o&&i===s}function Zm(e){ms||(ms=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;e.version?Qm(e)||Ei(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${ms}.`)):Ei(t(`'${e.moduleName}' is incompatible.`));const i=e.validate?.();i&&!i.isValid&&Ei(`${i.message}`)}function Fi(e,t,i=!1){i||(Pd=!0),Zm(e);const o=e.rowModels??["all"];xd.add(e);let s;t!==void 0?(Dd=!0,Xt[t]===void 0&&(Xt[t]={}),s=Xt[t]):s=fs;for(const n of o)s[n]===void 0&&(s[n]={}),s[n][e.moduleName]=e;if(e.dependsOn)for(const n of e.dependsOn)Fi(n,t,i)}function Xm(e){delete Xt[e]}function zn(e,t,i){const o=s=>!!fs[s]?.[e]||!!Xt[t]?.[s]?.[e];return o(i)||o("all")}function Wn(){return Dd}function Jm(e,t){const i=Xt[e]??{};return[...Object.values(fs.all??{}),...Object.values(i.all??{}),...Object.values(fs[t]??{}),...Object.values(i[t]??{})]}function eC(){return new Set(xd)}function tC(e,t){const i=Xt[e]??{};return[...Object.values(i.all??{}),...Object.values(i[t]??{})]}function iC(){return Pd}function _n(){return Md}function Td(){Md=!0}var Un=class{static register(e){Fi(e,void 0)}static registerModules(e){for(const t of e)Fi(t,void 0)}};function Ad(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const i=Ad(t.dependsOn);if(i)return i}}}var P="35.2.1",Id=2e3,kd=100,Ld="_version_",Bd=null,xi=`${Rd}/javascript-data-grid`;function oC(e){Bd=e}function sC(e){xi=e}function Hd(e,t,i){return Bd?.(e,t)??[aC(e,t,i)]}function Cs(e,t,i,o,s){e(`${o?"warning":"error"} #${t}`,...Hd(t,i,s))}function nC(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 rC(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=nC(e)),t}function vs(e){return e===void 0?"undefined":e===null?"null":e}function qn(e,t){return`${e}?${t.toString()}`}function lC(e,t,i){const o=Array.from(t.entries()).sort((n,r)=>r[1].length-n[1].length);let s=qn(e,t);for(const[n,r]of o){if(n===Ld)continue;const l=s.length-i;if(l<=0)break;const a="...",d=l+a.length,c=r.length-d>kd?r.slice(0,r.length-d)+a:r.slice(0,kd)+a;t.set(n,c),s=qn(e,t)}return s}function Od(e,t){const i=new URLSearchParams;if(i.append(Ld,P),t)for(const n of Object.keys(t))i.append(n,rC(t[n]));const o=`${xi}/errors/${e}`,s=qn(o,i);return s.length<=Id?s:lC(o,i,Id)}var aC=(e,t,i)=>{const o=Od(e,t),s=`${i?i+` `:""}Visit ${o}`;return _n()?s:`${s}${i?"":` Alternatively register the ValidationModule to see the full message in the console.`}`};function F(...e){Cs(Zt,e[0],e[1],!0)}function z(...e){Cs(Ei,e[0],e[1],!1)}function ro(e,t,i){Cs(Ei,e,t,!1,i)}function dC(e,t,i){Cs(Zt,e,t,!0,i)}function Gd(e,t){const i=t[0];return`error #${i} `+Hd(i,t[1],e).join(" ")}function Ne(...e){return Gd(void 0,e)}function cC(...e){return Gd(` `,e)}function Vd(e,t){return e.get("rowModelType")===t}function J(e,t){return Vd(e,"clientSide")}function Pi(e,t){return Vd(e,"serverSide")}function ae(e,t){return e.get("domLayout")===t}function Et(e){return uo(e)!==void 0}function $n(e){return typeof e.get("getRowHeight")=="function"}function uC(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function Nd({gos:e,formula:t}){const i=e.get("rowNumbers");return i||!!t?.active&&i!==!1}function dt(e,t,i=!1,o){const{gos:s,environment:n}=e;if(o==null&&(o=n.getDefaultRowHeight()),$n(s)){if(i)return{height:o,estimated:!0};const a={node:t,data:t.data},d=s.getCallback("getRowHeight")(a);if(Kn(d))return d===0&&F(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&s.get("masterDetail"))return hC(s);const r=s.get("rowHeight");return{height:r&&Kn(r)?r:o,estimated:!1}}function hC(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Kn(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function Ft(e){const{environment:t,gos:i}=e,o=i.get("rowHeight");if(!o||K(o))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(F(24),t.getDefaultRowHeight())}function Kn(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function zd(e,t,i){const o=t[e.getDomDataKey()];return o?o[i]:void 0}function Jt(e,t,i,o){const s=e.getDomDataKey();let n=t[s];K(n)&&(n={},t[s]=n),n[i]=o}function ei(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function jn(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||ae(e,"print"))}function Qe(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function lo(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function Yn(e){return e.get("grandTotalRow")}function gC(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function Wd(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function _d(e){return Wd(e)&&e.get("groupHideColumnsUntilExpanded")&&J(e)}function Qn(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Zn(e,t,i){return!!t.group&&!t.footer&&Qn(e,i)}function ti(e){const t=e.getCallback("getRowId");return t===void 0?t:i=>{let o=t(i);return typeof o!="string"&&(so(()=>F(25,{id:o}),"getRowIdString"),o=String(o)),o}}function Ud(e,t){const i=e.get("groupHideParentOfSingleChild");return!!(i===!0||i==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function qd(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function pC(e,t){const i=e.get("suppressGroupChangesColumnVisibility");if(i===!0||t&&i==="suppressHideOnGroup"||!t&&i==="suppressShowOnUngroup")return!1;const o=e.get("suppressRowGroupHidesColumns");if(t&&o===!0)return!1;const s=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&s===!0)}function ii(e){return e?.checkboxes??!0}function ao(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function co(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Xn(e){return e?.hideDisabledCheckboxes??!1}function $d(e){return typeof e.get("rowSelection")!="string"}function fC(e){return e.get("cellSelection")!==void 0}function mC(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?t?.suppressMultiRanges??!1:!1:e.get("suppressMultiRangeSelection")}function Ze(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function CC(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 oi(e){const t=e.get("cellSelection")??!1;return(typeof t=="object"&&t.enableColumnSelection)??!1}function Kd(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),o=e.get("suppressRowDeselection");return i&&o?!1:i?"enableDeselection":o?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function vC(e){const t=Kd(e);return t===!0||t==="enableSelection"}function wC(e){const t=Kd(e);return t===!0||t==="enableDeselection"}function ws(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function uo(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 Di(e){return uo(e)==="multiRow"}function bC(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function ho(e){const t=e.get("rowSelection");if(typeof t=="string"){const i=e.get("groupSelectsChildren"),o=e.get("groupSelectsFiltered");return i&&o?"filteredDescendants":i?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function jd(e,t=!0){const i=e.get("rowSelection");return typeof i!="object"?t?"all":void 0:i.mode==="multiRow"?i.selectAll:"all"}function SC(e){const t=e.get("rowSelection");return typeof t=="string"?!1:t?.mode==="multiRow"?t.ctrlASelectsRows??!1:!1}function Mi(e){const t=ho(e);return t==="descendants"||t==="filteredDescendants"}function Yd(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function Qd(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function be(e){return e.get("columnMenu")==="legacy"}function Zd(e){return!be(e)}function Xd(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function yC(e,t,i){typeof e!="object"&&(e={});const o={...e};for(const s of i){const n=t[s];typeof n<"u"&&(o[s]=n)}return o}function RC(e,t){if(!e)return;const i={};let o=!1;for(const r of Object.keys(e))i[r]=e[r],o=!0;if(!o)return;const s={type:"gridOptionsChanged",options:i};t.dispatchEvent(s);const n={type:"componentStateChanged",...i};t.dispatchEvent(n)}function k(e,t){return e.addCommon(t)}function EC(e,t){return e[t]??e.gridOptions?.[t]??Nn(t)??yd[t]}function Jd({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var FC={resizable:!0,sortable:!0},xC=0;function ec(){return xC++}function ct(e){return e instanceof ut}var PC=["asc","desc",null],DC=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],ut=class extends S{constructor(e,t,i,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=o,this.isColumn=!0,this.instanceId=ec(),this.autoHeaderHeight=null,this.sortDef=Me(),this._wasSortExplicitlyRemoved=!1,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.formulaRef=null,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new bt,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Ci(i)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:i,colFlex:o}}=this;t?.initCol(this);const s=e.hide;s!==void 0?this.visible=!s:this.visible=!e.initialHide,i?.initCol(this),o?.initCol(this)}setColDef(e,t,i){const o=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),o&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",i)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.initState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:i}}=this,o=e.get("suppressFieldDotNotation");this.fieldContainsDots=M(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=M(i)&&i.includes(".")&&!o}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:i=>{const o=e.recreateColDef(this.colDef);this.setColDef(o,o,i.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){const t=e.width??e.initialWidth??200;return Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const i=this.frameworkEventListenerService?.wrap(e,t)??t;this.colEventSvc.addEventListener(e,i)}removeEventListener(e,t){const i=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return k(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??FC[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 k(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sortDef.direction}getSortDef(){return this.sortDef.direction?this.sortDef:null}getColDefAllowedSortTypes(){const e=[],{sort:t,initialSort:i}=this.colDef,o=t===null?t:Xe(t?.type),s=i===null?i:Xe(i?.type);return o&&e.push(o),s&&e.push(s),e}getSortingOrder(){const e=this.getColDefAllowedSortTypes().includes("absolute")?DC:PC;return(this.colDef.sortingOrder??this.gos.get("sortingOrder")??e).map(t=>Me(t))}getAvailableSortTypes(){const e=this.getSortingOrder().reduce((t,i)=>(i.direction&&t.push(i.type),t),this.getColDefAllowedSortTypes());return new Set(e)}get wasSortExplicitlyRemoved(){return this._wasSortExplicitlyRemoved}setSortDef(e,t=!1){t||(this._wasSortExplicitlyRemoved=!e.direction),this.sortDef=e}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.getSort()==="asc"}isSortDescending(){return this.getSort()==="desc"}isSortNone(){return K(this.getSort())}isSorting(){return M(this.getSort())}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return F(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const i=e===!0;this.visible!==i&&(this.visible=i,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e?.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e?.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return k(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(K(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(K(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}isAllowFormula(){return this.colDef.allowFormula===!0}dispatchColEvent(e,t,i){const o=this.createColumnEvent(e,t);i&&ge(o,i),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Me(e){return Ti(e)?{direction:e.direction,type:e.type}:{direction:po(e),type:Xe(e)}}function ht(e){return e==="asc"||e==="desc"||e===null}function bs(e){return e==="default"||e==="absolute"}function Ti(e){if(!e||typeof e!="object")return!1;const t=e;return bs(t.type)&&ht(t.direction)}function go(e,t){return e?t?e.type===t.type&&e.direction===t.direction:e?e.direction===null:!0:t?t.direction===null:!0}function po(e){return ht(e)?e:null}function Xe(e){return bs(e)?e:"default"}function tc(e,t,i){const s=i?.()??t.sortSvc.getDisplaySortForColumn(e),n=Xe(s?.type),r=po(s?.direction),l=e.getAvailableSortTypes(),a=l.has("default"),d=l.has("absolute");return{isDefaultSortAllowed:a,isAbsoluteSortAllowed:d,isAbsoluteSort:n==="absolute",isDefaultSort:n==="default",isAscending:r==="asc",isDescending:r==="desc",direction:r}}function ce(e){return e instanceof Ai}var Ai=class extends S{constructor(e,t,i,o){super(),this.colGroupDef=e,this.groupId=t,this.padding=i,this.level=o,this.isColumn=!1,this.expandable=!1,this.instanceId=ec(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)ct(t)?e(t):ce(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)ct(t)?e.push(t):ce(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const o=this.findChildrenRemovingPadding();for(let n=0,r=o.length;n{for(const o of i)ce(o)&&o.isPadding()?t(o.children):e.push(o)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},MC={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Jn(e,t,i){const o={},s=e.gos;return Object.assign(o,s.get("defaultColGroupDef")),Object.assign(o,t),s.validateColDef(o,i),o}var ic=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t0&&F(273,{providedId:e,usedId:s}),this.existingKeys[s]=!0,s}i++}}},oc=(e,t)=>{ce(e)&&e.setupExpandable(),e.originalParent=t};function TC(e,t=null,i,o,s){const{existingCols:n,existingGroups:r}=nc(o),l=new Map(n.map(f=>[f.getId(),f])),a=new Map(r.map(f=>[f.getId(),f]));let d=0;const c=(f,m)=>{if(d=Math.max(d,m),ac(f)){if(!e.colGroupSvc)return null;const y=f.groupId,R=a.get(y),E=Jn(e,f,y),D=new Ai(E,y,!1,m);return e.context.createBean(D),R&&D.setExpanded(R.isExpanded()),D.setChildren(f.children.map(B=>c(B,m+1))),D}const C=f.colId;let v=l.get(C);const w=fo(e,f,v?.getColId()??C);return v?(v.setColDef(w,f,s),er(e,v,w,s)):(v=new ut(w,f,C,i),e.context.createBean(v)),e.dataTypeSvc?.addColumnListeners(v),v},u=t?.map(f=>c(f,0))??[];let h=0;const g={getUniqueKey:(f,m)=>String(++h)},p=e.colGroupSvc?e.colGroupSvc.balanceColumnTree(u,0,d,g):u;return Je(null,p,oc),{columnTree:p,treeDepth:d}}function sc(e,t=null,i,o,s){const n=new ic,{existingCols:r,existingGroups:l,existingColKeys:a}=nc(o);n.addExistingKeys(a);const d=rc(e,t,0,i,r,n,l,s),{colGroupSvc:c}=e,u=c?.findMaxDepth(d,0)??0,h=c?c.balanceColumnTree(d,0,u,n):d;return Je(null,h,oc),{columnTree:h,treeDepth:u}}function nc(e){const t=[],i=[],o=[];return e&&Je(null,e,s=>{if(ce(s)){const n=s;i.push(n)}else{const n=s;o.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:i,existingColKeys:o}}function rc(e,t,i,o,s,n,r,l){if(!t)return[];const{colGroupSvc:a}=e,d=new Array(t.length);for(let c=0;c0))if(i.width!=null)t.setActualWidth(i.width,o);else{const n=t.getActualWidth();t.setActualWidth(n,o)}}function IC(e,t){if(t)for(let i=0;i{for(let s=0;st+i.getActualWidth(),0)}function mo(e,t,i){const o={};if(!t)return;Je(null,t,n=>{o[n.getInstanceId()]=n}),i&&Je(null,i,n=>{o[n.getInstanceId()]=null});const s=Object.values(o).filter(n=>n!=null);e.context.destroyBeans(s)}function Rs(e){return e.getId().startsWith(gt)}function ft(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Ss)??!1}function pe(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(ys)??!1}function dc(e){return ft(e)||pe(e)}function Es(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function cc(e,t){return lt(e,t,(i,o)=>i.getColId()===o.getColId())}function uc(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function si(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Ii(e,t){return e===t||e.colId==t||e.getColDef()===t}var HC=(e,t)=>(i,o)=>{const s={value1:void 0,value2:void 0};let n=!1;return e&&(e[i]!==void 0&&(s.value1=e[i],n=!0),M(o)&&e[o]!==void 0&&(s.value2=e[o],n=!0)),!n&&t&&(t[i]!==void 0&&(s.value1=t[i]),M(o)&&t[o]!==void 0&&(s.value2=t[o])),s};function hc(e,t){const i={...e,sort:void 0,colId:t},o=ir(e);return o&&(i.sort=o.direction,i.sortType=o.type),i}function ir(e){const{sort:t,initialSort:i}=e,o=Ti(t)||ht(t),s=Ti(i)||ht(i);return o?Me(t):s?Me(i):null}function gc(e,t){return e+"_"+t}function ee(e){return e instanceof ki}var ki=class extends S{constructor(e,t,i,o){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=i,this.pinned=o,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=Ci(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return gc(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){for(const e of this.displayedChildren)ee(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=q(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;for(const t of this.displayedChildren??[])e+=t.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(const t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(const t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){for(const t of this.displayedChildren??[])ct(t)?e.push(t):ee(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])ct(t)?e.push(t):ee(t)&&t.addLeafColumns(e)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e?.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e?.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}for(const i of this.children??[]){if(ee(i)&&!i.displayedChildren?.length)continue;switch(i.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(i);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i);break}}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},b={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"},OC=65,GC=67,VC=86,NC=68,zC=90,WC=89;function pc(e){const{keyCode:t}=e;let i;switch(t){case OC:i=b.A;break;case GC:i=b.C;break;case VC:i=b.V;break;case NC:i=b.D;break;case zC:i=b.Z;break;case WC:i=b.Y;break;default:i=e.code}return i}function _C(e){return typeof e.then=="function"}function UC(e,t){return new Y(i=>{i(window.setInterval(e,t))})}var Y=class Xo{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 Xo(i=>{let o=t.length;const s=new Array(o);t.forEach((n,r)=>{n.then(l=>{s[r]=l,o--,o===0&&i(s)})})}):Xo.resolve()}static resolve(t=null){return new Xo(i=>i(t))}then(t){return new Xo(i=>{this.status===1?i(t(this.resolution)):this.waiters.push(o=>i(t(o)))})}onDone(t){this.status=1,this.resolution=t;for(const i of this.waiters)i(t)}onReject(t){}},fc=class extends he{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.externalDropZoneCount=0,this.lastDropTarget=null}addDragSource(e,t=!1){const i={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:o=>this.onDragStart(e,o),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(i),this.beans.dragSvc.addDragSource(i)}setDragImageCompIcon(e,t=!1){const i=this.dragImageComp;i&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,i.setIcon(e,t))}removeDragSource(e){const{dragSourceAndParamsList:t,beans:i}=this;for(let o=0,s=t.length;o{for(const d of a){const{width:c,height:u,left:h,right:g,top:p,bottom:f}=d.getBoundingClientRect();if(c===0||u===0)return!1;const m=l.clientX>=h&&l.clientX=p&&l.clientY0}findExternalZone(e){const t=this.dropTargets;for(let i=0,o=t.length;i0?"down":p<0?"up":null,hDirection:g<0?"left":g>0?"right":null,initialSourcePointerOffsetX:l,initialSourcePointerOffsetY:a,dragSource:o,fromNudge:i,dragItem:s,dropZoneTarget:d,dropTarget:n?.dropTarget??null,changed:!!n?.changed});return this.lastDraggingEvent=f,f}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&pd(t,e,this.beans)}removeDragImageComp(e){this.dragImageComp===e&&(this.dragImageComp=null),e&&(e.getGui()?.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){const t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t?.then(i=>{const o=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!o||!this.isAlive()){this.destroyBean(i);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const s=this.dragImageComp;s!==i&&(this.dragImageComp=i,this.removeDragImageComp(s)),i&&(this.appendDragImageComp(i),this.updateDragImageComp(),this.positionDragImageComp(o))})}appendDragImageComp(e){const t=e.getGui(),i=t.style;i.position="absolute",i.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(i.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),i.top="20px",i.left="20px";const o=is(this.beans);o?o.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:i,lastDraggingEvent:o,dragImageLastLabel:s}=this;if(!e)return;this.setDragImageCompIcon(i?.getIconName?.(o)??null);let n=t?.dragItemName;typeof n=="function"&&(n=n(o)),n||(n=""),s!==n&&(this.dragImageLastLabel=n,e.setLabel(n))}};function mc(e){return typeof e=="object"&&!!e.component}function qC(e){return e?e.prototype&&"getGui"in e.prototype:!1}function Cc(e,t,i,o){const{name:s}=i;let n,r,l,a,d,c;if(t){const u=t,h=u[s+"Selector"],g=h?h(o):null,p=f=>{typeof f=="string"?n=f:f!=null&&f!==!0&&(e.isFrameworkComponent(f)?l=f:r=f)};g?(p(g.component),a=g.params,d=g.popup,c=g.popupPosition):p(u[s])}return{compName:n,jsComp:r,fwComp:l,paramsFromSelector:a,popupFromSelector:d,popupPositionFromSelector:c}}var $C=class extends S{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,i,o=!1){return this.getCompDetails(this.gridOptions,e,t,i,o)}getCompDetails(e,t,i,o,s=!1){const{name:n,cellRenderer:r}=t;let{compName:l,jsComp:a,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:h}=Cc(this.beans.frameworkOverrides,e,t,o),g,p;const f=w=>{const y=this.registry.getUserComponent(n,w);y&&(a=y.componentFromFramework?void 0:y.component,d=y.componentFromFramework?y.component:void 0,g=y.params,p=y.processParams)};if(l!=null&&f(l),a==null&&d==null&&i!=null&&f(i),a&&r&&!qC(a)&&(a=this.agCompUtils?.adaptFunction(t,a)),!a&&!d){const{validation:w}=this.beans;s&&(l!==i||!i)?l?w?.isProvidedUserComp(l)||z(50,{compName:l}):i?w||z(260,{...this.gos.getModuleErrorParams(),propName:n,compName:i}):z(216,{name:n}):i&&!w&&z(146,{comp:i});return}const m=this.mergeParams(e,t,o,c,g,p),C=a==null,v=a??d;return{componentFromFramework:C,componentClass:v,params:m,type:t,popupFromSelector:u,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(v,C,m,t)}}newAgStackInstance(e,t,i,o){const s=!t;let n;s?n=new e:n=this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o),this.createBean(n);const r=n.init?.(i);return r==null?Y.resolve(n):r.then(()=>n)}mergeParams(e,t,i,o=null,s,n){const r={...i,...s},a=e?.[t.name+"Params"];if(typeof a=="function"){const d=a(i);ge(r,d)}else typeof a=="object"&&ge(r,a);return ge(r,o),n?n(r):r}},KC={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},jC={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},YC={name:"headerComponent",optionalMethods:["refresh"]},QC={name:"innerHeaderComponent"},ZC={name:"innerHeaderGroupComponent"},XC={name:"headerGroupComponent"},JC={name:"innerRenderer",cellRenderer:!0,optionalMethods:["afterGuiAttached"]},ev={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},tv={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"]},iv={name:"loadingCellRenderer",cellRenderer:!0},ov={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},sv={name:"tooltipComponent"},or={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},nv={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},rv={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},lv={name:"loadingCellRenderer",cellRenderer:!0},av={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},dv={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function cv(e,t){return e.getCompDetailsFromGridOptions(jC,"agDragAndDropImage",t,!0)}function uv(e,t,i){return e.getCompDetails(t,JC,void 0,i)}function hv(e,t,i){return e.getCompDetails(t,YC,"agColumnHeader",i)}function gv(e,t,i){return e.getCompDetails(t,QC,void 0,i)}function pv(e,t){const i=t.columnGroup.getColGroupDef();return e.getCompDetails(i,XC,"agColumnGroupHeader",t)}function fv(e,t,i){return e.getCompDetails(t,ZC,void 0,i)}function mv(e,t){return e.getCompDetailsFromGridOptions(rv,void 0,t,!0)}function Cv(e,t){return e.getCompDetailsFromGridOptions(lv,"agLoadingCellRenderer",t,!0)}function vv(e,t){return e.getCompDetailsFromGridOptions(av,"agGroupRowRenderer",t,!0)}function wv(e,t){return e.getCompDetailsFromGridOptions(dv,"agDetailCellRenderer",t,!0)}function sr(e,t,i){return e.getCompDetails(t,ev,void 0,i)}function bv(e,t,i){return e.getCompDetails(t,tv,void 0,i)}function vc(e,t,i){return e.getCompDetails(t,iv,"agSkeletonCellRenderer",i,!0)}function wc(e,t,i){return e.getCompDetails(t,ov,"agCellEditor",i,!0)}function bc(e,t,i,o){const s=t.filter;return mc(s)&&(t={filter:s.component,filterParams:t.filterParams}),e.getCompDetails(t,or,o,i,!0)}function Sv(e,t,i){return e.getCompDetails(t,KC,"agDateInput",i,!0)}function yv(e,t){return e.getCompDetails(t.colDef,sv,"agTooltipComponent",t,!0)}function Sc(e,t,i,o){return e.getCompDetails(t,nv,o,i)}function yc(e,t){return Cc(e,t,or)}function nr(e,t,i){return e.mergeParams(t,or,i)}var Rc=(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))(Rc||{}),Rv=class extends fc{createEvent(e){return k(this.gos,e)}createDragImageComp(e){const{gos:t,beans:i}=this;return cv(i.userCompFactory,k(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){F(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const i={getContainer:e,isInterestedIn:o=>o===1||o===0,getIconName:()=>"notAllowed"};this.addDropTarget(i),t.addDestroyFunc(()=>this.removeDropTarget(i))}};function rr(e){return!!e.operator}var Ec="ag-resizer-wrapper",xt=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),Ev={tag:"div",cls:Ec,children:[xt("eTopLeft","topLeft"),xt("eTop","top"),xt("eTopRight","topRight"),xt("eRight","right"),xt("eBottomRight","bottomRight"),xt("eBottom","bottom"),xt("eBottomLeft","bottomLeft"),xt("eLeft","left")]},Fc=class extends he{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config={popup:!1,...t}}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){const{clientHeight:t,clientWidth:i}=this.offsetParent,o=i/2-this.getWidth()/2,s=t/2-this.getHeight()/2;this.offsetElement(o,s,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:i,minWidth:o,width:s,minHeight:n,height:r,x:l,y:a}=this.config;this.offsetParent||this.setOffsetParent();let d=0,c=0;const u=De(this.element);if(u){const h=this.findBoundaryElement(),g=window.getComputedStyle(h);if(g.minWidth!=null){const p=h.offsetWidth-this.element.offsetWidth;c=Number.parseInt(g.minWidth,10)-p}if(g.minHeight!=null){const p=h.offsetHeight-this.element.offsetHeight;d=Number.parseInt(g.minHeight,10)-p}}if(this.minHeight=n||d,this.minWidth=o||c,s&&this.setWidth(s),r&&this.setHeight(r),(!s||!r)&&this.refreshSize(),t)this.center(e);else if(l||a)this.offsetElement(l,a,e);else if(u&&i){let h=this.boundaryEl,g=!0;if(h||(h=this.findBoundaryElement(),g=!1),h){const p=Number.parseFloat(h.style.top),f=Number.parseFloat(h.style.left);g?this.offsetElement(Number.isNaN(f)?0:f,Number.isNaN(p)?0:p,e):this.setPosition(f,p)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const i=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(i),this.moveElementDragListener=i):(this.dragSvc?.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}for(const t of Object.keys(e)){const i=!!e[t],o=this.getResizerElement(t),s={dragStartPixels:0,eElement:o,onDragStart:n=>this.onResizeStart(n,t),onDragging:this.onResize.bind(this),onDragStop:n=>this.onResizeEnd(n,t)};(i||!this.isAlive()&&!i)&&(i?(this.dragSvc?.addDragSource(s),this.resizeListeners.push(s),o.style.pointerEvents="all"):o.style.pointerEvents="none",this.resizable[t]=i)}}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,i=this.element;let o=!1;if(typeof e=="string"&&e.includes("%"))io(i,e),e=In(i),o=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const s=this.getAvailableHeight();s&&e>s&&(e=s)}this.getHeight()!==e&&(o?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?io(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:Number.parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:i}=this.offsetParent;if(!i)return null;const o=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),n=e?this.position.y:o.top,r=e?0:s.top;let l=0;if(t){const d=this.element.parentElement;if(d){const{bottom:c}=d.getBoundingClientRect();l=c-o.bottom}}return i+r-n-l}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:i}=this.config;let o=!1;if(typeof e=="string"&&e.includes("%"))Ve(t,e),e=Ji(t),o=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:s}=this.offsetParent,n=i?this.position.x:this.element.getBoundingClientRect().left;s&&e+n>s&&(e=s-n)}this.getWidth()!==e&&(o?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Ve(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,i){const{forcePopupParentAsOffsetParent:o}=this.config,s=o?this.boundaryEl:this.element;s&&(this.popupSvc?.positionPopup({ePopup:s,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:i}),this.setPosition(Number.parseFloat(s.style.left),Number.parseFloat(s.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const i=this.getAvailableHeight();this.element.style.setProperty("max-height",`${i}px`)};e&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=at(this.beans,this.popupSvc?.getPopupParent(),t)):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:i,isTop:o,anywhereWithin:s,topBuffer:n}=e,r=t.clientX-this.dragStartPosition.x,l=t.clientY-this.dragStartPosition.y,a=this.shouldSkipX(t,!!i,!!s,r)?0:r,d=this.shouldSkipY(t,!!o,n,l)?0:l;return{movementX:a,movementY:d}}shouldSkipX(e,t,i,o){const s=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:s.left;let a=l<=0&&n.left>=e.clientX||n.right<=e.clientX&&n.right<=r.right;return a?!0:(t?a=o<0&&e.clientX>l+n.left||o>0&&e.clientXr.right||o>0&&e.clientXr.right||o>0&&e.clientX=e.clientY||n.bottom<=e.clientY&&n.bottom<=r.bottom;return a?!0:(t?a=o<0&&e.clientY>l+n.top+i||o>0&&e.clientYr.bottom||o>0&&e.clientY({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(St(Ev)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${Ec}`)?.remove(),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:i,forcePopupParentAsOffsetParent:o}=this.config;!i&&!o&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(i=>!i.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,i=0;for(const o of e){const s=!!o.style.flex&&o.style.flex!=="0 0 auto";if(o===this.element)continue;let n=this.minHeight||0,r=this.minWidth||0;if(s){const l=window.getComputedStyle(o);l.minHeight&&(n=Number.parseInt(l.minHeight,10)),l.minWidth&&(r=Number.parseInt(l.minWidth,10))}else n=o.offsetHeight,r=o.offsetWidth;t+=n,i+=r}return{height:t,width:i}}applySizeToSiblings(e){let t=null;const i=this.getSiblings();if(i){for(let o=0;oe)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:i}=this.config,{isTop:o,isRight:s,isBottom:n,isLeft:r}=this.currentResizer,l=s||r,a=n||o,{movementX:d,movementY:c}=this.calculateMouseMovement({e,isLeft:r,isTop:o}),u=this.position.x,h=this.position.y;let g=0,p=0;if(l&&d){const f=r?-1:1,m=this.getWidth(),C=m+d*f;let v=!1;r&&(g=m-C,(u+g<=0||C<=this.minWidth)&&(v=!0,g=0)),v||this.setWidth(C)}if(a&&c){const f=o?-1:1,m=this.getHeight(),C=m+c*f;let v=!1;o?(p=m-C,(h+p<=0||C<=this.minHeight)&&(v=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&mthis.element.parentElement.offsetHeight&&(v=!0),v||this.setHeight(C)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&g||p)&&this.offsetElement(u+g,h+p)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:i}=this.position;let o;this.config.calculateTopBuffer&&(o=this.config.calculateTopBuffer());const{movementX:s,movementY:n}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:o});this.offsetElement(t+s,i+n),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},xc=class extends Fc{},x=null;function lr(e){return typeof e?.getGui=="function"}var ar=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(!e)return;if(e.includes(" ")){const o=(e||"").split(" ");if(o.length>1){for(const s of o)this.toggleCss(s,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}},Fv=0,ni=class extends he{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Fv++,this.cssManager=new ar(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(i=>[i.selector,i])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui()),this.addGlobalCss()}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(cd):null}applyElementsToComponent(e,t,i,o=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===x)this[t]=o??e;else{const n=i?.[t];if(!this.suppressDataRefValidation&&!n)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){const i=[];for(const o of e.childNodes??[])i.push(o);for(const o of i){if(!(o instanceof HTMLElement))continue;const s=this.createComponentFromElement(o,n=>{const r=n.getGui();if(r)for(const l of o.attributes??[])r.setAttribute(l.name,l.value)},t);if(s){if(s.addItems&&o.children.length){this.createChildComponentsFromTags(o,t);const n=Array.prototype.slice.call(o.children);s.addItems(n)}this.swapComponentForNode(s,e,o)}else o.childNodes&&this.createChildComponentsFromTags(o,t)}}createComponentFromElement(e,t,i){const o=e.nodeName,s=this.getDataRefAttribute(e),n=o.indexOf("AG-")===0,r=n?this.componentSelectors.get(o):null;let l=null;if(r){const a=i&&s?i[s]:void 0;l=new r.component(a),l.setParentComponent(this),this.createBean(l,null,t)}else if(n)throw new Error(`selector: ${o}`);return this.applyElementsToComponent(e,s,i,l),l}swapComponentForNode(e,t,i){const o=e.getGui();t.replaceChild(o,i),t.insertBefore(document.createComment(i.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){const i=t??this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const o of e)o.setAttribute("tabindex",i.toString())}setTemplate(e,t,i){let o;typeof e=="string"||e==null?o=ds(e):o=St(e),this.setTemplateFromElement(o,t,i)}setTemplateFromElement(e,t,i,o=!1){if(this.eGui=e,this.suppressDataRefValidation=o,t)for(let s=0;sthis.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css===Pc?(this.css=[e],this.addGlobalCss()):(this.css||(this.css=[]),this.css.push(e))}addGlobalCss(){if(Array.isArray(this.css)){const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(const t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}this.css=Pc}},Pc=Symbol(),U=class extends ni{},dr,cr,ur,hr,gr,pr,fr;function mt(){return dr===void 0&&(dr=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),dr}function ri(){return cr===void 0&&(cr=/(firefox)/i.test(navigator.userAgent)),cr}function Dc(){return ur===void 0&&(ur=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),ur}function Pt(){return hr===void 0&&(hr=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),hr}function mr(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!ri())?null:t.toString()}function xv(){if(fr!==void 0)return fr;if(!document.body)return-1;let e=1e6;const t=ri()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const o=e*2;if(i.style.height=o+"px",o>t||i.clientHeight!==o)break;e=o}return i.remove(),fr=e,e}function Cr(){return pr==null&&Mc(),pr}function Mc(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.remove(),i!=null&&(pr=i,gr=i===0)}function Tc(){return gr==null&&Mc(),gr}var vr=!1,Fs=0;function Pv(e){Fs>0||(e.addEventListener("keydown",xs),e.addEventListener("mousedown",xs))}function Dv(e){Fs>0||(e.removeEventListener("keydown",xs),e.removeEventListener("mousedown",xs))}function xs(e){const t=vr,i=e.type==="keydown";i&&(e.ctrlKey||e.metaKey||e.altKey)||t!==i&&(vr=i)}function Mv(e){const t=oe(e);return Pv(t),Fs++,()=>{Fs--,Dv(t)}}function wr(){return vr}function Dt(e,t,i=!1){const o=Lm;let s=id;t&&(s+=", "+t),i&&(s+=', [tabindex="-1"]');const n=Array.prototype.slice.apply(e.querySelectorAll(o)).filter(a=>De(a)),r=Array.prototype.slice.apply(e.querySelectorAll(s));return r.length?((a,d)=>a.filter(c=>d.indexOf(c)===-1))(n,r):n}function Mt(e,t=!1,i=!1,o=!1){const s=Dt(e,o?".ag-tab-guard":null,i),n=t?q(s):s[0];return n?(n.focus({preventScroll:!0}),!0):!1}function Tt(e,t,i,o){const s=Dt(t,i?':not([tabindex="-1"])':null),n=j(e);let r;i?r=s.findIndex(a=>a.contains(n)):r=s.indexOf(n);const l=r+(o?-1:1);return l<0||l>=s.length?null:s[l]}function br(e,t=5){let i=0;for(;e&&mr(e)===null&&++i<=t;)e=e.parentElement;return mr(e)===null?null:e}var Ac="ag-focus-managed",Ic=class extends he{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},i={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=i,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:o=>{if(o.defaultPrevented)return;const s=Tt(this.beans,this.eFocusable,!1,o.shiftKey);s&&(s.focus(),o.preventDefault())},...i}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:i}}=this;e.classList.add(Ac),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),i&&this.addManagedElementListeners(e,{focusout:i})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||this.stopPropagationCallbacks.isStopPropagation(t))return;const{callbacks:i}=this;if(i.shouldStopEventPropagation(t)){this.stopPropagationCallbacks.stopPropagation(t);return}t.key===b.TAB?i.onTabKeyDown(t):i.handleKeyDown&&i.handleKeyDown(t)}})}},kc="__ag_Grid_Stop_Propagation";function At(e){e[kc]=!0}function et(e){return e[kc]===!0}var Co={isStopPropagation:et,stopPropagation:At},Li=class extends Ic{constructor(e,t){super(e,Co,t)}},Tv={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",bigintFilter:"BigInt Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",last7Days:"Last 7 Days",lastWeek:"Last Week",thisWeek:"This Week",nextWeek:"Next Week",last30Days:"Last 30 Days",lastMonth:"Last Month",thisMonth:"This Month",nextMonth:"Next Month",last90Days:"Last 90 Days",lastQuarter:"Last Quarter",thisQuarter:"This Quarter",nextQuarter:"Next Quarter",lastYear:"Last Year",thisYear:"This Year",yearToDate:"Year To Date",nextYear:"Next Year",last6Months:"Last 6 Months",last12Months:"Last 12 Months",last24Months:"Last 24 Months",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`,minDateValidation:e=>`Date must be after ${e[0]}`,maxDateValidation:e=>`Date must be before ${e[0]}`,strictMinValueValidation:e=>`Must be greater than ${e[0]}`,strictMaxValueValidation:e=>`Must be less than ${e[0]}`};function Le(e,t,i){return fd(e,Tv,t,i)}function Sr(e,t){const{debounceMs:i}=e;return vo(e)?(i!=null&&F(71),0):i??t}function vo(e){return(e.buttons?.indexOf("apply")??-1)>=0}function Lc(e,t,i,o){let s=Le(e,i);if(typeof t=="function"){const n=Le(e,o);s=t({filterOptionKey:o,filterOption:n,placeholder:s})}else typeof t=="string"&&(s=t);return s}var Bc=class extends U{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new Li(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new xc(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){const t=e,i=this.params;this.params=t;const{source:o,state:s,additionalEventAttributes:n}=t;o==="colDef"&&this.updateParams(t,i);const r=this.state;this.state=s;const l=n?.fromAction;return(l&&l!=="apply"||s.model!==r.model||!this.areStatesEqual(s.state,r.state))&&this.setModelIntoUi(s.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=vo(e),this.setupApplyDebounced()}doesFilterPass(e){F(283);const{getHandler:t,model:i,column:o}=this.params;return t().doesFilterPass({...e,model:i,handlerParams:this.beans.colFilter.getHandlerParams(o)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return F(284),this.params.model!=null}setupApplyDebounced(){const e=Sr(this.params,this.defaultDebounceMs),t=te(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return F(285),this.params.model}setModel(e){F(286);const{beans:t,params:i}=this;return t.colFilter.setModelForColumnLegacy(i.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:{valid:i=!0,model:o}}=this;if(!i)return!1;const s=!this.areModelsEqual(t.model,o);return s&&t.onAction("apply",e),s}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const i=this.getModelFromUi(),o={model:i,state:this.getState(),valid:this.canApply(i)};this.state=o;const{params:s,gos:n,eventSvc:r,applyActive:l}=this;s.onStateChange(o),s.onUiChange(this.getUiChangeEventParams()),n.get("enableFilterHandlers")||r.dispatchEvent({type:"filterModified",column:s.column,filterInstance:this}),o.valid&&(e??(e=l?void 0:"debounce"),e==="immediately"?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):e==="debounce"&&this.applyDebounced())}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:i}=this;if(!t)return;const o=e==="floatingFilter"||e==="columnFilter";o?(t.restoreLastSize(),t.setResizable(i.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(o)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return Le(this,e,t)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}},Av=["aggregation","filter","sort","pivot","columnVisibility","columnSizing","rowGroup"],Ps=class extends ni{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e?.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},wo=class extends Ps{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.eEditor.destroy(),this.errorMessages=null,super.destroy()}};function ze(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function Ds(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function Hc(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}function Iv(e){const t=e.rowModel;return t.getType()==="viewport"?t:void 0}var yr="row-group-",Ms="t-",Ts="b-",kv=0,Ct=class{constructor(e){this.id=void 0,this.destroyed=!1,this._groupData=void 0,this.master=!1,this.detail=void 0,this.rowIndex=null,this.field=null,this.rowGroupColumn=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenAfterGroup=null,this.childrenAfterFilter=null,this.childrenAfterAggFilter=null,this.childrenAfterSort=null,this.allChildrenCount=null,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this._expanded=void 0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=kv++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){const e=this._groupData;return e!==void 0?e:this.footer?this.sibling?.groupData:this.beans.groupStage?.loadGroupData(this)??null}set groupData(e){this._groupData=e}get primaryRow(){let e=this.footer&&this.sibling?this.sibling:this;const{pinnedSibling:t}=e;return t&&e.rowPinned&&(e=t,e.footer&&e.sibling&&(e=e.sibling)),e}get allLeafChildren(){const e=this._leafs;return e===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}get expanded(){const e=this.beans.expansionSvc;return e?e.isExpanded(this):this.level===-1?!0:!!this._expanded}set expanded(e){this._expanded=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:i,eventSvc:o}=this.beans,s=this.data;this.data=e,i?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,s,t);if(this.__localEventService?.dispatchEvent(n),this.sibling){this.sibling.data=e;const l=this.sibling.createDataChangedEvent(e,s,t);this.sibling.__localEventService?.dispatchEvent(l)}o.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(e,s,t)),o.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,i){return{type:"dataChanged",node:this,oldData:t,newData:e,update:i}}getRowIndexString(){return this.rowIndex==null?(z(13),null):this.rowPinned==="top"?Ms+this.rowIndex:this.rowPinned==="bottom"?Ts+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:i}=this.beans,o=i?.createDaemonNode?.(this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),i&&(i.updateRowSelectable(this),i.syncInRowNode(this,o));const n=this.createDataChangedEvent(e,s,!1);this.__localEventService?.dispatchEvent(n)}setId(e){const t=ti(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(yr)&&z(14,{groupPrefix:yr})}else this.id=void 0;else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=e!==null;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,i){this.beans.expansionSvc?.setExpanded(this,e,t,i)}setDataValue(e,t,i){const{colModel:o,valueSvc:s,gos:n,editSvc:r}=this.beans;if(e==null)return!1;let l=o.getCol(e)??o.getColDefCol(e);if(!l)return!1;if(!this.group){const c=l.getColDef();c.pivotValueColumn&&(l=c.pivotValueColumn)}const a=s.getValueForDisplay({column:l,node:this,from:"data"}).value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:c},data:u,rowIndex:h,rowPinned:g}=this;return c.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:g,column:l,colDef:l.colDef,data:u,node:this,oldValue:a,newValue:t,value:t,source:i}),!1}if(i!=="data"&&r&&!r.committing){const c=r.setDataValue({rowNode:this,column:l},t,i);if(c!=null)return c}const d=s.setValue(this,l,t,i);return this.dispatchCellChangedEvent(l,t,a),d&&this.pinnedSibling?.dispatchCellChangedEvent(l,t,a),d}getDataValue(e,t="data"){const{colModel:i,valueSvc:o,formula:s}=this.beans;if(e==null)return;const n=i.getCol(e)??i.getColDefCol(e);if(!n)return;const r=t==="data-raw",l=r||t==="value"?"data":t;let a=o.getValue(n,this,l,r);if(!r&&(s&&n.isAllowFormula()&&s.isFormula(a)&&(a=s.resolveValue(n,this)),t!=="data"&&n.getAggFunc()&&typeof a=="object"&&a!=null)){if(typeof a.toNumber=="function")return a.toNumber();if("value"in a)return a.value}return a}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,i){const o={type:"cellChanged",node:this,column:e,newValue:t,oldValue:i};this.__localEventService?.dispatchEvent(o)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let i=0,o=t.length;i{const i=new Ct(t);for(const o of Object.keys(e))Lv.has(o)||(i[o]=e[o]);return i.oldRowTop=null,i},As=(e,t,i)=>{if(!i)return;let o=i.rowIndex;if(o==null)return;o+=t;const s=e.getRowCount();for(;o>=0&&ot?.compareRowNodes(o,l,a)||(l.pinnedSibling?.rowIndex??0)-(a.pinnedSibling?.rowIndex??0)),!n)return;const r=Yn(i);r==="bottom"||r==="pinnedBottom"?this.order.push(n):this.order.unshift(n)}hide(e){const{all:t,visible:i}=this,o=i.size;return t.forEach(s=>e(s)?i.delete(s):i.add(s)),this.order=Array.from(i),this.sort(),o!=i.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function Nc(e){if(e.level===-1)return!0;const t=e.parent;return t?.childrenAfterSort?.some(i=>i==e)?Nc(t):!1}function Rr(e,t){const{gos:i,rowModel:o,filterManager:s}=e;return Pi(i,o)?!o.getRowNode(t.id):s?.isAnyFilterPresent()?!Nc(t):i.get("pivotMode")?!t.group:!1}function Bv(e){return!!e.footer&&e.level===-1}function Hv(e){return!!e.pinnedSibling&&Bv(e.pinnedSibling)}function Ov(e){const t=e.findIndex(Hv);if(t>-1)return e.splice(t,1)?.[0]}var zc=class extends S{constructor(){super(...arguments),this.csrm=null}postConstruct(){const{gos:e,beans:t}=this;this.top=new Vc(t,"top"),this.bottom=new Vc(t,"bottom"),this.csrm=ze(t)??null;const i=s=>Rr(t,s.pinnedSibling),o=()=>{const s=e.get("isRowPinned");s&&e.get("enableRowPinning")&&t.rowModel.forEachNode(n=>this.pinRow(n,s(n)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:s})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let n=!1;this.forContainers(l=>{n||(n=l.hide(i))});const r=this.refreshRowPositions();(!s||r||n)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(Vv),this.refreshRowPositions()},rowNodeDataChanged:({node:s})=>{(e.get("isRowPinnable")?.(s)??!0)||this.pinRow(s,null)},firstDataRendered:o}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(s=>s.hide(i)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:s})=>{this._grandTotalPinned=s==="pinnedBottom"?"bottom":s==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",o)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const i=[];t.forEach(o=>i.push(o)),i.forEach(o=>this.pinRow(o,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,i){if(t!=null&&e.destroyed)return;if(e.footer){const r=e.level;if(r>-1)return;if(r===-1){this._grandTotalPinned=t,this.csrm?.reMapRows();return}}const o=e.rowPinned??e.pinnedSibling?.rowPinned;if(o!=null&&t!=null&&t!=o){const r=e.rowPinned?e:e.pinnedSibling,l=e.rowPinned?e.pinnedSibling:e;this.pinRow(r,null,i),this.pinRow(l,t,i);return}const n=i&&Nv(this.beans,e,i);if(n){n.forEach(r=>this.pinRow(r,t));return}if(t==null){const r=e.rowPinned?e:e.pinnedSibling,l=this.findPinnedRowNode(r);if(!l)return;l.delete(r);const a=r.pinnedSibling;Er(r),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(a)}else{const r=Wc(this.beans,e,t),l=this.getContainer(t);l.add(r),Rr(this.beans,e)&&l.hide(a=>Rr(this.beans,a.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const i=o=>{if(o.rowHeightEstimated){const s=dt(this.beans,o);o.setRowTop(t),o.setRowHeight(s.height),t+=s.height,e=!0}};return this.bottom.forEach(i),t=0,this.top.forEach(i),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return _c(this.top)}getPinnedBottomTotalHeight(){return _c(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const e=t=>{const i=[];return this.forEachPinnedRow(t,o=>{const s=o.pinnedSibling?.id;s!=null&&i.push(s)}),i};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,i)=>{for(const o of e[i]){const s=this.beans.rowModel.getRowNode(o);s?this.pinRow(s,i):t.queue(o)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const i=new Set;e.forEachQueued(o=>{const s=this.beans.rowModel.getRowNode(o);s&&i.add(s)});for(const o of i)e.unqueue(o.id),this.pinRow(o,t)})}pinGrandTotalRow(){const{csrm:e,beans:t,_grandTotalPinned:i}=this;if(!e)return;const o=e.rootNode?.sibling;if(!o)return;const s=o.pinnedSibling,n=s&&this.findPinnedRowNode(s);if(i){if(n&&n.floating!==i&&(Er(s),n.delete(s)),!n||n.floating!==i){const r=Wc(t,o,i);this.getContainer(i).add(r)}}else{if(!n)return;Er(s),n.delete(s)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(i=>i.setRowHeight(i.rowHeight,!0)))}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){const t=o=>Gv(this.beans,o);if(e)return t(this.getContainer(e));let i=!1;return this.forContainers(o=>{const s=t(o);i||(i=s)}),i}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function Gv(e,t){let i=0,o=!1;return t.forEach((s,n)=>{if(o||(o=s.rowTop!==i),s.setRowTop(i),s.rowHeightEstimated||s.rowHeight==null){const r=dt(e,s).height;o||(o=s.rowHeight!==r),s.setRowHeight(r)}s.setRowIndex(n),i+=s.rowHeight}),o}function Wc(e,t,i){if(t.pinnedSibling)return t.pinnedSibling;const o=Gc(t,e);o.setRowTop(null),o.setRowIndex(null),o.rowPinned=i;const s=i==="top"?Ms:Ts;return o.id=`${s}${i}-${t.id}`,o.pinnedSibling=t,t.pinnedSibling=o,o}function Er(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function Vv(e){const t=new Set;e.forEach(i=>{i.group&&t.add(i)}),t.forEach(i=>e.delete(i))}function Nv(e,t,i){const{rowSpanSvc:o}=e,s=(i&&o?.isCellSpanning(i,t))??!1;if(i&&s)return o?.getCellSpan(i,t)?.spannedNodes}function _c(e){const t=e.size();if(t===0)return 0;const i=e.getByIndex(t-1);return i===void 0?0:i.rowTop+i.rowHeight}var Uc=class extends S{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=i=>{i.setRowHeight(i.rowHeight,!0)};So(this.pinnedBottomRows,t),So(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const i=o=>{if(o.rowHeightEstimated){const s=dt(this.beans,o);o.setRowTop(t),o.setRowHeight(s.height),t+=s.height,e=!0}};return So(this.pinnedBottomRows,i),t=0,So(this.pinnedTopRows,i),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const i=this.getCache(t);if(e===void 0){i.order.length=0,i.cache={};return}const o=ti(this.gos),s=t==="top"?Ms:Ts,n=new Set(i.order),r=[],l=new Set;let a=0,d=-1;for(const c of e){const u=o?.({data:c,level:0,rowPinned:t})??s+this.nextId++;if(l.has(u)){F(96,{id:u,data:c});continue}d++,l.add(u),r.push(u);const h=bo(i,u);if(h!==void 0)h.data!==c&&h.updateData(c),a+=this.setRowTopAndRowIndex(h,a,d),n.delete(u);else{const g=new Ct(this.beans);g.id=u,g.data=c,g.rowPinned=t,a+=this.setRowTopAndRowIndex(g,a,d),i.cache[u]=g,i.order.push(u)}}for(const c of n)bo(i,c)?.clearRowTopAndRowIndex(),delete i.cache[c];i.order=r}setRowTopAndRowIndex(e,t,i){return e.setRowTop(t),e.setRowHeight(dt(this.beans,e).height),e.setRowIndex(i),e.rowHeight}getPinnedTopTotalHeight(){return qc(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return qc(this.pinnedBottomRows)}getPinnedTopRowCount(){return xr(this.pinnedTopRows)}getPinnedBottomRowCount(){return xr(this.pinnedBottomRows)}getPinnedTopRow(e){return Fr(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Fr(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return bo(this.getCache(t),e)}forEachPinnedRow(e,t){return So(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function qc(e){const t=xr(e);if(t===0)return 0;const i=Fr(e,t-1);return i===void 0?0:i.rowTop+i.rowHeight}function bo(e,t){return e.cache[t]}function Fr(e,t){return bo(e,e.order[t])}function So(e,t){e.order.forEach((i,o)=>{const s=bo(e,i);s&&t(s,o)})}function xr(e){return e.order.length}var $c=class extends S{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const i=e.get("enableRowPinning"),o=Yn(e),n=!!i||(o==="pinnedBottom"||o==="pinnedTop"),r=n?this.inner instanceof Uc:this.inner instanceof zc;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(n?new zc:new Uc))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,i){return this.inner.pinRow(e,t,i)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}},Kc=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(Kc||{}),zv=500,Wv=550,Is,_v=e=>{if(!Is)Is=new WeakSet;else if(Is.has(e))return!1;return Is.add(e),!0},It=class{constructor(e,t=!1){this.eElement=e,this.preventClick=t,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,t){let i=this.eventSvc;if(!i){if(i===null)return;this.eventSvc=i=new bt;const o=this.onTouchStart.bind(this);this.startListener=o,this.eElement.addEventListener("touchstart",o,{passive:!0})}i.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!_v(e))return;const t=e.touches[0];this.touchStart=t;const i=this.handlers;if(!i.length){const o=this.eElement,s=o.ownerDocument,n=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),l=this.onTouchCancel.bind(this),a={passive:!0},d={passive:!1};gs(i,[o,"touchmove",n,a],[s,"touchcancel",l,a],[s,"touchend",r,d],[s,"contextmenu",yt,d])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,this.eventSvc?.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},Wv)}onTouchMove(e){const{moved:t,touchStart:i}=this;if(!t&&i){const o=Ri(i,e.touches);o&&!gd(o,i,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;!t||!Ri(t,e.changedTouches)||(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&yt(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!Ri(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const i=this.lastTapTime;i&&t-i>zv&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),Hn(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){const e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}},jc=(e=>(e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION",e))(jc||{}),Uv=1,Yc=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=Uv++,e?.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];for(const t of e.beanClasses){const i=new t;i.beanName?this.beans[i.beanName]=i:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(i)}for(const t of e.derivedBeans??[]){const{beanName:i,bean:o}=t(this);this.beans[i]=o,this.createdBeans.push(o)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){const i=this.beans;for(const o of e)o.preWireBeans?.(i),o.wireBeans?.(i);for(const o of e)o.preConstruct?.();t&&e.forEach(t);for(const o of e)o.postConstruct?.()}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],this.destroyCallback?.()}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t[e,t]));function Kv(e,t){const i=(e.beanName?Qc[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,o=(t.beanName?Qc[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return i-o}function jv(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}function Zc(e){const{rowIndex:t,rowPinned:i,column:o}=e;return`${t}.${i??"null"}.${o.getId()}`}function ks(e,t){const i=e.column===t.column,o=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return i&&o&&s}function Xc(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(M(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndexu.rowNode.rowIndex===t.rowIndex),a=l?n:r,d=(i?-1:1)*(l?-1:1);let c;for(let u=0;u{if(!o.defaultPrevented&&!ew(o)&&o.key===b.TAB){const s=o.shiftKey;Tt(e,i,!1,s)||ai(e,s)&&o.preventDefault()}}})}function iu(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function _e(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.exclusive}function Ro(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.exclusive}function ai(e,t,i=!1){const o=e.ctrlsSvc.get("gridCtrl"),s=o.focusNextInnerContainer(t);return s===!0?!0:s===!1?s:((i||!t&&!o.isDetailGrid()&&o.isFocusInsideGridBody())&&o.forceFocusOutOfContainer(t),!1)}function ou(e,t){const i=e.focusSvc,o=i.getFocusedCell();if(o&&t&&ks(o,t)){const{rowIndex:s,rowPinned:n,column:r}=t;es(e)&&i.setFocusedCell({rowIndex:s,column:r,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!wr()})}}function Xv(e,t){const i=e.getFocusableContainerName();return i==="gridBody"?t():su(e,()=>Dt(e.getGui(),".ag-tab-guard").length>0)?i:null}function su(e,t){e.setAllowFocus?.(!0);try{return t()}finally{e.setAllowFocus?.(!1)}}var nu="__ag_Grid_Skip_Focusable_Container";function Jv(e){e[nu]=!0}function ew(e){return e[nu]===!0}function tw(e){return e.cols?e.cols.treeDepth+1:-1}function Be(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function Tr(e){const t=[],i=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const o of i){if(!o)continue;const s=o.getGroupRowCount()||0;for(let n=0;nl)&&(t[n]=a)}}}return t}function iw(e,t){let o=e.colModel.isPivotMode()?sw(e):ru(e);const s=t.getHeaderCellCtrls();for(const n of s){const{column:r}=n,l=r.getAutoHeaderHeight();l!=null&&l>o&&r.isAutoHeaderHeight()&&(o=l)}return o}function Ar(e){let i=e.colModel.isPivotMode()?ow(e):Eo(e);return e.colModel.forAllCols(o=>{const s=o.getAutoHeaderHeight();s!=null&&s>i&&o.isAutoHeaderHeight()&&(i=s)}),i}function Eo(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function Ir(e){return e.gos.get("floatingFiltersHeight")??Eo(e)}function ru(e){return e.gos.get("groupHeaderHeight")??Eo(e)}function ow(e){return e.gos.get("pivotHeaderHeight")??Eo(e)}function sw(e){return e.gos.get("pivotGroupHeaderHeight")??ru(e)}function nw(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}function rw(e){return e?.headerRowIndex!=null}var lu=class extends S{setComp(e,t,i){this.comp=e,this.eGui=t;const{beans:o}=this,{headerNavigation:s,touchSvc:n,ctrlsSvc:r}=o;s&&this.createManagedBean(new Li(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,o),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,o)}),this.onPivotModeChanged(o),this.setupHeaderHeight();const l=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:l}),n?.mockHeaderContextMenu(this,l),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>Ye(this.beans,()=>e()),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const i=Tr(e).reduce((r,l)=>r+l,0),o=Ar(e);e.filterManager?.hasFloatingFilters()&&(t+=Ir(e)),t+=i,t+=o;const s=e.environment.getHeaderRowBorderWidth(),n=t+s;if(this.headerHeightWithBorder!==n){this.headerHeightWithBorder=n;const r=`${n}px`;this.comp.setHeightAndMinHeight(r)}this.headerHeight!==t&&(this.headerHeight=t,this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const i=e.visibleCols.allCols.some(o=>o.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",i)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),i=e.shiftKey,o=i!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:n,focusSvc:r}=s;(n.navigateHorizontally(o,!0,e)||!i&&r.focusOverlay(!1)||ai(s,i,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:i}=this.beans;switch(e.key){case b.LEFT:t="LEFT";case b.RIGHT:{M(t)||(t="RIGHT"),i.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case b.UP:t="UP";case b.DOWN:{M(t)||(t="DOWN"),i.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:i,beans:o}=this;!t&&i.contains(j(o))||i.contains(t)||(o.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,i){const{menuSvc:o,ctrlsSvc:s}=this.beans;if(!e&&!i||!o?.isHeaderContextMenuEnabled())return;const{target:n}=e??t;(n===this.eGui||n===s.getHeaderRowContainerCtrl()?.eViewport)&&o.showHeaderContextMenu(void 0,e,i)}},kr=class extends U{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},lw={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},aw=class extends kr{constructor(e){super(lw,e),this.eResize=x,this.eHeaderCompWrapper=x,this.headerCompVersion=0}postConstruct(){const e=this.getGui(),t=()=>{const o=this.ctrl.getSelectAllGui();o&&(this.eResize.insertAdjacentElement("afterend",o),this.addDestroyFunc(()=>o.remove()))},i={setWidth:o=>e.style.width=o,toggleCss:(o,s)=>this.toggleCss(o,s),setUserStyles:o=>to(e,o),setAriaSort:o=>o?Za(e,o):Xa(e),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:t,removeSelectAllGui:()=>this.ctrl.getSelectAllGui()?.remove()};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),t()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.headerCompGui?.remove(),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(i=>this.afterCompCreated(t,i))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},dw={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},cw=class extends kr{constructor(e){super(dw,e),this.eResize=x,this.eHeaderCompWrapper=x}postConstruct(){const e=this.getGui(),t=(o,s)=>s!=null?e.setAttribute(o,s):e.removeAttribute(o),i={toggleCss:(o,s)=>this.toggleCss(o,s),setUserStyles:o=>to(e,o),setHeaderWrapperHidden:o=>{o?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:o=>{o!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${o}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",o!=null)},setResizableDisplayed:o=>_(this.eResize,o),setWidth:o=>e.style.width=o,setAriaExpanded:o=>t("aria-expanded",o),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(i,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}const i=this.getGui(),o=e.getGui();this.eHeaderCompWrapper.appendChild(o),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(i)}},uw={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},hw=class extends kr{constructor(e){super(uw,e),this.eFloatingFilterBody=x,this.eButtonWrapper=x,this.eButtonShowMainFilter=x}postConstruct(){const e=this.getGui(),t={toggleCss:(i,o)=>this.toggleCss(i,o),setUserStyles:i=>to(e,i),addOrRemoveBodyCssClass:(i,o)=>this.eFloatingFilterBody.classList.toggle(i,o),setButtonWrapperDisplayed:i=>_(this.eButtonWrapper,i),setCompDetails:i=>this.setCompDetails(i),getFloatingFilterComp:()=>this.compPromise,setWidth:i=>e.style.width=i,setMenuIcon:i=>this.eButtonShowMainFilter.appendChild(i)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp?.getGui().remove(),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp)}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached?.()}}},gw=class extends U{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),wi(this.getGui(),this.ctrl.getAriaRowIndex());const t={setHeight:i=>this.getGui().style.height=i,setTop:i=>this.getGui().style.top=i,setHeaderCtrls:(i,o)=>this.setHeaderCtrls(i,o),setWidth:i=>this.getGui().style.width=i,setRowIndex:i=>wi(this.getGui(),i)};this.ctrl.setComp(t,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const i=this.headerComps;this.headerComps={};for(const o of e){const s=o.instanceId;let n=i[s];delete i[s],n==null&&(n=this.createHeaderComp(o),this.getGui().appendChild(n.getGui())),this.headerComps[s]=n}if(Object.values(i).forEach(o=>{o.getGui().remove(),this.destroyBean(o)}),t){const o=Object.values(this.headerComps);o.sort((n,r)=>{const l=n.getCtrl().column.getLeft(),a=r.getCtrl().column.getLeft();return l-a});const s=o.map(n=>n.getGui());ld(this.getGui(),s)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new cw(e);break;case"filter":t=new hw(e);break;default:t=new aw(e);break}return this.createBean(t),t.setParentComponent(this),t}},Lr=class extends S{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=ae(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:i}=this.beans,o=t.bodyWidth,s=t.getColsLeftWidth(),n=t.getDisplayedColumnsRightWidth();let r;e?r=o+s+n:(r=o,this.addSpacer&&(this.gos.get("enableRtl")?s:n)===0&&i.verticalScrollShowing&&(r+=i.getScrollbarWidth())),this.callback(r)}},pw=class extends S{};function Fo(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var Br=class extends S{constructor(e,t,i,o){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=o,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=i}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?q(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,i=e.get("suppressColumnMoveAnimation"),o=M(this.columnOrGroup.getOldLeft());t?.isActive()&&o&&!i?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),i=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=i,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===i&&this.setLeft(i)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:i,visibleCols:o}=this.beans;if(!ae(i,"print")||e.getPinned()==="left")return t;const n=o.getColsLeftWidth();if(e.getPinned()==="right"){const r=o.bodyWidth;return n+r+t}return n+t}setLeft(e){if(M(e)&&(this.eCell.style.left=`${e}px`),ee(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&Qa(this.ariaEl,t.length)}}},fw="ag-column-first",mw="ag-column-last";function Hr(e,t,i,o){return K(e)?[]:du(e.headerClass,e,t,i,o)}function Cw(e,t,i,o){return K(e)?[]:du(e.toolPanelClass,e,t,i,o)}function au(e,t,i){e.toggleCss(fw,i.isColAtEdge(t,"first")),e.toggleCss(mw,i.isColAtEdge(t,"last"))}function vw(e,t,i,o){return k(t,{colDef:e,column:i,columnGroup:o})}function du(e,t,i,o,s){if(K(e))return[];let n;if(typeof e=="function"){const r=vw(t,i,o,s);n=e(r)}else n=e;return typeof n=="string"?[n]:Array.isArray(n)?[...n]:[]}var ww=0,cu="headerCtrl",Or=class extends S{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+"-"+ww++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,i,o,s){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,i,o,s),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:i}=this.beans.focusSvc.focusedHeader,o=i.getDefinition(),s=o?.suppressHeaderKeyboardEvent;if(!M(s))return!1;const n=k(this.gos,{colDef:o,column:i,headerRowIndex:t,event:e});return!!s(n)}getWrapperHasFocus(){return j(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let i;if(typeof t=="function"){const o=this.getHeaderClassParams();i=t(o)}else i=t;i&&this.comp.setUserStyles(i)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:i,compBean:o}=e,{beans:s}=this,n=u=>{if(!this.isAlive()||!o.isAlive())return;const{paddingTop:h,paddingBottom:g,borderBottomWidth:p,borderTopWidth:f}=Yt(this.eGui),m=h+g+p+f,v=t.offsetHeight+m;if(u<5){const y=!oe(s)?.contains(t),R=v==0;if(y||R){ps(()=>n(u+1),"raf",s);return}}this.setColHeaderHeight(this.column,v)};let r=!1,l;const a=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&d(),!u&&r&&c()},d=()=>{r=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),n(0),l=at(this.beans,t,()=>n(0))},c=()=>{r=!1,l&&l(),this.comp.toggleCss("ag-header-cell-auto-height",!1),l=void 0};a(),o.addDestroyFunc(()=>c()),o.addManagedListeners(this.column,{widthChanged:()=>r&&n(0)}),o.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>n(0))}}),i&&i(a)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:i,eGui:o}=this;!e||!t||!o||(au(e,t,i.visibleCols),Tn(o,i.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=_e(this.beans);this.eGui&&we(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=j(this.beans),i=e.key===b.LEFT||e.key===b.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey)return;if((this.isResizing||i)&&(e.preventDefault(),e.stopImmediatePropagation()),(e.ctrlKey||e.metaKey)&&pc(e)===b.C)return this.beans.clipboardSvc?.copyToClipboard();if(!i)return;const n=e.key===b.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const r=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(r,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(n)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:i}=this.beans;return i?i.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:i}=this;let o=e.key===b.LEFT!==t.get("enableRtl");const s=i.getPinned(),n=t.get("enableRtl");return s&&n!==(s==="right")&&(o=!o),(o?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case b.PAGE_DOWN:case b.PAGE_UP:case b.PAGE_HOME:case b.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=cu,{eGui:i,gos:o}=this;Jt(o,i,t,this),e.addDestroyFunc(()=>Jt(o,i,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus()):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,i){const o=e??t,{menuSvc:s,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&o.preventDefault(),s?.isHeaderContextMenuEnabled(i)&&s.showHeaderContextMenu(i,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",i)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:i}=this;e.isColumn?i.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):i.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},bw=class extends Or{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,i,o,s){this.comp=e;const{rowCtrl:n,column:r,beans:l}=this,{colResize:a,context:d,colHover:c,rangeSvc:u}=l,h=Fo(this,d,s);this.setGui(t,h),this.updateState(),this.setupWidth(h),this.setupMovingCss(h),this.setupMenuClass(h),this.setupSortableClass(h),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:o,checkMeasuringCallback:p=>this.setRefreshFunction("measuring",p),compBean:h}),this.addColumnHoverListener(h),this.setupFilterClass(h),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(h),this.setupSelectAll(h),this.setupUserComp(),this.refreshAria(),a?this.resizeFeature=h.createManagedBean(a.createResizeFeature(n.pinned,r,i,e,this)):_(i,!1),c?.createHoverFeature(h,[r],t),u?.createRangeHighlightFeature(h,r,e),h.createManagedBean(new Br(r,t,l)),h.createManagedBean(new Li(t,{shouldStopEventPropagation:p=>this.shouldStopEventPropagation(p),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(h),h.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),h.addManagedListeners(r,{colDefChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();h.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),h.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.colDef;return k(t.gos,{colDef:i,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return hv(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:i,gos:o}=this.beans;return k(o,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!i&&(!this.openFilterEnabled||be(this.gos)),showColumnMenu:(n,r)=>{e?.showColumnMenu({column:this.column,buttonElement:n,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(n,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:n,positionBy:"mouse",onClosedCallback:r})},showFilter:n=>{e?.showFilterMenu({column:this.column,buttonElement:n,containerType:"columnFilter",positionBy:"button"})},progressSort:n=>{t?.progressSort(this.column,!!n,"uiColumnSorted")},setSort:(n,r)=>{t?.setSortForColumn(this.column,Me(n),!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(n,r)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(n,r)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{const i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===b.SPACE?this.selectAllFeature?.onSpaceKeyDown(e):e.key===b.ENTER?this.onEnterKeyDown(e):e.key===b.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){const{column:t,gos:i,sortable:o,beans:s}=this;let n=!1;(e.ctrlKey||e.metaKey)&&(n=this.showMenuOnKeyPress(e,!0)),n||(!e.altKey&&oi(i)?s.rangeSvc?.handleColumnSelection(t,e):o&&s.sortSvc?.progressSort(t,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const i=this.comp.getUserCompInstance();return uu(i)&&i.onMenuKeyboardShortcut(t)?(e.preventDefault(),!0):!1}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),wr()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),i=Hr(t,this.gos,this.column,null),o=this.userHeaderClasses;this.userHeaderClasses=new Set(i);for(const s of i)o.has(s)?o.delete(s):this.comp.toggleCss(s,!0);for(const s of o)this.comp.toggleCss(s,!1)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(const e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const i=this.column.getActualWidth();this.comp.setWidth(`${i}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const i=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",i),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,i=e===1;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",i)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:i,beans:o}=this,s=Tr(this.beans),n=s.reduce((h,g)=>h+g,0)===0;if(i.toggleCss("ag-header-parent-hidden",n),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),i.toggleCss("ag-header-span-height",!1),i.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:l}=this.column.getColumnGroupPaddingInfo();i.toggleCss("ag-header-span-height",r>0);const a=Ar(o);if(r===0){i.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${a}px`);return}i.toggleCss("ag-header-span-total",l);const d=(this.column.getFirstRealParent()?.getLevel()??-1)+1,c=s.length-d;let u=0;for(let h=0;hs==="filter"?-1:n.charCodeAt(0)-s.charCodeAt(0)).map(s=>i.get(s)).join(". ");e.ariaAnnounce?.announceValue(o,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),i=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},o=s=>this.handleContextMenuMouseEvent(s,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:i,contextmenu:o})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return uu(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function uu(e){return typeof e?.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var Sw=0,Gr=class extends S{constructor(e,t,i){super(),this.rowIndex=e,this.pinned=t,this.type=i,this.instanceId=Sw++,this.comp=null,this.allCtrls=[];let o="ag-header-row-column";i==="group"?o="ag-header-row-group":i==="filter"&&(o="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${o}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=ae(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,i=!0){this.comp=e,t=Fo(this,this.beans.context,t),i&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),i=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:i,virtualColumnsChanged:o=>this.onVirtualColumnsChanged(o.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",i),e.addManagedPropertyListener("ensureDomOrder",o=>this.isEnsureDomOrder=o.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=ae(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=Tr(this.beans);for(let s=0;s{const{focusSvc:s,visibleCols:n}=this.beans;return s.isHeaderWrapperFocused(o)?n.isVisible(o.column):!1};if(e)for(const[o,s]of e)i(s)?this.ctrlsById.set(o,s):this.destroyBean(s);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,i){if(e.isEmptyGroup())return;const o=e.getUniqueId();let s;if(i&&(s=i.get(o),i.delete(o)),s&&s.column!=e&&(this.destroyBean(s),s=void 0),s==null)switch(this.type){case"filter":{s=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":s=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:s=this.createBean(new bw(e,this));break}t.set(o,s)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];for(const t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const i=this.allCtrls.find(s=>s.column==e);return i?i.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},hu=class extends S{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:i,ctrlsSvc:o,colModel:s,colMoves:n}=this.beans;this.setupCenterWidth(),i?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});const l=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;o.register(l,this),s.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,filterManager:i,visibleCols:o}=this.beans;let s=0;const n=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=o.headerGroupRowCount;s=u,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const h=this.groupsRowCtrls.length;if(h!==u){if(h>u){for(let g=u;g{const u=s++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new Gr(u,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},a=()=>{this.includeFloatingFilter=!!i?.hasFloatingFilters()&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}e||u();const h=s++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==h&&this.filtersRowCtrl.setRowIndex(h):this.filtersRowCtrl=this.createBean(new Gr(h,this.pinned,"filter"))},d=this.getAllCtrls();r(),l(),a();const c=this.getAllCtrls();this.comp.setCtrls(c),this.restoreFocusOnHeader(t,n),d.length!==c.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=i=>i?.getHeaderCellCtrls().find(o=>o.column===e);if(ct(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let i=0;ithis.comp.setCenterWidth(`${e}px`),!0))}},yw={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},Rw={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},Ew={tag:"div",cls:"ag-header-viewport",role:"rowgroup",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"presentation"}]},Vr=class extends U{constructor(e){super(),this.eCenterContainer=x,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:i=>this.setDisplayed(i),setCtrls:i=>this.setCtrls(i),setCenterWidth:i=>this.eCenterContainer.style.width=i,setViewportScrollLeft:i=>this.getGui().scrollLeft=i,setPinnedContainerWidth:i=>{const o=this.getGui();o.style.width=i,o.style.maxWidth=i,o.style.minWidth=i}};this.createManagedBean(new hu(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",i=e?yw:t?Rw:Ew;this.setTemplate(i),this.eRowContainer=this.eCenterContainer!==x?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),e.getGui().remove()}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let i;const o=s=>{const n=s.getGui();n.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(n),i&&rd(this.eRowContainer,n,i),i=n};for(const s of e){const n=s.instanceId,r=t[n];delete t[n];const l=r||this.createBean(new gw(s));this.headerRowComps[n]=l,this.rowCompsList.push(l),o(l)}for(const s of Object.values(t))this.destroyRowComp(s)}},Fw={tag:"div",cls:"ag-header",role:"presentation"},xw=class extends U{constructor(){super(Fw)}postConstruct(){const e={toggleCss:(o,s)=>this.toggleCss(o,s),setHeightAndMinHeight:o=>{this.getGui().style.height=o,this.getGui().style.minHeight=o}};this.createManagedBean(new lu).setComp(e,this.getGui(),this.getFocusableElement());const i=o=>{this.createManagedBean(o),this.appendChild(o)};i(new Vr("left")),i(new Vr(null)),i(new Vr("right"))}},Pw={selector:"AG-HEADER-ROOT",component:xw},Ue={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},Nr=class extends S{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},i=t.autoHeight?Ue.AUTO_HEIGHT:t.print?Ue.PRINT:Ue.NORMAL;this.view.updateLayoutClasses(i,t)}},gu=class extends U{constructor(e,t){super(),this.direction=t,this.eViewport=x,this.eContainer=x,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",Dc()||Pt())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=Tc(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),i=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:i,touchend:i})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),Ye(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;wd(this,()=>De(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},Dw={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},pu=class extends gu{constructor(){super(Dw,"horizontal"),this.eLeftSpacer=x,this.eRightSpacer=x,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new Lr(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const i=!this.enableRtl&&e,o=this.scrollVisibleSvc.getScrollbarWidth();i&&(t+=o),Ve(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=o);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=o),Ve(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=o)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),o=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,n=i?0:o===0&&t?16:o,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),io(this.getGui(),n),io(this.eViewport,n),io(this.eContainer,n),n||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return as(this.eViewport,this.enableRtl)}setScrollPosition(e){De(this.eViewport)||this.attemptSettingScrollPosition(e),eo(this.eViewport,e,this.enableRtl)}},Mw={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:pu},fu=class extends S{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,i=t!=null?`${t}px`:"";this.eContainer.style.height=i,this.eViewport&&(this.eViewport.style.height=i)}},Tw={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},mu=class extends gu{constructor(){super(Tw,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new fu(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,i=this.invisibleScrollbar,o=t&&e.getScrollbarWidth()||0,s=o===0&&i?16:o;this.toggleCss("ag-scrollbar-invisible",i),Ve(this.getGui(),s),Ve(this.eViewport,s),Ve(this.eContainer,s),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const i=e.getGridBodyCtrl().eBodyViewport,o=this.getScrollPosition(),s=i.scrollTop;o!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!De(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},Aw={selector:"AG-FAKE-VERTICAL-SCROLL",component:mu},Cu=(e=>(e[e.Vertical=0]="Vertical",e[e.Horizontal=1]="Horizontal",e))(Cu||{}),kt="Viewport",vu="fakeVScrollComp",zr=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],wu=100,Wr=150,Iw=class extends S{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=te(this,()=>this.lastScrollSource[1]=null,Wr),this.resetLastVScrollDebounced=te(this,()=>this.lastScrollSource[0]=null,Wr)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,i=>{this.centerRowsCtrl=i.center,this.fakeVScrollComp=i.fakeVScrollComp,this.fakeHScrollComp=i.fakeHScrollComp,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,kt)});for(const e of zr){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.gos.get("debounceVerticalScrollbar"),t=e?te(this,this.onVScroll.bind(this,kt),wu):this.onVScroll.bind(this,kt),i=e?te(this,this.onVScroll.bind(this,vu),wu):this.onVScroll.bind(this,vu);this.addManagedElementListeners(this.eBodyViewport,{scroll:t}),this.registerScrollPartner(this.fakeVScrollComp,i)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...zr,kt]){if(this.lastScrollSource[1]===t)continue;const i=this.getViewportForSource(t);eo(i,e,this.enableRtl)}}getViewportForSource(e){return e===kt?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:i}=t;if(this.shouldBlockScrollUpdate(1,i,!0))return;const o=as(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(o),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;const t=e===kt?this.eBodyViewport.scrollTop:this.fakeVScrollComp.getScrollPosition();let i=t;if(this.shouldBlockScrollUpdate(0,i,!0))return;e===kt?this.fakeVScrollComp.setScrollPosition(i):(this.eBodyViewport.scrollTop=t,i=this.eBodyViewport.scrollTop,this.invalidateVerticalScroll(),i!==t&&this.fakeVScrollComp.setScrollPosition(i,!0));const{animationFrameSvc:o}=this;o?.setScrollTop(i),this.nextScrollTop=i,o?.active?o.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.fakeHScrollComp.getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Wr)}shouldBlockScrollUpdate(e,t,i=!1){return i&&!Pt()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=ls(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return e<0||e+t>i}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>i}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){const e=this.scrollLeft;let t=!1;for(const i of zr)if(this.getViewportForSource(i).scrollLeft!==e){t=!0;break}t&&this.onHScroll(kt)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const o=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:o:e=Math.min(Math.max(e,0),o)),eo(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:i,lastScrollTop:o}=this;return{top:o,bottom:o+i}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.setVerticalScrollPosition(0)}ensureNodeVisible(e,t=null){const{rowModel:i}=this.beans,o=i.getRowCount();let s=-1;for(let n=0;n=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t,i=0){if(ae(this.gos,"print"))return;const{rowModel:o}=this.beans,s=o.getRowCount();if(typeof e!="number"||e<0||e>=s){F(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:l,rowRenderer:a}=this.beans;n.wrapIncoming(()=>{const d=this.ctrlsSvc.getGridBodyCtrl(),c=o.getRow(e);let u,h,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:p,stickyBottomHeight:f}=d,m=c.rowTop,C=c.rowHeight,v=r.getPixelOffset(),w=c.rowTop-v,y=w+c.rowHeight,R=this.getVScrollPosition(),E=l.divStretchOffset,D=R.top+E,B=R.bottom+E,O=B-D,G=l.getScrollPositionForPixel(w),H=l.getScrollPositionForPixel(y-O),$=Math.min((G+H)/2,w),W=D+p>w,ue=B-fO?ne=G-p:ne=H+f),ne!==null&&(this.setVerticalScrollPosition(ne),a.redraw({afterScroll:!0})),u=m!==c.rowTop||C!==c.rowHeight,h=p!==d.stickyTopHeight||f!==d.stickyBottomHeight,g++}while((u||h)&&g<10);if(this.animationFrameSvc?.flushAllFrames(),i<10&&(c?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const p=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const f=this.getVScrollPosition().top;p!==f&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=o.getRowCount())&&this.ensureIndexVisible(e,t,i+1)}})}})}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:i,frameworkOverrides:o}=this.beans,s=i.getCol(e);if(!s||s.isPinned()||!this.visibleCols.isColDisplayed(s))return;const n=this.getPositionedHorizontalScroll(s,t);o.wrapIncoming(()=>{n!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:i,columnAfterEnd:o}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()s:io;return{columnBeforeStart:r,columnAfterEnd:l}}getColumnBounds(e){const t=this.enableRtl,i=this.visibleCols.bodyWidth,o=e.getActualWidth(),s=e.getLeft(),n=t?-1:1,r=t?i-s:s,l=r+o*n,a=r+o/2*n;return{colLeft:r,colMiddle:a,colRight:l}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),i=t,o=e+t;return{start:i,end:o,width:e}}},bu={horizontal:{overflow:e=>e.scrollWidth-e.clientWidth,scrollSize:e=>e.scrollWidth,clientSize:e=>e.clientWidth,opposite:"vertical"},vertical:{overflow:e=>e.scrollHeight-e.clientHeight,scrollSize:e=>e.scrollHeight,clientSize:e=>e.clientHeight,opposite:"horizontal"}};function kw(e,t,i=Cr()||0,o,s){return Su(e,t,"horizontal",i,o,s)}function Lw(e,t,i=Cr()||0,o,s){return Su(e,t,"vertical",i,o,s)}function Su(e,t,i,o,s,n){const r=bu[i],l=bu[r.opposite],a=s?De(s):!0,d=n?De(n):!0,c=r.overflow(e);if(c<=0)return!1;if(!t||o===0)return!0;const u=l.overflow(t);if(u<=0)return!0;if(c<=o){if(a&&d&&Bw({candidateOverflow:u,candidateScrollSize:l.scrollSize(t),candidateClientSize:l.clientSize(t),scrollbarWidth:o}))return!1;const h=r.clientSize(e)+o;return r.scrollSize(e)<=h}return!0}function Bw({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:i,scrollbarWidth:o}){if(e<=0||e>o)return!1;const s=i+o;return t>i&&t<=s}var Hw=class extends S{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:i}=this,o=()=>{Ye(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(o),i.registerBodyViewportResizeListener(o)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const i=this.centerContainerCtrl.getCenterWidth();i!==this.centerWidth&&(this.centerWidth=i,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=ls(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const{centerContainerCtrl:e,beans:t}=this,i=e.getCenterWidth(),o=e.getViewportScrollLeft();t.colViewport.setScrollPosition(i,o)}};function _r(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function xo(e,t,i,o){const s=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return yu(e,t,i,o,s)}function Ow(e,t,i,o){const s=t?.suppressMouseEventHandling;return yu(e,void 0,i,o,s)}function yu(e,t,i,o,s){return s?s(k(e,{column:t,node:i,event:o})):!1}function Ru(e,t,i){let o=t;for(;o;){const s=zd(e,o,i);if(s)return s;o=o.parentElement}return null}var Ls="cellCtrl";function Bs(e,t){return Ru(e,t,Ls)}var Hs="renderedRow";function Eu(e,t){return Ru(e,t,Hs)}function Ur(e,t,i,o,s){const n=o?o.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=k(e,{event:t,editing:s,column:o,node:i,data:i.data,colDef:o.getColDef()});return!!(n&&n(r))}function Fu(e){const{pinnedRowModel:t,rowModel:i,rangeSvc:o,visibleCols:s}=e;if(!o||s.allCols.length===0)return;const n=t?.isEmpty("top")??!0,r=t?.isEmpty("bottom")??!0,l=n?null:"top";let a,d;r?(a=null,d=i.getRowCount()-1):(a="bottom",d=t?.getPinnedBottomRowCount()??-1),o.setCellRange({rowStartIndex:0,rowStartPinned:l,rowEndIndex:d,rowEndPinned:a})}var Gw=class extends S{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){let e="mousedown";hs("pointerdown")?e="pointerdown":hs("touchstart")&&(e="touchstart");const t=["dblclick","contextmenu","mouseover","mouseout","click",e];for(const i of t){const o=this.processMouseEvent.bind(this,i);this.addManagedElementListeners(this.element,{[i]:o})}}processMouseEvent(e,t){if(!oo(this.beans,t)||et(t))return;const{cellCtrl:i,rowCtrl:o}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(i?.column&&i.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,o,i)):(i&&i.onMouseEvent(e,t),o&&o.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:Bs(t,e),rowCtrl:Eu(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:i,rowCtrl:o}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,t):o?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(o,e,t))}processCellKeyboardEvent(e,t,i){const o=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!Ur(this.gos,i,e.rowNode,e.column,o)&&t==="keydown"&&(!o&&this.beans.navigation?.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,o),_r(i)&&e.processCharacter(i)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,i){const{rowNode:o}=e,{focusSvc:s,navigation:n}=this.beans,l=s.getFocusedCell()?.column;if(!Ur(this.gos,i,o,l,!1)){const d=i.key;if(t==="keydown")switch(d){case b.PAGE_HOME:case b.PAGE_END:case b.PAGE_UP:case b.PAGE_DOWN:n?.handlePageScrollingKey(i,!0);break;case b.LEFT:case b.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case b.UP:case b.DOWN:e.onKeyboardNavigate(i);break;case b.TAB:e.onTabKeyDown(i);break;default:}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",i))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!oo(this.beans,e))return;const i=pc(e),{clipboardSvc:o,undoRedo:s}=this.beans;if(i===b.A)return this.onCtrlAndA(e);if(i===b.C)return this.onCtrlAndC(o,e);if(i===b.D)return this.onCtrlAndD(o,e);if(i===b.V)return this.onCtrlAndV(o,e);if(i===b.X)return this.onCtrlAndX(o,e);if(i===b.Y)return this.onCtrlAndY(s);if(i===b.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:i,selectionSvc:o},gos:s}=this;i&&Ze(s)&&!SC(s)&&t.isRowsToRender()?Fu(this.beans):o&&o.selectAllRowNodes({source:"keyboardSelectAll",selectAll:jd(s)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},Os=e=>e.topRowCtrls,Gs=e=>e.getStickyTopRowCtrls(),Vs=e=>e.getStickyBottomRowCtrls(),Ns=e=>e.bottomRowCtrls,zs=e=>e.allRowCtrls,qr=e=>e.getCtrls("top"),$r=e=>e.getCtrls("center"),Kr=e=>e.getCtrls("bottom"),Vw={center:{type:"center",name:"center-cols",getRowCtrls:zs,getSpannedRowCtrls:$r},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:zs,getSpannedRowCtrls:$r},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:zs,getSpannedRowCtrls:$r},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:zs},topCenter:{type:"center",name:"floating-top",getRowCtrls:Os,getSpannedRowCtrls:qr},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:Os,getSpannedRowCtrls:qr},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:Os,getSpannedRowCtrls:qr},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:Os},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Gs},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Gs},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Gs},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Gs},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:Vs},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:Vs},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:Vs},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:Vs},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:Ns,getSpannedRowCtrls:Kr},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:Ns,getSpannedRowCtrls:Kr},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:Ns,getSpannedRowCtrls:Kr},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:Ns}};function jr(e){return`ag-${Bi(e).name}-viewport`}function Yr(e){const t=Bi(e);return t.container??`ag-${t.name}-container`}function xu(e){return`ag-${Bi(e).name}-spanned-cells-container`}function Bi(e){return Vw[e]}var Nw=["topCenter","topLeft","topRight"],zw=["bottomCenter","bottomLeft","bottomRight"],Ww=["center","left","right"],_w=["center","left","right","fullWidth"],Uw=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],qw=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],$w=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],Pu=["stickyTopCenter","stickyTopLeft","stickyTopRight"],Du=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Kw=[...Pu,"stickyTopFullWidth",...Du,"stickyBottomFullWidth"],jw=[...Nw,...zw,...Ww,...Pu,...Du],Mu=class extends S{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=Bi(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Hw(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,i,o){this.comp=e,this.eContainer=t,this.eSpannedContainer=i,this.eViewport=o,this.createManagedBean(new Gw(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:s,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(qw,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers($w,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(s?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(_w,()=>this.createManagedBean(new fu(this.eContainer,this.name==="center"?o:void 0))),n&&this.forContainers(jw,()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer))),this.forContainers(Uw,()=>this.createManagedBean(new Lr(l=>this.comp.setContainerWidth(`${l}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,i=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i,displayedColumnsWidthChanged:i,displayedRowsChanged:o=>this.onDisplayedRowsChanged(o.afterScroll)}),i(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const o=this.options.getSpannedRowCtrls(e);o&&this.comp.setSpannedRowCtrls(o,!1)}})}listenOnDomOrder(){if(Kw.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const i=this.gos.get("ensureDomOrder"),o=ae(this.gos,"print");this.comp.setDomOrder(i||o)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=i=>{e.dragging&&i.cancelable&&i.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,i,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return yi(this.eViewport)}getCenterViewportScrollLeft(){return as(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=at(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return nd(this.eViewport)}getViewportScrollLeft(){return as(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){const{beans:e,gos:t,eViewport:i}=this,o=t.get("alwaysShowHorizontalScroll"),{ctrlsSvc:s}=e,n=s.getGridBodyCtrl()?.eBodyViewport,r=s.get("fakeHScrollComp")?.getGui(),l=s.get("fakeVScrollComp")?.getGui();return o||kw(i,n,void 0,r,l)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){eo(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const i=ae(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||i,n=t.filter(r=>{const l=r.isFullWidth();return this.options.fullWidth?!s&&l:s||!l});this.comp.setRowCtrls({rowCtrls:n,useFlushSync:e})}},Tu="ag-force-vertical-scroll",Yw="ag-selectable",Qw="ag-column-moving",Au=class extends S{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,i,o,s,n,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=o,this.eBottom=s,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=i.querySelector(`.${jr("center")}`),this.eFullWidthContainer=i.querySelector(`.${Yr("fullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",l=>this.setCellTextSelection(l.currentValue)),this.createManagedBean(new Nr(this.comp)),this.scrollFeature=this.createManagedBean(new Iw(i)),this.beans.rowDragSvc?.setupRowDrag(i,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([o,i,s,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(o),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),i=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:i,rowResizeEnded:i}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const i=t&&e.getScrollbarWidth()||0,o=Tc()?16:0,s=`calc(100% + ${i+o}px)`;Ye(this.beans,()=>this.comp.setBodyViewportWidth(s)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t,gos:i}=this;let o=i.get("treeData");if(!o){const s=t.isPivotMode();o=(e?e.columns.length:0)>=(s?2:1)}this.comp.setGridRootRole(o?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:i=>{const{target:o}=i,s=jt(o,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:i=>{const{target:o,relatedTarget:s}=i,n=t.contains(s),r=jt(s,"ag-root",t);jt(o,"ag-root",t)||(!n||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(Qw,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(Yw,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,i=t.isLastRowIndexKnown()?t.getRowCount():-1,o=i===-1?-1:e+i;this.comp.setRowCount(o)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const{gos:e,comp:t,ctrlsSvc:i}=this,o=e.get("alwaysShowVerticalScroll"),s=o?Tu:null,n=ae(e,"normal");t.setAlwaysVerticalScrollClass(s,o);const r=i.get("center")?.eViewport,l=i.get("fakeHScrollComp")?.getGui(),a=i.get("fakeVScrollComp")?.getGui();return o||n&&Lw(this.eBodyViewport,r,void 0,a,l)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let i=t.sizesMeasured;const o=()=>{const s=i&&ei(this.gos)&&!e.stretching,n=s?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(n,s)};o(),this.addManagedEventListeners({heightScaleChanged:o}),this.addManagedPropertyListener("animateRows",o),this.addManagedEventListeners({stylesChanged:()=>{!i&&t.sizesMeasured&&(i=!0,o())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:i,eTop:o,eBottom:s,beans:{popupSvc:n,touchSvc:r}}=this,l=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:l}),r?.mockBodyContextMenu(this,l),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,n)});const a=this.onStickyWheel.bind(this);for(const c of[t,i,o,s])this.addManagedElementListeners(c,{wheel:a});const d=this.onHorizontalWheel.bind(this);for(const c of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(c).eContainer,{wheel:d});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:i,shiftKey:o}=e;(o||Math.abs(t)>Math.abs(i))&&oo(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:i,shiftKey:o}=e;(o||Math.abs(t)>Math.abs(i))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:i}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||i})}onBodyViewportContextMenu(e,t,i){if(!e&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(e||i).preventDefault();const{target:o}=e||t;(o===this.eBodyViewport||o===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:i,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e,beans:{environment:t}}=this,i=e?.getPinnedTopTotalHeight(),o=e?.getPinnedBottomTotalHeight(),s=t.getPinnedRowBorderWidth(),n=t.getRowBorderWidth(),r=s-n,l=i?r+i:0,a=o?r+o:0;this.comp.setTopHeight(l),this.comp.setBottomHeight(a),this.comp.setTopInvisible(l<=0),this.comp.setBottomInvisible(a<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),i=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let o=0;t>0&&(o+=t),i>0&&(o+=i),o>0&&(o+=1),this.comp.setStickyTopTop(`${o}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:i}=this,o=e?.getPinnedBottomTotalHeight()??0,n=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=o+n;i.setStickyBottomBottom(`${r}px`)}};function se(e){return St(e)}var Zw=class extends U{constructor(e,t,i,o,s){super(),this.cellCtrl=t,this.rowResizerElement=null,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.gos=e.gos,this.column=t.column,this.rowNode=t.rowNode,this.eRow=o;const n=se({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.column.colIdSanitised}});this.eCell=n;let r;t.isCellSpanning()?(r=se({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(n),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssManager=new ar(()=>n),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const l={toggleCss:(a,d)=>this.cellCssManager.toggleCss(a,d),setUserStyles:a=>to(n,a),getFocusableElement:()=>n,setIncludeSelection:a=>this.includeSelection=a,setIncludeRowDrag:a=>this.includeRowDrag=a,setIncludeDndSource:a=>this.includeDndSource=a,setRowResizerElement:a=>this.setRowResizerElement(a),setRenderDetails:(a,d,c)=>this.setRenderDetails(a,d,c),setEditDetails:(a,d,c)=>this.setEditDetails(a,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(a,d)=>this.refreshEditStyles(a,d)};t.setComp(l,n,r,this.eCellWrapper,i,s,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRowResizerElement(e){this.rowResizerElement&&Pe(this.rowResizerElement),this.rowResizerElement=e,e&&this.eCell.appendChild(e)}setRenderDetails(e,t,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const s=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(i||s)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)),this.rowDraggingComp?.refreshVisibility(),this.rowResizerElement&&!this.rowResizerElement.parentElement&&this.eCell.appendChild(this.rowResizerElement)}setEditDetails(e,t,i){e?this.createCellEditorInstance(e,t,i):this.destroyEditor()}removeControls(){const e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=t||this.forceWrapper,o=i&&this.eCellWrapper==null;o&&(this.eCellWrapper=se({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const s=!i&&this.eCellWrapper!=null;s&&(Pe(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!i);const n=!e&&i,r=n&&this.eCellValue==null;if(r){const d=this.cellCtrl.getCellValueClass();this.eCellValue=se({tag:"span",cls:d,role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue)}const l=!n&&this.eCellValue!=null;l&&(Pe(this.eCellValue),this.eCellValue=void 0);const a=o||s||r||l;return a&&this.removeControls(),!e&&t&&this.addControls(),a}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:i,includeRowDrag:o,includeDndSource:s,includeSelection:n}=this,r=l=>{l&&t.insertBefore(l.getGui(),i)};o&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),r(this.rowDraggingComp)),s&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),r(this.dndSourceComp)),n&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),r(this.checkboxSelectionComp))}createCellEditorInstance(e,t,i){const o=this.editorVersion,s=e.newAgStackInstance(),{params:n}=e;s.then(l=>this.afterCellEditorCreated(o,l,n,t,i)),K(this.cellEditor)&&n.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();le(t);const i=$t(e);i!=null&&(t.textContent=i)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),Pe(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains(j(this.beans))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),Pe(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(this.cellRenderer?.refresh==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){const t=this.rendererVersion,i=n=>r=>{if(this.rendererVersion!==t||!this.isAlive())return;const a=n.newAgStackInstance(),d=this.afterCellRendererCreated.bind(this,t,n.componentClass);a?.then(d)},{animationFrameSvc:o}=this.beans;let s;if(o?.active&&this.firstRender?s=(n,r=!1)=>{o.createTask(i(n),this.rowNode.rowIndex,"p2",n.componentFromFramework,r)}:s=n=>i(n)(),e.params?.deferRender&&!this.cellCtrl.rowNode.group){const{loadingComp:n,onReady:r}=this.cellCtrl.getDeferLoadingCellRenderer();n&&(s(n),r.then(()=>s(e,!0)))}else s(e)}afterCellRendererCreated(e,t,i){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(i);return}this.cellRenderer=i,this.cellRendererClass=t;const s=i.getGui();if(this.cellRendererGui=s,s!=null){const n=this.getParentOfValue();le(n),n.appendChild(s)}}afterCellEditorCreated(e,t,i,o,s){const n=e!==this.editorVersion,{context:r}=this.beans;if(n){r.destroyBean(t);return}if(t.isCancelBeforeStart?.()){r.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){F(97,{colId:this.column.getId()}),r.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const a=o||t.isPopup?.();a?this.addPopupCellEditor(i,s):this.addInCellEditor(),this.refreshEditStyles(!0,a),t.afterGuiAttached?.(),this.cellCtrl.enableEditorTooltipFeature(t),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssManager:i}=this;i.toggleCss("ag-cell-inline-editing",e&&!t),i.toggleCss("ag-cell-popup-editing",e&&!!t),i.toggleCss("ag-cell-not-inline-editing",!e||!!t)}addInCellEditor(){const{eCell:e}=this;e.contains(j(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),le(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){const{gos:i,context:o,popupSvc:s,editSvc:n}=this.beans;i.get("editType")==="fullRow"&&F(98);const r=this.cellEditorPopupWrapper=o.createBean(n.createPopupEditorWrapper(e)),{cellEditor:l,cellEditorGui:a,eCell:d,rowNode:c,column:u,cellCtrl:h}=this,g=r.getGui();a&&g.appendChild(a);const p=i.get("stopEditingWhenCellsLoseFocus"),f=t??l.getPopupPosition?.()??"over",m=i.get("enableRtl"),C={ePopup:g,additionalParams:{column:u,rowNode:c},type:"popupCellEditor",eventSource:d,position:f,alignSide:m?"right":"left",keepWithinBounds:!0},v=s.positionPopupByComponent.bind(s,C),w=s.addPopup({modal:p,eChild:g,closeOnEsc:!0,closedCallback:y=>{h.onPopupEditorClosed(y)},anchorToElement:d,positionCallback:v,ariaOwns:d});w&&(this.hideEditorPopup=w.hideFunc)}detach(){this.getGui().remove()}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},Xw=class extends U{constructor(e,t,i){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const o=se({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(o,i),this.setTemplateFromElement(o);const s=o.style;this.domOrder=this.rowCtrl.getDomOrder();const n={setDomOrder:r=>this.domOrder=r,setCellCtrls:r=>this.setCellCtrls(r),showFullWidth:r=>this.showFullWidth(r),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,getFullWidthCellRendererParams:()=>this.fullWidthCellRendererParams,toggleCss:(r,l)=>this.toggleCss(r,l),setUserStyles:r=>to(o,r),setTop:r=>s.top=r,setTransform:r=>s.transform=r,setRowIndex:r=>o.setAttribute("row-index",r),setRowId:r=>o.setAttribute("row-id",r),setRowBusinessKey:r=>o.setAttribute("row-business-key",r),refreshFullWidth:r=>{const l=r();return this.fullWidthCellRendererParams=l,this.fullWidthCellRenderer?.refresh?.(l)??!1}};e.setComp(n,this.getGui(),i,void 0),this.addDestroyFunc(()=>{e.unsetComp(i)})}setInitialStyle(e,t){const i=this.rowCtrl.getInitialTransform(t);if(i)e.style.setProperty("transform",i);else{const o=this.rowCtrl.getInitialRowTop(t);o&&e.style.setProperty("top",o)}}showFullWidth(e){const t=o=>{if(this.isAlive()){const s=o.getGui();this.getGui().appendChild(s),this.rowCtrl.setupDetailRowAutoHeight(s),this.setFullWidthRowComp(o,e.params)}else this.beans.context.destroyBean(o)};e.newAgStackInstance().then(t)}setCellCtrls(e){const t=new Map(this.cellComps);for(const i of e){const o=i.instanceId;this.cellComps.has(o)?t.delete(o):this.newCellComp(i)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];for(const i of e){const o=this.cellComps.get(i.instanceId);o&&t.push(o.getGui())}ld(this.getGui(),t)}newCellComp(e){const t=this.beans.editSvc?.isEditing(e,{withOpenEditor:!0})??!1,i=new Zw(this.beans,e,this.rowCtrl.printLayout,this.getGui(),t);this.cellComps.set(e.instanceId,i),this.getGui().appendChild(i.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e,t){this.fullWidthCellRenderer=e,this.fullWidthCellRendererParams=t,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer),this.fullWidthCellRendererParams=void 0})}destroyCells(e){for(const t of e.values()){if(!t)continue;const i=t.cellCtrl.instanceId;this.cellComps.get(i)===t&&(t.detach(),t.destroy(),this.cellComps.delete(i))}}};function Jw(e,t,i){const o=!!i.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,s={tag:"div",ref:"eContainer",cls:Yr(e),role:"rowgroup"};if(t.type==="center"||o){const n={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${xu(e)}`,role:"presentation"};return s.role="presentation",{tag:"div",ref:"eViewport",cls:`ag-viewport ${jr(e)}`,role:"rowgroup",children:[s,o?n:null]}}return s}var e0=class extends U{constructor(e){super(),this.eViewport=x,this.eContainer=x,this.eSpannedContainer=x,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e?.name,this.options=Bi(this.name)}postConstruct(){this.setTemplate(Jw(this.name,this.options,this.beans));const e={setHorizontalScroll:i=>this.eViewport.scrollLeft=i,setViewportHeight:i=>this.eViewport.style.height=i,setRowCtrls:({rowCtrls:i})=>this.setRowCtrls(i),setSpannedRowCtrls:i=>this.setRowCtrls(i,!0),setDomOrder:i=>{this.domOrder=i},setContainerWidth:i=>{this.eContainer.style.width=i,this.eSpannedContainer&&(this.eSpannedContainer.style.width=i)},setOffsetTop:i=>{const o=`translateY(${i})`;this.eContainer.style.transform=o,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=o)}};this.createManagedBean(new Mu(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){const{beans:i,options:o}=this,s=t?this.eSpannedContainer:this.eContainer,n=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},r={};t?this.rowCompsWithSpan=r:this.rowCompsNoSpan=r,this.lastPlacedElement=null;const l=[];for(const a of e){const d=a.instanceId,c=n[d];let u;if(c)u=c,delete n[d];else{if(!a.rowNode.displayed)continue;u=new Xw(a,i,o.type)}r[d]=u,l.push([u,!c])}this.removeOldRows(Object.values(n)),this.addRowNodes(l,s)}addRowNodes(e,t){const{domOrder:i}=this;for(const[o,s]of e){const n=o.getGui();i?this.ensureDomOrder(n,t):s&&t.appendChild(n)}}removeOldRows(e){for(const t of e)t.getGui().remove(),t.destroy()}ensureDomOrder(e,t){rd(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},t0={selector:"AG-ROW-CONTAINER",component:e0};function Po(e,t){return t.map(i=>{const o=`e${i[0].toUpperCase()+i.substring(1)}RowContainer`;return e[o]={name:i},{tag:"ag-row-container",ref:o,attrs:{name:i}}})}function i0(e){const t={},i={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:Po(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:Po(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:Po(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:Po(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:Po(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:i}}var o0=class extends U{constructor(){super(...arguments),this.eGridRoot=x,this.eBodyViewport=x,this.eStickyTop=x,this.eStickyBottom=x,this.eTop=x,this.eBottom=x,this.eBody=x}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,i=e?.getOverlayWrapperSelector(),{paramsMap:o,elementParams:s}=i0(!!i);this.setTemplate(s,[...i?[i]:[],Mw,Aw,Pw,t0],o);const n=(l,a)=>{const d=`${l}px`;a.style.minHeight=d,a.style.height=d},r={setRowAnimationCssOnBodyViewport:(l,a)=>this.setRowAnimationCssOnBodyViewport(l,a),setColumnCount:l=>Ya(this.getGui(),l),setRowCount:l=>ja(this.getGui(),l),setTopHeight:l=>n(l,this.eTop),setBottomHeight:l=>n(l,this.eBottom),setTopInvisible:l=>this.eTop.classList.toggle("ag-invisible",l),setBottomInvisible:l=>this.eBottom.classList.toggle("ag-invisible",l),setStickyTopHeight:l=>this.eStickyTop.style.height=l,setStickyTopTop:l=>this.eStickyTop.style.top=l,setStickyTopWidth:l=>this.eStickyTop.style.width=l,setStickyBottomHeight:l=>{this.eStickyBottom.style.height=l,this.eStickyBottom.classList.toggle("ag-invisible",l==="0px")},setStickyBottomBottom:l=>this.eStickyBottom.style.bottom=l,setStickyBottomWidth:l=>this.eStickyBottom.style.width=l,setColumnMovingCss:(l,a)=>this.toggleCss(l,a),updateLayoutClasses:(l,a)=>{const d=[this.eBodyViewport.classList,this.eBody.classList];for(const c of d)c.toggle(Ue.AUTO_HEIGHT,a.autoHeight),c.toggle(Ue.NORMAL,a.normal),c.toggle(Ue.PRINT,a.print);this.toggleCss(Ue.AUTO_HEIGHT,a.autoHeight),this.toggleCss(Ue.NORMAL,a.normal),this.toggleCss(Ue.PRINT,a.print)},setAlwaysVerticalScrollClass:(l,a)=>this.eBodyViewport.classList.toggle(Tu,a),registerBodyViewportResizeListener:l=>{const a=at(this.beans,this.eBodyViewport,l);this.addDestroyFunc(()=>a())},setPinnedTopBottomOverflowY:l=>this.eTop.style.overflowY=this.eBottom.style.overflowY=l,setCellSelectableCss:(l,a)=>{for(const d of[this.eTop,this.eBodyViewport,this.eBottom])d.classList.toggle(l,a)},setBodyViewportWidth:l=>this.eBodyViewport.style.width=l,setGridRootRole:l=>je(this.eGridRoot,l)};this.ctrl=this.createManagedBean(new Au),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&Ze(this.gos)||Di(this.gos))&&Dm(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const i=this.eBodyViewport.classList;i.toggle("ag-row-animation",t),i.toggle("ag-row-no-animation",!t)}getFocusableContainerName(){return"gridBody"}},s0={selector:"AG-GRID-BODY",component:o0},Ws={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},Iu=class extends he{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:i,eTopGuard:o,eBottomGuard:s,focusTrapActive:n,forceFocusOutWhenTabGuardsAreEmpty:r,isFocusableContainer:l,focusInnerElement:a,onFocusIn:d,onFocusOut:c,shouldStopEventPropagation:u,onTabKeyDown:h,handleKeyDown:g,isEmpty:p,eFocusableElement:f}=e;this.comp=i,this.eTopGuard=o,this.eBottomGuard=s,this.providedFocusInnerElement=a,this.eFocusableElement=f,this.focusTrapActive=!!n,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.isFocusableContainer=!!l,this.providedFocusIn=d,this.providedFocusOut=c,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=h,this.providedHandleKeyDown=g,this.providedIsEmpty=p}postConstruct(){this.createManagedBean(new Ic(this.eFocusableElement,this.stopPropagationCallbacks,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards();for(const e of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)})}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():Dt(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const t=oe(this.beans),i=Dt(t.body,null,!0),o=i.indexOf(e?this.eTopGuard:this.eBottomGuard);if(o===-1)return;let s,n;e?(s=0,n=o):(s=o+1,n=i.length);const r=i.slice(s,n),l=this.gos.get("tabIndex");r.sort((a,d)=>{const c=Number.parseInt(a.getAttribute("tabindex")||"0"),u=Number.parseInt(d.getAttribute("tabindex")||"0");return u===l?1:c===l?-1:c===0?1:u===0?-1:c-u}),r[e?r.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const i=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),i&&(i.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=Dt(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return Tt(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},Qr=class extends he{constructor(e,t){super(),this.comp=e,this.stopPropagationCallbacks=t}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:i,eFocusableElement:o,stopPropagationCallbacks:s}=this,n=[t,i],r={setTabIndex:C=>{for(const v of n)C==null?v.removeAttribute("tabindex"):v.setAttribute("tabindex",C)}};this.addTabGuards(t,i);const{focusTrapActive:l=!1,onFocusIn:a,onFocusOut:d,focusInnerElement:c,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}=e;this.tabGuardCtrl=this.createManagedBean(new Iu({comp:r,focusTrapActive:l,eTopGuard:t,eBottomGuard:i,eFocusableElement:o,onFocusIn:a,onFocusOut:d,focusInnerElement:c,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m},s))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=oe(this.beans).createElement("div"),i=e==="top"?Ws.TAB_GUARD_TOP:Ws.TAB_GUARD_BOTTOM;return t.classList.add(Ws.TAB_GUARD,i),je(t,"presentation"),t}addTabGuards(e,t){const i=this.eFocusableElement;i.prepend(e),i.append(t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];le(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,i){us(t)||(t=t.getGui());const{eBottomGuard:o}=this;o?o.before(t):e(t,i)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;Pe(e),Pe(t),super.destroy()}},ku=class extends ni{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new Qr(this,t)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},Zr=class extends ku{initialiseTabGuard(e){super.initialiseTabGuard(e,Co)}},Lu=(e,t)=>su(e,()=>Mt(e.getGui(),t,!1,!0)),Bu=e=>e?.getFocusableContainerName()??"external",n0=e=>e==null?"external":typeof e=="string"?e:"gridBody",Hu=class extends S{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,i){this.view=e,this.eGridHostDiv=t,this.eGui=i,this.eGui.setAttribute("grid-id",this.beans.context.getId());const{dragAndDrop:o,ctrlsSvc:s}=this.beans;o?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new Nr(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=at(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>n()),s.register("gridCtrl",this)}isDetailGrid(){return br(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry?.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){const{view:t}=this;e===!1?t.setCursor(null):t.setCursor(e===1?"ew-resize":"ns-resize")}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:o}=this.getNextFocusableIndex(t,e),s=i===-1?e?t.length-1:0:o,{gos:n,beans:{focusSvc:r,navigation:l}}=this,a=n.getCallback("tabToNextGridContainer");if(a){const d=r.getDefaultTabToNextGridContainerTarget({backwards:e,focusableContainers:t,nextIndex:s}),c=Bu(t[s]),u=d==null&&c==="gridBody"?"gridBody":n0(d),h=a({backwards:e,previousContainer:Bu(t[i]),nextContainer:u,defaultTarget:d});if(h!==void 0){if(typeof h=="boolean")return h;if(typeof h=="string"){if(h==="gridBody")return this.focusGridBodyDefault(e)||void 0;const g=t.find(p=>p.getFocusableContainerName()===h);if(!g){Fd(`tabToNextGridContainer - ${h} container not found`);return}return Lu(g,e)?!0:void 0}return rw(h)?r.focusHeaderPosition({headerPosition:h})||void 0:(l?.ensureCellVisible(h),r.setFocusedCell({...h,forceBrowserFocus:!0}),r.isCellFocused(h)||void 0)}}return this.focusNextInnerContainerDefault({backwards:e,focusableContainers:t,indexWithFocus:i,nextIndex:s})||void 0}focusInnerElement(e){const{gos:t,beans:i,beans:{focusSvc:o,visibleCols:s}}=this;if(t.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const r=this.getFocusableContainers();if(e)return this.focusNextInnerContainerDefault({backwards:!0,focusableContainers:r,indexWithFocus:r.length,nextIndex:r.length-1})?!0:o.focusGridView({column:q(s.allCols),backwards:!0});const l=s.allCols;if(t.get("headerHeight")===0||_e(i)){if(o.focusGridView({column:l[0],backwards:e}))return!0;for(let a=1;as.getGui().contains(i));return{indexWithFocus:o,nextIndex:o+(t?-1:1)}}focusGridBodyDefault(e){const{gos:t,beans:i,beans:{focusSvc:o,visibleCols:{allCols:s}}}=this;return e?o.focusGridView({column:q(s),backwards:!0}):t.get("headerHeight")===0||_e(i)?o.focusGridView({column:s[0]}):o.focusFirstHeader()}focusNextInnerContainerDefault(e){const{backwards:t,focusableContainers:i,indexWithFocus:o}=e,s=t?-1:1;for(let n=e.nextIndex;n>=0&&nn:othis.destroyBean(this),setRtlClass:n=>this.addCss(n),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:n=>{this.getGui().style.userSelect=n??"",this.getGui().style.webkitUserSelect=n??""},setCursor:n=>{this.getGui().style.cursor=n??""}},t=this.createManagedBean(new Hu),i=t.getOptionalSelectors(),o=this.createTemplate(i),s=[s0,...Object.values(i).filter(n=>!!n)];this.setTemplate(o,s),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>t.focusInnerElement(n),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{e.remove(),Rt(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const i=this.rootWrapperBody.classList,{AUTO_HEIGHT:o,NORMAL:s,PRINT:n}=Ue,{autoHeight:r,normal:l,print:a}=t;i.toggle(o,r),i.toggle(s,l),i.toggle(n,a),this.toggleCss(o,r),this.toggleCss(s,l),this.toggleCss(n,a)}createTemplate(e){const t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones",ref:"gridHeaderDropZones"}:null,i=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,o=e.statusBarSelector?{tag:"ag-status-bar",ref:"statusBar"}:null,s=e.watermarkSelector?{tag:"ag-watermark"}:null,n=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},i]},o,n,s]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){if(!e&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[...this.gridHeaderDropZones?.getFocusableContainers?.()??[],this.gridBody];for(const t of[this.sideBar,this.statusBar,this.pagination])t&&e.push(t);return e.filter(t=>De(t.getGui()))}},L=(e,t)=>{for(const i of Object.keys(t))t[i]=e;return t},Ou={dispatchEvent:"CommunityCore",...L("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...L("GridState",{getState:0,setState:0}),...L("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...L("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...L("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...L("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...L("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...L("ValueCache",{expireValueCache:0}),...L("CellApi",{getCellValue:0}),...L("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...L("Sort",{onSortChanged:0}),...L("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...L("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...L("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...L("HighlightChanges",{flashCells:0}),...L("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...L("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...L("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...L("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...L("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...L("ColumnResize",{setColumnWidths:0}),...L("ColumnHover",{isColumnHovered:0}),...L("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...L("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...L("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...L("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...L("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...L("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...L("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...L("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...L("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,resetRowGroupExpansion:0}),...L("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...L("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...L("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...L("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...L("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...L("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...L("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...L("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...L("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...L("ContextMenu",{showContextMenu:0}),...L("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...L("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...L("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...L("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...L("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...L("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...L("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...L("StatusBar",{getStatusPanel:0}),...L("AiToolkit",{getStructuredSchema:0})},Xr={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},l0=(e,t)=>e.eventSvc.dispatchEvent(t),Gu=class{};Reflect.defineProperty(Gu,"name",{value:"GridApi"});var a0=class extends S{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Gu,this.fns={...Xr,dispatchEvent:l0},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(Ou))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:i,beans:o}=this;i!==Xr&&(i[e]=o?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:i,fns:{[e]:o}}=this;return o?o(i,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:i,preDestroyLink:o}=this;if(!t)F(26,{fnName:e,preDestroyLink:o});else{const s=Ou[e];i.assertModuleRegistered(s,`api.${e}`)&&F(27,{fnName:e,module:s})}}destroy(){super.destroy(),this.fns=Xr,this.beans=null}};function Vu(e){return e.context.getId()}function d0(e){e.gridDestroySvc.destroy()}function c0(e){return e.gridDestroySvc.destroyCalled}function u0(e,t){return e.gos.get(t)}function h0(e,t,i){Nu(e,{[t]:i})}function Nu(e,t){e.gos.updateGridOptions({options:t})}function g0(e,t){const i=t.replace(/Module$/,"");return e.gos.isModuleRegistered(i)}function zu(e,t,i){const o=Se(e,t,i);if(o){const{className:n}=o;if(typeof n=="string"&&n.includes("ag-icon")||typeof n=="object"&&n["ag-icon"])return o}const s=se({tag:"span"});return s.appendChild(o),s}function Se(e,t,i){let o=null;e==="smallDown"?F(262):e==="smallLeft"?F(263):e==="smallRight"&&F(264);const s=i?.getColDef().icons;if(s&&(o=s[e]),t.gos&&!o){const n=t.gos.get("icons");n&&(o=n[e])}if(o){let n;if(typeof o=="function")n=o();else if(typeof o=="string")n=o;else{F(38,{iconName:e});return}if(typeof n=="string")return ds(n);if(us(n))return n;F(133,{iconName:e});return}else{const n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),se({tag:"span",cls:`ag-icon ag-icon-${n??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var p0={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},f0=class extends U{constructor(e,t,i){super(p0),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(Se("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:i,eCell:o,gos:s}=this,n=i.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(o,0,0),n){const l=k(s,{rowNode:t,dragEvent:e});n(l)}else try{const l=JSON.stringify(t.data);r.setData("application/json",l),r.setData("text/plain",l)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},m0=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}",C0={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},v0=class extends U{constructor(){super(),this.dragSource=null,this.eIcon=x,this.eLabel=x,this.eGhost=x,this.registerCSS(m0)}postConstruct(){const e=t=>zu(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(C0),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:i,eIcon:o,dragSource:s,dropIconMap:n,gos:r}=this;le(o);let l=null;e||(e=s?.getDefaultIconName?s.getDefaultIconName():"notAllowed"),l=n[e],i.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),o.classList.toggle("ag-shake-left-to-right",t),!(l===n.hide&&r.get("suppressDragLeaveHidesColumns"))&&l&&o.appendChild(l)}setLabel(e){this.eLabel.textContent=e}};function w0(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function b0(e,t){const i=e.dragAndDrop?.findExternalZone(t.getContainer());i&&e.dragAndDrop?.removeDropTarget(i)}function S0(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function y0(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function R0(e,t){const i=e.rowDropHighlightSvc;if(!i)return;const o=t?.row;let s=t?.dropIndicatorPosition;s!=="above"&&s!=="below"&&s!=="inside"&&(s="none");const n=o?.rowIndex;n==null||s==="none"?i.clear():i.set(o,s)}var Wu=(e,t)=>{if(t!=null&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},E0=(e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const i=t.pointerId;if(!Wu(e,i))return null;const o={eElement:e,pointerId:i,onLost(s){x0(o,s)}};return e.addEventListener("lostpointercapture",o.onLost),o},F0=e=>{if(!e)return;_u(e);const{eElement:t,pointerId:i}=e;if(t){try{t.releasePointerCapture(i)}catch{}e.eElement=null}},_u=e=>{const{eElement:t,onLost:i}=e;t&&i&&(t.removeEventListener("lostpointercapture",i),e.onLost=null)},x0=(e,t)=>{_u(e);const{eElement:i,pointerId:o}=e;i&&t.pointerId===o&&Wu(i,o)},Hi,Oi,Jr={passive:!0},Lt={passive:!1},tt=e=>{if(!Oi)Oi=new WeakSet;else if(Oi.has(e))return!1;return Oi.add(e),!0},Uu=class extends he{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!Hi?.has(ke(this.beans))}hasPointerCapture(){const e=this.drag?.pointerCapture;return!!(e&&this.beans.eRootDiv.hasPointerCapture?.(e.pointerId))}destroy(){this.drag&&this.cancelDrag();const e=this.dragSources;for(const t of e)qu(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let i=0,o=t.length;ithis.onPointerDown(e,d),Lt],[t,"mousedown",d=>this.onMouseDown(e,d)]);const a=this.gos.get("suppressTouch");i&&!a&&gs(o,[t,"touchstart",c=>this.onTouchStart(e,c),Lt])}cancelDrag(e){const t=this.drag;e??(e=t?.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),t?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(e){const t=e.type;return(t==="mousemove"||t==="pointermove")&&e.cancelable&&oo(this.beans,e)&&!bi(tl(e))}initDrag(e,...t){this.drag=e;const i=this.beans,o=l=>this.onScroll(l),s=l=>this.onKeyDown(l),n=ke(i),r=oe(i);gs(e.handlers,[n,"contextmenu",yt],[n,"keydown",s],[r,"scroll",o,{capture:!0}],[r.defaultView||window,"scroll",o],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;Hi?.get(t)===e&&Hi.delete(t),this.drag=null,F0(e.pointerCapture),Hn(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const i=this.beans;if(Oi?.has(t))return;const o=t.pointerType;if(o==="touch"&&(i.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),bi(tl(t))))||!t.isPrimary||o==="mouse"&&t.button!==0)return;this.destroyDrag();const s=ke(i),n=e.eElement,r=t.pointerId,l=new el(s,e,t,r);Hi??(Hi=new WeakMap),Hi.set(s,l);const a=h=>{h.pointerId===r&&this.onMouseOrPointerMove(h)},d=h=>{h.pointerId===r&&this.onMouseOrPointerUp(h)},c=h=>{h.pointerId===r&&tt(h)&&this.cancelDrag()},u=h=>this.draggingPreventDefault(h);this.initDrag(l,[s,"pointerup",d],[s,"pointercancel",c],[s,"pointermove",a,Lt],[s,"touchmove",u,Lt],[n,"mousemove",u,Lt]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):tt(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!tt(t)||bi(tl(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){this.dragging&&yt(t);return}this.destroyDrag();const o=this.beans,s=ke(o),n=new el(s,e,t.touches[0]),r=h=>this.onTouchMove(h),l=h=>this.onTouchUp(h),a=h=>this.onTouchCancel(h),d=h=>this.draggingPreventDefault(h),c=ke(o),u=t.target??e.eElement;this.initDrag(n,[u,"touchmove",r,Jr],[u,"touchend",l,Jr],[u,"touchcancel",a,Jr],[c,"touchmove",d,Lt],[c,"touchend",l,Lt],[c,"touchcancel",a,Lt]),e.dragStartPixels===0&&this.onMove(n.start)}draggingPreventDefault(e){this.dragging&&yt(e)}onMouseDown(e,t){if(t.button!==0||Oi?.has(t)||this.isPointer())return;const i=this.beans;this.destroyDrag();const o=new el(ke(i),e,t),s=l=>this.onMouseOrPointerMove(l),n=l=>this.onMouseOrPointerUp(l),r=ke(i);this.initDrag(o,[r,"mousemove",s],[r,"mouseup",n]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):tt(t)}onScroll(e){if(!tt(e))return;const t=this.drag,i=t?.lastDrag;i&&this.dragging&&t.params?.onDragging?.(i)}onMouseOrPointerMove(e){tt(e)&&(mt()&&oe(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&yt(e),this.onMove(e))}onTouchCancel(e){const t=this.drag;!t||!tt(e)||Ri(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){const t=this.drag;if(!t||!tt(e))return;const i=Ri(t.start,e.touches);i&&(this.onMove(i),this.draggingPreventDefault(e))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const i=t.params;if(!this.dragging){const o=t.start,n=i.dragStartPixels??4;if(gd(e,o,n)||(this.dragging=!0,i.capturePointer&&(t.pointerCapture=E0(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:i.eElement}),i.onDragStart?.(o),this.drag!==t)||(i.onDragging?.(o),this.drag!==t))return}i.onDragging?.(e)}onTouchUp(e){const t=this.drag;t&&tt(e)&&this.onUp(Ri(t.start,e.changedTouches))}onMouseOrPointerUp(e){tt(e)&&this.onUp(e)}onUp(e){const t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,t.params.onDragStop?.(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===b.ESCAPE&&this.cancelDrag()}},qu=e=>{Hn(e.handlers);const t=e.oldTouchAction;if(t!=null){const i=e.params.eElement.style;i&&(i.touchAction=t)}},el=class{constructor(e,t,i,o=null){this.rootEl=e,this.params=t,this.start=i,this.pointerId=o,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},tl=e=>{const t=e.target;return t instanceof Element?t:null},P0=class extends Uu{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},D0=class extends S{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:i}=this.beans;return i.addDragSource(t),()=>i.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const i=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(i)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},M0={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},_s={skipAriaHidden:!0},T0=class extends U{constructor(e,t,i,o,s,n=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=o,this.dragStartPixels=s,this.alwaysVisible=n,this.dragSource=null,this.disabled=!1}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(M0),this.getGui().appendChild(Se("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,rowNode:t}=this,i=this.refreshVisibility.bind(this);this.addManagedListeners(e.eventSvc,{rowDragVisibilityChanged:i}),this.addManagedListeners(t,{dataChanged:i,cellChanged:i}),this.refreshVisibility()}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const{beans:e,column:t,rowNode:i}=this,{gos:o,dragAndDrop:s,rowDragSvc:n}=e,r=n?.visibility;let a=!(r==="suppress"||r==="hidden"&&!s?.hasExternalDropZones()),d=a;if(a&&!this.isCustomGui()&&t){const c=t.getColDef().rowDrag;if(c===!1)a=!1;else{const u=typeof c=="function";d=t.isRowDrag(i),a=u||d}}a&&d&&i.footer&&o.get("rowDragManaged")&&(d=!1,a=!0),d&&(d=a),a||this.setDisplayed(a,_s),d||this.setVisible(d,_s),this.setDisabled(!d||r==="disabled"&&!s?.hasExternalDropZones()),a&&this.setDisplayed(a,_s),d&&this.setVisible(d,_s)}setDisabled(e){e!==this.disabled&&(this.disabled=e,this.getGui()?.classList?.toggle("ag-drag-handle-disabled",e))}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const i=this.beans.selectionSvc?.getSelectedNodes()??[];return i.indexOf(e)!==-1?i:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();const o=hs("pointerdown")?{pointerdown:yt}:{mousedown:yt};this.mouseDownListener=this.addManagedElementListeners(t,o)[0]}const i=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:o=>this.getDragItemName(o,i),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){const i=e?.dragItem||this.getDragItem(),o=(e?.dropTarget?.rows.length??i.rowNodes?.length)||1,s=this.column?.getColDef()?.rowDragText??this.gos.get("rowDragText");if(s)return s(i,o);if(o!==1)return`${o} ${t("rowDragRows","rows")}`;const n=this.cellValueFn();return n||`1 ${t("rowDragRow","rows")}`}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},$u=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=e.scrollByTick??20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}get scrolling(){return this.tickingInterval!==null}check(e,t=!1){const i=!this.scrollVertically||t||this.shouldSkipVerticalScroll(),o=!this.scrollHorizontally||this.shouldSkipHorizontalScroll();if(i&&o)return;const s=this.scrollContainer.getBoundingClientRect(),n=this.scrollByTick;this.tickLeft=!o&&e.clientXs.right-n,this.tickUp=!i&&e.clientYs.bottom-n,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)}},Do=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},Mo=e=>{let t=e.childrenAfterGroup;for(;t?.length;){const i=t[0];if(i.sourceRowIndex>=0)return i;t=i.childrenAfterGroup}},Ku=(e,t,i,o)=>{if(!t.size||!e)return!1;let s=!1;const n=e.length??0;let r=-1;i&&(r=i.sourceRowIndex,i=r<0?Mo(i):null,i&&(r=i.sourceRowIndex)),r<0||r>=n?r=n:o||++r;let l=r,a=Math.min(r,n-1);for(const u of t){const h=u.sourceRowIndex;ha&&(a=h)}let d=l;for(let u=l;u=r;--u){const h=e[u];t.has(h)||(h.sourceRowIndex!==c&&(h.sourceRowIndex=c,e[c]=h,s=!0),--c)}for(const u of t)u.sourceRowIndex!==d&&(u.sourceRowIndex=d,e[d]=u,s=!0),++d;return s};function ju(e,t){return Bs(e,t.target)?.getFocusedCellPosition()??null}function il(e,t){const i=ae(e.gos,"normal"),o=t;let s,n;o.clientX!=null||o.clientY!=null?(s=o.clientX,n=o.clientY):(s=o.x,n=o.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(n+=r,i){const l=e.ctrlsSvc.getScrollFeature(),a=l.getVScrollPosition(),d=l.getHScrollPosition();s+=d.left,n+=a.top}return{x:s,y:n}}var A0=.25,I0=class extends S{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{const i=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,o=new $u({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:"y",getVerticalPosition:i,setVerticalPosition:s=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(s),onScrollCallback:()=>{const s=i();if(this.autoScrollOldV!==s){this.autoScrollOldV=s,this.autoScrollChanging=!0;return}const n=this.autoScrollChanging;this.autoScrollChanged=n,this.autoScrollChanging=!1,n&&(e.dragAndDrop?.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=o,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){return e?.dropTarget?.allowed===!1||this.beans.rowDragSvc.visibility!=="visible"?"notAllowed":"move"}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const i=this.beans.selectionSvc?.getSelectedNodes();if(i&&i.indexOf(t)>=0)return i.slice().sort(k0)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:i,beans:o}=this;if(t){const l=this.getRowNodes(e);e.dragItem.rowNodes=l,Qu(l,!0)}this.lastDraggingEvent=e;const s=e.fromNudge,n=this.makeRowsDrop(i,e,s,!1);o.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);const r=this.autoScroll;n?.rowDragManaged&&n.moved&&n.allowed&&n.sameGrid&&!n.suppressMoveWhenRowDragging&&(!s&&!r?.scrolling||this.autoScrollChanged)&&this.dropRows(n),r?.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,i,o){const{beans:s,gos:n}=this,r=this.newRowsDrop(t,o),l=s.rowModel;if(t.dropTarget=r,t.changed=!1,!r)return null;let{sameGrid:a,rootNode:d,source:c,target:u}=r;u??(u=l.getRow(l.getRowCount()-1)??null);const h=this.beans.groupEditSvc,g=!!h?.canSetParent(r);let p=null;if(u?.footer){const m=As(l,-1,u)??As(l,1,u);g&&(p=u.sibling??d),u=m??null}u?.detail&&(u=u.parent),r.moved&&(r.moved=c!==u);let f=.5;if(u&&(a&&r.moved&&(p||!g)?f=c.rowIndex>u.rowIndex?-.5:.5:f=(r.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!g&&a&&u&&r.moved&&J(n)){const m=L0(l,r);m&&(f=c.rowIndex>m.rowIndex?-.5:.5,u=m,r.moved&&(r.moved=c!==u))}return r.target=u,r.newParent=p,r.pointerPos=B0(u,r.y),r.yDelta=f,h?.fixRowsDrop(r,g,i,f),this.validateRowsDrop(r,g,o),t.changed||(t.changed=Yu(e?.dropTarget,r)),r}newRowsDrop(e,t){const{beans:i,gos:o}=this,s=i.rowModel.rootNode,n=J(o)?o.get("rowDragManaged"):!1,r=o.get("suppressMoveWhenRowDragging"),l=this.isFromThisGrid(e);let{rowNode:a,rowNodes:d}=e.dragItem;if(d||(d=a?[a]:[]),a||(a=d[0]),!a||!s)return null;const c=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;n&&(!d.length||i.rowDragSvc.visibility!=="visible"||(r||!l)&&!c)&&(u=!1);const h=il(i,e).y,g=this.getOverNode(h);return{api:i.gridApi,context:i.gridOptions.context,draggingEvent:e,rowDragManaged:n,suppressMoveWhenRowDragging:r,sameGrid:l,withinGrid:c,treeData:!1,rootNode:s,moved:a!==g,y:h,overNode:g,overIndex:g?.rowIndex??-1,pointerPos:"none",position:"none",source:a,target:g??null,newParent:null,rows:d,allowed:u,highlight:!t&&n&&r&&(c||!l),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,i){const{source:o,target:s,yDelta:n,inside:r,moved:l,rowDragManaged:a,suppressMoveWhenRowDragging:d}=e;e.moved&&(e.moved=o!==s);const{position:c,fallbackPosition:u}=this.computeDropPosition(l,r,n);e.position=c,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,d,"initial");const h=(!a||e.allowed)&&this.gos.get("isRowValidDropPosition");h&&this.applyDropValidator(e,t,i,a,h),a&&(e.rows=this.filterRows(e)),this.beans.groupEditSvc?.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,d,"final"),e.position==="inside"&&(!e.allowed||!e.newParent)&&(e.position=u)}computeDropPosition(e,t,i){const o=i<0?"above":"below";return e?{position:t?"inside":o,fallbackPosition:o}:{position:"none",fallbackPosition:o}}enforceSuppressMoveWhenRowDragging(e,t,i){if(t){if(i==="initial"){e.moved||(e.allowed=!1);return}(!e.rows.length||e.position==="none")&&(e.allowed=!1)}}applyDropValidator(e,t,i,o,s){this.beans.groupEditSvc?.clearNewSameParent(e,t);const n=s(e);if(!n){e.allowed=!1;return}if(typeof n!="object")return;n.rows!==void 0&&(e.rows=n.rows??[]),t&&n.newParent!==void 0&&(e.newParent=n.newParent),n.target!==void 0&&(e.target=n.target),n.position&&(e.position=n.position),n.allowed!==void 0?e.allowed=n.allowed:o||(e.allowed=!0);const r=e.draggingEvent;n.changed&&r&&(r.changed=!0),!i&&n.highlight!==void 0&&(e.highlight=n.highlight)}addRowDropZone(e){if(!e.getContainer()){F(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){F(56);return}const i=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(s=>e.onDragEnter(this.rowDragEvent("rowDragEnter",s))),onDragLeave:e.onDragLeave&&(s=>e.onDragLeave(this.rowDragEvent("rowDragLeave",s))),onDragging:e.onDragging&&(s=>e.onDragging(this.rowDragEvent("rowDragMove",s))),onDragStop:e.onDragStop&&(s=>e.onDragStop(this.rowDragEvent("rowDragEnd",s))),onDragCancel:e.onDragCancel&&(s=>e.onDragCancel(this.rowDragEvent("rowDragCancel",s)))},o={isInterestedIn:s=>s===2,getIconName:()=>"move",external:!0,...i};t.addDropTarget(o),this.addDestroyFunc(()=>t.removeDropTarget(o))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:i=>{this.onDragEnter(i),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",i))},onDragLeave:i=>{this.onDragLeave(i),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",i))},onDragging:i=>{this.onDragging(i),e?.onDragging?.(this.rowDragEvent("rowDragMove",i))},onDragStop:i=>{this.onDragStop(i),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",i))},onDragCancel:i=>{this.onDragCancel(i),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",i))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:i}=this.beans,s=e>t.getCurrentPagePixelRange().pageLastPixel?-1:i.getRowIndexAtPixel(e);return s>=0?i.getRow(s):void 0}rowDragEvent(e,t){const i=this.beans,{dragItem:o,dropTarget:s,event:n,vDirection:r}=t,l=s?.rootNode===i.rowModel.rootNode,a=l?s.y:il(i,t).y,d=l?s.overNode:this.getOverNode(a),c=l?s.overIndex:d?.rowIndex??-1;return{api:i.gridApi,context:i.gridOptions.context,type:e,event:n,node:o.rowNode,nodes:o.rowNodes,overIndex:c,overNode:d,y:a,vDirection:r,rowsDrop:s}}dispatchGridEvent(e,t){const i=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){const t=this.lastDraggingEvent?.dropTarget??null,i=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),i?.allowed&&i.rowDragManaged&&(!t?.droppedManaged||Yu(t,i))&&this.dropRows(i),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){this.clearAutoScroll(),this.beans.groupEditSvc?.stopDragging(t),this.beans.rowDropHighlightSvc?.fromDrag(null),Qu(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){this.autoScroll?.ensureCleared(),this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}dropRows(e){return e.droppedManaged=!0,e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:i}){const o=ti(this.gos),s=this.beans.rowModel,n=i.filter(({data:l,rowPinned:a})=>!s.getRowNode(o?.({data:l,level:0,rowPinned:a})??l.id)).map(({data:l})=>l);if(n.length===0)return!1;let r;if(t){const l=t.sourceRowIndex>=0?t:Mo(t);l&&(r=l.sourceRowIndex+(e==="above"?0:1))}return s.updateRowData({add:n,addIndex:r}),!0}filterRows(e){const{groupEditSvc:t}=this.beans,{rows:i,sameGrid:o}=e;let s;for(let n=0,r=i.length;n=0)return e.destroyed?void 0:e;const t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):Mo(e)}},Yu=(e,t)=>e!==t&&(!e||e.sameGrid!==t.sameGrid||e.allowed!==t.allowed||e.position!==t.position||e.target!==t.target||e.source!==t.source||e.newParent!==t.newParent||!lt(e.rows,t.rows)),k0=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,Qu=(e,t)=>{for(let i=0,o=e?.length||0;i{let i=null,o=t.target;if(o&&t.rows.indexOf(o)<0)return null;const s=t.source;if(!o||!s)return null;let n=o.rowIndex-s.rowIndex;const r=n<0?-1:1;n=t.suppressMoveWhenRowDragging?Math.abs(n):1;const l=new Set(t.rows);do{const a=As(e,r,o);if(!a)break;l.has(a)||(i=a,--n),o=a}while(n>0);return i},B0=(e,t)=>{const i=e?.rowTop,o=e?.rowHeight??0;if(i==null||!o||o<=0)return"none";const s=t-i,n=o*A0;return s<=n?"above":s>=o-n?"below":"inside"},H0=class extends S{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){const i=t.createManagedBean(new I0(e)),o=this.beans.dragAndDrop;o.addDropTarget(i),t.addDestroyFunc(()=>o.removeDropTarget(i)),this.rowDragFeature=i;const s=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],s),this.addManagedEventListeners({newColumnsLoaded:s,columnRowGroupChanged:s,columnPivotModeChanged:s,sortChanged:s,filterChanged:s}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,i,o,s,n){return new T0(e,t,i,o,s,n)}createRowDragCompForRow(e,t){if(Ze(this.gos))return;const i=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${i("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,i,o,s,n){const r=this.gos;return r.get("rowDragManaged")&&(!J(r)||r.get("pagination"))?void 0:this.createRowDragComp(i,e,t,o,s,n)}cancelRowDrag(){this.rowDragFeature?.lastDraggingEvent&&this.beans.dragSvc?.cancelDrag()}computeVisibility(){const e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";const o=e.colModel.isPivotMode();return(o||e.rowGroupColsSvc?.columns?.length)&&!t.get("refreshAfterGroupEdit")?"hidden":o||e.filterManager?.isAnyFilterPresent()||e.sortSvc?.isSortActive()?"disabled":"visible"}refreshVisibility(){const e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,this.eventSvc?.dispatchEvent({type:"rowDragVisibilityChanged"}))}},O0=class extends S{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;!e||e?.rowIndex===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const i=e!==this.row,o=e.uiLevel,s=t!==this.position,n=o!==this.uiLevel;this.dragging=!1,(i||s||n)&&(i&&this.clear(),this.uiLevel=o,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:i,target:o,position:s}=t;if(i&&o&&s!=="none"){this.set(o,s),this.dragging=!0;return}}this.dragging&&this.clear()}},ol={moduleName:"Drag",version:P,beans:[P0]},Zu={moduleName:"DragAndDrop",version:P,dynamicBeans:{dndSourceComp:f0},icons:{rowDrag:"grip"}},sl={moduleName:"SharedDragAndDrop",version:P,beans:[Rv],dependsOn:[ol],userComponents:{agDragAndDropImage:v0},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},Xu={moduleName:"RowDrag",version:P,beans:[O0,H0],apiFunctions:{addRowDropZone:w0,removeRowDropZone:b0,getRowDropZoneParams:S0,getRowDropPositionIndicator:y0,setRowDropPositionIndicator:R0},dependsOn:[sl]},Ju={moduleName:"HorizontalResize",version:P,beans:[D0],dependsOn:[ol]},G0=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",V0=class extends S{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:i,executeLaterFuncs:o}=this;if(i.length===0&&o.length===0){e(),t();return}const s=n=>{for(;n.length;){const r=n.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),s(i)},0),window.setTimeout(()=>{t(),s(o)},200)})}};function N0(e,t,i){e.colMoves?.moveColumnByIndex(t,i,"api")}function z0(e,t,i){e.colMoves?.moveColumns(t,i,"api")}var W0=class extends S{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;if(t)for(const i of t)i.isPrimary()&&(i.isAnyFunctionActive()||(i.isAllowValue()?this.columnsToAggregate.push(i):i.isAllowRowGroup()?this.columnsToGroup.push(i):i.isAllowPivot()&&this.columnsToPivot.push(i)))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:i,pivotColsSvc:o}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&i?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&o?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function _0(e,t){!t||t.length<=1||t.filter(o=>e.indexOf(o)<0).length>0||t.sort((o,s)=>{const n=e.indexOf(o),r=e.indexOf(s);return n-r})}function U0(e){const t=[...e];for(const i of e){let o=null,s=i.getParent();for(;s!=null&&s.getDisplayedLeafColumns().length===1;)o=s,s=s.getParent();if(o!=null){const r=!!o.getColGroupDef()?.marryChildren?o.getProvidedColumnGroup().getLeafColumns():o.getLeafColumns();for(const l of r)t.includes(l)||t.push(l)}}return t}function q0(e,t,i,o){const s=o.allCols;let n=null,r=null;for(let l=0;ls.includes(h));if(r===null)r=c;else if(!lt(c,r))break;const u=K0(d);(n===null||u=p||i&&f<=p))return;const C=q0(g,h,d,c);if(!C)return;const v=C.move;if(!(v>a.getCols().length-h.length))return{columns:h,toIndex:v}}function th(e){const{columns:t,toIndex:i}=eh(e)||{},{finished:o,colMoves:s}=e;return!t||i==null?null:(s.moveColumns(t,i,"uiColumnMoved",o),o?null:{columns:t,toIndex:i})}function $0(e,t){const i=t.getCols(),o=e.map(a=>i.indexOf(a)).sort((a,d)=>a-d),s=o[0];return q(o)-s!==o.length-1?null:s}function K0(e){function t(o){const s=[];let n=o.getOriginalParent();for(;n!=null;)s.push(n),n=n.getOriginalParent();return s}let i=0;for(let o=0;on.length?[s,n]:[n,s];for(const r of s)n.indexOf(r)===-1&&i++}return i}function j0(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function Y0(e){const{movingCols:t,draggingRight:i,xPosition:o,pinned:s,gos:n,colModel:r,visibleCols:l}=e;if(n.get("suppressMovableColumns")||t.some(w=>w.getColDef().suppressMovable))return[];const d=j0(l,s),c=r.getCols(),u=d.filter(w=>t.includes(w)),h=d.filter(w=>!t.includes(w)),g=c.filter(w=>!t.includes(w));let p=0,f=o;if(i){let w=0;for(const y of u)w+=y.getActualWidth();f-=w}if(f>0){for(let w=0;w0){const w=h[p-1];m=g.indexOf(w)+1}else m=g.indexOf(h[0]),m===-1&&(m=0);const C=[m],v=(w,y)=>w-y;if(i){let w=m+1;const y=c.length-1;for(;w<=y;)C.push(w),w++;C.sort(v)}else{let w=m;const y=c.length-1;let R=c[w];for(;w<=y&&d.indexOf(R)<0;)w++,C.push(w),R=c[w];w=m-1;const E=0;for(;w>=E;)C.push(w),w--;C.sort(v).reverse()}return C}function nl(e){const{pinned:t,fromKeyboard:i,gos:o,ctrlsSvc:s,useHeaderRow:n,skipScrollPadding:r}=e;let l=s.getHeaderRowContainerCtrl(t)?.eViewport,{x:a}=e;return l?(i&&(a-=l.getBoundingClientRect().left),o.get("enableRtl")&&(n&&(l=l.querySelector(".ag-header-row")),a=l.clientWidth-a),t==null&&!r&&(a+=s.get("center").getCenterViewportScrollLeft()),a):0}function rl(e,t){for(const i of e)i.moving=t,i.dispatchColEvent("movingChanged","uiColumnMoved")}var ih=7,ll=100,Us=ll/2,Q0=5,Z0=100,X0=class extends S{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!M(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:i}=t||{},o=i?.columns??[];for(const s of o){const n=s.getPinned();if(s.getColDef().lockPinned){if(n==e)return"move";continue}const r=i?.containerType;if(r===e||!e)return"move";if(e&&(!n||r!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,i=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(i,!0,"uiColumnDragged");else{const s=t.visibleState,n=(i||[]).filter(r=>s[r.getId()]&&!r.isVisible());this.setColumnsVisible(n,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(i,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,o=!1){const{gos:s,ctrlsSvc:n}=this.beans,r=s.get("suppressMoveWhenColumnDragging");if(o&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!o&&K(e.hDirection))return;const l=nl({x:e.x,pinned:this.pinned,gos:s,ctrlsSvc:n});t||this.checkCenterForScrolling(l),r?this.handleColumnDragWhileSuppressingMovement(e,t,i,l,o):this.handleColumnDragWhileAllowingMovement(e,t,i,l,o)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,i){if(!e?.length)return;const o=e.filter(s=>!s.getColDef().lockVisible);o.length&&this.beans.colModel.setColsVisible(o,t,i)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:i}=e;this.beans.colMoves.moveColumns(t,i,"uiColumnMoved",!0)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,i,o,s){const n=this.getAllMovingColumns(e,!0);if(s){const r=this.isAttemptingToPin(n);r&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:l,xPosition:a}=this.getNormalisedXPositionInfo(n,r)||{};if(l==null||a==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:a,fromEnter:t,fakeEvent:i,fromLeft:l})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(n,o)}}handleColumnDragWhileAllowingMovement(e,t,i,o,s){const n=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",l=e.dragSource.type===1,a=this.getMoveColumnParams({allMovingColumns:n,isFromHeader:l,xPosition:o,fromLeft:r,fromEnter:t,fakeEvent:i}),d=th({...a,finished:s});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const i=e.dragSource.getDragItem();let o=null;t?(o=i.columnsInSplit,o||(o=i.columns)):o=i.columns;const s=n=>n.getColDef().lockPinned?n.getPinned()==this.pinned:!0;return o?o.filter(s):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:i,xPosition:o,fromLeft:s,fromEnter:n,fakeEvent:r}=e,{gos:l,colModel:a,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:i,fromLeft:s,xPosition:o,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:l,colModel:a,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){const{gos:i,colModel:o}=this.beans,s=i.get("enableRtl"),n=o.getCols().filter(c=>c.isVisible()&&c.getPinned()===this.pinned);let r=null,l=null,a=null;for(const c of n){if(l=c.getActualWidth(),r=this.getNormalisedColumnLeft(c,0,s),r!=null){const u=r+l;if(r<=t&&u>=t){a=c;break}}r=null,l=null}if(a)e.indexOf(a)!==-1&&(a=null);else{for(let c=n.length-1;c>=0;c--){const u=n[c],h=n[c].getParent();if(!h){a=u;break}const g=h?.getDisplayedLeafColumns();if(g.length){a=q(g);break}}if(!a)return;r=this.getNormalisedColumnLeft(a,0,s),l=a.getActualWidth()}if(a==null||r==null||l==null){this.lastHighlightedColumn?.column!==a&&this.clearHighlighted();return}let d;if(t-rih;return t&&i||e.some(o=>o.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:i,fromEnter:o,fakeEvent:s,fromLeft:n}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:i,fromLeft:n,fromEnter:o,fakeEvent:s}),{columns:l,toIndex:a}=eh(r)||{};l&&a!=null&&(this.lastMovedInfo={columns:l,toIndex:a}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(oh(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),i=t.getCenterViewportScrollLeft(),o=i+t.getCenterWidth();let s,n;this.gos.get("enableRtl")?(s=eo-Us):(n=eo-Us),this.needToMoveRight=s,this.needToMoveLeft=n,n||s?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),Z0),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*Q0,e>ll&&(e=ll);let t=null;const i=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:o,dragAndDrop:s,gos:n}=this.beans;if(this.failedMoveAttempts<=ih+1||!o)return;if(s.setDragImageCompIcon("pinned"),!n.get("suppressMoveWhenColumnDragging")){const r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,i=!1){const o=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!o.length)return 0;i&&(t=this.getPinDirection());const{pinnedCols:s,dragAndDrop:n}=this.beans;return s?.setColsPinned(o,t,"uiColumnDragged"),i&&n.nudge(),o.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function oh(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function J0(e){const t=e.length;let i,o;for(let s=0;s{let s;const n=o.gridBodyCtrl.eBodyViewport;switch(i){case"left":s=[[n,o.left.eContainer],[o.bottomLeft.eContainer],[o.topLeft.eContainer]];break;case"right":s=[[n,o.right.eContainer],[o.bottomRight.eContainer],[o.topRight.eContainer]];break;default:s=[[n,o.center.eViewport],[o.bottomCenter.eViewport],[o.topCenter.eViewport]];break}this.eSecondaryContainers=s}),this.moveColumnFeature=this.createManagedBean(new X0(i)),this.bodyDropPivotTarget=this.createManagedBean(new W0(i)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}};function sh(e,t){const i=[],o=[],s=[];return e.forEach(r=>{const l=r.getColDef().lockPosition;l==="right"?s.push(r):l==="left"||l===!0?i.push(r):o.push(r)}),t.get("enableRtl")?[...s,...o,...i]:[...i,...o,...s]}function nh(e,t){let i=!0;return Je(null,t,o=>{if(!ce(o))return;const s=o;if(!s.getColGroupDef()?.marryChildren)return;const l=[];for(const h of s.getLeafColumns()){const g=e.indexOf(h);l.push(g)}const a=Math.max.apply(Math,l),d=Math.min.apply(Math,l),c=a-d,u=s.getLeafColumns().length-1;c>u&&(i=!1)}),i}var t1=class extends S{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,i){const o=this.beans.colModel.getCols();if(!o)return;const s=o[e];this.moveColumns([s],t,i)}moveColumns(e,t,i,o=!0){const{colModel:s,colAnimation:n,visibleCols:r,eventSvc:l}=this.beans,a=s.getCols();if(!a)return;if(t>a.length-e.length){F(30,{toIndex:t});return}n?.start();const d=s.getColsForKeys(e);this.doesMovePassRules(d,t)&&(Na(s.getCols(),d,t),r.refresh(i),l.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:o,source:i})),n?.finish()}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){const{colModel:t,gos:i}=this.beans;return!(!nh(e,t.getColTree())||!(s=>{const n=d=>d?d==="left"||d===!0?-1:1:0,r=i.get("enableRtl");let l=r?1:-1,a=!0;for(const d of s){const c=n(d.getColDef().lockPosition);r?c>l&&(a=!1):cl?"hide":"notAllowed",getDragItem:a?()=>s1(t,r.allCols):()=>o1(t),dragItemName:i,onDragStarted:()=>{l=!o.get("suppressDragLeaveHidesColumns"),rl(d,!0)},onDragStopped:()=>rl(d,!1),onDragCancelled:()=>rl(d,!1),onGridEnter:h=>{if(l){const{columns:g=[],visibleState:p}=h??{},f=a?C=>!p||p[C.getColId()]:()=>!0,m=g.filter(C=>!C.getColDef().lockVisible&&f(C));s.setColsVisible(m,!0,"uiColumnMoved")}},onGridExit:h=>{if(l){const g=h?.columns?.filter(p=>!p.getColDef().lockVisible)||[];s.setColsVisible(g,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}};function i1(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function o1(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function s1(e,t){const i=e.getProvidedColumnGroup().getLeafColumns(),o={};for(const l of i)o[l.getId()]=l.isVisible();const s=[];for(const l of t)i.indexOf(l)>=0&&(s.push(l),Ie(i,l));for(const l of i)s.push(l);const n=[],r=e.getLeafColumns();for(const l of s)r.indexOf(l)!==-1&&n.push(l);return{columns:s,columnsInSplit:n,visibleState:o,containerType:n[0]?.pinned}}var rh={moduleName:"ColumnMove",version:P,beans:[t1,V0],apiFunctions:{moveColumnByIndex:N0,moveColumns:z0},dependsOn:[sl],css:[G0]},n1=class extends S{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const i=this.getHeaderCellForColumn(e);if(!i)return-1;const o=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||o.push(i),this.getPreferredWidthForElements(o)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const i=document.createElement("form");i.style.position="fixed";const o=this.centerRowContainerCtrl.eContainer;for(const n of e)this.cloneItemIntoDummy(n,i);o.appendChild(i);const s=Math.ceil(i.getBoundingClientRect().width);return i.remove(),t=t??this.gos.get("autoSizePadding"),s+t}getHeaderCellForColumn(e){let t=null;for(const i of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const o=i.getHtmlElementForColumnHeader(e);o!=null&&(t=o)}return t}cloneItemIntoDummy(e,t){const i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";const o=document.createElement("div"),s=o.classList;["ag-header-cell","ag-header-group-cell"].some(l=>i.classList.contains(l))?(s.add("ag-header","ag-header-row"),o.style.position="static"):s.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(a=>r.classList.contains(a))){for(let a=0;an.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:o,source:i})}function l1(e,t,i){if(!t.length)return;const o=t.length===1?t[0]:null,s=ah(t,n=>n.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:o,source:i})}function ch(e,t,i,o){e.dispatchEvent({type:t,columns:i,column:i&&i.length==1?i[0]:null,source:o})}function Gi(e,t,i,o,s=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:i,source:o})}var a1=class extends S{constructor(e,t,i,o){super(),this.comp=e,this.eResize=t,this.pinned=i,this.columnGroup=o}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:i}=this.beans,o=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(o),!t.get("suppressAutoSize")&&i&&this.addDestroyFunc(i.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:i,resizeRatios:o,groupAfterColumns:s,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=o,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){const o=this.normaliseDragChange(t),s=this.resizeStartWidth+o;this.resizeColumnsFromLocalValues(s,i,e)}getInitialValues(e){const t=a=>a.reduce((d,c)=>d+c.getActualWidth(),0),i=(a,d)=>a.map(c=>c.getActualWidth()/d),o=this.getColumnsToResize(),s=t(o),n=i(o,s),r={columnsToResize:o,resizeStartWidth:s,resizeRatios:n};let l=null;if(e&&(l=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),l){const a=l.getDisplayedLeafColumns(),d=r.groupAfterColumns=a.filter(u=>u.isResizable()),c=r.groupAfterStartWidth=t(d);r.groupAfterRatios=i(d,c)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();t>i.resizeStartWidth&&this.resizeColumns(i,t,e,!0)}resizeColumnsFromLocalValues(e,t,i=!0){if(!this.resizeCols||!this.resizeRatios)return;const o={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(o,e,t,i)}resizeColumns(e,t,i,o=!0){const{columnsToResize:s,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:d}=e,c=[];if(c.push({columns:s,ratios:r,width:t}),l){const u=t-n;c.push({columns:l,ratios:d,width:a-u})}this.beans.colResize?.resizeColumnSets({resizeSets:c,finished:o,source:i}),o&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},d1=class extends S{constructor(e,t,i,o,s){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=o,this.ctrl=s}postConstruct(){const e=[];let t,i;const o=()=>{if(_(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:l}=this.beans,a=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(a),i&&l&&e.push(l.addColumnAutosizeListeners(this.eResize,this.column))},s=()=>{for(const r of e)r();e.length=0},n=()=>{const r=this.column.isResizable(),l=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||l!==i)&&(t=r,i=l,s(),o())};n(),this.addDestroyFunc(s),this.ctrl.setRefreshFunction("resize",n)}onResizing(e,t){const{column:i,lastResizeAmount:o,resizeStartWidth:s,beans:n}=this,r=this.normaliseResizeAmount(t),l=s+r,a=[{key:i,newWidth:l}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=n;if(this.column.getPinned()){const h=d?.leftWidth??0,g=d?.rightWidth??0,p=yi(c.getGridBodyCtrl().eBodyViewport)-50;if(h+g+(r-o)>p)return}this.lastResizeAmount=r,u?.setColumnWidths(a,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.column.resizing=e,this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const i=this.pinned!=="left",o=this.pinned==="right";return this.gos.get("enableRtl")?i&&(t*=-1):o&&(t*=-1),t}},c1=class extends S{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,i,o){const s=[],{colModel:n,gos:r,visibleCols:l}=this.beans;for(const a of e){const d=n.getColDefCol(a.key)||n.getCol(a.key);if(!d)continue;if(s.push({width:a.newWidth,ratios:[1],columns:[d]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=l.getColAfter(d);if(!u)continue;const h=d.getActualWidth()-a.newWidth,g=u.getActualWidth()+h;s.push({width:g,ratios:[1],columns:[u]})}}s.length!==0&&this.resizeColumnSets({resizeSets:s,finished:i,source:o})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:o}=e;if(!(!t||t.every(c=>u1(c)))){if(i){const c=t&&t.length>0?t[0].columns:null;Gi(this.eventSvc,c,i,o)}return}const n=[],r=[];for(const c of t){const{width:u,columns:h,ratios:g}=c,p={},f={};for(const v of h)r.push(v);let m=!0,C=0;for(;m;){if(C++,C>1e3){z(31);break}m=!1;const v=[];let w=0,y=u;h.forEach((E,D)=>{if(f[E.getId()])y-=p[E.getId()];else{v.push(E);const O=g[D];w+=O}});const R=1/w;v.forEach((E,D)=>{const B=D===v.length-1;let O;B?O=y:(O=Math.round(g[D]*u*R),y-=O);const G=E.getMinWidth(),H=E.getMaxWidth();O0&&O>H&&(O=H,f[E.getId()]=!0,m=!0),p[E.getId()]=O})}for(const v of h){const w=p[v.getId()];v.getActualWidth()!==w&&(v.setActualWidth(w,o),n.push(v))}}const l=n.length>0;let a=[];if(l){const{colFlex:c,visibleCols:u,colViewport:h}=this.beans;a=c?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(o),u.updateBodyWidths(),h.checkViewportColumns()}const d=r.concat(a);(l||i)&&Gi(this.eventSvc,d,i,o,a)}resizeHeader(e,t,i){if(!e.isResizable())return;const o=e.getActualWidth(),s=e.getMinWidth(),n=e.getMaxWidth(),r=Math.min(Math.max(o+t,s),n);this.setColumnWidths([{key:e,newWidth:r}],i,!0,"uiColumnResized")}createResizeFeature(e,t,i,o,s){return new d1(e,t,i,o,s)}createGroupResizeFeature(e,t,i,o){return new a1(e,t,i,o)}};function u1(e){const{columns:t,width:i}=e;let o=0,s=0,n=!0;for(const a of t){const d=a.getMinWidth();o+=d||0;const c=a.getMaxWidth();c>0?s+=c:n=!1}const r=i>=o,l=!n||i<=s;return r&&l}var h1={moduleName:"ColumnResize",version:P,beans:[c1],apiFunctions:{setColumnWidths:r1},dependsOn:[Ju,lh]},g1=class extends S{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);for(const t of this.columnGroup.getLeafColumns())t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})}removeListenersOnChildrenColumns(){for(const e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},p1=class extends Or{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,i,o,s){const{column:n,beans:r}=this,{context:l,colNames:a,colHover:d,rangeSvc:c,colResize:u}=r;this.comp=e,s=Fo(this,l,s),this.setGui(t,s),this.displayName=a.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(s),this.setupExpandable(s),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:o,compBean:s}),this.setupUserComp(),this.addHeaderMouseListeners(s,o),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const h=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(s,g,t),c?.createRangeHighlightFeature(s,n,e),s.createManagedBean(new Br(n,t,r)),s.createManagedBean(new g1(e,n)),u?this.resizeFeature=s.createManagedBean(u.createGroupResizeFeature(e,i,h,n)):e.setResizableDisplayed(!1),s.createManagedBean(new Li(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(s,g),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),s.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(s),s.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.getDefinition();return k(t.gos,{colDef:i,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,i=e.get("groupHeaderHeight");i!=null?i===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(i):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const i of t)e.addManagedListeners(i,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,i)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),i=t[0]===e,o=q(t)===e;if(!i&&!o)return;const s=e.getHighlighted(),n=!!this.rowCtrl.getHeaderCellCtrls().find(a=>a.column.isMoving());let r=!1,l=!1;if(n){const a=this.beans.gos.get("enableRtl"),d=s===1,c=s===0;i&&(a?l=d:r=c),o&&(a?r=c:l=d)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",l)}resizeHeader(e,t){const{resizeFeature:i}=this;if(!i)return;const o=i.getInitialValues(t);i.resizeColumns(o,o.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:i,enterpriseMenuFactory:o}=this.beans,s=this.column,n=s.getProvidedColumnGroup(),r=k(i,{displayName:this.displayName,columnGroup:s,setExpanded:a=>{e.setColumnGroupOpened(n,a,"gridInitializing")},setTooltip:(a,d)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(a,d)},showColumnMenu:(a,d)=>o?.showMenuAfterButtonClick(n,a,"columnMenu",d),showColumnMenuAfterMouseClick:(a,d)=>o?.showMenuAfterMouseEvent(n,a,"columnMenu",d),eGridHeader:this.eGui}),l=pv(t,r);l&&this.comp.setUserCompDetails(l)}addHeaderMouseListeners(e,t){const{column:i,comp:o,beans:{rangeSvc:s},gos:n}=this,r=c=>this.handleMouseOverChange(c.type==="mouseenter"),l=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",i.getProvidedColumnGroup()),a=c=>this.handleContextMenuMouseEvent(c,void 0,i.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:r,mouseleave:r,click:l,contextmenu:a}),o.toggleCss("ag-header-group-cell-selectable",oi(n));const d=s?.createHeaderGroupCellMouseListenerFeature(this.column,t);d&&this.createManagedBean(d)}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const i=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:i,expandableChanged:i})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),i=Hr(t,this.gos,null,e);e.isPadding()?(i.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(s=>s.isSpanHeaderHeight())&&i.push("ag-header-span-height")):(i.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&i.push("ag-header-cell-wrap-text"));for(const o of i)this.comp.toggleCss(o,!0)}setupMovingCss(e){const{column:t}=this,o=t.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const n of o)e.addManagedListeners(n,{movingChanged:s});s()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;const{column:i,expandable:o,gos:s,beans:n}=this,r=oi(s);if(e.key==b.ENTER){if(r&&!e.altKey)n.rangeSvc?.handleColumnSelection(i,e);else if(o){const l=!i.isExpanded();n.colGroupSvc.setColumnGroupOpened(i.getProvidedColumnGroup(),l,"uiColumnExpanded")}}}refreshAnnouncement(){let e;const{gos:t}=this;oi(t)&&(e=this.getLocaleTextFunc()("ariaColumnGroupCellSelection","Press Enter to toggle selection for all visible cells in this column group")),this.ariaAnnouncement=e}announceAriaDescription(){const{beans:e,eGui:t,ariaAnnouncement:i}=this;!i||!t.contains(j(e))||e.ariaAnnounce?.announceValue(i,"columnHeader")}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function f1(e,t,i){e.colGroupSvc?.setColumnGroupOpened(t,i,"api")}function m1(e,t,i){return e.colGroupSvc?.getColumnGroup(t,i)??null}function C1(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function v1(e,t,i){return e.colNames.getDisplayNameForColumnGroup(t,i)||""}function w1(e){return e.colGroupSvc?.getColumnGroupState()??[]}function b1(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function S1(e){e.colGroupSvc?.resetColumnGroupState("api")}function y1(e){return e.visibleCols.treeLeft}function R1(e){return e.visibleCols.treeCenter}function E1(e){return e.visibleCols.treeRight}function F1(e){return e.visibleCols.getAllTrees()}var al=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return typeof t!="number"?i=0:i=t+1,this.existingIds[e]=i,i}};function x1(e,t){for(let i=0;i=0&&(e[o]=e[e.length-1],e.pop())}}var P1=class extends S{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:i,colModel:o,colGroupSvc:s,colViewport:n,selectionColSvc:r}=this.beans;t||this.buildTrees(o,s),s?.updateOpenClosedVisibility(),this.leftCols=dl(this.treeLeft),this.centerCols=dl(this.treeCenter),this.rightCols=dl(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(o),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(l=>l.isAutoHeight()),i?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(o,this.leftCols,this.rightCols,e),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let i=t.getParent();for(;i;){if(!i.isPadding()){const o=i.getProvidedColumnGroup().getLevel()+1;o>e&&(e=o);break}i=i.getParent()}}return e}updateBodyWidths(){const e=pt(this.centerCols),t=pt(this.leftCols),i=pt(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,i,o){let s,n;this.gos.get("enableRtl")?(s=t?t[0]:null,n=i?q(i):null):(s=t?q(t):null,n=i?i[0]:null);for(const r of e.getCols())r.setLastLeftPinned(r===s,o),r.setFirstRightPinned(r===n,o)}buildTrees(e,t){const i=e.getColsToShow(),o=i.filter(a=>a.getPinned()=="left"),s=i.filter(a=>a.getPinned()=="right"),n=i.filter(a=>a.getPinned()!="left"&&a.getPinned()!="right"),r=new al,l=a=>t?t.createColumnGroups(a):a.columns;this.treeLeft=l({columns:o,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=l({columns:s,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=l({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),i=[],o=[],s=[];for(const n of t){const r=n.getPinned();r?r===!0||r==="left"?i.push(n):s.push(n):o.push(n)}this.ariaOrderColumns=i.concat(o).concat(s)}getAriaColIndex(e){let t;return ee(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(const e of[this.treeLeft,this.treeRight,this.treeCenter])for(const t of e)ee(t)&&t.checkLeft()}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const o=t.getCols().slice(0),s=this.gos.get("enableRtl");for(const n of[this.leftCols,this.rightCols,this.centerCols]){if(s){let r=pt(n);for(const l of n)r-=l.getActualWidth(),l.setLeft(r,e)}else{let r=0;for(const l of n)l.setLeft(r,e),r+=l.getActualWidth()}x1(o,n)}for(const n of o)n.setLeft(null,e)}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:i}}=this;return i.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:i}}=this;return i.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,i,o){const s=[];let n=null;for(let r=0;r1){const h=d-1;for(let g=1;g<=h;g++)c.push(t[r+g]);r+=h}let u;if(i){u=!1;for(const h of c)i(h)&&(u=!0)}else u=!0;u&&(s.length===0&&n&&(o&&o(l))&&s.push(n),s.push(l)),n=l}return s}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,i=t.indexOf(e);return i>0?t[i-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};di(this.treeCenter,!1,e),di(this.treeLeft,!1,e),di(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let i=0;i{ct(i)&&t.push(i)}),t}var D1=class extends S{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return Je(null,t,i=>{ce(i)&&e.push({groupId:i.getGroupId(),open:i.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const i=[];Je(null,t,o=>{if(ce(o)){const s=o.getColGroupDef(),n={groupId:o.getGroupId(),open:s?s.openByDefault:void 0};i.push(n)}}),this.setColumnGroupState(i,e)}setColumnGroupState(e,t){const{colModel:i,colAnimation:o,visibleCols:s,eventSvc:n}=this.beans;if(!i.getColTree().length)return;o?.start();const l=[];for(const a of e){const d=a.groupId,c=a.open,u=this.getProvidedColGroup(d);u&&u.isExpanded()!==c&&(u.setExpanded(c),l.push(u))}s.refresh(t,!0),l.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:l.length===1?l[0]:void 0,columnGroups:l}),o?.finish()}setColumnGroupOpened(e,t,i){let o;ce(e)?o=e.getId():o=e||"",this.setColumnGroupState([{groupId:o,open:t}],i)}getProvidedColGroup(e){let t=null;return Je(null,this.beans.colModel.getColTree(),i=>{ce(i)&&i.getId()===e&&(t=i)}),t}getGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),o=e.getDisplayedLeafColumns(),s=t==="After"?q(o):o[0],n=`getCol${t}`;for(;;){const r=this.beans.visibleCols[n](s);if(!r)return null;const l=this.getColGroupAtLevel(r,i);if(l!==e)return l}}getColGroupAtLevel(e,t){let i=e.getParent(),o,s;for(;o=i.getProvidedColumnGroup().getLevel(),s=i.getPaddingLevel(),!(o+s<=t);)i=i.getParent();return i}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();di(e,!1,t=>{ee(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(ee(e))return e;const i=this.beans.visibleCols.getAllTrees(),o=typeof t=="number";let s=null;return di(i,!1,n=>{if(ee(n)){const r=n;let l;o?l=e===r.getGroupId()&&t===r.getPartId():l=e===r.getGroupId(),l&&(s=r)}}),s}createColumnGroups(e){const{columns:t,idCreator:i,pinned:o,oldDisplayedGroups:s,isStandaloneStructure:n}=e,r=this.mapOldGroupsById(s),l=[];let a=t;for(;a.length;){const d=a;a=[];let c=0;const u=h=>{const g=c;c=h;const p=d[g],m=(ee(p)?p.getProvidedColumnGroup():p).getOriginalParent();if(m==null){for(let v=g;vce(c))){a.setChildren([r]);continue}else{a.setChildren(e);break}s.push(r)}}return s}findDepth(e){let t=0,i=e;for(;i?.[0]&&ce(i[0]);)t++,i=i[0].getChildren();return t}findMaxDepth(e,t){let i=t;for(let o=0;o=0;n--){const r=new Ai(null,`FAKE_PATH_${o.getId()}_${n}`,!0,n);this.createBean(r),r.setChildren([s]),s.originalParent=r,s=r}t===0&&(o.originalParent=null),i.push(s)}return i}findExistingGroup(e,t){if(e.groupId!=null)for(let o=0;o{for(const s of o)if(ee(s)){const n=s;t[s.getUniqueId()]=n,i(n.getChildren())}};return e&&i(e),t}setupParentsIntoCols(e,t){for(const i of e??[])if(i.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),i.parent=t,ee(i)){const o=i;this.setupParentsIntoCols(o.getChildren(),o)}}},uh={moduleName:"ColumnGroup",version:P,dynamicBeans:{headerGroupCellCtrl:p1},beans:[D1],apiFunctions:{getAllDisplayedColumnGroups:F1,getCenterDisplayedColumnGroups:R1,getColumnGroup:m1,getColumnGroupState:w1,getDisplayNameForColumnGroup:v1,getLeftDisplayedColumnGroups:y1,getProvidedColumnGroup:C1,getRightDisplayedColumnGroups:E1,resetColumnGroupState:S1,setColumnGroupOpened:f1,setColumnGroupState:b1}};function He(e,t,i){const{colModel:o,rowGroupColsSvc:s,pivotColsSvc:n,autoColSvc:r,selectionColSvc:l,colAnimation:a,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:h,eventSvc:g,gos:p}=e,f=o.getColDefCols()??[],m=l?.getColumns();if(!f.length&&!m?.length)return!1;if(t?.state&&!t.state.forEach)return F(32),!1;const C=(R,E,D,B,O)=>{if(!R)return;const G=HC(E,t.defaultState),H=G("flex").value1,$=G("sort").value1,W=G("sortType").value1,ue=ht($)||bs(W),ne=Xe(W),Ba=po($),Ha=ue?{type:ne,direction:Ba}:void 0;if(lc(e,R,G("hide").value1,Ha,G("sortIndex").value1,G("pinned").value1,H,i),H==null){const Yi=G("width").value1;if(Yi!=null){const Qo=R.getColDef().minWidth??u.getDefaultColumnMinWidth();Qo!=null&&Yi>=Qo&&R.setActualWidth(Yi,i)}}O||!R.isPrimary()||(h?.syncColumnWithState(R,i,G),s?.syncColumnWithState(R,i,G,D),n?.syncColumnWithState(R,i,G,B))},v=(R,E,D)=>{const B=gh(e,i),O=E.slice(),G={},H={},$=[],W=[],ue=[];let ne=0;const Ba=s?.columns.slice()??[],Ha=n?.columns.slice()??[];for(const Re of R){const Zo=Re.colId;if(Zo.startsWith(gt)){$.push(Re),ue.push(Re);continue}if(ft(Zo)){W.push(Re),ue.push(Re);continue}const Qi=D(Zo);Qi?(C(Qi,Re,G,H,!1),Ie(O,Qi)):(ue.push(Re),ne+=1)}const Yi=Re=>C(Re,null,G,H,!1);O.forEach(Yi),s?.sortColumns(fh.bind(s,G,Ba)),n?.sortColumns(fh.bind(n,H,Ha)),o.refreshCols(!1,i);const Qo=(Re,Zo,Oa=[])=>{for(const Qi of Zo){const rm=Re(Qi.colId);Ie(Oa,rm),C(rm,Qi,null,null,!0)}Oa.forEach(Yi)};return Qo(Re=>r?.getColumn(Re)??null,$,r?.getColumns()?.slice()),Qo(Re=>l?.getColumn(Re)??null,W,l?.getColumns()?.slice()),M1(t,o,p),d.refresh(i),g.dispatchEvent({type:"columnEverythingChanged",source:i}),B(),{unmatchedAndAutoStates:ue,unmatchedCount:ne}};a?.start();let{unmatchedAndAutoStates:w,unmatchedCount:y}=v(t.state||[],f,R=>o.getColDefCol(R));if(w.length>0||M(t.defaultState)){const R=c?.getPivotResultCols()?.list??[];y=v(w,R,E=>c?.getPivotResultCol(E)??null).unmatchedCount}return a?.finish(),y===0}function hh(e,t){const{colModel:i,autoColSvc:o,selectionColSvc:s,eventSvc:n,gos:r}=e,l=i.getColDefCols();if(!l?.length)return;const a=i.getColDefColTree(),d=tr(a),c=[];let u=1e3,h=1e3;const g=v=>{const w=ph(v);K(w.rowGroupIndex)&&w.rowGroup&&(w.rowGroupIndex=u++),K(w.pivotIndex)&&w.pivot&&(w.pivotIndex=h++),c.push(w)};o?.getColumns()?.forEach(g),s?.getColumns()?.forEach(g),d?.forEach(g),He(e,{state:c},t);const p=o?.getColumns()??[],C=[...s?.getColumns()??[],...p,...l].map(v=>({colId:v.colId}));He(e,{state:C,applyOrder:!0},t),n.dispatchEvent(k(r,{type:"columnsReset",source:t}))}function gh(e,t){const{rowGroupColsSvc:i,pivotColsSvc:o,valueColsSvc:s,colModel:n,sortSvc:r,eventSvc:l}=e,a={rowGroupColumns:i?.columns.slice()??[],pivotColumns:o?.columns.slice()??[],valueColumns:s?.columns.slice()??[]},d=To(e),c={};for(const u of d)c[u.colId]=u;return()=>{const u=(E,D,B,O)=>{const G=D.map(O),H=B.map(O);if(lt(G,H))return;const W=new Set(D);for(const ne of B)W.delete(ne)||W.add(ne);const ue=[...W];l.dispatchEvent({type:E,columns:ue,column:ue.length===1?ue[0]:null,source:t})},h=E=>{const D=[];return n.forAllCols(B=>{const O=c[B.getColId()];O&&E(O,B)&&D.push(B)}),D},g=E=>E.getColId();u("columnRowGroupChanged",a.rowGroupColumns,i?.columns??[],g),u("columnPivotChanged",a.pivotColumns,o?.columns??[],g);const f=h((E,D)=>{const B=E.aggFunc!=null,O=B!=D.isValueActive(),G=B&&E.aggFunc!=D.getAggFunc();return O||G});f.length>0&&ch(l,"columnValueChanged",f,t),Gi(l,h((E,D)=>E.width!=D.getActualWidth()),!0,t),dh(l,h((E,D)=>E.pinned!=D.getPinned()),t),l1(l,h((E,D)=>E.hide==D.isVisible()),t);const y=h((E,D)=>!go(D.getSortDef(),{type:Xe(E.sortType),direction:po(E.sort)})||E.sortIndex!=D.getSortIndex());y.length>0&&r?.dispatchSortChangedEvents(t,y);const R=To(e);A1(d,R,t,n,l)}}function To(e){const{colModel:t,rowGroupColsSvc:i,pivotColsSvc:o}=e,s=t.getColDefCols();if(K(s)||!t.isAlive())return[];const n=i?.columns,r=o?.columns,l=[],a=c=>{const u=c.isRowGroupActive()&&n?n.indexOf(c):null,h=c.isPivotActive()&&r?r.indexOf(c):null,g=c.isValueActive()?c.getAggFunc():null,p=c.getSortIndex()!=null?c.getSortIndex():null;l.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:c.getSort(),sortType:c.getSortDef()?.type,sortIndex:p,aggFunc:g,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:h,flex:c.getFlex()??null})};t.forAllCols(c=>a(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return l.sort((c,u)=>{const h=d.has(c.colId)?d.get(c.colId):-1,g=d.has(u.colId)?d.get(u.colId):-1;return h-g}),l}function ph(e){const t=(m,C)=>m??C??null,i=e.getColDef(),o=Me(t(i.sort,i.initialSort)),s=o.direction,n=o.type,r=t(i.sortIndex,i.initialSortIndex),l=t(i.hide,i.initialHide),a=t(i.pinned,i.initialPinned),d=t(i.width,i.initialWidth),c=t(i.flex,i.initialFlex);let u=t(i.rowGroupIndex,i.initialRowGroupIndex),h=t(i.rowGroup,i.initialRowGroup);u==null&&!h&&(u=null,h=null);let g=t(i.pivotIndex,i.initialPivotIndex),p=t(i.pivot,i.initialPivot);g==null&&!p&&(g=null,p=null);const f=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortType:n,sortIndex:r,hide:l,pinned:a,width:d,flex:c,rowGroup:h,rowGroupIndex:u,pivot:p,pivotIndex:g,aggFunc:f}}function M1(e,t,i){if(!e.applyOrder||!e.state)return;const o=[];for(const s of e.state)s.colId!=null&&o.push(s.colId);T1(t.cols,o,t,i)}function T1(e,t,i,o){if(e==null)return;let s=[];const n={};for(const l of t){if(n[l])continue;const a=e.map[l];a&&(s.push(a),n[l]=!0)}let r=0;for(const l of e.list){const a=l.getColId();if(n[a]!=null)continue;a.startsWith(gt)?s.splice(r++,0,l):s.push(l)}if(s=sh(s,o),!nh(s,i.getColTree())){F(39);return}e.list=s}function A1(e,t,i,o,s){const n={};for(const c of t)n[c.colId]=c;const r={};for(const c of e)n[c.colId]&&(r[c.colId]=!0);const l=e.filter(c=>r[c.colId]),a=t.filter(c=>r[c.colId]),d=[];a.forEach((c,u)=>{const h=l?.[u];if(h&&h.colId!==c.colId){const g=o.getCol(h.colId);g&&d.push(g)}}),d.length&&s.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:i})}var fh=(e,t,i,o)=>{const s=e[i.getId()],n=e[o.getId()],r=s!=null,l=n!=null;if(r&&l)return s-n;if(r)return-1;if(l)return 1;const a=t.indexOf(i),d=t.indexOf(o),c=a>=0,u=d>=0;return c&&u?a-d:c?-1:1},I1=class extends S{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","groupHideColumnsUntilExpanded","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(si(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),si(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:i,colAutosize:o,rowGroupColsSvc:s,pivotColsSvc:n,valueColsSvc:r,visibleCols:l,eventSvc:a,groupHierarchyColSvc:d}=t,c=this.colDefs?gh(t,e):void 0;i?.expire();const u=this.colDefCols?.list,h=this.colDefCols?.tree,g=sc(t,this.colDefs,!0,h,e);mo(t,this.colDefCols?.tree,g.columnTree);const p=g.columnTree,f=g.treeDepth,m=tr(p),C={};for(const v of m)C[v.getId()]=v;this.colDefCols={tree:p,treeDepth:f,list:m,map:C},this.createColumnsForService([d],this.colDefCols,e),s?.extractCols(e,u),n?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,l.refresh(e),a.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),a.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&o?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const i=this.cols?.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:s,rowNumbersSvc:n,quickFilter:r,pivotResultCols:l,showRowGroupCols:a,rowAutoHeight:d,visibleCols:c,colViewport:u,eventSvc:h,formula:g}=this.beans,p=this.selectCols(l,this.colDefCols);g?.setFormulasActive(p),this.createColumnsForService([o,s,n],p,t);const f=uC(this.gos,this.showingPivotResult);(!e||f)&&this.restoreColOrder(p),this.positionLockedCols(p),a?.refresh(),r?.refreshCols(),this.setColSpanActive(),d?.setAutoHeightActive(p),c.clear(),u.clear(),lt(i,this.cols.tree)||h.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,i){for(const o of e)o&&(o.createColumns(t,s=>{this.lastOrder=s(this.lastOrder),this.lastPivotOrder=s(this.lastPivotOrder)},i),o.addColumns(t))}selectCols(e,t){const i=e?.getPivotResultCols()??null;this.showingPivotResult=i!=null;const{map:o,list:s,tree:n,treeDepth:r}=i??t;return this.cols={list:s.slice(),map:{...o},tree:n.slice(),treeDepth:r},i&&(i.list.some(a=>this.cols?.map[a.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{beans:e,showingPivotResult:t,cols:i}=this,{valueColsSvc:o,selectionColSvc:s,gos:n}=e,r=this.isPivotMode()&&!t,l=s?.isSelectionColumnEnabled(),a=Nd(e),d=o?.columns,c=_d(n);return i.list.filter(h=>{const g=Rs(h);return r?d?.includes(h)||g&&(!c||h.isVisible())||l&&ft(h)||a&&pe(h):g&&!c||h.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,i){He(this.beans,{state:e.map(o=>({colId:typeof o=="string"?o:o.getColId(),hide:!t}))},i)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const i=t.filter(u=>e.map[u.getId()]!=null);if(i.length===0)return;if(i.length===e.list.length){e.list=i;return}const o=u=>{const h=u.getOriginalParent();return h?h.getChildren().length>1?!0:o(h):!1};if(!i.some(u=>o(u))){const u=new Set(i);for(const h of e.list)u.has(h)||i.push(h);e.list=i;return}const s=new Map;for(let u=0;u!s.has(u));if(n.length===0){e.list=i;return}const r=(u,h)=>{const g=h?h.getOriginalParent():u.getOriginalParent();if(!g)return null;let p=null,f=null;for(const m of g.getChildren())if(!(m===h||m===u)){if(m instanceof ut){const C=s.get(m);if(C==null)continue;(p==null||p{const v=s.get(C);v!=null&&(p==null||p=0;u--)d[c--]=l[u];for(let u=i.length-1;u>=0;u--){const h=i[u],g=a.get(h);if(g)if(Array.isArray(g))for(let p=g.length-1;p>=0;p--){const f=g[p];d[c--]=f}else d[c--]=g;d[c--]=h}e.list=d}positionLockedCols(e){e.list=sh(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:i,eventSvc:o}=this.beans;i.refresh(t),o.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=si(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){mo(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:i,selectionColSvc:o,groupHierarchyColSvc:s}=this.beans;Xi(this.colDefCols?.list,e)||Xi(i?.columns?.list,e)||Xi(o?.columns?.list,e)||Xi(s?.columns?.list,e)||Xi(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(t==null)return null;const{map:i,list:o}=t;if(typeof e=="string"&&i[e])return i[e];for(let l=0;le(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Ve(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function L1(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var Bt=class extends cl{constructor(e,t,i="text",o="input"){super(e,e?.template??L1(o),[],t),this.inputType=i,this.displayFieldTag=o,this.eLabel=x,this.eWrapper=x,this.eInput=x}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:i,className:o}=this;e.classList.add(`${o}-label`),t.classList.add(`${o}-input-wrapper`),i.classList.add(`${o}-input`),this.addCss("ag-input-field"),i.id=i.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:n,inputPlaceholder:r,autoComplete:l,tabIndex:a}=this.config;s!=null&&this.setInputName(s),n!=null&&this.setInputWidth(n),r!=null&&this.setInputPlaceholder(r),l!=null&&this.setAutoComplete(l),this.addInputListeners(),this.activateTabIndex([i],a)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,we(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return cs(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return we(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Kt(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return Si(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)we(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";we(this.eInput,"autocomplete",t)}return this}},Ao=class extends Bt{constructor(e,t="ag-checkbox",i="checkbox"){super(e,t,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t,name:i}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t),i!=null&&this.setName(i)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const i=this.eInput;i.checked=e,i.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:i});const o=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:o.id,name:o.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),i=this.selected=e.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},qs={selector:"AG-CHECKBOX",component:Ao},B1=".ag-checkbox-cell{height:100%}",H1={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},O1=class extends U{constructor(){super(H1,[qs]),this.eCheckbox=x,this.registerCSS(B1)}init(e){this.refresh(e);const{eCheckbox:t,beans:i}=this,o=t.getInputElement();o.setAttribute("tabindex","-1"),Ua(o,"polite"),this.addManagedListeners(o,{click:s=>{if(At(s),t.isDisabled())return;const n=t.getValue();this.onCheckboxChanged(n)},dblclick:s=>{At(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(s.key===b.SPACE&&!t.isDisabled()){e.eGridCell===j(i)&&t.toggle();const n=t.getValue();this.onCheckboxChanged(n),s.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,i=!0;const{value:o,column:s,node:n}=e;if(n.group&&s)if(typeof o=="boolean")t=o;else{const u=s.getColId();u.startsWith(gt)?t=o==null||o===""?void 0:o==="true":n.aggData&&n.aggData[u]!==void 0||n.sourceRowIndex>=0?t=o??void 0:i=!1}else t=o??void 0;const{eCheckbox:r}=this;if(!i){r.setDisplayed(!1);return}r.setValue(t);const l=e.disabled??!s?.isCellEditable(n);r.setDisabled(l);const a=this.getLocaleTextFunc(),d=rs(a,t),c=l?d:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;r.setInputAriaLabel(c)}onCheckboxChanged(e){const{params:t}=this,{column:i,node:o,value:s}=t,{editSvc:n}=this.beans;if(!i)return;const r={rowNode:o,column:i};n?.dispatchCellEvent(r,null,"cellEditingStarted",{value:s});const l=o.setDataValue(i,e,"ui");n?.dispatchCellEvent(r,null,"cellEditingStopped",{oldValue:s,newValue:e,valueChanged:l}),l||this.updateCheckbox(t)}},G1={tag:"div",cls:"ag-skeleton-container"},V1=class extends U{constructor(){super(G1)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>vi(e.eParentOfValue)),vi(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.getLocaleTextFunc();this.getGui().textContent=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");Kt(this.getGui(),t)}setupLoading(e){const t=se({tag:"div",cls:"ag-skeleton-effect"}),i=e.node.rowIndex;if(i!=null){const n=75+25*(i%2===0?Math.sin(i):Math.cos(i));t.style.width=`${n}%`}this.getGui().appendChild(t);const o=this.getLocaleTextFunc(),s=e.deferRender?o("ariaDeferSkeletonCellLoading","Cell is loading"):o("ariaSkeletonCellLoading","Row data is loading");Kt(this.getGui(),s)}refresh(e){return!1}},N1={moduleName:"CheckboxCellRenderer",version:P,userComponents:{agCheckboxCellRenderer:O1}},z1={moduleName:"SkeletonCellRenderer",version:P,userComponents:{agSkeletonCellRenderer:V1}};function W1(e,t){const i=e.colModel.getColDefCol(t);return i?i.getColDef():null}function _1(e){return e.colModel.getColumnDefs(!0)}function U1(e,t,i){return e.colNames.getDisplayNameForColumn(t,i)||""}function q1(e,t){return e.colModel.getColDefCol(t)}function $1(e){return e.colModel.getColDefCols()}function K1(e,t){return He(e,t,"api")}function j1(e){return To(e)}function Y1(e){hh(e,"api")}function Q1(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function Z1(e){return e.visibleCols.isPinningLeft()}function X1(e){return e.visibleCols.isPinningRight()}function J1(e,t){return e.visibleCols.getColAfter(t)}function eb(e,t){return e.visibleCols.getColBefore(t)}function tb(e,t,i){e.colModel.setColsVisible(t,i,"api")}function ib(e,t,i){e.pinnedCols?.setColsPinned(t,i,"api")}function ob(e){return e.colModel.getCols()}function sb(e){return e.visibleCols.leftCols}function nb(e){return e.visibleCols.centerCols}function rb(e){return e.visibleCols.rightCols}function lb(e){return e.visibleCols.allCols}function ab(e){return e.colViewport.getViewportColumns()}function ul(e,t){if(!e)return;const i=e,o={};for(const s of Object.keys(i)){if(t&&t.indexOf(s)>=0||bd.has(s))continue;const n=i[s];typeof n=="object"&&n!==null&&n.constructor===Object?o[s]=ul(n):o[s]=n}return o}var db=class extends S{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,i,o,s=!1){const n=e.slice();t?n.sort((a,d)=>i.indexOf(a)-i.indexOf(d)):(i||s)&&n.sort((a,d)=>o.indexOf(a)-o.indexOf(d));const r=this.rowGroupColsSvc?.columns,l=this.pivotColsSvc?.columns;return this.buildColumnDefs(n,r,l)}buildColumnDefs(e,t=[],i=[]){const o=[],s={};for(const n of e){const r=this.createDefFromColumn(n,t,i);let l=!0,a=r,d=n.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}const h=s[d.getGroupId()];if(h){h.children.push(a),l=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[a],s[u.groupId]=u,a=u,d=d.getOriginalParent()),d!=null&&c===d){l=!1;break}c=d}l&&o.push(a)}return o}createDefFromGroup(e){const t=ul(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){const o=ul(e.getColDef());return o.colId=e.getColId(),o.width=e.getActualWidth(),o.rowGroup=e.isRowGroupActive(),o.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,o.pivot=e.isPivotActive(),o.pivotIndex=e.isPivotActive()?i.indexOf(e):null,o.aggFunc=e.isValueActive()?e.getAggFunc():null,o.hide=e.isVisible()?void 0:!0,o.pinned=e.isPinned()?e.getPinned():null,o.sort=e.getSortDef(),o.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,o}},cb=class extends S{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const i=this.flexViewportWidth,{visibleCols:o,colDelayRenderSvc:s}=this.beans,n=o.centerCols;let r=-1;if(e.resizingCols){const f=new Set(e.resizingCols);for(let m=n.length-1;m>=0;m--)if(f.has(n[m])){r=m;break}}let l=!1;const a=n.map((f,m)=>{const C=f.getFlex(),v=C!=null&&C>0&&m>r;return l||(l=v),{col:f,isFlex:v,flex:Math.max(0,C??0),initialSize:f.getActualWidth(),min:f.getMinWidth(),max:f.getMaxWidth(),targetSize:0}});if(l?(s?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(s),!i||!l)return[];let d=a.length,c=a.reduce((f,m)=>f+m.flex,0),u=i;const h=(f,m)=>{f.frozenSize=m,f.col.setActualWidth(m,t),u-=m,c-=f.flex,d-=1},g=f=>f.frozenSize!=null;for(const f of a)f.isFlex||h(f,f.initialSize);for(;d>0;){const f=Math.round(c<1?u*c:u);let m,C=0,v=0;for(const R of a){if(g(R))continue;m=R,v+=f*(R.flex/c);const E=v-C,D=Math.round(E);R.targetSize=D,C+=D}m&&(m.targetSize+=f-C);let w=0;for(const R of a){if(g(R))continue;const E=R.targetSize,D=Math.min(Math.max(E,R.min),R.max);w+=D-E,R.violationType=D===E?void 0:D0?"min":"max";for(const R of a)g(R)||(y==="all"||R.violationType===y)&&h(R,R.targetSize)}e.skipSetLeft||o.setLeftValues(t),e.updateBodyWidths&&o.updateBodyWidths();const p=a.filter(f=>f.isFlex&&!f.violationType).map(f=>f.col);if(e.fireResizedEvent){const f=a.filter(C=>C.initialSize!==C.frozenSize).map(C=>C.col),m=a.filter(C=>C.flex).map(C=>C.col);Gi(this.eventSvc,f,!0,t,m)}return this.revealColumns(s),p}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){const{flex:t,initialFlex:i}=e.colDef;t!==void 0?e.flex=t:i!==void 0&&(e.flex=i)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},ye=e=>{if(typeof e=="bigint")return e;let t;if(typeof e=="number")t=e;else if(typeof e=="string"&&(t=e.trim(),t===""||(t.endsWith("n")&&(t=t.slice(0,-1)),!/^[+-]?\d+$/.test(t))))return null;if(t==null)return null;try{return BigInt(t)}catch{return null}},hl="T",ub=new RegExp(`[${hl} ]`),hb=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${hl}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function it(e,t){return e.toString().padStart(t,"0")}function fe(e,t=!0,i=hl){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>it(s,2)).join("-");return t&&(o+=i+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>it(s,2)).join(":")),o}function Io(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),it(e.getDate(),2),it(e.getHours(),2),`:${it(e.getMinutes(),2)}`,`:${it(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,it(e.getDate(),2)].map(String):null}var gl=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},pl=["January","February","March","April","May","June","July","August","September","October","November","December"],fl=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function gb(e,t){if(t==null)return fe(e,!1);const i=it(e.getFullYear(),4),o={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>pl[e.getMonth()],MMM:()=>pl[e.getMonth()].slice(0,3),MM:()=>it(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${gl(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${gl(e.getDate())}`,DD:()=>it(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>fl[e.getDay()],ddd:()=>fl[e.getDay()].slice(0,3),dd:()=>fl[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${gl(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(o).join("|"),"g");return t.replace(s,n=>n in o?o[n]():n)}function $s(e,t=!1){return!!me(e,t)}function pb(e){return $s(e,!0)}function me(e,t=!1,i){if(!e||!i&&!hb.test(e))return null;const[o,s]=e.split(ub);if(!o)return null;const n=o.split("-").map(g=>Number.parseInt(g,10));if(n.filter(g=>!isNaN(g)).length!==3)return null;const[r,l,a]=n,d=new Date(r,l-1,a);if(d.getFullYear()!==r||d.getMonth()!==l-1||d.getDate()!==a||!s&&t)return null;if(!s||s==="00:00:00")return d;const[c,u,h]=s.split(":").map(g=>Number.parseInt(g,10));if(c>=0&&c<24)d.setHours(c);else if(t)return null;if(u>=0&&u<60)d.setMinutes(u);else if(t)return null;if(h>=0&&h<60)d.setSeconds(h);else if(t)return null;return d}function ko(e,t,i){if(!t||!e)return;if(!i)return e[t];const o=t.split(".");let s=e;for(let n=0;nnull,suppressKeyboardEvent:({node:e,event:t,column:i})=>t.key===b.SPACE&&i.isCellEditable(e)}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:i}){return{cellEditorParams:{useFormatter:!0},comparator:(o,s)=>{const n=t.getColDefCol(i),r=n?.getColDef();if(!n||!r)return 0;const l=o==null?"":e({column:n,node:null,value:o}),a=s==null?"":e({column:n,node:null,value:s});return l===a?0:l>a?1:-1},keyCreator:e}},text(){return{}}}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={},i={},o=c=>u=>{const{column:h,node:g,value:p}=u;let f=h.getColDef().valueFormatter;return f===c.groupSafeValueFormatter&&(f=c.valueFormatter),this.beans.valueSvc.formatValue(h,g,p,f)};for(const c of Object.keys(e)){const u=e[c],h={...u,groupSafeValueFormatter:wh(u,this.gos)};t[c]=h,i[c]=o(h)}const s=this.gos.get("dataTypeDefinitions")??{},n={};for(const c of Object.keys(s)){const u=s[c],h=this.processDataTypeDefinition(u,s,[c],e);h&&(t[c]=h,u.dataTypeMatcher&&(n[c]=u.dataTypeMatcher),i[c]=o(h))}const{valueParser:r,valueFormatter:l}=e.object,{valueParser:a,valueFormatter:d}=t.object;this.hasObjectValueParser=a!==r,this.hasObjectValueFormatter=d!==l,this.formatValueFuncs=i,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(n,e)}sortKeysInMatchers(e,t){const i={...e};for(const o of fb)delete i[o],i[o]=e[o]??t[o].dataTypeMatcher;return i}processDataTypeDefinition(e,t,i,o){let s;const n=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=o[n];const l=t[n];if(r&&l&&(r=l),!vh(e,r,n))return;s=Ch(r,e)}else{if(i.includes(n)){F(44);return}const r=t[n];if(!vh(e,r,n))return;const l=this.processDataTypeDefinition(r,t,[...i,n],o);if(!l)return;s=Ch(l,e)}return{...s,groupSafeValueFormatter:wh(s,this.gos)}}updateColDefAndGetColumnType(e,t,i){let{cellDataType:o}=t;o===void 0&&(o=e.cellDataType);const{field:s}=t;if((o==null||o===!0)&&(o=this.canInferCellDataType(e,t)?this.inferCellDataType(s,i):!1),this.addFormulaCellEditorToColDef(e,t),!o){e.cellDataType=!1;return}const n=this.dataTypeDefinitions[o];if(!n){F(47,{cellDataType:o});return}return e.cellDataType=o,n.groupSafeValueFormatter&&(e.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(e.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,o,n,i),n.columnTypes}addFormulaCellEditorToColDef(e,t){!(t.allowFormula??e.allowFormula)||t.cellEditor||(e.cellEditor="agFormulaCellEditor")}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const i=o=>{t.add(o.key)};e.__addEventListener("columnStateUpdated",i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",i))}canInferCellDataType(e,t){const{gos:i}=this;if(!J(i))return!1;const o={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(ml(t,o))return!1;const s=t.type===null?e.type:t.type;if(s){const n=i.get("columnTypes")??{};if(Es(s).some(l=>{const a=n[l.trim()];return a&&ml(a,o)}))return!1}return!ml(e,o)}inferCellDataType(e,t){if(!e)return;let i;const o=this.getInitialData();if(o){const n=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");i=ko(o,e,n)}else this.initWaitForRowData(t);return i==null?void 0:Object.keys(this.dataTypeMatchers).find(n=>this.dataTypeMatchers[n](i))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?._leafs;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:i,eventSvc:o}=this.beans;t&&i&&(i.shouldQueueResizeOperations=!0);const[s]=this.addManagedEventListeners({rowDataUpdateStarted:n=>{const{firstRowData:r}=n;r&&(s?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&i?.processResizeOperations(),o.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const i=[];this.destroyColumnStateUpdateListeners();const o={},s={};for(const n of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[n],l=this.colModel.getCol(n);if(!l)continue;const a=l.getColDef();if(!this.resetColDefIntoCol(l,"cellDataTypeInferred"))continue;const d=l.getColDef();if(t&&d.type&&d.type!==a.type){const c=yb(l,r);c.rowGroup&&c.rowGroupIndex==null&&(o[n]=c),c.pivot&&c.pivotIndex==null&&(s[n]=c),i.push(c)}}t&&i.push(...this.generateColumnStateForRowGroupAndPivotIndexes(o,s)),i.length&&He(this.beans,{state:i},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const i={},{rowGroupColsSvc:o,pivotColsSvc:s}=this.beans;return o?.restoreColumnOrder(i,e),s?.restoreColumnOrder(i,t),Object.values(i)}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const o=fo(this.beans,i,e.getColId());return e.setColDef(o,i,t),!0}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const i=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!i||e.getColDef().allowFormula&&this.beans.formula?.isFormula(t)?!0:i(t)}validateColDef(e,t,i,o){if(e.cellDataType==="object"){const s=a=>a?.cellDataType==null||a?.cellDataType===!0,n=s(t)&&s(i),r=a=>F(48,{property:a,inferred:n,colId:o}),{object:l}=this.dataTypeDefinitions;e.valueFormatter===l.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&r("Formatter"),e.editable&&e.valueParser===l.valueParser&&!this.hasObjectValueParser&&r("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:i,beans:o,formatValueFuncs:s}=this,n=i[t];n&&o.colFilter?.setColDefPropsForDataType(e,n,s[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,i,o){const s=this.formatValueFuncs[t],n=this.columnDefinitionPropsPerDataType[i.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:i,colId:o,formatValue:s,filterModuleBean:this.beans.filterManager});e.cellEditor==="agFormulaCellEditor"&&n.cellEditor!==e.cellEditor&&(n.cellEditor=e.cellEditor),Object.assign(e,n)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),i=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:o=>me(o.newValue&&String(o.newValue)),valueFormatter:o=>o.value==null?"":!(o.value instanceof Date)||isNaN(o.value.getTime())?t("invalidDate","Invalid Date"):fe(o.value,i)??"",dataTypeMatcher:o=>o instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:i=>me(i)??void 0,dateFormatter:i=>fe(i??null,t)??void 0,valueParser:i=>$s(String(i.newValue))?i.newValue:null,valueFormatter:i=>$s(String(i.value))?String(i.value):"",dataTypeMatcher:i=>typeof i=="string"&&$s(i)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>t.newValue?.trim?.()===""?null:Number(t.newValue),valueFormatter:t=>t.value==null?"":typeof t.value!="number"||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},bigint:{baseDataType:"bigint",valueParser:t=>{const{newValue:i}=t;return i==null||typeof i=="string"&&i.trim()===""?null:ye(i)},valueFormatter:t=>t.value==null?"":typeof t.value!="bigint"?e("invalidBigInt","Invalid BigInt"):String(t.value),dataTypeMatcher:t=>typeof t=="bigint"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:Jo(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>t.newValue==null?t.newValue:t.newValue?.trim?.()===""?null:String(t.newValue).toLowerCase()==="true",valueFormatter:t=>t.value==null?"":String(t.value),dataTypeMatcher:t=>typeof t=="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>typeof t=="string"&&pb(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>Jo(t.value)??""}}}destroyColumnStateUpdateListeners(){for(const e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function Ch(e,t){const i={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...Es(e.columnTypes),...Es(t.columnTypes)]),i}function vh(e,t,i){return t?t.baseDataType!==e.baseDataType?(F(46),!1):!0:(F(45,{parentCellDataType:i}),!1)}var Cb=e=>typeof e=="bigint"||typeof e=="number",vb=e=>e==="number"||e==="bigint";function wh(e,t){if(e.valueFormatter)return i=>{const{node:o,colDef:s,column:n,value:r}=i;if(o?.group){const l=(s.pivotValueColumn??n).getAggFunc();if(l){if(l==="first"||l==="last")return e.valueFormatter(i);const{baseDataType:a}=e;if(vb(a)&&l!=="count"){if(Cb(r))return e.valueFormatter(i);if(r==null)return;if(typeof r=="object"){if(typeof r.toNumber=="function")return e.valueFormatter({...i,value:r.toNumber()});if("value"in r)return e.valueFormatter({...i,value:r.value})}}return}}else if(t.get("groupHideOpenParents")&&i.column.isRowGroupActive()&&typeof i.value=="string"&&!e.dataTypeMatcher?.(i.value))return;return e.valueFormatter(i)}}function wb(e,t,i,o){if(!t[i])return!1;const s=e[i];return s===null?(t[i]=!1,!1):o===void 0?!!s:s===o}function bb(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const i=ye(e),o=ye(t);return i!=null&&o!=null?i===o?0:i>o?1:-1:0}function Sb(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const i=bh(e),o=bh(t);return i!=null&&o!=null?i===o?0:i>o?1:-1:0}function bh(e){const t=ye(e);return t==null?null:t<0n?-t:t}function ml(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,o])=>wb(e,t,i,o))}function yb(e,t){const i=ph(e);for(const o of t)delete i[o],o==="rowGroup"?delete i.rowGroupIndex:o==="pivot"&&delete i.pivotIndex;return i}var Rb={moduleName:"DataType",version:P,beans:[mb],dependsOn:[N1]},Eb={moduleName:"ColumnFlex",version:P,beans:[cb]},Cl={moduleName:"ColumnApi",version:P,beans:[db],apiFunctions:{getColumnDef:W1,getDisplayNameForColumn:U1,getColumn:q1,getColumns:$1,applyColumnState:K1,getColumnState:j1,resetColumnState:Y1,isPinning:Q1,isPinningLeft:Z1,isPinningRight:X1,getDisplayedColAfter:J1,getDisplayedColBefore:eb,setColumnsVisible:tb,setColumnsPinned:ib,getAllGridColumns:ob,getDisplayedLeftColumns:sb,getDisplayedCenterColumns:nb,getDisplayedRightColumns:rb,getAllDisplayedColumns:lb,getAllDisplayedVirtualColumns:ab,getColumnDefs:_1}},Fb=class extends S{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const o=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:s}=this.beans;return i&&s?s.getHeaderName(e,o):o}getDisplayNameForProvidedColumnGroup(e,t,i){const o=t?.getColGroupDef();return o?this.getHeaderName(o,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,o,s){const n=e.headerValueGetter;if(n){const r=k(this.gos,{colDef:e,column:t,columnGroup:i,providedColumnGroup:o,location:s});return typeof n=="function"?n(r):typeof n=="string"?this.beans.expressionSvc?.evaluate(n,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return Wa(e.field)}return""}},xb=class extends S{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}getScrollPosition(){return this.scrollPosition}setScrollPosition(e,t,i=!1){const{visibleCols:o}=this,s=o.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!s)){if(this.scrollWidth=e,this.scrollPosition=t,o.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=o.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(i)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let i;switch(e){case"left":i=this.rowsOfHeadersToRenderLeft[t];break;case"right":i=this.rowsOfHeadersToRenderRight[t];break;default:i=this.rowsOfHeadersToRenderCenter[t];break}return i??[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||Pb(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,i=t+e.getActualWidth(),o=this.viewportLeft-200,s=this.viewportRight+200,n=ts&&i>s;return!n&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=n=>{const r=n.getLeft();return M(r)&&r>this.viewportLeft},i=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:o}=this,s=o.centerCols;return o.getColsForRow(e,s,i,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const i=o=>{const s=new Set,n={};for(const r of o){let l=r.getParent();const a=r.isSpanHeaderHeight();for(;l&&!s.has(l);){if(a&&l.isPadding()){l=l.getParent();continue}const c=l.getProvidedColumnGroup().getLevel();n[c]??(n[c]=[]),n[c].push(l),s.add(l),l=l.getParent()}}return n};this.rowsOfHeadersToRenderLeft=i(e),this.rowsOfHeadersToRenderRight=i(t),this.rowsOfHeadersToRenderCenter=i(this.headerColsWithinViewport)}extractViewport(){const e=o=>`${o.getId()}-${o.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),i=this.colsWithinViewportHash!==t;return i&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),i}};function Pb(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var Db=class extends S{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class i{refresh(){return!1}getGui(){return this.eGui}init(s){const n=t(s),r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=ds(""+n+"");return}if(n==null){this.eGui=se({tag:"span"});return}this.eGui=n}}return i}},Mb={moduleName:"CellRendererFunction",version:P,beans:[Db]},Sh=class extends he{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){if(e){this.dynamicBeans??(this.dynamicBeans={});for(const t of Object.keys(e))this.dynamicBeans[t]=e[t]}}createDynamicBean(e,t,...i){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));const o=this.dynamicBeans[e];if(o==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new o(...i)}};function Tb(e){return typeof e=="object"&&!!e.getComp}var Ab=class extends Sh{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:i,dynamicBeans:o,selectors:s}=e;if(i){const n=(r,l,a,d)=>{this.agGridDefaults[r]=l,(a||d)&&(this.agGridDefaultOverrides[r]={params:a,processParams:d})};for(const r of Object.keys(i)){let l=i[r];if(Tb(l)&&(l=l.getComp(this.beans)),typeof l=="object"){const{classImp:a,params:d,processParams:c}=l;n(r,a,d,c)}else n(r,l)}}this.registerDynamicBeans(o);for(const n of s??[])this.selectors[n.selector]=n;if(t)for(const n of Object.keys(t))this.icons[n]=t[n]}getUserComponent(e,t){const i=(l,a,d,c)=>({componentFromFramework:a,component:l,params:d,processParams:c}),{frameworkOverrides:o}=this.beans,s=o.frameworkComponent(t,this.gos.get("components"));if(s!=null)return i(s,!0);const n=this.jsComps[t];if(n){const l=o.isFrameworkComponent(n);return i(n,l)}const r=this.agGridDefaults[t];if(r){const l=this.agGridDefaultOverrides[t];return i(r,!1,l?.params,l?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?Ne(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??Ne(256)}},Ib=23,kb=class extends S{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(const e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===Ib&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const i=this.readyCallbacks.indexOf(t);i>=0&&this.readyCallbacks.splice(i,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:i}=this.params;return[e,i,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},Lb=':where([class^=ag-]),:where([class^=ag-]):after,:where([class^=ag-]):before{box-sizing:border-box}:where([class^=ag-]):where(button){color:inherit}:where([class^=ag-]):where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}:where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block}.ag-measurement-element-border:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}.ag-popup-child{top:0;z-index:5}.ag-popup-child:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);font-weight:var(--ag-font-weight);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled .ag-icon,[disabled] .ag-icon{opacity:.5}.ag-icon-grip.ag-disabled,.ag-icon-grip[disabled]{opacity:.35}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}',vl=typeof window!="object"||!window?.document?.fonts?.forEach,Ks=!1,ci=(e,t,i,o,s,n,r=!1)=>{if(vl||Ks)return;let l=e;o&&(l=`@layer ${CSS.escape(o).replaceAll("\\.",".")} { ${e} }`);let a=ot.map.get(t);if(a||(a=[],ot.map.set(t,a)),a.some(h=>h.injectedCss===l))return;const d=document.createElement("style");n&&d.setAttribute("nonce",n),d.dataset.agCss=i,d.dataset.agCssVersion=P,d.textContent=l;const c={rawCss:e,injectedCss:l,el:d,priority:s,isParams:r};let u;for(const h of a){if(h.priority>s)break;u=h}if(u){u.el.after(d);const h=a.indexOf(u);a.splice(h+1,0,c)}else t.nodeName==="STYLE"?t.after(d):t.insertBefore(d,t.querySelector(":not(title, meta)")),a.push(c)},yh=(e,t,i,o)=>{ci(Lb,e,"shared",t,0,i),o?.forEach((s,n)=>s.forEach(r=>ci(r,e,n,t,0,i)))},Bb=(e,t,i,o,s,n)=>{if(vl||Ks)return;const r=ot.grids.get(e);r?r.paramsCss=t:ot.grids.set(e,{styleContainer:o,paramsCss:t}),wl(o),t&&i&&ci(t,o,i,s,2,n,!0)},Hb=e=>{const t=ot.grids.get(e)?.styleContainer;if(!t)return;ot.grids.delete(e),Array.from(ot.grids.values()).some(o=>o.styleContainer===t)?wl(t):(wl(t,!0),ot.map.delete(t))},wl=(e,t=!1)=>{const i=new Set;for(const s of ot.grids.values())s.styleContainer===e&&i.add(s.paramsCss);const o=ot.map.get(e)??[];for(let s=o.length-1;s>=0;s--)(t||o[s].isParams&&!i.has(o[s].rawCss))&&(o[s].el.remove(),o.splice(s,1))},Rh=()=>{const e=globalThis.agStyleInjectionVersions??(globalThis.agStyleInjectionVersions=new Map);let t=e.get(P);return t||(t={map:new WeakMap,grids:new Map,paramsId:0},e.set(P,t)),t},ot=Rh(),N=e=>new Eh(e),Ht="$default",Ob=0,Eh=class{constructor({feature:e,params:t,modeParams:i={},css:o,cssImports:s}){this.feature=e,this.css=o,this.cssImports=s,this.modeParams={[Ht]:{...i[Ht]??{},...t??{}},...i}}use(e,t,i){let o=this._inject;if(o==null){let{css:s}=this;if(s){const n=`ag-theme-${this.feature??"part"}-${++Ob}`;typeof s=="function"&&(s=s()),s=`:where(.${n}) { ${s} } `;for(const r of this.cssImports??[])s=`@import url(${JSON.stringify(r)}); ${s}`;o={css:s,class:n}}else o=!1;this._inject=o}return o&&e&&ci(o.css,e,o.class,t,1,i),o?o.class:!1}},Gb=e=>e.replace(/[A-Z]|\d+/g,t=>`-${t}`).toLowerCase(),js=e=>`--ag-${Gb(e)}`,st=e=>`var(${js(e)})`,Vb=(e,t,i)=>Math.max(t,Math.min(i,e)),Nb=e=>{const t=new Map;return i=>{const o=i;return t.has(o)||t.set(o,e(i)),t.get(o)}},Te=e=>({ref:"accentColor",mix:e}),ie=e=>({ref:"foregroundColor",mix:e}),Q=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),zb=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),Z={ref:"backgroundColor"},Fe={ref:"foregroundColor"},X={ref:"accentColor"},ui={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:ie(.15),chromeBackgroundColor:Q(.02),browserColorScheme:"light"},Fh={...ui,textColor:Fe,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,fontWeight:"inherit",focusShadow:{spread:3,color:Te(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:Z,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:X,toggleButtonOffBackgroundColor:Q(.3),toggleButtonSwitchBackgroundColor:Z,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}},panelBackgroundColor:Z,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontFamily:{ref:"headerFontFamily"},panelTitleBarFontSize:{ref:"headerFontSize"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,dialogShadow:{ref:"popupShadow"},dialogBorder:{color:ie(.2)},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},dataFontSize:{ref:"fontSize"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontSize:{ref:"fontSize"},headerFontWeight:500,headerTextColor:{ref:"textColor"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,menuBorder:{color:ie(.2)},menuBackgroundColor:Q(.03),menuTextColor:Q(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"}},Wb=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],xh=Nb(e=>(e=e.toLowerCase(),Wb.find(t=>e.endsWith(t.toLowerCase()))??"length")),Ys=e=>typeof e=="object"&&e?.ref?st(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,Qs=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e&&"ref"in e){const t=st(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?st(e.onto):"transparent"}, ${t} ${Vb(e.mix*100,0,100)}%)`}return!1},_b=Ys,Vi=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:typeof e=="object"&&e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,i=>i[0]==="-"?i:" "+st(i)+" ")})`:typeof e=="object"&&e&&"ref"in e?st(e.ref):!1,Ub=Ys,bl=(e,t)=>typeof e=="string"?e:e===!0?bl({},t):e===!1?t==="columnBorder"?bl({color:"transparent"},t):"none":typeof e=="object"&&e&&"ref"in e?st(e.ref):Dh(e.style??"solid")+" "+Vi(e.width??{ref:"borderWidth"})+" "+Qs(e.color??{ref:"borderColor"}),Ph=e=>[Vi(e.offsetX??0),Vi(e.offsetY??0),Vi(e.radius??0),Vi(e.spread??0),Qs(e.color??{ref:"foregroundColor"}),...e.inset?["inset"]:[]].join(" "),qb=e=>typeof e=="string"?e:e===!1?"none":typeof e=="object"&&e&&"ref"in e?st(e.ref):Array.isArray(e)?e.map(Ph).join(", "):Ph(e),Dh=Ys,Sl=e=>typeof e=="string"?e.includes(",")?e:Mh(e):typeof e=="object"&&e&&"googleFont"in e?Sl(e.googleFont):typeof e=="object"&&e&&"ref"in e?st(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),Mh(t))).join(", "):!1,Mh=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),Th=Ys,yl=e=>typeof e=="string"?e:typeof e=="object"&&e&&"url"in e?`url(${JSON.stringify(e.url)})`:typeof e=="object"&&e&&"svg"in e?yl({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):typeof e=="object"&&e&&"ref"in e?st(e.ref):!1,$b=(e,t,i)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&i?.warn(104,{value:e,param:t}),`${e}s`):typeof e=="object"&&e&&"ref"in e?st(e.ref):!1,Kb={color:Qs,colorScheme:_b,length:Vi,scale:Ub,border:bl,borderStyle:Dh,shadow:qb,image:yl,fontFamily:Sl,fontWeight:Th,duration:$b},Ah=(e,t,i)=>{const o=xh(e);return Kb[o](t,e,i)},jb=e=>{if(!(e instanceof Rl))throw new Error("theme is not an object created by createTheme");return e},Ih=(e,t)=>new Rl({themeLogger:e,overridePrefix:t}),Rl=class lm{constructor(t,i=[]){this.params=t,this.parts=i}withPart(t){return typeof t=="function"&&(t=t()),t instanceof Eh?new lm(this.params,[...this.parts,t]):(this.params.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(N({feature:t}))}withParams(t,i=Ht){return this.withPart(N({modeParams:{[i]:t}}))}_startUse({styleContainer:t,cssLayer:i,nonce:o,loadThemeGoogleFonts:s,moduleCss:n}){if(vl||Ks)return;Qb(),yh(t,i,o,n);const r=Yb(this);if(r.length>0)for(const l of r)s&&Zb(l,o);for(const l of this.parts)l.use(t,i,o)}_getCssClass(){return Ks?"ag-theme-quartz":this._cssClassCache??(this._cssClassCache=kh(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).concat(this._getParamsClassName()).join(" "))}_getParamsClassName(){return this._paramsClassName??(this._paramsClassName=`ag-theme-params-${++Rh().paramsId}`)}_getModeParams(){let t=this._paramsCache;if(!t){const i={[Ht]:{...Fh}};for(const o of kh(this.parts))for(const s of Object.keys(o.modeParams)){const n=o.modeParams[s];if(n){const r=i[s]??(i[s]={}),l=new Set;for(const a of Object.keys(n)){const d=n[a];d!==void 0&&(r[a]=d,l.add(a))}if(s===Ht)for(const a of Object.keys(i)){const d=i[a];if(a!==Ht)for(const c of l)delete d[c]}}}this._paramsCache=t=i}return t}_getParamsCss(){if(!this._paramsCssCache){let t="",i="";const o=this._getModeParams(),{overridePrefix:s,themeLogger:n}=this.params,r=s?`--ag-${s}-`:void 0;for(const d of Object.keys(o)){const c=o[d];if(d!==Ht){const h=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(d):d}"]) & { `;t+=h,i+=h}for(const u of Object.keys(c).sort()){const h=c[u],g=Ah(u,h,n);if(g===!1)n.error(107,{key:u,value:h});else{const p=js(u),f=r?p.replace("--ag-",r):p,m=p.replace("--ag-","--ag-inherited-");t+=` ${p}: var(${m}, ${g}); `,i+=` ${m}: var(${f}); `}}d!==Ht&&(t+=`} `,i+=`} `)}const l=`:where(.${this._getParamsClassName()})`;let a=`${l} { ${t}} `;a+=`:has(> ${l}):not(${l}) { ${i}} `,this._paramsCssCache=a}return this._paramsCssCache}},kh=e=>{const t=new Map;for(const o of e)t.set(o.feature,o);const i=[];for(const o of e)(!o.feature||t.get(o.feature)===o)&&i.push(o);return i},Yb=e=>{const t=new Set,i=n=>{if(Array.isArray(n))n.forEach(i);else{const r=n?.googleFont;typeof r=="string"&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(n=>Object.values(n)).forEach(i),Array.from(t).sort()},Lh=!1,Qb=()=>{if(!Lh){Lh=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},Zb=async(e,t)=>{const i=`@import url('https://${Xb}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap'); `;ci(i,document.head,`googleFont:${e}`,void 0,0,t)},Xb="fonts.googleapis.com",Bh={changeKey:"listItemHeight",type:"length",defaultValue:24},Hh=class extends he{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){const{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t);const i=e.get("themeStyleContainer"),o=typeof ShadowRoot<"u",s=o&&t.getRootNode()instanceof ShadowRoot;this.eStyleContainer=(typeof i=="function"?i():i)??(s?t:document.head),!i&&!s&&o&&Jb(t,this.shadowRootError.bind(this),this.addDestroyFunc.bind(this)),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.getSizeEl(Bh),this.initVariables(),this.addDestroyFunc(()=>Hb(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("theme")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){const{theme:i}=this,o=i?i._getCssClass():this.applyLegacyThemeClasses();for(const s of Array.from(e.classList))s.startsWith("ag-theme-")&&e.classList.remove(s);if(o){const s=e.className;e.className=`${s}${s?" ":""}${o}${t?.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let i=!1;for(const o of Array.from(t.classList))o.startsWith("ag-theme-")&&(i=!0,e=e?`${e} ${o}`:o);i&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?ci(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(Bh)}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const i=this.measureSizeEl(e);return i==="detached"||i==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,i),i)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const i=t.offsetWidth;return i===El?"no-styles":(this.sizesMeasured=!0,i)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=St({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const i=this.getMeasurementContainer();t=St({tag:"div"});const o=this.setSizeElStyles(t,e);i.appendChild(t),this.sizeEls.set(e,t);const{type:s,noWarn:n}=e;if(s!=="length"&&s!=="border")return t;let r=this.measureSizeEl(e);r==="no-styles"&&!n&&this.varError(o,e.defaultValue);const l=at(this.beans,t,()=>{const a=this.measureSizeEl(e);a==="detached"||a==="no-styles"||(this.lastKnownValues.set(e,a),a!==r&&(r=a,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>l()),t}setSizeElStyles(e,t){const{changeKey:i,type:o}=t;let s=js(i);return o==="border"?(s.endsWith("-width")&&(s=s.slice(0,-6)),e.className="ag-measurement-element-border",e.style.setProperty("--ag-internal-measurement-border",`var(${s}, solid ${El}px)`)):e.style.width=`var(${s}, ${El}px)`,s}handleThemeChange(){const{gos:e,theme:t}=this,i=e.get("theme");let o;if(i==="legacy")o=void 0;else{const s=i??this.getDefaultTheme();s instanceof Rl?o=s:this.themeError(s)}o!==t&&this.handleNewTheme(o),this.postProcessThemeChange(o,i)}handleNewTheme(e){const{gos:t,eRootDiv:i,globalCSS:o}=this,s=this.getAdditionalCss();if(e){yh(this.eStyleContainer,this.cssLayer,this.styleNonce,s);for(const[n,r]of o)ci(n,this.eStyleContainer,r,this.cssLayer,0,this.styleNonce);o.length=0}this.theme=e,e?._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:s}),Bb(this,e?._getParamsCss()??null,e?._getParamsClassName()??null,this.eStyleContainer,this.cssLayer,this.styleNonce),this.applyThemeClasses(i),this.fireStylesChangedEvent("theme")}fireStylesChangedEvent(e){this.eventSvc.dispatchEvent({type:"stylesChanged",[`${e}Changed`]:!0})}},El=15538,Jb=(e,t,i)=>{let o=60;const s=setInterval(()=>{typeof ShadowRoot<"u"&&e.getRootNode()instanceof ShadowRoot&&(t(),clearInterval(s)),(e.isConnected||--o<0)&&clearInterval(s)},1e3);i(()=>clearInterval(s))},eS='.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-body-viewport::-webkit-scrollbar,.ag-center-cols-viewport::-webkit-scrollbar,.ag-floating-bottom-viewport::-webkit-scrollbar,.ag-floating-top-viewport::-webkit-scrollbar,.ag-header-viewport::-webkit-scrollbar,.ag-sticky-bottom-viewport::-webkit-scrollbar,.ag-sticky-top-viewport::-webkit-scrollbar{display:none!important}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-left-sticky-bottom,.ag-pinned-right-cols-container,.ag-pinned-right-sticky-bottom,.ag-sticky-bottom-container,.ag-sticky-top-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-active),&:where(.ag-scrollbar-scrolling){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-sticky-bottom{box-sizing:content-box!important;:where(.ag-pinned-left-sticky-bottom),:where(.ag-pinned-right-sticky-bottom),:where(.ag-sticky-bottom-container){border-top:var(--ag-row-border);box-sizing:border-box}}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;:where(.ag-column-group-closed-icon),:where(.ag-column-group-opened-icon){cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-cell-font-size);font-weight:var(--ag-cell-font-weight);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width)/2);content:"";height:var(--ag-row-drag-indicator-width);pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label,:where(.ag-header-group-cell-selectable) .ag-header-cell-comp-wrapper{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden)),:where(.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)):before,.ag-header-group-cell:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}.ag-header-cell:where(:not(.ag-floating-filter)):where(:hover):before,.ag-header-group-cell:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:where(:not(.ag-floating-filter)):where(.ag-header-cell-moving):before,.ag-header-group-cell:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}:where(.ag-header-cell:not(.ag-floating-filter)>*,.ag-header-group-cell>*){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-column-drag-indicator-color);border-radius:calc(var(--ag-column-drag-indicator-width)/2);content:"";height:100%;position:absolute;top:0;width:var(--ag-column-drag-indicator-width)}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2}:where(.ag-ltr) .ag-header-cell-resize{right:-3px}:where(.ag-rtl) .ag-header-cell-resize{left:-3px}.ag-header-cell-resize:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}:where(.ag-ltr) .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-rtl) .ag-header-cell-resize:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{container-type:normal;display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{container-type:normal;display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);container-type:inline-size;display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color)}.ag-chart-menu-icon:hover,.ag-chart-settings-next:hover,.ag-chart-settings-prev:hover,.ag-column-group-icons:hover,.ag-column-select-header-icon:hover,.ag-filter-toolpanel-expand:hover,.ag-floating-filter-button-button:hover,.ag-group-title-bar-icon:hover,.ag-header-cell-filter-button:hover,.ag-header-cell-menu-button:hover,.ag-header-expand-icon:hover,.ag-panel-title-bar-button-icon:hover,.ag-panel-title-bar-button:hover,.ag-set-filter-group-icons:hover,:where(.ag-group-contracted) .ag-icon:hover,:where(.ag-group-expanded) .ag-icon:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}:where(.ag-filter-active),:where(.ag-filter-toolpanel-group-instance-header-icon),:where(.ag-filter-toolpanel-instance-header-icon){position:relative}:where(.ag-filter-active):after,:where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-filter-toolpanel-instance-header-icon):after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-ltr) :where(.ag-filter-active):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-instance-header-icon):after{right:-1px}:where(.ag-rtl) :where(.ag-filter-active):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-instance-header-icon):after{left:-1px}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}',Oh={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarPanelAnimationDuration:0,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:Z,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},cellFontFamily:{ref:"fontFamily"},cellFontSize:{ref:"dataFontSize"},cellFontWeight:{ref:"fontWeight"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:X,rangeSelectionBackgroundColor:Te(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:Te(.5),rangeHeaderHighlightColor:zb(.08),rowNumbersSelectedColor:Te(.5),rowHoverColor:Te(.08),columnHoverColor:Te(.05),selectedRowBackgroundColor:Te(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:Z,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, cellFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:ie(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:ie(.1),iconButtonActiveColor:X,iconButtonActiveBackgroundColor:Te(.28),iconButtonActiveIndicatorColor:X,setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:ie(.8),cellEditingBorder:{color:X},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:ie(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:ie(.13)},selectCellBackgroundColor:ie(.07),selectCellBorder:{color:ie(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:Z,filterPanelApplyButtonBackgroundColor:X,columnPanelApplyButtonColor:Z,columnPanelApplyButtonBackgroundColor:X,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:Fe,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:Fe,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:ie(.15),statusBarLabelColor:Fe,statusBarLabelFontWeight:500,statusBarValueColor:Fe,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"},rowDragIndicatorColor:{ref:"rangeSelectionBorderColor"},rowDragIndicatorWidth:2,columnDragIndicatorColor:{ref:"accentColor"},columnDragIndicatorWidth:2},tS=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",Gh={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},iS={...Gh,cellBatchEditTextColor:"#f3d0b3"},oS=()=>N({feature:"batchEditStyle",params:Gh,css:tS}),sS=oS(),Zs=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}.ag-standard-button:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}",Xs={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},nS=()=>N({feature:"buttonStyle",params:Xs,css:Zs}),Vh=nS(),rS=()=>N({feature:"buttonStyle",params:{...Xs,buttonBackgroundColor:Z,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:X}},css:Zs}),Nh=rS(),lS=()=>N({feature:"buttonStyle",params:{...Xs,buttonBackgroundColor:Z,buttonBorder:{color:X},buttonFontWeight:600,buttonTextColor:X,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBackgroundColor:X,buttonActiveTextColor:Z},css:Zs}),zh=lS(),aS=()=>N({feature:"buttonStyle",params:{...Xs,buttonBorder:{color:Fe,width:2,style:"outset"},buttonActiveBorder:{color:Fe,width:2,style:"inset"},buttonBackgroundColor:Q(.07),buttonHoverBackgroundColor:Z,buttonVerticalPadding:{calc:"spacing * 0.5"}},css:Zs}),Wh=aS(),dS=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",cS=".ag-column-drop-vertical-empty-message{color:var(--ag-subtle-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600;padding-top:var(--ag-spacing)}:where(.ag-ltr) .ag-column-drop-vertical-empty-message{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing));padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-column-drop-vertical-empty-message{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing))}",uS=()=>N({feature:"columnDropStyle",css:dS}),Js=uS(),hS=()=>N({feature:"columnDropStyle",css:cS}),Fl=hS(),gS={formulaToken1Color:"#3269c6",formulaToken1BackgroundColor:{ref:"formulaToken1Color",mix:.08},formulaToken1Border:{color:{ref:"formulaToken1Color"}},formulaToken2Color:"#c0343f",formulaToken2BackgroundColor:{ref:"formulaToken2Color",mix:.06},formulaToken2Border:{color:{ref:"formulaToken2Color"}},formulaToken3Color:"#8156b8",formulaToken3BackgroundColor:{ref:"formulaToken3Color",mix:.08},formulaToken3Border:{color:{ref:"formulaToken3Color"}},formulaToken4Color:"#007c1f",formulaToken4BackgroundColor:{ref:"formulaToken4Color",mix:.06},formulaToken4Border:{color:{ref:"formulaToken4Color"}},formulaToken5Color:"#b03e85",formulaToken5BackgroundColor:{ref:"formulaToken5Color",mix:.08},formulaToken5Border:{color:{ref:"formulaToken5Color"}},formulaToken6Color:"#b74900",formulaToken6BackgroundColor:{ref:"formulaToken6Color",mix:.06},formulaToken6Border:{color:{ref:"formulaToken6Color"}},formulaToken7Color:"#247492",formulaToken7BackgroundColor:{ref:"formulaToken7Color",mix:.08},formulaToken7Border:{color:{ref:"formulaToken7Color"}}},pS=()=>N({feature:"formulaStyle",params:gS}),fS=pS(),mS={warn:(...e)=>{F(e[0],e[1])},error:(...e)=>{z(e[0],e[1])},preInitErr:(...e)=>{ro(e[0],e[2],e[1])}},Lo=()=>Ih(mS).withParams(Oh).withPart(Nh).withPart(Js).withPart(sS).withPart(fS),CS='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color)}&:where(.ag-checked):after{background-color:var(--ag-checkbox-checked-shape-color)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input,.ag-radio-button-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}.ag-checkbox-input-wrapper:after,.ag-radio-button-input-wrapper:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}.ag-checkbox-input-wrapper:where(:focus-within,:active),.ag-radio-button-input-wrapper:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color)}&:where(.ag-indeterminate):after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',vS=()=>N({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:Z,checkboxUncheckedBorderColor:Q(.3),checkboxCheckedBackgroundColor:X,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:''},checkboxCheckedShapeColor:Z,checkboxIndeterminateBackgroundColor:Q(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:''},checkboxIndeterminateShapeColor:Z,radioCheckedShapeImage:{svg:''}},css:CS}),Bo=vS(),wS=()=>N({feature:"colorScheme",params:ui}),bS=wS(),SS=()=>N({feature:"colorScheme",params:{...ui,foregroundColor:"#000000de",borderColor:"#60300026",chromeBackgroundColor:"#60300005"}}),yS=SS(),RS=()=>N({feature:"colorScheme",params:{...ui,foregroundColor:"#000",chromeBackgroundColor:"#f3f8f8"}}),ES=RS(),xl=()=>({...ui,...iS,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Q(.05),rowHoverColor:Te(.15),selectedRowBackgroundColor:Te(.2),menuBackgroundColor:Q(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:Fe,columnPanelApplyButtonColor:Fe,findMatchColor:Z,findActiveMatchColor:Z,checkboxUncheckedBorderColor:Q(.4),toggleButtonOffBackgroundColor:Q(.4),rowBatchEditBackgroundColor:Q(.1),formulaToken1Color:"#4da3e5",formulaToken2Color:"#f55864",formulaToken3Color:"#b688f2",formulaToken4Color:"#24bb4a",formulaToken5Color:"#e772ba",formulaToken6Color:"#f69b5f",formulaToken7Color:"#a3e6ff"}),FS=()=>N({feature:"colorScheme",params:xl()}),xS=FS(),PS=()=>N({feature:"colorScheme",params:{backgroundColor:"hsl(29, 10%, 17%)",foregroundColor:"#FFF",browserColorScheme:"dark"}}),_h=()=>({...xl(),backgroundColor:"#1f2836"}),DS=PS(),MS=()=>N({feature:"colorScheme",params:_h()}),TS=MS(),AS=()=>N({feature:"colorScheme",params:ui,modeParams:{light:ui,dark:xl(),"dark-blue":_h()}}),Ho=AS(),IS=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M22 12h-2v-2h-8v.092c.056 1.352 3.426 2.598 4.472 4.404.682 1.174.438 2.754-.572 3.72C14.29 19.618 12 20.924 12 22h8v-2h2v4H10c0-1.586-.098-3.304 1.016-4.314 1.904-1.632 4.89-3.108 3.54-4.42-1.918-1.68-4.464-2.936-4.554-5.12L10 8h12z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='m6.414 17 2.294 2.292-1.416 1.416L2.586 16l4.706-4.708 1.416 1.416L6.414 15H15V6.414l-2.292 2.294-1.416-1.416L16 2.586l4.708 4.706-1.416 1.416L17 6.414V15h8.586l-2.294-2.292 1.416-1.416L29.414 16l-4.706 4.708-1.416-1.416L25.586 17H17v8.586l2.292-2.294 1.416 1.416L16 29.414l-4.708-4.706 1.416-1.416L15 25.586V17z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 4C9.378 4 4 9.378 4 16s5.378 12 12 12 12-5.378 12-12S22.622 4 16 4m0 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S6 21.52 6 16 10.48 6 16 6m0 8.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M14 25h-2V7h2zm6 0h-2V7h2zm6 0h-2V7h2zM8 25H6V7h2z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M21.929 27.999h-7.828a5.09 5.09 0 0 1-5.086-5.086v-9.812a5.087 5.087 0 0 1 5.086-5.086h7.828a5.09 5.09 0 0 1 5.086 5.086v9.812a5.087 5.087 0 0 1-5.086 5.086m.16-17.984h-8.088a2.94 2.94 0 0 0-2.938 2.938v10.132a2.94 2.94 0 0 0 2.938 2.938h8.088a2.94 2.94 0 0 0 2.936-2.938V12.953a2.94 2.94 0 0 0-2.936-2.938M7.041 26.013h-2.05a4 4 0 0 1-.006-.228V9.065a5.07 5.07 0 0 1 5.064-5.064h12.812q.069 0 .134.002v2.012H9.915a2.876 2.876 0 0 0-2.874 2.874z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 24 24'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m16 14.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14.703 15.096 6.215 4.719a1 1 0 1 1 1.548-1.267l13.058 15.965A5.001 5.001 0 0 1 28 23.916a5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 4.98 4.98 0 0 1 1.23-3.283l-3.238-3.958-3.272 4.001a4.98 4.98 0 0 1 1.265 3.323 5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 5 5 0 0 1 7.13-4.522zM8.991 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M23 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1m-5.723-8.852 1.292 1.579 7.205-8.808a1 1 0 0 0-1.548-1.267z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M9.304 7.89a15.2 15.2 0 0 1 6.404-1.638c.294-.002.292-.002.584 0 5.956.174 11.328 4.088 13.62 9.748 0 0-1.318 3.178-3.224 5.174a13.6 13.6 0 0 1-2.226 1.874L26.414 25 25 26.414l-2.336-2.336C17.866 26.396 11.776 26.15 7.36 22.96a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.218 2.002-3.718a14.6 14.6 0 0 1 3.442-3.334L5.586 7 7 5.586zm-.3 2.528c-2.038 1.344-3.708 3.246-4.724 5.508L4.248 16c2.46 5.762 9.622 9.064 15.63 7.15q.688-.219 1.342-.516l-.912-.912a6.96 6.96 0 0 1-4.19 1.394c-3.862 0-7-3.136-7-7 0-1.57.52-3.022 1.394-4.19zm14.032 11.204a13.25 13.25 0 0 0 4.684-5.548l.032-.074c-1.984-4.646-6.834-7.798-12.006-7.748-1.712.05-3.386.458-4.922 1.158l1.102 1.102a6.97 6.97 0 0 1 4.192-1.396 7.003 7.003 0 0 1 5.606 11.192zm-11.09-8.262a5.003 5.003 0 0 0 6.928 6.928zm8.342 5.514a5.002 5.002 0 0 0-6.928-6.928z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16.292 6.32c5.956.174 11.328 4.086 13.62 9.746 0 0-1.318 3.18-3.224 5.176-4.862 5.088-13.534 5.97-19.328 1.784a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.216 2.002-3.716 2.678-3.64 7.03-5.896 11.618-6.03.294-.004.292-.004.584 0m-.546 2c-4.896.142-9.458 3.202-11.466 7.672l-.032.074c2.46 5.762 9.622 9.066 15.63 7.152 3.458-1.102 6.342-3.738 7.842-7.076l.032-.076C25.768 11.42 20.918 8.27 15.746 8.32m.254.946c3.754 0 6.8 3.048 6.8 6.8 0 3.754-3.046 6.8-6.8 6.8s-6.8-3.046-6.8-6.8c0-3.752 3.046-6.8 6.8-6.8m5 6.768V16c0-2.76-2.24-5-5-5s-5 2.24-5 5v.066c0 2.76 2.24 5 5 5s5-2.24 5-5z'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M26 8.184c-.066 2.658-4.058 5.154-6.742 7.974a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h20zM8 8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.066-2.658 4.058-5.154 6.742-7.974.198-.23.258-.538.258-.842z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.354 8.708 17.06 16l7.294 7.292-1.416 1.416L14.232 16l8.706-8.708zM9.646 8v16h-2V8z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M14 21h-4v-2h4zm12 0H16v-2h10zm-12-4h-4v-2h4zm12 0H16v-2h10zm-16-4H6v-2h4zm16 0H12v-2h14z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m17.768 16-8.706 8.708-1.416-1.416L14.94 16 7.646 8.708l1.416-1.416zm6.586 8h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='m17.621 11-2 2h12.586v6H15.621l2 2-4.414 4.414L3.793 16l9.414-9.414zm-11 5 6.586 6.586L14.793 21l-4-4h15.414v-2H10.793l4-4-1.586-1.586z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M17.138 13.418a1.03 1.03 0 0 0-.298.658s.125.096.226.178c1.372 1.114 2.033 3.039 1.582 4.796a4.7 4.7 0 0 1-1.205 2.123c-1.145 1.151-2.296 2.294-3.445 3.441-1.241 1.232-3.185 1.691-4.864 1.105-1.546-.54-2.756-1.938-3.048-3.572-.267-1.496.246-3.108 1.319-4.186l.578-.578-.03-.092a10.5 10.5 0 0 1-.452-2.3v-.005c-.776.775-1.621 1.489-2.275 2.396-1.817 2.522-1.643 6.323.706 8.669 1.813 1.811 4.708 2.462 7.171 1.517a6.75 6.75 0 0 0 2.336-1.518l3.427-3.424c1.939-1.954 2.533-5.126 1.294-7.674a6.8 6.8 0 0 0-2.071-2.481l-.003-.002zM21.265 4a6.8 6.8 0 0 0-4.734 1.964l-3.427 3.424c-1.961 1.977-2.52 5.092-1.32 7.619a6.8 6.8 0 0 0 2.098 2.537l.003.002c.32-.32.643-.637.96-.96.167-.172.27-.401.286-.64l-.204-.167c-1.603-1.287-2.215-3.68-1.316-5.616a4.7 4.7 0 0 1 .918-1.32c1.145-1.151 2.296-2.294 3.445-3.441 1.239-1.23 3.178-1.694 4.864-1.105 1.83.639 3.16 2.498 3.12 4.493a4.8 4.8 0 0 1-1.391 3.265l-.578.578.03.092c.235.743.387 1.519.452 2.3v.005c.732-.731 1.521-1.406 2.162-2.244 1.192-1.559 1.643-3.651 1.204-5.575a6.8 6.8 0 0 0-3.98-4.703 6.8 6.8 0 0 0-2.529-.506h-.061z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='m7.54 17.4.1 6.98 6.96.1-2.24-2.24L16 18.6 13.4 16l-3.64 3.64zm16.92-2.8-.1-6.98-6.96-.1 2.24 2.24L16 13.4l2.6 2.6 3.64-3.64z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M26 23H6v-2h20zm0-6H6v-2h20zm0-6H6V9h20z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath fill='%23000' d='M16 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='m14.8 24.26-.1-6.96-6.96-.1 2.24 2.24-3.64 3.64 2.6 2.6 3.64-3.64zm2.4-16.52.1 6.96 6.96.1-2.24-2.24 3.64-3.64-2.6-2.6-3.64 3.64z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142m-1.414 6.07h16.97v2.002H7.515z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='m10.044 21.258 4.478-4.198L16 18.444 9 25l-7-6.556 1.478-1.384 4.478 4.198V7h2.088zm14 3.742h-2.088V10.742l-4.478 4.198L16 13.556 23 7q3.5 3.28 7 6.556l-1.478 1.384-4.478-4.198z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16.186 3.646c8.188.154 14.898 9.796 11.17 17.78-3.298 7.066-13.932 9.374-19.848 3.87-3.9-3.632-5.076-9.896-2.684-14.708 2.082-4.19 6.588-6.974 11.362-6.942m-.298 1.998c-6.922.132-12.578 8.308-9.33 15.052 3.342 6.934 15.246 7.646 18.932 0 3.076-6.386-1.988-15.1-9.602-15.052m7.596 6.422c2.864 5.33-1.744 13.186-8.306 12.536a8.6 8.6 0 0 1-3.232-.998l-1.266-.706L22.778 10.8q.351.633.706 1.266m-9.422 10.276c3.296 1.028 7.246-1.006 8.216-4.418a6.6 6.6 0 0 0-.056-3.742zm2.104-14.696a8.8 8.8 0 0 1 3.936 1.038l1.266.706L9.27 21.488c-3.018-5.41-.99-13.37 6.318-13.834q.289-.01.578-.008m-.31 2c-4.06.154-7.23 4.614-6.03 8.46l8.16-8.16a6.8 6.8 0 0 0-2.13-.3'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M20 6.5c0-1-1-3-4-3s-4 2-4 3H8c-2.21 0-4 1.79-4 4v14c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-14c0-2.21-1.79-4-4-4zm-4 .546c.734 0 1.334.572 1.334 1.272S16.734 9.59 16 9.59s-1.334-.572-1.334-1.272.6-1.272 1.334-1.272M24 26.5H8a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h2v4h12v-4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008c-1.358-.022-2.714-.026-4.07-.022v4.034h4.07z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142M15 15l-.001-7.485h2.002L17 15l7.485-.001v2.002L17 17l.001 7.485h-2.002L15 17l-7.485.001v-2.002z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m28.207 16-9.414 9.414L14.379 21l2-2H3.793v-6h12.586l-2-2 4.414-4.414zm-11-5 4 4H5.793v2h15.414l-4 4 1.586 1.586L25.379 16l-6.586-6.586z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='m24.708 19.645-1.416 1.416L16 13.767l-7.292 7.294-1.416-1.416L16 10.939z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='M24.708 10.855 13 22.561l-5.708-5.706 1.416-1.416L13 19.733 23.292 9.439z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6 15h20v2H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M5.35 3.999a.2.2 0 0 0-.14.058c-.388.38-.768.768-1.152 1.152a.21.21 0 0 0-.002.288c7.459 7.506 14.965 14.965 22.447 22.447a.21.21 0 0 0 .288.002q.576-.574 1.151-1.151a.21.21 0 0 0 .002-.288C20.484 19.002 12.979 11.542 5.497 4.06a.2.2 0 0 0-.146-.061zm.611 12.548c-1.933 1.939-2.538 5.119-1.289 7.688a6.79 6.79 0 0 0 4.891 3.672 6.82 6.82 0 0 0 5.893-1.866l1.984-1.984-1.438-1.438-1.986 1.986c-1.486 1.476-3.993 1.81-5.834.629a4.73 4.73 0 0 1-2.024-2.853 4.76 4.76 0 0 1 1.241-4.393l1.986-1.986-1.438-1.438-1.984 1.984zM21.273 3.999a6.78 6.78 0 0 0-4.727 1.963l-1.984 1.984L16 9.384l1.985-1.985a4.74 4.74 0 0 1 2.776-1.338c1.974-.224 4.045.926 4.845 2.834.712 1.699.329 3.778-1.004 5.12L22.616 16l1.439 1.438q1-1 2-2c2.012-2.031 2.557-5.368 1.112-7.982-1.144-2.07-3.432-3.441-5.834-3.459h-.061z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M23.182 5a3.82 3.82 0 0 1 2.83 6.383l-.131.137-2.09 2.088a1 1 0 0 1-.084.099 1 1 0 0 1-.098.084L12.533 24.869a3 3 0 0 1-1.245.746l-4.353 1.32-.003.002a1.5 1.5 0 0 1-1.87-1.867l.003-.004 1.32-4.352v-.003l.06-.174c.13-.344.321-.661.565-.936l.126-.135L18.209 8.39a1 1 0 0 1 .18-.181l2.092-2.09.137-.132A3.82 3.82 0 0 1 23.182 5M8.548 20.883a1 1 0 0 0-.25.415l-1.049 3.451 3.457-1.048.114-.042q.17-.076.301-.206l10.458-10.46-2.572-2.572zM23.182 7c-.482 0-.946.19-1.287.531v.001l-1.474 1.475 2.572 2.572 1.474-1.474.121-.133A1.82 1.82 0 0 0 23.182 7'/%3E%3C/svg%3E")}`,Uh=N({feature:"iconSet",css:IS}),kS=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24 6H8v2l8 8-8 8v2h16v-2H11l8-8-8-8h13z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 11.171 2.687 16l4.828 4.829-1.414 1.414L-.142 16l6.243-6.243zm16.97 0 1.414-1.414L32.142 16l-6.243 6.243-1.414-1.414L29.313 16zM16.028 13.2l2.829 2.828-2.829 2.829-2.828-2.829zm-4.857 11.285L16 29.313l4.829-4.828 1.414 1.414L16 32.142l-6.243-6.243zm0-16.97L9.757 6.101 16-.142l6.243 6.243-1.414 1.414L16 2.687z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667A13.32 13.32 0 0 0 2.667 16c0 7.373 5.96 13.333 13.333 13.333S29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M14 7h4v18h-4zM8 17h4v8H8zM20 13h4v12h-4z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26 25H6V7h20zM12 11H8v12h4zm6 0h-4v12h4zm6 12V11h-4v12z' style='fill-rule:nonzero' transform='translate(0 -1)'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m12 6 10 10-10 10-2-2 8-8-8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.984 13.894 27.05 2.828l2.122 2.122-11.066 11.066 11.066 11.066-2.122 2.12-11.066-11.066L4.918 29.202l-2.12-2.12 11.066-11.066L2.798 4.95l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M13.775 15.198 3.835 2.945a1.501 1.501 0 0 1 2.33-1.89l14.997 18.488A6.003 6.003 0 0 1 29.657 25c0 3.311-2.688 6-6 6s-6-2.689-6-6c0-1.335.437-2.569 1.176-3.566l-3.127-3.855-3.001 3.7A5.97 5.97 0 0 1 14 25c0 3.311-2.689 6-6 6s-6-2.689-6-6a6.003 6.003 0 0 1 8.315-5.536zm9.882 6.702a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M8 21.95a3.05 3.05 0 1 0 .001 6.101A3.05 3.05 0 0 0 8 21.95m9.63-11.505 1.932 2.381 8.015-9.881a1.5 1.5 0 0 0-2.329-1.89z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 26 10 16 20 6l2 2-8 8 8 8z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath fill='%23000' fill-rule='nonzero' d='M8.95 10.364 7 8.414 8.414 7l2.32 2.32A13.2 13.2 0 0 1 16.5 8c5.608 0 10.542 3.515 12.381 8.667L29 17l-.119.333a13 13 0 0 1-4.255 5.879l1.466 1.466-1.414 1.414-1.754-1.753A13.2 13.2 0 0 1 16.5 26c-5.608 0-10.542-3.515-12.381-8.667L4 17l.119-.333a13 13 0 0 1 4.83-6.303m1.445 1.445A11.02 11.02 0 0 0 6.148 17c1.646 4.177 5.728 7 10.352 7 1.76 0 3.441-.409 4.94-1.146l-1.878-1.878A5.06 5.06 0 0 1 16.5 22c-2.789 0-5.05-2.239-5.05-5 0-1.158.398-2.223 1.065-3.07zm1.855-.974 1.794 1.795A5.07 5.07 0 0 1 16.5 12c2.789 0 5.05 2.239 5.05 5 0 .9-.24 1.745-.661 2.474l2.305 2.306A11 11 0 0 0 26.852 17c-1.646-4.177-5.728-7-10.352-7-1.495 0-2.933.295-4.25.835'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16.5 23c4.624 0 8.706-2.823 10.352-7-1.646-4.177-5.728-7-10.352-7s-8.706 2.823-10.352 7c1.646 4.177 5.728 7 10.352 7M4.119 15.667C5.958 10.515 10.892 7 16.5 7s10.542 3.515 12.381 8.667L29 16l-.119.333C27.042 21.485 22.108 25 16.5 25S5.958 21.485 4.119 16.333L4 16zM16.5 21c2.789 0 5.049-2.239 5.049-5s-2.26-5-5.049-5-5.049 2.239-5.049 5 2.26 5 5.049 5' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m28 8-8 8v5l-6 6V16L6 8V6h22zM9 8l7 7v7l2-2v-5l7-7z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 7v1H9V7zm0-3v1H5.001V4zm-7 7H5v-1h2zm0-3H5V7h2zM3 5H1V4h2zm11 5v1H9v-1zm-7 4H5v-1h2zm7-1v1H9v-1z' style='fill-rule:nonzero' transform='matrix(2 0 0 2 0 -2)'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333a6.67 6.67 0 0 0-6.667 6.667 6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133 4.136 4.136 0 0 1-4.133 4.133h-5.333v2.533h5.333a6.67 6.67 0 0 0 6.667-6.667 6.67 6.67 0 0 0-6.667-6.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z' style='fill-rule:nonzero' transform='translate(-3.692 -3.692)scale(1.23077)'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 30H2V18h2.828v7.05l8.254-8.252 2.12 2.12-8.252 8.254H14zm4-28h12v12h-2.828V6.95l-8.254 8.252-2.12-2.12 8.252-8.254H18z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 13H0v-2h20zm0-6H0V5h20zm0-6H0v-2h20z' style='fill-rule:nonzero' transform='translate(6 9)'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 27a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M2 18h12v12h-2.828v-7.05l-8.254 8.252-2.12-2.12 8.252-8.254H2zm28-4H18V2h2.828v7.05L29.082.798l2.12 2.12-8.252 8.254H30z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.94 6 9.06 7.88 17.167 16 9.06 24.12 10.94 26l10-10z' style='fill-rule:nonzero' transform='translate(1)'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M23.708 14.645 16 6.939l-7.708 7.706 1.416 1.416L16 9.767l6.292 6.294zM23.708 20.355 16 28.061l-7.708-7.706 1.416-1.416L16 25.233l6.292-6.294z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.334 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4M16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008a213 213 0 0 0-4.07-.022v4.034h4.07z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.94 7.88 20.06 6l-10 10 10 10 1.88-1.88L13.833 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.708 2.355 8 10.061.292 2.355 1.708.939 8 7.233 14.292.939z' style='fill-rule:nonzero' transform='translate(8 14)'/%3E%3Cpath d='M5 26h22v2H5zM15 4h2v18h-2z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 10.667 16 21.334l8.667-10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.333 7.334 10.666 16l10.667 8.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.667 24.666 21.334 16 10.667 7.333z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 21.333 16 10.666l8.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M11.586 22.96 27.718 6.828 29.84 8.95 11.586 27.202 2.4 18.016l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m11.94 6-1.88 1.88L18.167 16l-8.107 8.12L11.94 26l10-10z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6 13.5h20v3H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.12 9.06 16 17.167 7.88 9.06 6 10.94l10 10 10-10z' style='fill-rule:nonzero' transform='translate(0 1)'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M6.222 25.778h1.611l14.834-14.811-1.611-1.611-14.834 14.81zM4 28v-4.733L22.644 4.656a2.26 2.26 0 0 1 1.567-.634q.423 0 .833.167.412.166.734.478l1.589 1.6q.333.322.483.733t.15.822q0 .423-.161.839-.162.416-.472.728L8.733 28zm17.856-17.833-.8-.811 1.61 1.61z'/%3E%3C/svg%3E")}`,qh=N({feature:"iconSet",css:kS}),LS=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M24 5.333H8V8l8.667 8L8 24v2.667h16v-4h-9.333L21.334 16l-6.667-6.667H24z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='M13.333 11.556h5.333V8h3.556L16 1.778 9.778 8h3.556zm-1.777 1.777H8V9.777l-6.222 6.222L8 22.221v-3.556h3.556zM30.222 16 24 9.778v3.556h-3.556v5.333H24v3.556l6.222-6.222zm-11.555 4.444h-5.333V24H9.778L16 30.222 22.222 24h-3.556z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 2.667C8.627 2.667 2.667 8.627 2.667 16S8.627 29.333 16 29.333 29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M5.333 10.667h5.333V5.334H5.333zm8 16h5.333v-5.333h-5.333zm-8 0h5.333v-5.333H5.333zm0-8h5.333v-5.333H5.333zm8 0h5.333v-5.333h-5.333zm8-13.334v5.333h5.333V5.333zm-8 5.334h5.333V5.334h-5.333zm8 8h5.333v-5.333h-5.333zm0 8h5.333v-5.333h-5.333z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m25.333 8.547-1.88-1.88L16 14.12 8.547 6.667l-1.88 1.88L14.12 16l-7.453 7.453 1.88 1.88L16 17.88l7.453 7.453 1.88-1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m19 3-6 6 2 2 7-7V3m-10 9.5a.503.503 0 0 1-.5-.5c0-.274.226-.5.5-.5s.5.226.5.5-.226.5-.5.5M6 20c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2M6 8c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2m3.64-.36c.23-.5.36-1.05.36-1.64 0-2.194-1.806-4-4-4S2 3.806 2 6s1.806 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.194 0-4 1.806-4 4s1.806 4 4 4 4-1.806 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1z' style='fill-rule:nonzero' transform='translate(4 4)'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M21.106 15.088A5.19 5.19 0 0 0 16 10.814a5.17 5.17 0 0 0-3.668 1.522L9.866 9.868a12.2 12.2 0 0 1 6.133-1.646c5.186 0 9.614 3.225 11.408 7.778a12.34 12.34 0 0 1-5.276 6.133l-2.468-2.466a5.17 5.17 0 0 0 1.449-2.802h-2.123c-.148.508-.42.964-.782 1.33l-1.33-1.33h-2.514l2.196 2.196q-.272.049-.56.05a3.11 3.11 0 0 1-2.99-2.245h-2.123a5.19 5.19 0 0 0 7.3 3.836l2.247 2.247a12.2 12.2 0 0 1-4.434.828c-5.186 0-9.614-3.225-11.408-7.778a12.3 12.3 0 0 1 3.781-5.111l2.924 2.924a5.1 5.1 0 0 0-.404 1.275h4.206l-1.296-1.296a3.1 3.1 0 0 1 2.196-.903c1.404 0 2.587.924 2.976 2.199h2.13z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16 8.222c-5.186 0-9.614 3.225-11.408 7.778 1.794 4.553 6.222 7.778 11.408 7.778S25.614 20.553 27.408 16C25.614 11.447 21.186 8.222 16 8.222m0 12.964c-2.862 0-5.186-2.324-5.186-5.186s2.324-5.186 5.186-5.186 5.186 2.324 5.186 5.186-2.324 5.186-5.186 5.186m0-8.297c-1.721 0-3.111 1.39-3.111 3.111s1.39 3.111 3.111 3.111 3.111-1.39 3.111-3.111-1.39-3.111-3.111-3.111'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M13.333 24h5.333v-2.667h-5.333zM4 8v2.667h24V8zm4 9.333h16v-2.667H8z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M18.667 21.333h8.889A3.555 3.555 0 0 1 24 24.889h-5.333zm8.888-7.111v3.556h-8.889v-3.556zM24 7.111a3.555 3.555 0 0 1 3.556 3.556h-16V7.111zm-8.889 17.778h-3.556v-3.556h3.556zm0-7.111h-3.556v-3.556h3.556zM8 10.667H4.444A3.555 3.555 0 0 1 8 7.111z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227v-2.667z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333c-3.68 0-6.667 2.987-6.667 6.667s2.987 6.667 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333c2.28 0 4.133 1.853 4.133 4.133s-1.853 4.133-4.133 4.133h-5.333v2.533h5.333c3.68 0 6.667-2.987 6.667-6.667s-2.987-6.667-6.667-6.667z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='m17.778 11.708 3.25-3.251 2.516 2.516-3.251 3.25h4.597v3.556h-4.597l3.251 3.25-2.516 2.516-3.25-3.251v4.597h-3.556v-4.597l-3.25 3.251-2.516-2.516 3.251-3.25H7.11v-3.556h4.597l-3.251-3.25 2.516-2.516 3.25 3.251V7.111h3.556zm-3.251 7.847h2.944l2.084-2.084v-2.944l-2.084-2.084h-2.944l-2.084 2.084v2.944z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='M4 4h24v2.667H4z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M4 24h24v-2.667H4zm0-6.667h24v-2.667H4zM4 8v2.667h24V8z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 26.667a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 24q0-1.1.784-1.883A2.57 2.57 0 0 1 16 21.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 16q0-1.1.784-1.883A2.57 2.57 0 0 1 16 13.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 8q0-1.1.784-1.883A2.57 2.57 0 0 1 16 5.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='M8 25.333h16V28H8z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='M4 24h16v-2.667H4zM4 8v2.667h24V8zm0 9.333h24v-2.667H4z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M25.333 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4zM16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m11.106 22.093-4.444 4.444-1.259-1.259 4.444-4.444zm5.872-16.63 9.618 9.62-.962.962-.962-.962-7.694 3.847 1.924 1.924-2.74 2.74-7.696-7.696 2.741-2.74 1.924 1.925 3.847-7.696-.962-.962z'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M26.667 30.223H5.334a3.556 3.556 0 0 1-3.556-3.556V5.334a3.556 3.556 0 0 1 3.556-3.556h21.333a3.556 3.556 0 0 1 3.556 3.556v21.333a3.556 3.556 0 0 1-3.556 3.556m-16-8.89H5.334v5.333h5.333zm16-7.11H12.444v12.444h14.223zm-9.15 6.85-2.039 2.037 2.039 2.039-1.257 1.257-3.295-3.296 3.295-3.295q.63.628 1.257 1.257zm-6.85-6.85H5.334v5.333h5.333zm15.74 3.816-1.257 1.256-2.039-2.037-2.037 2.037-1.257-1.256 3.295-3.296zM10.667 5.333H5.334v5.333h5.333zm8.889 0h-7.112v5.333h7.112zm7.111 0h-5.333v5.333h5.333z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M9.333 12.667 16 19.334l6.667-6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M19.333 9.333 12.666 16l6.667 6.667V9.334z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='M12.667 22.667 19.334 16l-6.667-6.667v13.333z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='M9.333 19.333 16 12.666l6.667 6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='m11.727 21.167-5.56-5.56-1.893 1.88 7.453 7.453 16-16-1.88-1.88z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6.667 14.667h18.667v2.667H6.667z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M22.12 11.06 16 17.167 9.88 11.06 8 12.94l8 8 8-8z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M26.667 12H5.334v2.667h21.333zM5.333 20h21.333v-2.667H5.333z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11'/%3E%3Cpath fill='currentColor' d='M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28zM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972z'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22M3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' d='M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22M12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M18.666 24h-5.333v-2.667h5.333zM24 17.333H8v-2.667h16zm3.59-9.344h3.221v2.657h-3.22v3.22h-2.656v-3.22h-3.221V7.989h3.22V4.77h2.657zm-8.582 2.678H4V8h15.008z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M6.222 25.778h1.611l14.834-14.811-1.611-1.611-14.834 14.81zM4 28v-4.733L22.644 4.656a2.26 2.26 0 0 1 1.567-.634q.423 0 .833.167.412.166.734.478l1.589 1.6q.333.322.483.733t.15.822q0 .423-.161.839-.162.416-.472.728L8.733 28zm17.856-17.833-.8-.811 1.61 1.61z'/%3E%3C/svg%3E")}`,$h=N({feature:"iconSet",css:LS}),BS=e=>{const t=[];if(e.type==="image"){const{icons:i,mask:o}=e;for(const s of Object.keys(i)){const n=yl(i[s]);o?t.push(`.ag-icon-${s}::before { mask-image: ${n}; }`):t.push(`.ag-icon-${s}::before { background-image: ${n}; ${Kh} }`)}}if(e.type==="font"){const{family:i,weight:o,color:s,icons:n}=e;let r=Kh;i&&(r+=` font-family: ${Sl(i)};`),o&&(r+=` font-weight: ${Th(o)};`),s&&(r+=` color: ${Qs(s)};`);for(const l of Object.keys(n))t.push(`.ag-icon-${l}::before { content: ${JSON.stringify(n[l])}; ${r} }`)}return N({css:t.join(`; `),cssImports:e.cssImports})},Kh="background-color: unset; mask-image: unset; -webkit-mask-image: unset;",jh={aggregation:'',arrows:'',asc:'',cancel:'',chart:'',"color-picker":'',columns:'',contracted:'',copy:'',cross:'',csv:'',cut:'',desc:'',down:'',excel:'',expanded:'',eye:'',"eye-slash":'',filter:'',first:'',grip:'',group:'',last:'',left:'',linked:'',loading:'',maximize:'',menu:'',"menu-alt":'',minimize:'',minus:'',next:'',none:'',"not-allowed":'',paste:'',pin:'',pivot:'',plus:'',previous:'',right:'',save:'',settings:'',"small-left":'',"small-right":'',tick:'',"tree-closed":'',"tree-indeterminate":'',"tree-open":'',unlinked:'',up:''},Yh={aasc:'',adesc:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"column-arrow":'',edit:'',"filter-add":'',"pinned-bottom":'',"pinned-top":'',"small-down":'',"small-up":'',"un-pin":''},HS=(e={})=>{let t="";for(const i of[...Object.keys(jh),...Object.keys(Yh)]){const o=OS(i,e.strokeWidth);t+=`.ag-icon-${i}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(o)}'); } `}return t},OS=(e,t=1.5)=>{const i=Yh[e];if(i)return i;const o=jh[e];if(!o)throw new Error(`Missing icon data for ${e}`);return``+o+""},en=(e={})=>N({feature:"iconSet",css:()=>HS(e)}),GS=en({strokeWidth:1}),Qh=en(),VS=en({strokeWidth:2}),Pl=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}&:where(.ag-ltr,.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding:0 var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper),:where(.ag-filter-add-select),:where(.ag-filter-filter),:where(.ag-filter-toolpanel-search),:where(.ag-floating-filter-search-icon),:where(.ag-mini-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper),:where(.ag-ltr) :where(.ag-filter-add-select),:where(.ag-ltr) :where(.ag-filter-filter),:where(.ag-ltr) :where(.ag-filter-toolpanel-search),:where(.ag-ltr) :where(.ag-floating-filter-search-icon),:where(.ag-ltr) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper),:where(.ag-rtl) :where(.ag-filter-add-select),:where(.ag-rtl) :where(.ag-filter-filter),:where(.ag-rtl) :where(.ag-filter-toolpanel-search),:where(.ag-rtl) :where(.ag-floating-filter-search-icon),:where(.ag-rtl) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',NS=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}",zS=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){border-left:none;border-right:none;border-top:none}",Dl={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},WS=()=>N({feature:"inputStyle",params:Dl,css:Pl}),_S=WS(),US=()=>N({feature:"inputStyle",params:{...Dl,inputBackgroundColor:Z,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:X},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Q(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>Pl+NS}),tn=US(),qS=()=>N({feature:"inputStyle",params:{...Dl,inputBackgroundColor:"transparent",inputBorder:{width:2,color:ie(.3)},inputPaddingStart:{ref:"spacing"},inputFocusBorder:"solid 2px var(--ag-accent-color)",inputDisabledTextColor:{ref:"textColor",mix:.5},inputDisabledBorder:"solid 1px var(--ag-border-color)",inputInvalidBorder:{width:2,color:{ref:"invalidColor",mix:.3}}},css:()=>Pl+zS}),Zh=qS(),Oo='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative}.ag-tab:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}.ag-tab.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}.ag-tab:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}.ag-tab.ag-tab-selected:after{opacity:1}',$S=".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}",Go={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},KS=()=>N({feature:"tabStyle",params:Go,css:Oo}),jS=KS(),YS=()=>N({feature:"tabStyle",params:{...Go,tabBarBorder:!0,tabBarBackgroundColor:ie(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:Z},css:Oo}),Xh=YS(),QS=()=>N({feature:"tabStyle",params:{...Go,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabSelectedUnderlineColor:{ref:"primaryColor"},tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:0},css:Oo}),Jh=QS(),ZS=()=>N({feature:"tabStyle",params:{...Go,tabBarBorder:!0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabHoverTextColor:X,tabSelectedTextColor:X,tabSelectedUnderlineColor:X,tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0.3s"},css:Oo}),eg=ZS(),XS=()=>N({feature:"tabStyle",params:{...Go,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabBarHorizontalPadding:{ref:"spacing"},tabBarTopPadding:{ref:"spacing"},tabBarBorder:!0,tabHorizontalPadding:{calc:"spacing * 2"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:{ref:"spacing"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:Z},css:()=>Oo+$S}),tg=XS(),JS=".ag-dnd-ghost,.ag-filter-toolpanel-header,.ag-filter-toolpanel-search,.ag-multi-filter-group-title-bar,.ag-panel-title-bar-title,.ag-status-bar{color:var(--ag-header-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600}.ag-column-drop-horizontal{background-color:color-mix(in srgb,var(--ag-background-color),var(--ag-foreground-color) 8%)}.ag-cell.ag-cell-inline-editing{background-color:var(--ag-background-color);background-image:linear-gradient(0deg,var(--ag-input-background-color),var(--ag-input-background-color));border:var(--ag-input-border)!important;border-width:1px!important;height:calc(var(--ag-row-height) + var(--ag-spacing)*3);padding:var(--ag-spacing);:where(.ag-row-last:not(.ag-row-first)) &{bottom:0}:where(.ag-has-focus) &{border:var(--ag-input-focus-border)!important;border-width:1px!important}}.ag-advanced-filter-builder-button,.ag-standard-button{text-transform:uppercase}.ag-status-bar{border:solid var(--ag-border-width) var(--ag-border-color)}.ag-list-item-hovered:after{background-color:var(--ag-primary-color)}.ag-pill-button:hover{color:var(--ag-primary-color)}.ag-filter-add-button,.ag-filter-add-button:hover{border-bottom:2px solid var(--ag-primary-color)}",ig=()=>({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),ey=()=>Lo().withPart(Bo).withPart(Ho).withPart(Qh).withPart(Xh).withPart(tn).withPart(Js).withParams(ig()),og=ey(),sg=()=>({accentColor:"#2196f3",selectedRowBackgroundColor:Te(.3),inputFocusBorder:{color:Te(.4)},focusShadow:{radius:2,spread:1.6,color:Te(.4)},iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",checkboxUncheckedBorderColor:Q(.45),checkboxIndeterminateBackgroundColor:Q(.45),checkboxIndeterminateBorderColor:Q(.45),checkboxBorderWidth:2,checkboxBorderRadius:2,fontSize:13,dataFontSize:14,headerFontWeight:700,borderRadius:3,wrapperBorderRadius:3,tabSelectedUnderlineColor:X,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sideButtonSelectedUnderlineColor:X,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,sideButtonSelectedBorder:!1,sideButtonBarTopPadding:{calc:"spacing * 3"},sideButtonSelectedBackgroundColor:"transparent",sideButtonHoverTextColor:X,iconButtonHoverColor:X,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:Q(.45),colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}),ty=()=>Lo().withPart(zh).withPart(Bo).withPart(Ho).withPart(qh).withPart(eg).withPart(tn).withPart(Js).withParams(sg()),iy=ty(),ng=()=>({accentColor:"#0091ea",borderColor:ie(.2),spacing:4,widgetVerticalSpacing:{calc:"max(8px, spacing)"},borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},checkboxBorderRadius:2,checkboxBorderWidth:1,checkboxUncheckedBackgroundColor:Z,checkboxUncheckedBorderColor:Q(.5),checkboxCheckedBackgroundColor:Z,checkboxCheckedBorderColor:X,checkboxCheckedShapeColor:X,checkboxIndeterminateBackgroundColor:Z,checkboxIndeterminateBorderColor:Q(.5),checkboxIndeterminateShapeColor:Q(.5),focusShadow:{radius:2,spread:1,color:X},headerTextColor:ie(.6),iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",fontSize:12,tabSelectedBackgroundColor:Z,headerFontWeight:"bold",toggleButtonWidth:32,toggleButtonHeight:16,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:Q(.5),sideButtonBorder:!0,sideButtonBarTopPadding:{calc:"spacing * 4"},popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)",statusBarLabelColor:ie(.54),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,panelTitleBarIconColor:Fe,colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}),oy=()=>Lo().withPart(Wh).withPart(Bo).withPart(Ho).withPart(Uh).withPart(tg).withPart(tn).withPart(Fl).withParams(ng()),sy=oy(),ny=()=>{const e={tabSelectedUnderlineColor:{ref:"primaryColor"},sideButtonSelectedUnderlineColor:{ref:"primaryColor"},buttonTextColor:{ref:"primaryColor"},rangeSelectionBackgroundColor:{ref:"primaryColor",mix:.2},rangeSelectionBorderColor:{ref:"primaryColor"},rangeSelectionHighlightColor:{ref:"primaryColor",mix:.5},rangeHeaderHighlightColor:{ref:"foregroundColor",mix:.08},rowNumbersSelectedColor:{ref:"primaryColor",mix:.5},inputFocusBorder:{width:2,color:{ref:"primaryColor"}},pickerButtonFocusBorder:{width:1,color:{ref:"primaryColor"}},cellEditingBorder:{color:{ref:"primaryColor"}},menuBackgroundColor:{ref:"backgroundColor"},sideButtonBarBackgroundColor:Z,sideButtonSelectedBackgroundColor:"transparent",sideButtonBarTopPadding:{calc:"spacing * 4"},headerColumnResizeHandleColor:"none",headerBackgroundColor:{ref:"backgroundColor"},rowHoverColor:ie(.08),columnHoverColor:ie(.08),headerCellHoverBackgroundColor:ie(.05),statusBarLabelColor:ie(.63),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,valueChangeValueHighlightBackgroundColor:"#00acc1",panelTitleBarIconColor:Fe,advancedFilterBuilderButtonBarBorder:!1,filterPanelApplyButtonColor:{ref:"buttonTextColor"},filterPanelApplyButtonBackgroundColor:{ref:"buttonBackgroundColor"},columnPanelApplyButtonColor:{ref:"buttonTextColor"},columnPanelApplyButtonBackgroundColor:{ref:"buttonBackgroundColor"},colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2,rowDragIndicatorColor:{ref:"primaryColor"},columnDragIndicatorColor:{ref:"primaryColor"}},t={...e,primaryColor:"#3f51b5",foregroundColor:"#000D",headerTextColor:"#0008",accentColor:"#ff4081",checkboxUncheckedBorderColor:Fe,checkboxIndeterminateBackgroundColor:Fe,toggleButtonOffBackgroundColor:Fe,selectedRowBackgroundColor:"rgba(33, 150, 243, 0.3)"},i={...e,primaryColor:"#3f51b5",foregroundColor:"#fffD",headerTextColor:"#fff8",accentColor:"#bb86fc",checkboxUncheckedBorderColor:Q(.5),checkboxIndeterminateBackgroundColor:Q(.5),toggleButtonOffBackgroundColor:Q(.5),selectedRowBackgroundColor:"#bb86fc33"};return N({feature:"styleMaterial",css:JS,params:t,modeParams:{light:t,dark:i,"dark-blue":i}})},rg=ny(),lg=()=>({rowHeight:{calc:"max(iconSize, cellFontSize) + spacing * 3.75 * rowVerticalPaddingScale"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4.75 * headerVerticalPaddingScale"},widgetVerticalSpacing:{calc:"spacing * 1.75"},cellHorizontalPadding:{calc:"spacing * 3"},buttonHorizontalPadding:{ref:"spacing"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 2"},fontSize:13,iconSize:18,borderRadius:0,wrapperBorderRadius:0,wrapperBorder:!1,menuBorder:!1,dialogBorder:!1,panelTitleBarBorder:!1,tabSelectedBorderWidth:0,tabSelectedUnderlineTransitionDuration:.3,sidePanelBorder:!1,sideButtonSelectedBorder:!1,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineTransitionDuration:.3,sideButtonBorder:!1,buttonBorder:!1,buttonDisabledBorder:!1,focusShadow:{spread:4,color:ie(.16)},fontFamily:[{googleFont:"Roboto"},"-apple-system","BlinkMacSystemFont","Segoe UI","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],inputHeight:{calc:"max(iconSize, fontSize) + spacing * 3"},pickerButtonBorder:{width:1,color:"transparent"},headerFontWeight:600,headerFontSize:{calc:"fontSize - 1px"},checkboxBorderWidth:2,checkboxBorderRadius:2,toggleButtonWidth:34,toggleButtonSwitchInset:1,cardShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)",popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)"}),ry=()=>Lo().withPart(Vh).withPart(Bo).withPart(Ho).withPart($h).withPart(Jh).withPart(Zh).withPart(Fl).withPart(rg).withParams(lg()),ly=ry(),Ot=(e,t,i,o,s)=>({changeKey:e,type:t,defaultValue:i,noWarn:o,cacheDefault:s}),ay=Ot("cellHorizontalPadding","length",16),dy=Ot("indentationLevel","length",0,!0,!0),cy=Ot("rowGroupIndentSize","length",0),ag=Ot("rowHeight","length",42),dg=Ot("headerHeight","length",48),Ml=Ot("rowBorderWidth","border",1),cg=Ot("pinnedRowBorderWidth","border",1),uy=Ot("headerRowBorderWidth","border",1);function ug(e,t){for(const i of t.sort((o,s)=>o.moduleName.localeCompare(s.moduleName))){const o=i.css;o&&e.set(`module-${i.moduleName}`,o)}}var hy=class extends Hh{initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(ag),this.getSizeEl(dg),this.getSizeEl(Ml),this.getSizeEl(cg),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(cg)}getRowBorderWidth(){return this.getCSSVariablePixelValue(Ml)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(uy)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(ag)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(dg)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(ay)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(dy),i=this.getCSSVariablePixelValue(cy);return e-1+i*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){const{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),i=this.gos.get("rowHeight");if(i==null||isNaN(i)||!isFinite(i))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const o=`${i}px`;return t!=o?(e.style.setProperty("--ag-line-height",o),i):t!=""?Number.parseFloat(t):-1}fireStylesChangedEvent(e){e==="rowBorderWidth"&&this.refreshRowBorderWidthVariable(),super.fireStylesChangedEvent(e)}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(Ml);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&z(t?106:239)}getAdditionalCss(){const e=new Map;return e.set("core",[eS]),ug(e,Array.from(eC())),e}getDefaultTheme(){return og}varError(e,t){F(9,{variable:{cssName:e,defaultValue:t}})}themeError(e){z(240,{theme:e})}shadowRootError(){z(293)}},hg=class extends he{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new bt}addListener(e,t,i){this.globalSvc.addEventListener(e,t,i)}removeListener(e,t,i){this.globalSvc.removeEventListener(e,t,i)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},gy=class extends hg{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function Tl(e,t,i){const o=e.visibleCols.headerGroupRowCount;if(i>=o)return{column:t,headerRowIndex:i};let s=t.getParent();for(;s&&s.getProvidedColumnGroup().getLevel()>i;)s=s.getParent();const n=t.isSpanHeaderHeight();return!s||n&&s.isPadding()?{column:t,headerRowIndex:o}:{column:s,headerRowIndex:s.getProvidedColumnGroup().getLevel()}}var py=class extends S{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,i=>{this.gridBodyCon=i.gridBodyCtrl});const t=oe(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let i;const{colModel:o,colGroupSvc:s,ctrlsSvc:n}=this.beans;if(typeof e=="string"?(i=o.getCol(e),i||(i=s?.getColumnGroup(e)??null)):i=e,!i)return null;const l=n.getHeaderRowContainerCtrl()?.getAllCtrls(),a=q(l||[]).type==="filter",d=Be(this.beans)-1;let c=-1,u=i;for(;u;)c++,u=u.getParent();let h=c;return t&&a&&h===d-1&&h++,h===-1?null:{headerRowIndex:h,column:i}}navigateVertically(e,t){const{focusSvc:i,visibleCols:o}=this.beans,{focusedHeader:s}=i;if(!s)return!1;const{headerRowIndex:n}=s,r=s.column,l=Be(this.beans),a=this.getHeaderRowType(n),d=o.headerGroupRowCount;let{headerRowIndex:c,column:u,headerRowIndexWithoutSpan:h}=e==="UP"?fy(a,r,n):my(r,n,d),g=!1;return c<0&&(c=0,u=r,g=!0),c>=l?(c=-1,this.currentHeaderRowWithoutSpan=-1):h!==void 0&&(this.currentHeaderRowWithoutSpan=h),!g&&!u?!1:i.focusHeaderPosition({headerPosition:{headerRowIndex:c,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,i){const{focusSvc:o,gos:s}=this.beans,n={...o.focusedHeader};let r,l;this.currentHeaderRowWithoutSpan!==-1?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,e==="LEFT"!==s.get("enableRtl")?(l="Before",r=this.findHeader(n,l)):(l="After",r=this.findHeader(n,l));const a=s.getCallback("tabToNextHeader");if(t&&a){const d=o.focusHeaderPositionFromUserFunc({userFunc:a,headerPosition:r,direction:l});if(d){const{headerRowIndex:c}=o.focusedHeader||{};c!=null&&c!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return d}return r||!t?o.focusHeaderPosition({headerPosition:r,direction:l,fromTab:t,allowUserOverride:!0,event:i}):this.focusNextHeaderRow(n,l,i)}focusNextHeaderRow(e,t,i){const o=this.beans,s=e.headerRowIndex;let n=null,r;const l=Be(o),a=this.beans.visibleCols.allCols;if(t==="Before"){if(s<=0)return!1;n=q(a),r=s-1,this.currentHeaderRowWithoutSpan-=1}else n=a[0],r=s+1,this.currentHeaderRowWithoutSpan=l&&(c=-1),o.focusSvc.focusHeaderPosition({headerPosition:{column:d,headerRowIndex:c},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){if(e.getPinned())return;let i;if(ee(e)){const o=e.getDisplayedLeafColumns();i=t==="Before"?q(o):o[0]}else i=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(i)}findHeader(e,t){const{colGroupSvc:i,visibleCols:o}=this.beans;let s=e.column;if(s instanceof ki){const a=s.getDisplayedLeafColumns();s=t==="Before"?a[0]:a[a.length-1]}const n=t==="Before"?o.getColBefore(s):o.getColAfter(s);if(!n)return;const r=o.headerGroupRowCount;if(e.headerRowIndex>=r)return{headerRowIndex:e.headerRowIndex,column:n};const l=i?.getColGroupAtLevel(n,e.headerRowIndex);return l?l.isPadding()&&n.isSpanHeaderHeight()?{headerRowIndex:o.headerGroupRowCount,column:n}:{headerRowIndex:e.headerRowIndex,column:l??n}:{headerRowIndex:n instanceof ut&&n.isSpanHeaderHeight()?o.headerGroupRowCount:e.headerRowIndex,column:n}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function fy(e,t,i){const o=i-1;if(e!=="filter"){const s=t instanceof ut&&t.isSpanHeaderHeight();let n=t.getParent();for(;n&&(n.getProvidedColumnGroup().getLevel()>o||s&&n.isPadding());)n=n.getParent();if(n)return s?{column:n,headerRowIndex:n.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:o}:{column:n,headerRowIndex:o,headerRowIndexWithoutSpan:o}}return{column:t,headerRowIndex:o,headerRowIndexWithoutSpan:o}}function my(e,t,i){const o=t+1,s={column:e,headerRowIndex:o,headerRowIndexWithoutSpan:o};if(e instanceof ki){if(o>=i)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:i,headerRowIndexWithoutSpan:o};let r=e.getDisplayedChildren()[0];if(r instanceof ki&&r.isPadding()){const a=r.getDisplayedLeafColumns()[0];a.isSpanHeaderHeight()&&(r=a)}s.column=r,r instanceof ut&&r.isSpanHeaderHeight()&&(s.headerRowIndex=i,s.headerRowIndexWithoutSpan=o)}return s}var Cy=class extends S{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(Mv(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(j(this.beans),cu)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=j(this.beans);return this.isDomDataPresentInHierarchy(e,Ls,!0)?!0:this.isDomDataPresentInHierarchy(e,Hs,!0)}isDomDataPresentInHierarchy(e,t,i){let o=e;for(;o;){const s=zd(this.gos,o,t);if(s)return s.destroyed&&i?(this.attemptToRecoverFocus(),!1):!0;o=o.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:i,column:o}=e,s={rowIndex:t,rowPinned:i,column:o,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i});return n&&(s.isFullWidthCell=n.isFullWidth()),s}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:i,rowPinned:o,forceBrowserFocus:s=!1,preventScrollOnBrowserFocus:n=!1,sourceEvent:r}=e,l=this.colModel.getCol(t);if(!l){this.focusedCell=null;return}this.focusedCell={rowIndex:i,rowPinned:Ke(o),column:l};const a=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...a,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:s,preventScrollOnBrowserFocus:n,sourceEvent:r}),this.previousCellFocusParams=a}isCellFocused(e){return this.focusedCell==null?!1:ks(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:i,pinned:o}}=e,{column:s,headerRowIndex:n}=this.focusedHeader;return t===s&&i===n&&o==s.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),_e(this.beans))return!1;const{direction:t,fromTab:i,allowUserOverride:o,event:s,fromCell:n,rowWithoutSpanValue:r,scroll:l=!0}=e;let{headerPosition:a}=e;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(a);if(o){const d=this.focusedHeader,c=Be(this.beans);if(i){const u=this.gos.getCallback("tabToNextHeader");u&&(a=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:d,headerPosition:a,headerRowCount:c}))}else{const u=this.gos.getCallback("navigateToNextHeader");if(u&&s){const h={key:s.key,previousHeaderPosition:d,nextHeaderPosition:a,headerRowCount:c,event:s},g=u(h);a=g===null?d:g}}}return a?this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:s,fromCell:n,rowWithoutSpanValue:r,scroll:l}):!1}focusHeaderPositionFromUserFunc(e){if(_e(this.beans))return!1;const{userFunc:t,headerPosition:i,direction:o,event:s}=e,n=this.focusedHeader,r=Be(this.beans),l=this.getHeaderPositionFromUserFunc({userFunc:t,direction:o,currentPosition:n,headerPosition:i,headerRowCount:r});return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:o,event:s})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:i,currentPosition:o,headerPosition:s,headerRowCount:n}=e,l=t({backwards:i==="Before",previousHeaderPosition:o,nextHeaderPosition:s,headerRowCount:n});return l===!0?o:l===!1?null:l}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:i,fromCell:o,rowWithoutSpanValue:s,event:n,scroll:r=!0}=e,{column:l,headerRowIndex:a}=t,{filterManager:d,ctrlsSvc:c,headerNavigation:u}=this.beans;if(this.focusedHeader&&nw(e.headerPosition,this.focusedHeader))return!1;if(a===-1)return d?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:l,event:n});r&&u?.scrollToColumn(l,i);const g=c.getHeaderRowContainerCtrl(l.getPinned())?.focusHeader(t.headerRowIndex,l,n)||!1;return u&&g&&(s!=null||o)&&(u.currentHeaderRowWithoutSpan=s??-1),g}focusFirstHeader(){if(this.overlays?.exclusive&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=Tl(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.exclusive&&this.focusOverlay(!0))return!0;const t=Be(this.beans)-1,i=q(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:i},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===Ke(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&Mt(t,e)}getDefaultTabToNextGridContainerTarget(e){const{backwards:t,focusableContainers:i}=e,o=t?-1:1;let s;const n=()=>(s===void 0&&(s=this.getGridBodyTabTarget(t)),s);for(let r=e.nextIndex;r>=0&&r{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),i=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==i)&&(this.horizontalScrollGap=t,this.verticalScrollGap=i,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),i=typeof e=="number"&&e>=0?e:Cr();i!=null&&(this.scrollbarWidth=i,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},wy=class extends S{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:i}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),i.destroy(),super.destroy()}},Al=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"],by=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","rowDragVisibilityChanged","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","stylesChanged","storeUpdated","filterDestroyed","filterHandlerDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged","rowNodeDataChanged","cellEditValuesChanged","filterSwitched","filterClosed","headerRowsChanged","rowExpansionStateChanged","showRowGroupColsSetChanged"],Sy=()=>[...Al,...by],Vo=new Set(["gridPreDestroyed","fillStart","pasteStart"]),on=Al.reduce((e,t)=>(e[t]=Xd(t),e),{}),Ni={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agExportingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agNoMatchingRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agBigIntColumnFilter:"BigIntFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agBigIntColumnFloatingFilter:"BigIntFilter",agDateColumnFloatingFilter:"DateFilter",agFormulaCellEditor:"Formula",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function gg(e){return`"${e}"`}var yy=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}}),Ry={allowFormula:"Formula",aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t,groupRowEditable:i})=>!!t||!!i?typeof e=="string"?Ni[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:Ni[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,groupRowEditable:({groupRowEditable:e,cellEditor:t})=>e?t?"RowGroupingEdit":["RowGroupingEdit","TextEditor"]:null,groupRowValueSetter:({groupRowValueSetter:e})=>e?"RowGroupingEdit":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?Ni[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(i=>t.includes(i))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},Ey=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:i})=>i?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},allowFormula:{supportedRowModels:["clientSide"]},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,i)=>i.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:i})=>i==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const i=t.headerValueGetter;return typeof i=="function"||typeof i=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return Ne(262);if(t.smallLeft)return Ne(263);if(t.smallRight)return Ne(264)}return null}},sort:{validate:t=>Ti(t.sort)||ht(t.sort)?null:`sort must be of type (SortDirection | SortDef), currently it is ${typeof t.sort=="object"?JSON.stringify(t.sort):vs(t.sort)}`},initialSort:{validate:t=>Ti(t.initialSort)||ht(t.initialSort)?null:`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${typeof t.initialSort=="object"?JSON.stringify(t.initialSort):vs(t.initialSort)}`},sortingOrder:{validate:t=>{const i=t.sortingOrder;if(Array.isArray(i)&&i.length>0){const o=i.filter(s=>!(Ti(s)||ht(s)));if(o.length>0)return`sortingOrder must be an array of type non-null (SortDirection | SortDef)[], incorrect items are: [${o.map(s=>typeof s=="string"||s==null?vs(s):JSON.stringify(s)).join(", ")}]`}else if(!Array.isArray(i)||!i.length)return`sortingOrder must be an array with at least one element, currently it is [${i}]`;return null}},type:{validate:t=>{const i=t.type;return i instanceof Array?i.some(s=>typeof s!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof i=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:i})=>i?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},groupRowEditable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:i,cellSelection:o,suppressRowTransform:s,enableCellSpan:n,rowDragEntireRow:r,enableCellTextSelection:l})=>typeof i=="object"&&i?.mode==="singleRow"&&i?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":o?"colDef.spanRows is not supported with cellSelection.":s?"colDef.spanRows is not supported with suppressRowTransform.":n?r?"colDef.spanRows is not supported with rowDragEntireRow.":l?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:i={}},o){const s=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),n=[];for(const r of t.groupHierarchy??[]){if(typeof r=="object"){o.validation?.validateColDef(r);continue}!s.has(r)&&!(r in i)&&n.push(gg(r))}if(n.length>0){const r=`The following parts of colDef.groupHierarchy are not recognised: ${n.join(", ")}.`,l=`Choose one of ${[...s].map(gg).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${r} ${l}`}return null}}}),Fy={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,groupRowEditable:void 0,groupRowValueSetter:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0,allowFormula:void 0},xy=()=>Object.keys(Fy),Py=()=>({objectName:"colDef",allProperties:xy(),docsUrl:"column-properties/",deprecations:yy(),validations:Ey()}),pg=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],Dy=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","activeOverlayParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","formulaDataSource","formulaFuncs","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],My=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector","suppressOverlays"],Il=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipSwitchShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],Ty=["theme","rowSelection"],kl=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],Ll=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","refreshAfterGroupEdit","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupHideColumnsUntilExpanded","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows","animateColumnResizing"],fg=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","overlayComponent","loadingOverlayComponent","noRowsOverlayComponent","overlayComponentSelector","activeOverlay","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","tabToNextGridContainer","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],mg=()=>[...My,...Dy,...pg,...Il,...fg,...Ll,...kl,...Ty],Ay=()=>[...pg,...Il,...fg,...Ll,...kl],Iy=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}});function nt(e,t,i){return typeof t=="number"||t==null?t==null||t>=i?null:`${e}: value should be greater than or equal to ${i}`:`${e}: value should be a number`}var ky={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",refreshAfterGroupEdit:["RowGrouping","TreeData"],rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},Ly=()=>{const e={autoSizePadding:{validate({autoSizePadding:i}){return nt("autoSizePadding",i,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:i}){return nt("cacheBlockSize",i,1)}},cacheOverflowSize:{validate({cacheOverflowSize:i}){return nt("cacheOverflowSize",i,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:i=>{const o=i.domLayout,s=["autoHeight","normal","print"];return o&&!s.includes(o)?`domLayout must be one of [${s.join()}], currently it's ${o}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableCellSpan:{supportedRowModels:["clientSide","serverSide"]},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:i,pinnedTopRowData:o,pinnedBottomRowData:s}){return i&&(o||s)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:i,isRowPinnable:o,pinnedTopRowData:s,pinnedBottomRowData:n}){return o&&(s||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!i&&o?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:i,isRowPinned:o,pinnedTopRowData:s,pinnedBottomRowData:n}){return o&&(s||n)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!i&&o?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideColumnsUntilExpanded:{supportedRowModels:["clientSide"],validate({groupHideColumnsUntilExpanded:i,groupHideOpenParents:o,groupDisplayType:s}){return i&&!o&&s!=="multipleColumns"?"`groupHideColumnsUntilExpanded = true` requires either `groupDisplayType = 'multipleColumns'` or `groupHideOpenParents = true`":null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:i={}},o,s){for(const n of Object.keys(i))s.validation?.validateColDef(i[n]);return null}},icons:{validate:({icons:i})=>{if(i){if(i.smallDown)return Ne(262);if(i.smallLeft)return Ne(263);if(i.smallRight)return Ne(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:i}){return nt("infiniteInitialRowCount",i,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:i=>{if(typeof i.ssrmExpandAllAffectsAllRows=="boolean"){if(i.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(i.ssrmExpandAllAffectsAllRows&&typeof i.getRowId!="function")return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:i}){return nt("keepDetailRowsCount",i,1)}},paginationPageSize:{validate({paginationPageSize:i}){return nt("paginationPageSize",i,1)}},paginationPageSizeSelector:{validate:i=>{const o=i.paginationPageSizeSelector;return typeof o=="boolean"||o==null||o.length?null:`'paginationPageSizeSelector' cannot be an empty array. If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:i}){return nt("rowBuffer",i,0)}},rowClass:{validate:i=>typeof i.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:i}){return i&&typeof i=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':i&&typeof i!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":i&&i.mode!=="multiRow"&&i.mode!=="singleRow"?`Selection mode "${i.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:i=>{const o=i.rowStyle;return o&&typeof o=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:i}){return nt("serverSideInitialRowCount",i,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:i=>{const o=i.sortingOrder;if(Array.isArray(o)&&o.length>0){const s=o.filter(n=>!Me(n));if(s.length>0)return`sortingOrder must be an array of type (SortDirection | SortDef)[], incorrect items are: ${s.map(n=>typeof n=="string"||n==null?vs(n):JSON.stringify(n))}]`}else if(!Array.isArray(o)||!o.length)return`sortingOrder must be an array with at least one element, currently it's ${o}`;return null}},tooltipHideDelay:{validate:i=>i.tooltipHideDelay&&i.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:i=>i.tooltipShowDelay&&i.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},tooltipSwitchShowDelay:{validate:i=>i.tooltipSwitchShowDelay&&i.tooltipSwitchShowDelay<0?"tooltipSwitchShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:i=>{const o=i.rowModelType??"clientSide";switch(o){case"clientSide":{const{treeDataChildrenField:s,treeDataParentIdField:n,getDataPath:r,getRowId:l}=i;if(!s&&!n&&!r)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(s){if(r)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(n)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(n){if(!l)return"getRowId callback not provided, tree data with parent id cannot be built.";if(r)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const s=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${o} row model.`;return i.isServerSideGroup&&i.getServerSideGroupKey?null:s}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:i}){return nt("viewportRowModelBufferSize",i,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:i}){return nt("viewportRowModelPageSize",i,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:i,showOpenedGroup:o}){return i?.field&&o?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":i?.valueGetter&&o?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:i=>{const o=i.renderingMode,s=["default","legacy"];return o&&!s.includes(o)?`renderingMode must be one of [${s.join()}], currently it's ${o}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:i})=>{if(!i)return null;const o=["fitCellContents","fitGridWidth","fitProvidedWidth"],s=i.type;return s!=="fitCellContents"&&s!=="fitGridWidth"&&s!=="fitProvidedWidth"?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${o.map(n=>'"'+n+'"').join(", ")}, currently it's ${s}`:s==="fitProvidedWidth"&&typeof i.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${i.width}`:null}}},t={};for(const i of Ll)t[i]={expectedType:"boolean"};for(const i of Il)t[i]={expectedType:"number"};return ge(t,e),t},By=()=>({objectName:"gridOptions",allProperties:[...mg(),...Object.values(on)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:Iy(),validations:Ly()}),Hy=0,Oy=0,Cg="__ag_grid_instance",Gy=class extends S{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=Oy++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new bt,this.globalEventHandlerFactory=e=>(t,i)=>{if(!this.isAlive())return;const o=Vo.has(t);if(o&&!e||!o&&e||!Vy(t))return;const s=(n,r)=>{const l=on[n],a=this.gridOptions[l];typeof a=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>a(r))};if(this.gridReadyFired)s(t,i);else if(t==="gridReady"){s(t,i),this.gridReadyFired=!0;for(const n of this.queueEvents)s(n.eventName,n.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:i})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??yd[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return M(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(i=>e(this.addCommon(i)))}updateGridOptions({options:e,force:t,source:i="api"}){const o={id:Hy++,properties:[]},s=[],{gridOptions:n,validation:r}=this;for(const l of Object.keys(e)){const a=no.applyGlobalGridOption(l,e[l]);r?.warnOnInitialPropertyUpdate(i,l);const d=t||typeof a=="object"&&i==="api",c=n[l];if(d||c!==a){n[l]=a;const u={type:l,currentValue:a,previousValue:c,changeSet:o,source:i};s.push(u)}}this.validateGridOptions(this.gridOptions),o.properties=s.map(l=>l.type);for(const l of s)Rt(this,`Updated property ${l.type} from`,l.previousValue," to ",l.currentValue),this.propEventSvc.dispatchEvent(l)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const i of Object.keys(e)){const o=e[i];if(o==null||o===!1)continue;let s=t[i];typeof s=="function"&&(s=s(e,this.gridOptions,this.beans)),s&&this.assertModuleRegistered(s,i)}}validateGridOptions(e){this.validateOptions(e,ky),this.validation?.processGridOptions(e)}validateColDef(e,t,i){(i||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,Ry),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const i=Array.isArray(e)?e.some(o=>this.isModuleRegistered(o)):this.isModuleRegistered(e);return i||z(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),i}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:Wn(),rowModelType:this.get("rowModelType"),isUmd:_n()}}isModuleRegistered(e){return zn(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[Cg]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const i=t[Cg];if(M(i))return i===this.instanceId;t=t.parentElement}return!1}};function Vy(e){return!!on[e]}var Ny=class extends S{constructor(e,t){super(),this.column=e,this.eGui=t,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:e=>e&&this.onClick(e)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(e){const{sortSvc:t,rangeSvc:i,gos:o}=this.beans;if(!(oi(o)?e.altKey:!0))i?.handleColumnSelection(this.column,e);else if(this.column.isSortable()){const n=this.column.isMoving(),l=Date.now()-this.lastMovingChanged<50;n||l||t?.progressSortFromEvent(this.column,e)}}};function zy(e,t){const i={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:i},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:i},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[e?{tag:"span",ref:"eColRef",cls:"ag-header-col-ref"}:null,{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:i},t?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var vg=class extends U{constructor(){super(...arguments),this.eFilter=x,this.eFilterButton=x,this.eSortIndicator=x,this.eMenu=x,this.eLabel=x,this.eText=x,this.eColRef=x,this.eSortOrder=x,this.eSortAsc=x,this.eSortDesc=x,this.eSortMixed=x,this.eSortNone=x,this.eSortAbsoluteAsc=x,this.eSortAbsoluteDesc=x,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||e.column.formulaRef!=this.currentRef||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const i={...e};ge(i,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(i)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const{formula:i}=this.beans,o=e.template;return o?o?.trim?o.trim():o:zy(!!i?.active,t)}init(e){this.params=e;const{sortSvc:t,touchSvc:i,rowNumbersSvc:o,userCompFactory:s}=this.beans,n=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),this.eLabel&&(this.mouseListener??(this.mouseListener=this.createManagedBean(new Ny(e.column,this.eLabel)))),i?.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),o?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(s,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const i=gv(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderComponent=o,this.eText&&this.eText.appendChild(o.getGui())):this.destroyBean(o))}))}setDisplayName(e){const{displayName:t}=e,i=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||i===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=$t(t))}addInIcon(e,t,i){const o=Se(e,this.beans,i);o&&t.appendChild(o)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){Pe(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:i}=this,o=be(e);this.addInIcon(o?"menu":"menuAlt",t,i.column),t.classList.toggle("ag-header-menu-icon",!o);const s=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=s,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(s)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:i}=this;t||this.toggleMenuAlwaysShow(!0),i.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:i,beans:o,eMenu:s,eFilterButton:n}=this,r=t.column,l=be(i);if(e&&!l){if(o.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(n??s??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(s??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:i}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:o,eSortOrder:s,eSortAsc:n,eSortDesc:r,eSortMixed:l,eSortNone:a,eSortAbsoluteAsc:d,eSortAbsoluteDesc:c}=this;o.attachCustomElements(s,n,r,l,a,d,c)}this.eSortIndicator.setupSort(i),this.currentSort&&e.setupHeader(this,i)}setupColumnRefIndicator(){const{eColRef:e,beans:{editModelSvc:t},params:i}=this;e&&(this.currentRef=i.column.formulaRef,e.textContent=this.currentRef,_(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{const o=t?.getEditPositions(),s=!!this.currentRef&&!!o?.some(n=>n.column.isAllowFormula());_(e,s)},cellEditingStopped:()=>{_(e,!1)}}))}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const i=()=>{const o=t.column.isFilterActive();_(e,o,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,i,"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,i,o){if(!e)return Pe(t),!1;const s=this.params.column;return this.addInIcon(o,t,s),this.addManagedListeners(s,{filterChanged:i}),i(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:i}=this;return e?t??i??this.getGui():i??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}},Wy=class extends S{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){const{columnGroup:e,beans:t}=this,{ctrlsSvc:i}=t;i.whenReady(this,()=>{const o=this.refreshPosition.bind(this);e.getPinned()==null&&this.addManagedEventListeners({bodyScroll:s=>{s.direction==="horizontal"&&this.updateSticky(s.left)}}),this.addManagedListeners(e,{leftChanged:o,displayedChildrenChanged:o}),this.addManagedEventListeners({columnResized:o}),this.refreshPosition()})}refreshPosition(){const{columnGroup:e,beans:t}=this,i=e.getLeft(),o=e.getActualWidth();if(i==null||o===0){this.left=null,this.right=null,this.setSticky(!1);return}this.left=i,this.right=i+o;const s=t.colViewport.getScrollPosition();s!=null&&this.updateSticky(s)}updateSticky(e){const{beans:t,left:i,right:o}=this;if(i==null||o==null){this.setSticky(!1);return}const{gos:s,visibleCols:n}=t,l=s.get("enableRtl")?n.bodyWidth-e:e;this.setSticky(il)}setSticky(e){const{isSticky:t,eLabel:i}=this;t!==e&&(this.isSticky=e,i.classList.toggle("ag-sticky-label",e))}},_y={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},Uy=class extends U{constructor(){super(_y),this.agOpened=x,this.agClosed=x,this.agLabel=x,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:i}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),i?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&F(89)}workOutInnerHeaderGroupComponent(e,t){const i=fv(e,t,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(o=>{this.isLoadingInnerComponent=!1,o&&(this.isAlive()?(this.innerHeaderGroupComponent=o,this.agLabel.appendChild(o.getGui())):this.destroyBean(o))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:i},beans:{colGroupSvc:o}}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const s=a=>{if(et(a))return;const d=!i.isExpanded();o.setColumnGroupOpened(i.getProvidedColumnGroup(),d,"uiColumnExpanded")};this.addTouchAndClickListeners(t,s),this.addTouchAndClickListeners(e,s);const n=a=>{At(a)};this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:s}),this.updateIconVisibility();const r=i.getProvidedColumnGroup(),l=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:l,expandableChanged:l})}addTouchAndClickListeners(e,t){this.beans.touchSvc?.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:i}}=this;if(i.isExpandable()){const o=i.isExpanded();_(e,o),_(t,!o)}else _(e,!1),_(t,!1)}addInIcon(e,t){const i=Se(e,this.beans,null);i&&t.appendChild(i)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:i}=this;_(t,!1),_(i,!1)}}setupLabel(e){const{displayName:t,columnGroup:i}=e,{innerHeaderGroupComponent:o,isLoadingInnerComponent:s}=this,n=o||s;M(t)&&!n&&(this.agLabel.textContent=$t(t)),i.getColGroupDef()?.suppressStickyLabel||this.createManagedBean(new Wy(this.getGui(),i))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},qy={moduleName:"ColumnHeaderComp",version:P,userComponents:{agColumnHeader:vg},icons:{menu:"menu",menuAlt:"menu-alt"}},$y={moduleName:"ColumnGroupHeaderComp",version:P,userComponents:{agColumnGroupHeader:Uy},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},Ky=class extends S{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&F(92)}createTask(e,t,i,o,s=!1){this.verify();let n=i;o&&this.batchFrameworkComps&&(n="f1");const r={task:e,index:t,createOrder:++this.taskCount,deferred:s};this.addTaskToList(this[n],r),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((i,o)=>i.deferred!==o.deferred?i.deferred?-1:1:i.index!==o.index?t*(o.index-i.index):o.createOrder-i.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:i,f1:o,destroyTasks:s,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:l}=n,a=t.list,d=i.list,c=o.list,u=Date.now();let h=0;const g=e<=0,p=r.getScrollFeature();for(;g||h{for(;(g||h{};else if(s.length)m=s.pop();else break;m()}h=Date.now()-u}a.length||d.length||c.length||s.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);Ye(this.beans,e)}isQueueEmpty(){return!this.ticking}},jy={moduleName:"AnimationFrame",version:P,beans:[Ky]},Yy=class extends S{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return Se(e,this.beans,t?.column)}},Qy=(e,t,i)=>t||e&&i,Zy=class extends S{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!Pt())return;const t=(i,o,s)=>{const{rowCtrl:n,cellCtrl:r}=e.getControlsForEventTarget(s?.target??null);r?.column&&r.dispatchCellContextMenuEvent(s??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,s,n,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!Pt()||hs("dblclick"))return!1;const o=Date.now(),s=o-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=o,s})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:i,menuSvc:o}=this.beans;if(t.get("suppressTouch"))return;const{params:s,eMenu:n,eFilterButton:r}=e,l=new It(e.getGui(),!0);e.addDestroyFunc(()=>l.destroy());const a=e.shouldSuppressMenuHide(),d=a&&M(n)&&s.enableMenu,c=!!o?.isHeaderContextMenuEnabled(s.column),u=Qy(s.enableMenu,c,be(t));let h=l;d&&(h=new It(n,!0),e.addDestroyFunc(()=>h.destroy()));const g=p=>s.showColumnMenuAfterMouseClick(p.touchStart);if(d&&s.enableMenu&&e.addManagedListeners(h,{tap:g}),u&&e.addManagedListeners(l,{longTap:g}),s.enableSorting){const p=f=>{const m=f.touchStart.target;a&&(n?.contains(m)||r?.contains(m))||i?.progressSort(s.column,!1,"uiColumnSorted")};e.addManagedListeners(l,{tap:p})}if(s.enableFilterButton&&r){const p=new It(r,!0);e.addManagedListeners(p,{tap:()=>s.showFilter(r)}),e.addDestroyFunc(()=>p.destroy())}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const i=new It(t.eGridHeader,!0),o=s=>t.showColumnMenuAfterMouseClick(s.touchStart);e.addManagedListeners(i,{longTap:o}),e.addDestroyFunc(()=>i.destroy())}}setupForHeaderGroupElement(e,t,i){const o=new It(t,!0);e.addManagedListeners(o,{tap:i}),e.addDestroyFunc(()=>o.destroy())}mockContextMenu(e,t,i){if(!Pt())return;const o=new It(t),s=n=>{oo(this.beans,n.touchEvent)&&i(void 0,n.touchStart,n.touchEvent)};e.addManagedListeners(o,{longTap:s}),e.addDestroyFunc(()=>o.destroy())}},Xy={moduleName:"Touch",version:P,beans:[Zy]},Jy=class extends S{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const i=e===b.UP,o=e===b.DOWN,s=e===b.LEFT;let n,r;const{pageBounds:l,gos:a,visibleCols:d,pinnedRowModel:c}=this.beans,{rowPinned:u}=t;if(i||o)u&&c?i?r=0:r=u==="top"?c.getPinnedTopRowCount()-1:c.getPinnedBottomRowCount()-1:r=i?l.getFirstRow():l.getLastRow(),n=t.column;else{const h=a.get("enableRtl");r=t.rowIndex,n=(s!==h?d.allCols:[...d.allCols].reverse()).find(p=>!pe(p)&&this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:p}))}return n?{rowIndex:r,rowPinned:u,column:n}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,o=!1;for(;!o;){switch(e){case b.UP:i=this.getCellAbove(i);break;case b.DOWN:i=this.getCellBelow(i);break;case b.RIGHT:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case b.LEFT:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,F(8,{key:e});break}i?o=this.isCellGoodToFocusOn(i):o=!0}return i}isCellGoodToFocusOn(e){const t=e.column;let i;const{pinnedRowModel:o,rowModel:s}=this.beans;switch(e.rowPinned){case"top":i=o?.getPinnedTopRow(e.rowIndex);break;case"bottom":i=o?.getPinnedBottomRow(e.rowIndex);break;default:i=s.getRow(e.rowIndex);break}return i?!this.isSuppressNavigable(t,i):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,i=Mr(this.beans,t,!0);return i?{rowIndex:i.rowIndex,column:e.column,rowPinned:i.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,i=yo(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return i?{rowIndex:i.rowIndex,column:e.column,rowPinned:i.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:i}=this.beans,o=t.allCols;let s=e.rowIndex,n=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=o[0];const l=Mr(this.beans,e,!0);if(K(l)||!l.rowPinned&&!(i?.isRowInPage(l.rowIndex)??!0))return null;s=l?l.rowIndex:null,n=l?l.rowPinned:null}return{rowIndex:s,column:r,rowPinned:n}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:i,pagination:o}=t,s=i.allCols;let n=e.rowIndex,r=e.rowPinned,l=i.getColBefore(e.column);if(!l){l=q(s);const a=yo(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(K(a)||!a.rowPinned&&!(o?.isRowInPage(a.rowIndex)??!0))return null;n=a?a.rowIndex:null,r=a?a.rowPinned:null}return{rowIndex:n,column:l,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:i}=e.colDef;if(typeof i=="boolean")return i;if(typeof i=="function"){const o=e.createColumnFunctionCallbackParams(t);return i(o)}return!1}};function e3(e){return e.focusSvc.getFocusedCell()}function t3(e){return e.focusSvc.clearFocusedCell()}function i3(e,t,i,o){e.focusSvc.setFocusedCell({rowIndex:t,column:i,rowPinned:o,forceBrowserFocus:!0})}function o3(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function s3(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function n3(e,t,i=!1){const o=e.headerNavigation?.getHeaderPositionForColumn(t,i);o&&e.focusSvc.focusHeaderPosition({headerPosition:o})}function Gt(e){const t=e;return t?.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var r3=class extends S{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new wg,this.rowValidations=new bg,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const i=this.getEditRow(e);t?i.delete(t):i.clear(),i.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const i=e&&this.edits.get(e);if(i)return i;if(t.checkSiblings){const o=e.pinnedSibling;if(o)return this.getEditRow(o)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;const i=this.getEditRow(e),o=e.pinnedSibling,s=t&&o&&this.getEditRow(o);if(!i&&!s)return;const n={...e.data},r=(l,a)=>l.forEach(({editorValue:d,pendingValue:c},u)=>{const h=d===void 0?c:d;h!==de&&(a[u.getColId()]=h)});return i&&r(i,n),s&&r(s,n),n}getEdit(e={},t){const{rowNode:i,column:o}=e,s=this.edits;if(this.suspendEdits||s.size===0||!i||!o)return;const n=s.get(i)?.get(o);if(n)return n;if(t?.checkSiblings){const r=i.pinnedSibling;if(r)return s.get(r)?.get(o)}}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((i,o)=>{const s=new Map;i.forEach(({editorState:n,...r},l)=>s.set(l,{...r})),t.set(o,s)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,i)=>{const o=new Map;t.forEach((s,n)=>o.set(n,{...s})),this.edits.set(i,o)})}setEdit(e,t){const i=this.edits;(i.size===0||!i.has(e.rowNode))&&i.set(e.rowNode,new Map);const o=this.getEdit(e),s={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...o,...t};return this.getEditRow(e.rowNode).set(e.column,s),s}clearEditValue(e){const{rowNode:t,column:i}=e;if(!t)return;const o=n=>{n.editorValue=void 0,n.pendingValue=n.sourceValue,n.state="changed"};if(!i){this.getEditRow(t)?.forEach(o);return}const s=this.getEdit(e);s&&o(s)}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((i,o)=>{for(const s of i.keys()){const{editorState:n,...r}=i.get(s);t.push({rowNode:o,column:s,...r})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:i,column:o}=e,{withOpenEditor:s}=t;if(i){const n=this.getEditRow(i,t);return n?o?s?this.getEdit(e)?.state==="editing":n.has(o):n.size!==0?s?Array.from(n.values()).some(({state:r})=>r==="editing"):!0:!1:!1}return s?this.getEditPositions().some(({state:n})=>n==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:i,column:o}=e;o&&!t.has(o)&&t.set(o,{editorValue:void 0,pendingValue:de,sourceValue:this.beans.valueSvc.getValue(o,i,"data"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(i,t)}stop(e,t,i){if(this.hasEdits(e))if(t){const o=this.getEditRow(e.rowNode)?.get(e.column);o&&(o.pendingValue===de||o.pendingValue===o.sourceValue)?this.removeEdits(e):o&&i&&(o.editorValue=void 0)}else this.removeEdits(e)}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},wg=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:i}=e||{};return this.cellValidations?.get(t)?.get(i)}hasCellValidation(e){return!e?.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:i,column:o}=e;this.cellValidations.has(i)||this.cellValidations.set(i,new Map),this.cellValidations.get(i).set(o,t)}clearCellValidation(e){const{rowNode:t,column:i}=e;this.cellValidations.get(t)?.delete(i)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},bg=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function sn(e,t={}){const{rowIndex:i,rowId:o,rowCtrl:s,rowPinned:n}=t;if(s)return s;const{rowModel:r,rowRenderer:l}=e;let{rowNode:a}=t;return a||(o?a=Yv(e,o,n):i!=null&&(a=r.getRow(i))),a?l.getRowCtrlByNode(a):void 0}function V(e,t={}){const{cellCtrl:i,colId:o,columnId:s,column:n}=t;if(i)return i;const r=e.colModel.getCol(o??s??Bl(n)),l=t.rowCtrl??sn(e,t),a=l?.getCellCtrl(r)??void 0;if(a)return a;const d=t.rowNode??l?.rowNode;if(d)return e.rowRenderer.getCellCtrls([d],[r])?.[0]}function Sg(e){const{editSvc:t}=e;t?.isBatchEditing()?(Vt(e,{persist:!0}),Nt(e)):t?.stopEditing(void 0,{source:"api"})}function l3(e,t,i){const{gos:o,popupSvc:s}=t;if(!o.get("stopEditingWhenCellsLoseFocus"))return;const n=r=>{const l=r.relatedTarget;if(mr(l)===null){Sg(t);return}let a=i.some(d=>d.contains(l))&&o.isElementInThisInstance(l);a||(a=!!s&&(s.getActivePopups().some(d=>d.contains(l))||s.isElementWithinCustomPopup(l))),a||Sg(t)};for(const r of i)e.addManagedElementListeners(r,{focusout:n})}function Bl(e){if(e)return typeof e=="string"?e:e.getColId()}var de=Symbol("unedited"),a3=(e,t={})=>{const i=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),o=new Array(i.length);let s=0;for(let n=0,r=i.length;n0&&t.set(i,s)}return t}function hi(e,t,i){const{key:o,event:s,cellStartedEdit:n,silent:r}=i??{},{editModelSvc:l,gos:a,userCompFactory:d}=e,c=V(e,t),u=c?.comp?.getCellEditor(),h=Rg(e,t,o,n&&!r),g=l?.getEdit(t),p=h.value??g?.sourceValue;if(u){l?.setEdit(t,{editorValue:Wi(e,p,!0,t.column),state:"editing"}),u.refresh?.(h);return}const f=t.column.getColDef(),m=wc(d,f,h);if(!m)return;const{popupFromSelector:C,popupPositionFromSelector:v}=m,w=C??!!f.cellEditorPopup,y=v??f.cellEditorPopupPosition;if(Eg(m.params,s),!c)return;const{rangeFeature:R,rowCtrl:E,comp:D,onEditorAttachedFuncs:B}=c;l?.setEdit(t,{editorValue:Wi(e,p,!0,t.column),state:"editing",editorState:{cellStartedEditing:void 0,cellStoppedEditing:void 0}}),c.editCompDetails=m,B.push(()=>R?.unsetComp()),D?.setEditDetails(m,w,y,a.get("reactiveCustomComponents")),E?.refreshRow({suppressFlash:!0}),u3(e,t,s,p,r)}function u3(e,t,i,o,s){const{editSvc:n,editModelSvc:r}=e,l=r?.getEdit(t);!s&&l?.state==="editing"&&!l?.editorState?.cellStartedEditing&&(n?.dispatchCellEvent(t,i,"cellEditingStarted",{value:o}),r?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function yg(e,t,i){const o={editorValueExists:!1};if(Hl(e)&&(t.getValidationErrors?.()?.length??0)>0||i?.isCancelling)return o;if(i?.isStopping){const n=t?.isCancelAfterEnd?.();if(n)return{...o,isCancelAfterEnd:n}}return{editorValue:t.getValue(),editorValueExists:!0}}function Rg(e,t,i,o){const{valueSvc:s,gos:n,editSvc:r}=e,l=e.gos.get("enableGroupEdit"),a=V(e,t),d=t.rowNode?.rowIndex??void 0,c=r?.isBatchEditing(),u=e.colModel.getCol(t.column.getId()),{rowNode:h,column:g}=t,p=a.comp?.getCellEditor(),f=r?.getCellDataValue(t),m=f===void 0?p?yg(e,p)?.editorValue:void 0:f,C=m===de?s.getValueForDisplay({column:u,node:h,from:"edit"})?.value:m;let v=l?m:C;return g.isAllowFormula()&&e.formula?.isFormula(v)&&(v=e.formula?.normaliseFormula(v,!0)??v),k(n,{value:v,eventKey:i??null,column:g,colDef:g.getColDef(),rowIndex:d,node:h,data:h.data,cellStartedEdit:!!o,onKeyDown:a?.onKeyDown.bind(a),stopEditing:w=>{r.stopEditing(t,{source:c?"ui":"api",suppressNavigateAfterEdit:w}),zo(e,t,{})},eGridCell:a?.eGui,parseValue:w=>s.parseValue(u,h,w,a?.value),formatValue:a?.formatValue.bind(a),validate:()=>{r?.validateEdit()}})}function No(e,t){const{editModelSvc:i}=e;i?.getEditMap().forEach((o,s)=>{o.forEach((n,r)=>{!t&&(n.state==="editing"||n.pendingValue===de)||!qe(n)&&(n.state!=="editing"||t)&&i?.removeEdits({rowNode:s,column:r})})})}function h3(e,t){const i=t.comp?.getCellEditor();if(!i?.refresh)return;const{eventKey:o,cellStartedEdit:s}=t.editCompDetails.params,{column:n}=t,r=Rg(e,t,o,s),l=n.getColDef(),a=wc(e.userCompFactory,l,r);i.refresh(Eg(a.params,o))}function Eg(e,t){return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function Vt(e,t){for(const i of e.editModelSvc?.getEditPositions()??[]){const o=V(e,i);if(!o)continue;const s=o.comp?.getCellEditor();if(!s)continue;const{editorValue:n,editorValueExists:r,isCancelAfterEnd:l}=yg(e,s,t);if(l){const{cellStartedEditing:a,cellStoppedEditing:d}=e.editModelSvc?.getEdit(i)?.editorState||{};e.editModelSvc?.setEdit(i,{editorState:{isCancelAfterEnd:l,cellStartedEditing:a,cellStoppedEditing:d}})}zi(e,i,n,void 0,!r,t)}}function zi(e,t,i,o,s,n){const{editModelSvc:r,valueSvc:l}=e;if(!r)return;const{rowNode:a,column:d}=t;if(!(a&&d))return;let c=r.getEdit(t);if(c?.sourceValue===void 0){const u=c?Wi(e,c.editorValue,!1,d):de,h={sourceValue:l.getValue(d,a,"data"),pendingValue:u};n?.persist&&(h.state="changed"),c=r.setEdit(t,h)}r.setEdit(t,{editorValue:s?Wi(e,c.sourceValue,!0,d):i}),n?.persist&&g3(e,t)}function Wi(e,t,i,o){const{formula:s}=e;return o.isAllowFormula()&&s?.isFormula(t)?s?.normaliseFormula(t,i)??t:t}function g3(e,t){const{editModelSvc:i}=e,o=i?.getEdit(t),n={pendingValue:Wi(e,o?.editorValue,!1,t.column)};!o?.editorState?.cellStoppedEditing&&o?.state!=="editing"&&(n.state="changed"),i?.setEdit(t,n)}function Nt(e,t,i={}){if(t||(t=e.editModelSvc?.getEditPositions()),t)for(const o of t)zo(e,o,i)}function zo(e,t,i,o=V(e,t)){const s=e.editModelSvc,n=s?.getEdit(t);let r;if(n&&n.state!=="editing"&&n.editorState?.cellStoppedEditing?r=n.state:r="changed",!o){n&&s?.setEdit(t,{state:r});return}const l=o.comp,a=l?.getCellEditor();if(l&&!a){if(o?.refreshCell(),n){s?.setEdit(t,{state:r});const c=e.gos.get("enableGroupEdit")?Fg(n,i?.cancel):{valueChanged:!1,newValue:void 0,oldValue:n.sourceValue};xg(e,t,c,i)}return}if(Hl(e)){const c=n&&a?.getValidationErrors?.(),u=s?.getCellValidationModel();c?.length?u?.setCellValidation(t,{errorMessages:c}):u?.clearCellValidation(t)}n&&s?.setEdit(t,{state:r}),l?.setEditDetails(),l?.refreshEditStyles(!1,!1),o?.refreshCell({force:!0,suppressFlash:!0});const d=s?.getEdit(t);if(d&&d.state!=="editing"){const c=i?.cancel,u=e.gos.get("enableGroupEdit")?Fg(d,c):p3(d,n,c);xg(e,t,u,i)}}function Fg(e,t){const{sourceValue:i,pendingValue:o}=e;let s;return!t&&o!==de&&(s=o),{valueChanged:!t&&qe(e),newValue:s,oldValue:i,value:i}}function p3(e,t,i){if(i||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let o=e.editorValue;return(o==null||o===de)&&(o=t?.pendingValue),o===de&&(o=void 0),{valueChanged:qe(e),newValue:o,oldValue:e.sourceValue}}function xg(e,t,i,{silent:o,event:s}={}){const{editSvc:n,editModelSvc:r}=e,l=r?.getEdit(t),{editorState:a}=l||{},{isCancelBeforeStart:d,cellStartedEditing:c,cellStoppedEditing:u}=a||{};!o&&!d&&c&&!u&&(n?.dispatchCellEvent(t,s,"cellEditingStopped",i),r?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function f3(e){if(!e)return!1;for(let t=0,i=e.length;t0,w=v?m.join(". "):"";ss(C,v),v&&o.announceValue(`${d} ${m}`,"editorValidation"),C instanceof HTMLInputElement?C.setCustomValidity(w):C.classList.toggle("invalid",v)}m?.length>0&&i.setCellValidation({rowNode:p,column:f},{errorMessages:m}),c.add(u.rowCtrl)}if(Vt(e,{persist:!1}),n?.setCellValidationModel(i),l){const u=C3(e);n?.setRowValidationModel(u)}for(const u of c.values()){u.rowEditStyleFeature?.applyRowStyles();for(const h of u.getAllCellCtrls())h.tooltipFeature?.refreshTooltip(!0),h.editorTooltipFeature?.refreshTooltip(!0),h.editStyleFeature?.applyCellStyles?.()}}var C3=e=>{const t=new bg,i=e.gos.get("getFullRowEditValidationErrors"),o=e.editModelSvc?.getEditMap();if(!o)return t;for(const s of o.keys()){const n=o.get(s);if(!n)continue;const r=[],{rowIndex:l,rowPinned:a}=s;for(const c of n.keys()){const u=n.get(c);if(!u)continue;const{editorValue:h,pendingValue:g,sourceValue:p}=u,f=h??(g===de?void 0:g)??p;r.push({column:c,colId:c.getColId(),rowIndex:l,rowPinned:a,oldValue:p,newValue:f})}const d=i?.({editorsState:r})??[];d.length>0&&t.setRowValidation({rowNode:s},{errorMessages:d})}return t};function v3(e){zt(e,!0);const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const i=[];return t.forEach((o,s)=>{o.forEach(({errorMessages:n},r)=>{i.push({column:r,rowIndex:s.rowIndex,rowPinned:s.rowPinned,messages:n??null})})}),i}function nn(e){return!!(e.rowPinned&&e.pinnedSibling)}function Oe(e,t,i,o){const s=t==="top";if(!i)return Oe(e,t,s?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),o);if(!o){const a=s?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return Oe(e,t,i,s?e.getPinnedTopRow(a-1):e.getPinnedBottomRow(a-1))}let n=!1,r=!1;const l=[];return e.forEachPinnedRow(t,a=>{if(a===i&&!n){n=!0,l.push(a);return}if(n&&a===o){r=!0,l.push(a);return}n&&!r&&l.push(a)}),l}function w3(e,t,i,{rowNode:o,column:s},n){return k(e.gos,{type:i,node:o,data:o.data,value:n,column:s,colDef:s.getColDef(),rowPinned:o.rowPinned,event:t,rowIndex:o.rowIndex})}function b3(e,t=!1){return e===b.DELETE?!0:!t&&e===b.BACKSPACE?Dc():!1}var S3=class extends S{constructor(e,t,i,o){super(),this.cellCtrl=e,this.rowNode=i,this.rowCtrl=o,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;if(!(t===b.ENTER&&pe(this.cellCtrl.column)&&this.beans.rowNumbersSvc?.handleKeyDownOnCell(this.cellCtrl.cellPosition,e)))switch(t){case b.ENTER:this.onEnterKeyDown(e);break;case b.F2:this.onF2KeyDown(e);break;case b.ESCAPE:this.onEscapeKeyDown(e);break;case b.TAB:this.onTabKeyDown(e);break;case b.BACKSPACE:case b.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case b.DOWN:case b.UP:case b.RIGHT:case b.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){const{cellCtrl:i,beans:o}=this;if(!o.editSvc?.isEditing(i,{withOpenEditor:!0})){if(e.shiftKey&&i.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const s=i.getFocusedCellPosition();o.navigation?.navigateToNextCell(e,t,s,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:i}=this.beans;if(!t)return;const o=t.extendLatestRangeInDirection(e);o&&(e.key===b.LEFT||e.key===b.RIGHT?i?.ensureColumnVisible(o.column):i?.ensureRowVisible(o.rowIndex))}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:i,beans:o,rowNode:s}=this,{gos:n,rangeSvc:r,eventSvc:l,editSvc:a}=o;if(l.dispatchEvent({type:"keyShortcutChangedCellStart"}),b3(e,n.get("enableCellEditingOnBackspace"))&&!a?.isEditing(i,{withOpenEditor:!0})){if(r&&Ze(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(i.isCellEditable()){const d=o.valueSvc.getDeleteValue(i.column,s);s.setDataValue(i.column,d,"cellClear")}}else a?.isEditing(i,{withOpenEditor:!0})||o.editSvc?.startEditing(i,{startedEdit:!0,event:t});l.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){const{cellCtrl:t,beans:i}=this,{editSvc:o,navigation:s}=i,n=o?.isEditing(t,{withOpenEditor:!0}),r=t.rowNode,l=o?.isRowEditing(r,{withOpenEditor:!0}),a=d=>{o?.startEditing(d,{startedEdit:!0,event:e,source:"edit"})&&e.preventDefault()};if(n||l){if(this.isCtrlEnter(e)){o?.applyBulkEdit(t,i?.rangeSvc?.getCellRanges()||[]);return}if(zt(i),o?.checkNavWithValidation(void 0,e)==="block-stop")return;o?.isEditing(t,{withOpenEditor:!0})?o?.stopEditing(t,{event:e,source:"edit"}):l&&!t.isCellEditable()?o?.stopEditing({rowNode:r},{event:e,source:"edit"}):a(t)}else if(i.gos.get("enterNavigatesVertically")){const d=e.shiftKey?b.UP:b.DOWN;s?.navigateToNextCell(null,d,t.cellPosition,!1)}else{if(o?.hasValidationErrors())return;o?.hasValidationErrors(t)&&o.revertSingleCellEdit(t,!0),a(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===b.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:i}}=this;i?.isEditing()&&(zt(this.beans),i?.checkNavWithValidation(void 0,e)==="block-stop")||i?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:i}}=this;i?.checkNavWithValidation(t,e)==="block-stop"&&i.revertSingleCellEdit(t),setTimeout(()=>{i?.stopEditing(t,{event:e,cancel:!0})})}processCharacter(e){const i=e.target!==this.eGui,{beans:{editSvc:o},cellCtrl:s}=this;if(i||o?.isEditing(s,{withOpenEditor:!0}))return;if(e.key===b.SPACE)this.onSpaceKeyDown(e);else if(o?.isCellEditable(s,"ui")){if(o?.hasValidationErrors()&&!o?.hasValidationErrors(s))return;o?.startEditing(s,{startedEdit:!0,event:e,source:"api",editable:!0}),!s.editCompDetails?.params?.suppressPreventDefault&&e.preventDefault()}}onSpaceKeyDown(e){const{gos:t,editSvc:i}=this.beans,{rowNode:o}=this.cellCtrl;!i?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&Et(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,o,"spaceKey"),e.preventDefault()}},y3=class extends S{constructor(e,t,i){super(),this.cellCtrl=e,this.column=i,this.beans=t}onMouseEvent(e,t){if(!et(t))switch(e){case"click":this.onCellClicked(t);break;case"pointerdown":case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:i,editSvc:o,editModelSvc:s,frameworkOverrides:n,gos:r}=this.beans,l=e.ctrlKey||e.metaKey,{cellCtrl:a}=this,{column:d,cellPosition:c,rowNode:u}=a,h=xo(r,d,u,e);i&&l&&!h&&i.getCellRangeCount(c)>1&&i.intersectLastRange(!0);const g=a.createEvent(e,"cellClicked");g.isEventHandlingSuppressed=h,t.dispatchEvent(g);const p=d.getColDef();if(p.onCellClicked&&window.setTimeout(()=>{n.wrapOutgoing(()=>{p.onCellClicked(g)})},0),!h&&s?.getState(a)!=="editing"){const f=o?.isEditing(),m=o?.isRangeSelectionEnabledWhileEditing(),C=s?.getCellValidationModel().getCellValidationMap().size??0,v=s?.getRowValidationModel().getRowValidationMap().size??0;if(f&&(m||C>0||v>0))return;o?.shouldStartEditing(a,e)?o?.startEditing(a,{event:e}):o?.shouldStopEditing(a,e)&&(this.beans.gos.get("editType")==="fullRow"?o?.stopEditing(a,{event:e,source:"edit"}):o?.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){const{column:t,beans:i,cellCtrl:o}=this,{eventSvc:s,frameworkOverrides:n,editSvc:r,editModelSvc:l,gos:a}=i,d=xo(a,o.column,o.rowNode,e),c=t.getColDef(),u=o.createEvent(e,"cellDoubleClicked");if(u.isEventHandlingSuppressed=d,s.dispatchEvent(u),typeof c.onCellDoubleClicked=="function"&&window.setTimeout(()=>{n.wrapOutgoing(()=>{c.onCellDoubleClicked(u)})},0),!d&&r?.shouldStartEditing(o,e)&&l?.getState(o)!=="editing"){const h=r?.isEditing(),g=r?.isRangeSelectionEnabledWhileEditing(),p=l?.getCellValidationModel().getCellValidationMap().size??0,f=l?.getRowValidationModel().getRowValidationMap().size??0;if(h&&(g||p>0||f>0))return;r?.startEditing(o,{event:e})}}onMouseDown(e){const{shiftKey:t}=e,i=e.target,{cellCtrl:o,beans:s}=this,{eventSvc:n,rangeSvc:r,rowNumbersSvc:l,focusSvc:a,gos:d,editSvc:c}=s,{column:u,rowNode:h,cellPosition:g}=o,p=xo(d,u,h,e),f=()=>{const w=o.createEvent(e,"cellMouseDown");w.isEventHandlingSuppressed=p,n.dispatchEvent(w)};if(p){f();return}if(this.isRightClickInExistingRange(e))return;const m=r&&!r.isEmpty(),C=this.containsWidget(i),v=pe(u);if(!(l&&v&&!l.handleMouseDownOnCell(g,e))){if(!t||!m){const w=c?.isEditing(o),R=d.get("enableCellTextSelection")&&e.defaultPrevented,E=(mt()||R)&&!w&&!bi(i)&&!C;o.focusCell(E,e)}if(t&&m&&!a.isCellFocused(g)){e.preventDefault();const w=a.getFocusedCell();if(w){const{column:y,rowIndex:R,rowPinned:E}=w,D=!!c?.isRangeSelectionEnabledWhileEditing?.();c?.isEditing(w)&&!D&&c?.stopEditing(w),D||a.setFocusedCell({column:y,rowIndex:R,rowPinned:E,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}C||(r?.handleCellMouseDown(e,g),f())}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const i=t.isCellInAnyRange(this.cellCtrl.cellPosition),o=Jd(this.beans,e);if(i&&o)return!0}return!1}containsWidget(e){return jt(e,"ag-selection-checkbox",3)||jt(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:i}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),i?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:i}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),i?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,i=t.contains(e.target),o=t.contains(e.relatedTarget);return i&&o}},R3=class extends S{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();lt(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,i=e.getColSpan(t),o=[];if(i===1)o.push(e);else{let s=e;const n=e.getPinned();for(let r=0;s&&rthis.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(o,r),this.refreshFirstAndLastStyles(),this.checkFormulaError(),this.refreshAriaRowIndex(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer();const l=n?this.isCellEditable():void 0,a=!l&&this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0});if(l||a?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:l}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const d of this.onCompAttachedFuncs)d();this.onCompAttachedFuncs=[]}}checkFormulaError(){const e=!!this.beans.formula?.getFormulaError(this.column,this.rowNode);this.eGui.classList.toggle("formula-error",e)}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:i,ctrlsSvc:o,eventSvc:s}=e,n=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const l=vc(i,n,r);if(o.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let a;const d=new Y(u=>{a=u}),[c]=this.addManagedListeners(s,{bodyScrollEnd:()=>{a(),c()}});return{loadingComp:l,onReady:d}}return{loadingComp:l,onReady:Y.resolve()}}showValue(e,t){const{beans:i,column:o,rowNode:s,rangeFeature:n}=this,{userCompFactory:r}=i;let l=this.getValueToDisplay(),a;const d=s.stub&&s.groupData?.[o.getId()]==null,c=o.getColDef();if(d||this.isCellRenderer()){const u=this.createCellRendererParams();!d||pe(o)?a=sr(r,c,u):a=vc(r,c,u)}if(!a&&!d&&i.findSvc?.isMatch(s,o)){const u=this.createCellRendererParams();a=sr(r,{...o.getColDef(),cellRenderer:"agFindCellRenderer"},u)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(s,{checkSiblings:!0})){const u=this.editSvc.prepDetailsDuringBatch(this,{compDetails:a,valueToDisplay:l});u&&(u.compDetails?a=u.compDetails:u.valueToDisplay&&(l=u.valueToDisplay))}this.comp.setRenderDetails(a,l,e),this.customRowDragComp?.refreshVisibility(),!t&&n&&Ye(i,()=>n?.refreshRangeStyleAndHandle()),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){const e="ag-cell-value",t=this.column.getColDef().cellRenderer==="agCheckboxCellRenderer";let i="";return t&&(i=" ag-allow-overflow"),`${e}${i}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&nn(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:i}=this.beans.gridOptions,o=co(t),s=ft(this.column);return i==="custom"&&o!=="selectionColumn"&&s?!1:e.checkboxSelection||s&&typeof t=="object"&&ii(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),o=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||i||o||s}onPopupEditorClosed(e){const{editSvc:t}=this.beans;if(!t?.isEditing(this,{withOpenEditor:!0}))return;const i=e instanceof KeyboardEvent,o=e instanceof MouseEvent,s=i&&e.key===b.ESCAPE;t.stopEditing(this,{source:t.isBatchEditing()?"ui":"api",cancel:s,event:i||o?e:void 0}),s&&this.focusCell(!0,e)}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:i,rowNode:o,comp:s,eGui:n,beans:{valueSvc:r,gos:l,editSvc:a}}=this;return k(l,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay({column:i,node:o,from:"edit"}).value,setValue:c=>a?.setDataValue({rowNode:o,column:i},c)||o.setDataValue(i,c),formatValue:this.formatValue.bind(this),data:o.data,node:o,pinned:i.getPinned(),colDef:i.getColDef(),column:i,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:s.getParentOfValue(),registerRowDragger:(c,u,h,g)=>this.registerRowDragger(c,u,g),setTooltip:(c,u)=>{l.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(c,u),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell()}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){const{editSvc:t,comp:i}=this;!i?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell(e){const{editStyleFeature:t,customStyleFeature:i,rowCtrl:{rowEditStyleFeature:o},beans:{cellFlashSvc:s,filterManager:n},column:r,comp:l,suppressRefreshCell:a,tooltipFeature:d}=this;if(a)return;const{field:c,valueGetter:u,showRowGroup:h,enableCellChangeFlash:g}=r.getColDef(),p=c==null&&u==null&&h==null,f=e?.newData??!1,m=p||e&&(e.force||f),C=!!l,v=this.updateAndFormatValue(C),w=m||v;if(C){if(w){this.showValue(!!f,!1);const y=n?.isSuppressFlashingCellsBecauseFiltering();!e?.suppressFlash&&!y&&g&&s?.flashCell(this),t?.applyCellStyles?.(),i?.applyUserStyles(),i?.applyClassesFromColDef(),o?.applyRowStyles(),this.checkFormulaError()}d?.refreshTooltip(),i?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,i=this.valueFormatted,{value:o,valueFormatted:s}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit"});return this.value=o,this.valueFormatted=s,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i:!0}valuesAreEqual(e,t){const i=this.column.getColDef();return i.equals?i.equals(e,t):e===t}addDomData(e){const t=this.eGui;Jt(this.beans.gos,t,Ls,this),e.addDestroyFunc(()=>Jt(this.beans.gos,t,Ls,null))}createEvent(e,t){const{rowNode:i,column:o,value:s,beans:n}=this;return w3(n,e,t,{rowNode:i,column:o},s)}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature?.getColSpanningList()??[]}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:i}=this;au(e,t,i.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);Tn(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){const i=this.editSvc?.allowedFocusTargetOnValidation(this);i&&i!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:i},comp:o}=this;if(!o||t?.isEditing(this)||!this.isCellFocused()||!i.shouldTakeFocus())return;const s=()=>{if(!this.isAlive())return;const n=o.getFocusableElement();this.isCellFocused()&&n.focus({preventScroll:!0})};if(e){setTimeout(s,0);return}s()}onRowIndexChanged(){this.createCellPosition(),this.refreshAriaRowIndex(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&we(t,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(D3,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(M3,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(Ro(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const i=this.isCellFocused(),o=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss(P3,i),i&&(e?.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let s=this.comp.getFocusableElement();if(o){const r=Dt(s,null,!0);r.length&&(s=r[0])}const n=e?e.preventScrollOnBrowserFocus:!0;s.focus({preventScroll:n}),dd(t,s)}i&&this.focusEventWhileNotReady&&(this.focusEventWhileNotReady=null),i&&e&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:Ke(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(E3,!0),e.toggleCss(T3,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss(F3,t),e.toggleCss(x3,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(A3,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),i=this.createEvent(e,"cellContextMenu"),{beans:o}=this;o.eventSvc.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{o.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(i)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(j(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,i){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const o=this.createRowDragComp(e,t,i);o&&(this.customRowDragComp=o,this.addDestroyFunc(()=>{this.beans.context.destroyBean(o),this.customRowDragComp=null}),o.refreshVisibility())}createRowDragComp(e,t,i){const o=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,i);if(o)return this.beans.context.createBean(o),o}cellEditorAttached(){for(const e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){if(!pe(this.column)||!this.eGui)return;const{ariaRowIndex:e}=this.rowCtrl;e!=null&&wi(this.eGui,e)}getRootElement(){return this.eGui}};function Ol(e,t,i,o,s,n){if(i==null&&t==null)return;const r={},l={},a=(d,c)=>{for(const u of d.split(" "))u.trim()!=""&&c(u)};if(i){const d=Object.keys(i);for(let c=0;c{g?r[p]=!0:l[p]=!0})}}if(t&&n)for(const d of Object.keys(t))a(d,c=>{r[c]||(l[c]=!0)});n&&Object.keys(l).forEach(n),Object.keys(r).forEach(s)}function Pg(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var k3=class extends S{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const i=this.gos,o=r=>{if(typeof r=="string")e.push(r);else if(Array.isArray(r))for(const l of r)e.push(l)},s=i.get("rowClass");s&&o(s);const n=i.getCallback("getRowClass");if(n){const r={data:t.data,node:t,rowIndex:t.rowIndex},l=n(r);o(l)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,i=>{e.push(i)},()=>{})}processRowClassRules(e,t,i){const{gos:o,expressionSvc:s}=this.beans,n=k(o,{data:e.data,node:e,rowIndex:e.rowIndex});Ol(s,void 0,o.get("rowClassRules"),n,t,i)}processStylesFromGridOptions(e){const t=this.gos,i=t.get("rowStyle"),o=t.getCallback("getRowStyle");let s;if(o){const n={data:e.data,node:e,rowIndex:e.rowIndex};s=o(n)}if(s||i)return Object.assign({},i,s)}},L3=0,rn=class extends S{constructor(e,t,i,o,s){super(),this.rowNode=e,this.useAnimationFrameForCreate=o,this.printLayout=s,this.focusEventWhileNotReady=null,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.ariaRowIndex=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+L3++,this.rowId=Ci(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=Pg(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Ci(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,i,o){const{context:s,rowRenderer:n}=this.beans;o=Fo(this,s,o);const r={rowComp:e,element:t,containerType:i,compBean:o};this.allRowGuis.push(r),this.updateGui(i,r),this.initialiseRowComp(r);const l=this.rowNode,a=this.rowType==="FullWidthLoading"||l.stub,d=!l.data&&this.beans.rowModel.getType()==="infinite";!a&&!d&&!l.rowPinned&&n.dispatchFirstDataRenderedEvent(),this.setupFocus()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";for(const i of this.allRowGuis)i.element.style.display=t}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),Et(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const i=e.rowComp,o=this.getInitialRowClasses(e.containerType);for(const s of o)i.toggleCss(s,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&ns(e.element,!!this.rowNode.expanded),this.setRowCompRowId(i),this.setRowCompRowBusinessKey(i),Jt(t,e.element,Hs,this),e.compBean.addDestroyFunc(()=>Jt(t,e.element,Hs,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Ci(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(ps(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(ps(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const i=this.createBean(t,this.beans.context);this.rowDragComps.push(i),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(o=>o!==i),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(i,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),i=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(i)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:i,beans:{visibleCols:o}}=this,s=!!e||!o.isPinningLeft(),n=!!t,r=!!i||!o.isPinningRight();return s&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const{rowNode:e,gos:t,beans:{colModel:i}}=this,o=e.stub&&!t.get("suppressServerSideFullWidthLoadingRow")&&!t.get("groupHideOpenParents"),s=this.isNodeFullWidthCell(),n=t.get("masterDetail")&&e.detail,r=i.isPivotMode(),l=Zn(t,e,r);o?this.rowType="FullWidthLoading":n?this.rowType="FullWidthDetail":s?this.rowType="FullWidth":l?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:i}=this.beans;if(!i?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(i.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new _i(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,i=null){const o={list:[],map:{}},s=(d,c,u)=>{u!=null?o.list.splice(u,0,c):o.list.push(c),o.map[d]=c},n=[];for(const d of t){const c=d.getInstanceId();let u=e.map[c];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(d)),u&&s(c,u)}for(const d of e.list){const c=d.column.getInstanceId();if(o.map[c]!=null)continue;!this.isCellEligibleToBeRemoved(d,i)?n.push([c,d]):d.destroy()}if(n.length)for(const[d,c]of n){const u=o.list.findIndex(g=>g.column.getLeft()>c.column.getLeft()),h=u===-1?void 0:Math.max(u-1,0);s(d,c,h)}const{focusSvc:r,visibleCols:l}=this.beans,a=r.getFocusedCell();if(a&&a.column.getPinned()==i){const d=a.column.getInstanceId();if(!o.map[d]&&l.allCols.includes(a.column)){const u=this.createFocusedCellCtrl();if(u){const h=o.list.findIndex(p=>p.column.getLeft()>u.column.getLeft()),g=h===-1?void 0:Math.max(h-1,0);s(d,u,g)}}}return o}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,i=e.getFocusedCell();if(!i)return;const o=t?.getCellSpan(i.column,this.rowNode);if(o){if(o.firstNode!==this.rowNode||!o.doesSpanContain(i))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(i.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(const t of this.allRowGuis){const i=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(i,e)}}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const i=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i);const o=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,o,"left");const s=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,s,"right")}}isCellEligibleToBeRemoved(e,t){const{column:s}=e;if(s.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{visibleCols:n,editSvc:r}=this.beans,l=r?.isEditing(e),a=e.isCellFocused();return l||a?!(n.allCols.indexOf(s)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||ae(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=M(this.rowNode.oldRowTop),{visibleCols:i}=this.beans,o=i.isPinningLeft(),s=i.isPinningRight();if(t){const{slideInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=o,n.right=s}else{const{fadeInAnimation:n}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){n.fullWidth=!0;return}n.center=!0,n.left=o,n.right=s}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,l)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,l).params):!0,t=e(this.fullWidthGui,null),i=e(this.centerGui,null),o=e(this.leftGui,"left"),s=e(this.rightGui,"right");return t&&i&&o&&s}addListeners(){const{beans:e,gos:t,rowNode:i}=this,{expansionSvc:o,eventSvc:s,context:n,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...o?.getRowExpandedListeners(this)??{}}),i.detail&&this.addManagedListeners(i.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(i,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(s,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:l})=>{l&&!i.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(const a of this.allRowGuis)this.addRowDraggerToRow(a);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,n)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(const t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}for(const i of this.getAllCellCtrls())i.refreshCell(e);for(const i of this.allRowGuis)this.setRowCompRowId(i.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(i.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:"none",i=t==="above",o=t==="inside",s=t==="below",n=t!=="none",r=i||s,l=this.rowNode.uiLevel,a=r&&l>0,d=a?l.toString():"0";for(const c of this.allRowGuis){const u=c.rowComp;u.toggleCss("ag-row-highlight-above",i),u.toggleCss("ag-row-highlight-inside",o),u.toggleCss("ag-row-highlight-below",s),u.toggleCss("ag-row-highlight-indent",a),n?c.element.style.setProperty("--ag-row-highlight-level",d):c.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const e=this.rowNode.dragging;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Ke(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:i,column:o}=t;if(!(i.element===e.target))return;const r=this.rowNode,{focusSvc:l,navigation:a}=this.beans,d=l.getFocusedCell(),c={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:d?.column??o};a?.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||et(e))return;const t=this.allRowGuis.find(l=>l.element.contains(e.target)),i=t?t.element:null,o=i===e.target,s=j(this.beans);let n=!1;i&&s&&(n=i.contains(s)&&s.classList.contains("ag-cell"));let r=null;!o&&!n&&(r=Tt(this.beans,i,!1,e.shiftKey)),(this.isFullWidth()&&o||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>De(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(const i of this.allRowGuis)we(i.element,"tabindex",t)}setupFocus(){this.isFullWidth()&&(this.restoreFullWidthFocus(!0),this.onFullWidthRowFocused(this.focusEventWhileNotReady??void 0))}restoreFullWidthFocus(e=!1){const{focusSvc:t,editSvc:i}=this.beans;if(i?.isEditing(this)||!t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)||!t.shouldTakeFocus())return;const o=this.getFullWidthRowGuiForFocus();if(!o)return;const s=()=>{this.isAlive()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)&&o.element.focus({preventScroll:!0})};if(e){setTimeout(s,0);return}s()}getFullWidthRowGuiForFocus(e){if(this.fullWidthGui)return this.fullWidthGui;const t=this.beans.focusSvc.getFocusedCell(),i=this.beans.colModel.getCol(e?.column??t?.column);if(!i)return;const o=i?.pinned;return o==="right"?this.rightGui:o==="left"?this.leftGui:this.centerGui}setFullWidthRowFocusedClass(e,t){this.forEachGui(void 0,i=>{i.element.classList.toggle("ag-full-width-focus",t&&i===e)})}onFullWidthRowFocused(e){const{focusSvc:t}=this.beans;if(!(this.isFullWidth()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))){this.setFullWidthRowFocusedClass(void 0,!1);return}const o=this.getFullWidthRowGuiForFocus(e);if(!o){e&&(this.focusEventWhileNotReady=e),this.setFullWidthRowFocusedClass(void 0,!1);return}this.setFullWidthRowFocusedClass(o,!0),this.focusEventWhileNotReady=null,e?.forceBrowserFocus&&o.element.focus({preventScroll:!0})}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const i={list:[],map:{}};for(const o of e.list)o!==t&&(i.list.push(o),i.map[o.column.getInstanceId()]=o);return i}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"pointerdown":case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:i}=this;return k(this.gos,{type:e,node:i,data:i.data,rowIndex:i.rowIndex,rowPinned:i.rowPinned,event:t})}createRowEventWithSource(e,t){const i=this.createRowEvent(e,t);return i.source=this,i}onRowDblClick(e){if(et(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),i=this.getColumnForFullWidth(t);if(!(!t||!i))return{rowGui:t,column:i}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=jt(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:i}=this.beans;t?.removeAllCellRanges();const o=this.findFullWidthInfoForEvent(e);if(!o)return;const{rowGui:s,column:n}=o,r=s.element,l=e.target,a=this.rowNode;let d=e.defaultPrevented||mt();r&&r.contains(l)&&bi(l)&&(d=!1),i.setFocusedCell({rowIndex:a.rowIndex,column:n,rowPinned:a.rowPinned,forceBrowserFocus:d})}isSuppressMouseEvent(e){const{gos:t,rowNode:i}=this;if(this.isFullWidth()){const s=this.findFullWidthRowGui(e.target);return Ow(t,s?.rowComp.getFullWidthCellRendererParams(),i,e)}const o=Bs(t,e.target);return o!=null&&xo(t,o.column,i,e)}onRowClick(e){if(et(e)||this.lastMouseDownOnDragger)return;const i=this.isSuppressMouseEvent(e),{eventSvc:o,selectionSvc:s}=this.beans,n=this.createRowEventWithSource("rowClicked",e);n.isEventHandlingSuppressed=i,o.dispatchEvent(n),!i&&s?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:i,rowNode:o}=this,s=k(i,{fullWidth:!0,data:o.data,node:o,value:o.key,valueFormatted:o.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,l,a,d)=>this.addFullWidthRowDragging(r,l,a,d),setTooltip:(r,l)=>{i.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(r,l)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return wv(n,s);case"FullWidthGroup":{const{value:r,valueFormatted:l}=this.beans.valueSvc.getValueForDisplay({node:this.rowNode,includeValueFormatted:!0,from:"edit"});return s.value=r,s.valueFormatted=l,vv(n,s)}case"FullWidthLoading":return Cv(n,s);default:return mv(n,s)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,i="",o){const{rowDragSvc:s,context:n}=this.beans;if(!s||!this.isFullWidth())return;const r=s.createRowDragComp(()=>i,this.rowNode,void 0,e,t,o);this.createBean(r,n),this.addDestroyFunc(()=>{this.destroyBean(r,n)})}onUiLevelChanged(){const e=Pg(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;for(const o of this.allRowGuis)o.rowComp.toggleCss(t,!0),o.rowComp.toggleCss(i,!1)}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(const i of this.allRowGuis)i.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(const i of this.allRowGuis)i.rowComp.toggleCss("ag-row-last",t)}}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(const t of e)for(const i of this.allRowGuis)i.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0)},e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,i=>i.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),i=this.isFullWidth(),{rowNode:o,beans:s}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&n.push("ag-opacity-zero"),n.push(o.rowIndex%2===0?"ag-row-even":"ag-row-odd"),o.isRowPinned()&&(n.push("ag-row-pinned"),s.pinnedRowModel?.isManual()&&n.push("ag-row-pinned-manual")),!o.isRowPinned()&&o.pinnedSibling&&n.push("ag-row-pinned-source"),o.isSelected()&&n.push("ag-row-selected"),o.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),o.stub&&n.push("ag-row-loading"),i&&n.push("ag-full-width-row"),s.expansionSvc?.addExpandedCss(n,o),o.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=s;return r&&(r.processClassesFromGridOptions(n,o),r.preProcessRowClassRules(n,o)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),i&&(t==="left"&&n.push("ag-cell-last-left-pinned"),t==="right"&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:i}=e,{rowNode:o,beans:s,gos:n}=this;i.addManagedListeners(t,{pointerenter:r=>{r.pointerType==="mouse"&&o.dispatchRowEvent("mouseEnter")},pointerleave:r=>{r.pointerType==="mouse"&&o.dispatchRowEvent("mouseLeave")}}),i.addManagedListeners(o,{mouseEnter:()=>{!s.dragSvc?.dragging&&!n.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),o.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(i=>i.element);for(const i of t)i.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),i=this.applyPaginationOffset(t.top,!0)-100,o=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(i,e),o)}forEachGui(e,t){if(e)t(e);else for(const i of this.allRowGuis)t(i)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),s=$n(this.gos)?dt(this.beans,this.rowNode).height:void 0,n=s?`${Math.min(i,s)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,n&&r.element.style.setProperty("--ag-line-height",n)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&ei(this.gos)&&!t.sticky)if(t.rowTop!=null){const s=this.roundRowTopToBounds(t.rowTop);this.setRowTop(s)}else for(const s of this.allRowGuis)s.rowComp.toggleCss("ag-opacity-zero",!0);this.fullWidthGui?.element.contains(j(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const i=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(i),this.beans.eventSvc.dispatchEvent(i),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const e=t=>{for(const i of t.list)i.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const i=this.beans.pageBounds.getPixelOffset();return e+i*(t?1:-1)}setRowTop(e){if(!this.printLayout&&M(e)){const t=this.applyPaginationOffset(e),s=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(s)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let i;if(t.sticky)i=t.stickyRowTop;else{const o=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,s=this.applyPaginationOffset(o);i=t.isRowPinned()?s:this.beans.rowContainerHeight.getRealPixelPosition(s)}return i+"px"}setRowTopStyle(e){for(const t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let i=null;for(const o of this.getAllCellCtrls())o.column==e&&(i=o);if(i!=null||t)return i;for(const o of this.getAllCellCtrls())o?.getColSpanningList().indexOf(e)>=0&&(i=o);return i}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const i=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),o=this.rowNode.rowIndex%2===0,s=this.ariaRowIndex=i+this.rowNode.rowIndex+1;this.forEachGui(e,n=>{n.rowComp.setRowIndex(t),n.rowComp.toggleCss("ag-row-even",o),n.rowComp.toggleCss("ag-row-odd",!o),wi(n.element,s)})}},B3=class extends S{constructor(){super(),this.beanName="navigation",this.onPageDown=vd(this.onPageDown,100),this.onPageUp=vd(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const i=e.key,o=e.altKey,s=e.ctrlKey||e.metaKey,n=!!this.beans.rangeSvc&&e.shiftKey,r=ju(this.gos,e);let l=!1;switch(i){case b.PAGE_HOME:case b.PAGE_END:!s&&!o&&(this.onHomeOrEndKey(i),l=!0);break;case b.LEFT:case b.RIGHT:case b.UP:case b.DOWN:if(!r)return!1;s&&!o&&!n&&(this.onCtrlUpDownLeftRight(i,r),l=!0);break;case b.PAGE_DOWN:case b.PAGE_UP:!s&&!o&&(l=this.handlePageUpDown(i,r,t));break}return l&&e.preventDefault(),l}handlePageUpDown(e,t,i){return i&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===b.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:i,focusIndex:o,focusColumn:s,isAsync:n,rowPinned:r}){const{scrollFeature:l}=this.gridBodyCon;M(i)&&!i.isPinned()&&l.ensureColumnVisible(i),M(e)&&l.ensureIndexVisible(e,t),n||l.ensureIndexVisible(o);const{focusSvc:a}=this.beans;a.setFocusedCell({rowIndex:o,column:s,rowPinned:r,forceBrowserFocus:!0}),this.setRangeToCellIfSupported({rowIndex:o,rowPinned:r,column:s})}onPageDown(e){const t=this.beans,i=Gl(t),o=this.getViewportHeight(),{pageBounds:s,rowModel:n,rowAutoHeight:r}=t,l=s.getPixelOffset(),a=i.top+o,d=n.getRowIndexAtPixel(a+l);r?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,i=Gl(t),{pageBounds:o,rowModel:s,rowAutoHeight:n}=t,r=o.getPixelOffset(),l=i.top,a=s.getRowIndexAtPixel(l+r);n?.active?this.navigateToNextPageWithAutoHeight(e,a,!0):this.navigateToNextPage(e,a,!0)}navigateToNextPage(e,t,i=!1){const{pageBounds:o,rowModel:s}=this.beans,n=this.getViewportHeight(),r=o.getFirstRow(),l=o.getLastRow(),a=o.getPixelOffset(),d=s.getRow(e.rowIndex),c=i?d?.rowHeight-n-a:n-a,u=d?.rowTop+c;let h=s.getRowIndexAtPixel(u+a);if(h===e.rowIndex){const p=i?-1:1;t=h=e.rowIndex+p}let g;i?(g="bottom",hl&&(h=l),t>l&&(t=l)),this.isRowTallerThanView(s.getRow(h))&&(t=h,g="top"),this.navigateTo({scrollIndex:t,scrollType:g,scrollColumn:null,focusIndex:h,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,i=!1){this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const o=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:o,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const i=t?-1:1,o=this.getViewportHeight(),{pageBounds:s,rowModel:n}=this.beans,r=s.getLastRow();let l=0,a=e.rowIndex;for(;a>=0&&a<=r;){const d=n.getRow(a);if(d){const c=d.rowHeight??0;if(l+c>o)break;l+=c}a+=i}return Math.max(0,Math.min(a,r))}getViewportHeight(){const e=this.beans,t=Gl(e),i=this.beans.scrollVisibleSvc.getScrollbarWidth();let o=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(o-=i),o}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const i=this.beans.cellNavigation.getNextCellToFocus(e,t,!0);if(!i)return;const o=this.getNormalisedPosition(i),{rowIndex:s,rowPinned:n,column:r}=o??i,l=r;this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:l,focusIndex:s,focusColumn:l,rowPinned:n})}onHomeOrEndKey(e){const t=e===b.PAGE_HOME,{visibleCols:i,pageBounds:o,rowModel:s}=this.beans,n=i.allCols,r=t?o.getFirstRow():o.getLastRow(),l=s.getRow(r);if(!l)return;const a=(t?n:[...n].reverse()).find(d=>!d.isSuppressNavigable(l)&&!pe(d));a&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:a,focusIndex:r,focusColumn:a})}onTabKeyDown(e,t){const i=t.shiftKey,o=this.tabToNextCellCommon(e,i,t),s=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:l,gos:a}=s;if(o!==!1){o?t.preventDefault():o===null&&n.get("gridCtrl").allowFocusForNextCoreContainer(i);return}if(i){const{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?d===0:d===r.getFirstRow())&&(a.get("headerHeight")===0||_e(s)?ai(s,!0,!0):(t.preventDefault(),l.focusPreviousFromFirstCell(t)))}else e instanceof _i&&e.focusCell(!0),(l.focusOverlay(!1)||ai(s,i))&&t.preventDefault()}tabToNextCell(e,t){const i=this.beans,{focusSvc:o,rowRenderer:s}=i,n=o.getFocusedCell();if(!n)return!1;let r=li(i,n);return!r&&(r=s.getRowByPosition(n),!r?.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t,"api")}tabToNextCellCommon(e,t,i,o="ui"){const{editSvc:s,focusSvc:n}=this.beans;let r;const l=e instanceof _i?e:e.getAllCellCtrls()?.[0];return s?.isEditing()?r=s?.moveToNextCell(l,t,i,o):r=this.moveToNextCellNotEditing(e,t,i),r===null?r:r||!!n.focusedHeader}moveToNextCellNotEditing(e,t,i){const o=this.beans.visibleCols.allCols;let s;if(e instanceof rn){if(s={...e.getRowPosition(),column:t?o[0]:q(o)},this.gos.get("embedFullWidthRows")&&i){const r=e.findFullWidthInfoForEvent(i);r&&(s.column=r.column)}}else s=e.getFocusedCellPosition();const n=this.findNextCellToFocusOn(s,{backwards:t,startEditing:!1});if(n===!1)return null;if(n instanceof _i)n.focusCell(!0);else if(n)return this.tryToFocusFullWidthRow(n,t);return M(n)}findNextCellToFocusOn(e,{backwards:t,startEditing:i,skipToNextEditableCell:o}){let s=e;const n=this.beans,{cellNavigation:r,gos:l,focusSvc:a,rowRenderer:d}=n;for(;;){e!==s&&(e=s),t||(s=this.getLastCellOfColSpan(s)),s=r.getNextTabbedCell(s,t);const c=l.getCallback("tabToNextCell");if(M(c)){const p=c({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:s||null});if(p===!0)s=e;else{if(p===!1)return!1;s={rowIndex:p.rowIndex,column:p.column,rowPinned:p.rowPinned}}}if(!s)return null;if(s.rowIndex<0){const g=Be(n);return a.focusHeaderPosition({headerPosition:{headerRowIndex:g+s.rowIndex,column:s.column},fromCell:!0}),null}const u=l.get("editType")==="fullRow";if(i&&(!u||o)&&!this.isCellEditable(s))continue;this.ensureCellVisible(s);const h=li(n,s);if(!h){const g=d.getRowByPosition(s);if(!g||!g.isFullWidth()||i)continue;return{...g.getRowPosition(),column:s?.column}}if(!r.isSuppressNavigable(h.column,h.rowNode))return h.setFocusedCellPosition(s),this.setRangeToCellIfSupported(s),h}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:i,rowModel:o}=this.beans;return t==="top"?i?.getPinnedTopRow(e):t==="bottom"?i?.getPinnedBottomRow(e):o.getRow(e)}navigateToNextCell(e,t,i,o){let s=i,n=!1;const r=this.beans,{cellNavigation:l,focusSvc:a,gos:d}=r;for(;s&&(s===i||!this.isValidNavigateCell(s));)d.get("enableRtl")?t===b.LEFT&&(s=this.getLastCellOfColSpan(s)):t===b.RIGHT&&(s=this.getLastCellOfColSpan(s)),s=l.getNextCellToFocus(t,s),n=K(s);if(n&&e&&e.key===b.UP&&(s={rowIndex:-1,rowPinned:null,column:i.column}),o){const u=d.getCallback("navigateToNextCell");if(M(u)){const g=u({key:t,previousCellPosition:i,nextCellPosition:s||null,event:e});M(g)?s={rowPinned:g.rowPinned,rowIndex:g.rowIndex,column:g.column}:s=null}}if(!s)return;if(s.rowIndex<0){const u=Be(r);a.focusHeaderPosition({headerPosition:{headerRowIndex:u+s.rowIndex,column:s.column??i.column},event:e||void 0,fromCell:!0});return}const c=this.getNormalisedPosition(s);c?this.focusPosition(c):this.tryToFocusFullWidthRow(s)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const i=li(this.beans,e);return i?(e=i.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:i,rowRenderer:o,focusSvc:s,eventSvc:n}=this.beans,r=i.allCols;if(!o.getRowByPosition(e)?.isFullWidth())return!1;const a=s.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?q(r):r[0])};this.focusPosition(d);const c=t??(a!=null&&Xc(d,a));return n.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){const{focusSvc:t}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.setRangeToCellIfSupported(e)}setRangeToCellIfSupported(e){pe(e.column)||this.beans.rangeSvc?.setRangeToCell(e)}isValidNavigateCell(e){return!!We(this.beans,e)}getLastCellOfColSpan(e){const t=li(this.beans,e);if(!t)return e;const i=t.getColSpanningList();return i.length===1?e:{rowIndex:e.rowIndex,column:q(i),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=jn(this.gos),i=this.beans.rowModel.getRow(e.rowIndex),o=t&&i?.sticky,{scrollFeature:s}=this.gridBodyCon;!o&&K(e.rowPinned)&&s.ensureIndexVisible(e.rowIndex),e.column.isPinned()||s.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function Gl(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var Dg={moduleName:"KeyboardNavigation",version:P,beans:[B3,Jy,py],apiFunctions:{getFocusedCell:e3,clearFocusedCell:t3,setFocusedCell:i3,setFocusedHeader:n3,tabToNextCell:o3,tabToPreviousCell:s3}},H3=class extends S{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:i}=this.beans;t?t.calculatePages():e.calculateBounds(0,i.getRowCount()-1)}},O3=class extends S{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,i=e?.rowTop??0,o=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:i,pageLastPixel:o}}calculateBounds(e,t){const{rowModel:i}=this.beans,o=i.getRowBounds(e);o&&(o.rowIndex=e),this.topRowBounds=o;const s=i.getRowBounds(t);s&&(s.rowIndex=t),this.bottomRowBounds=s,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},G3=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",V3=class extends S{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const i of this.elements)i&&(_(i,t),Ve(i,e))}},N3=class extends S{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:i}=this.beans,o=ae(e,"print"),s=o?0:t.getColsLeftWidth(),n=o?0:t.getDisplayedColumnsRightWidth();s!=this.leftWidth&&(this.leftWidth=s,i.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,i.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=yi(e);if(t<=50)return;const i=this.getPinnedColumnsOverflowingViewport(t-50),o=this.gos.getCallback("processUnpinnedColumns"),{columns:s,hasLockedPinned:n}=i;let r=s;!r.length&&!n||(o&&(r=o({columns:r,viewportWidth:t})),r?.length&&(r=r.filter(l=>!pe(l)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new V3(e,t)}setColsPinned(e,t,i){const{colModel:o,colAnimation:s,visibleCols:n,gos:r}=this.beans;if(!o.cols||!e?.length)return;if(ae(r,"print")){F(37);return}s?.start();let l;t===!0||t==="left"?l="left":t==="right"?l="right":l=null;const a=[];for(const d of e){if(!d)continue;const c=o.getCol(d);c&&c.getPinned()!==l&&(this.setColPinned(c,l),a.push(c))}a.length&&(n.refresh(i),dh(this.eventSvc,a,i)),s?.finish()}initCol(e){const{pinned:t,initialPinned:i}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,i)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const i=e.pinned==="left",o=e.pinned==="right";e.hidden=!0;const s=()=>{const n=i?this.leftWidth:this.rightWidth;if(n==null)return;const r=n==0,l=e.hidden!==r,a=this.gos.get("enableRtl"),d=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(a&&i||!a&&o)?n+d:n;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),l&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:s,rightPinnedWidthChanged:s,scrollVisibilityChanged:s,scrollbarWidthChanged:s})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:o,rightWidth:s}=this,n=yi(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(o+s+e>n)if(n>o+s)e=n-o-s;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,i=this.leftWidth??0,o=t+i;let s=!1;if(o0;){if(a0){const g=r[d++];if(g.colDef.lockPinned){s=!0;continue}h-=g.getActualWidth(),u.push(g)}}return{columns:u,hasLockedPinned:s}}},z3={moduleName:"PinnedColumn",version:P,beans:[N3],css:[G3]},W3=class extends he{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=te(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=oe(e),i=this.descriptionContainer=t.createElement("div");i.classList.add("ag-aria-description-container"),Ua(i,"polite"),Em(i,"additions text"),Rm(i,!0),e.eRootDiv.appendChild(i)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}\u200B`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(le(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},_3=class extends W3{},U3={moduleName:"Aria",version:P,beans:[_3]},q3=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",Mg="ag-delay-render",$3=class extends S{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add(Mg)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;const{renderStatus:t,ctrlsSvc:i}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}i.getGridBodyCtrl().eGridBody.classList.remove(Mg),this.alreadyRevealed=!0}},K3={moduleName:"ColumnDelayRender",version:P,beans:[$3],css:[q3]},ln=class extends U{constructor(){super()}},j3={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},Y3=class extends ln{constructor(){super(...arguments),this.eExportingIcon=x,this.eExportingText=x}init(e){const{beans:t}=this;this.setTemplate(j3);const i=Se("overlayExporting",t,null);i&&this.eExportingIcon.appendChild(i);const o=e.exporting?.overlayText??this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}},Q3={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},Z3=class extends ln{constructor(){super(...arguments),this.eLoadingIcon=x,this.eLoadingText=x}init(e){const{beans:t,gos:i}=this,o=Ke(i.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(o??Q3),!o){const s=Se("overlayLoading",t,null);s&&this.eLoadingIcon.appendChild(s);const n=e.loading?.overlayText??this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=n,t.ariaAnnounce.announceValue(n,"overlay")}}},X3={tag:"span",cls:"ag-overlay-no-matching-rows-center"},J3=class extends ln{init(e){const{beans:t}=this;this.setTemplate(X3);const i=e.noMatchingRows?.overlayText??this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}},e2={tag:"span",cls:"ag-overlay-no-rows-center"},t2=class extends ln{init(e){const{beans:t,gos:i}=this,o=Ke(i.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(o??e2),!o){const s=e.noRows?.overlayText??this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=s,t.ariaAnnounce.announceValue(s,"overlay")}}};function i2(e){e.overlays?.showLoadingOverlay()}function o2(e){e.overlays?.showNoRowsOverlay()}function s2(e){e.overlays?.hideOverlay()}var n2=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex;padding:var(--ag-spacing)}",r2={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},Tg=class extends U{constructor(){super(r2),this.eOverlayWrapper=x,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(n2)}handleKeyDown(e){if(e.key!==b.TAB||e.defaultPrevented||et(e))return;const{beans:t,eOverlayWrapper:i}=this;if(i&&Tt(t,i,!1,e.shiftKey))return;let s=!1;e.shiftKey?s=t.focusSvc.focusGridView({column:q(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):s=ai(t,!1),s&&e.preventDefault()}updateLayoutClasses(e,t){const i=this.eOverlayWrapper;if(!i)return;const o=i.classList,{AUTO_HEIGHT:s,NORMAL:n,PRINT:r}=Ue;o.toggle(s,t.autoHeight),o.toggle(n,t.normal),o.toggle(r,t.print)}postConstruct(){this.createManagedBean(new Nr(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper?.classList;if(!t){this.activeCssClass=null;return}this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=i,!e)return this.refreshWrapperPadding(),Y.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),i&&this.isGridFocused()){const o=j(this.beans);o&&!es(this.beans)&&(this.elToFocusAfter=o)}return e.then(o=>{const s=this.eOverlayWrapper;if(!s){this.destroyBean(o);return}if(this.activePromise!==e){this.activeOverlay!==o&&(this.destroyBean(o),o=null);return}this.activePromise=null,o&&(this.activeOverlay!==o&&(s.appendChild(o.getGui()),this.activeOverlay=o),i&&this.isGridFocused()&&Mt(s))}),e}refreshWrapperPadding(){if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}const e=!!this.activeOverlay||!!this.activePromise;let t=0;e&&!this.overlayExclusive&&(t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),t!==this.oldWrapperPadding&&(this.oldWrapperPadding=t,this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`))}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);const i=this.eOverlayWrapper;i&&le(i),t?.focus?.({preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=j(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},l2={selector:"AG-OVERLAY-WRAPPER",component:Tg},a2=["refresh"],Wo=e=>({name:e,optionalMethods:a2}),gi={id:"agLoadingOverlay",overlayType:"loading",comp:Wo("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:e=>{const t=e.get("loading");return t===!1||e.get("suppressLoadingOverlay")===!0&&t!==!0}},Ui={id:"agNoRowsOverlay",overlayType:"noRows",comp:Wo("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:e=>e.get("suppressNoRowsOverlay")},Vl={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:Wo("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},an={id:"agExportingOverlay",overlayType:"exporting",comp:Wo("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},dn={id:"activeOverlay",comp:Wo("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},d2=e=>e?{agLoadingOverlay:gi,agNoRowsOverlay:Ui,agNoMatchingRowsOverlay:Vl,agExportingOverlay:an}[e]??dn:null,c2=e=>e?{loading:gi,noRows:Ui,noMatchingRows:Vl,exporting:an}[e]:null,u2=class extends S{constructor(){super(...arguments),this.beanName="overlays",this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.newColumnsLoadedCleanup=null}postConstruct(){const e=this.gos;this.showInitialOverlay=J(e);const t=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[i,o,s,n]=this.addManagedEventListeners({newColumnsLoaded:t,rowCountReady:()=>{this.disableInitialOverlay(),t(),o()},rowDataUpdated:t,modelUpdated:t});this.newColumnsLoadedCleanup=i,this.addManagedPropertyListeners(["loading","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams"],r=>this.onPropChange(new Set(r.changeSet?.properties)))}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(e,t){this.isAlive()&&(t?this.eWrapper===e&&(this.eWrapper=void 0):this.eWrapper=e,this.updateOverlay(!1))}isVisible(){return!!this.currentDef}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos;if(!this.eWrapper||e.get("activeOverlay")||this.isDisabled(gi))return;const t=e.get("loading");!t&&t!==void 0||this.doShowOverlay(gi)}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;!this.eWrapper||e.get("activeOverlay")||e.get("loading")||this.isDisabled(Ui)||(this.userForcedNoRows=!0,this.doShowOverlay(Ui))}async showExportOverlay(e){const{gos:t,beans:i}=this;if(!this.eWrapper||t.get("activeOverlay")||t.get("loading")||this.isDisabled(an)||this.userForcedNoRows&&this.currentDef===Ui){e();return}const o=this.getDesiredDefWithOverride(an);if(!o){e();return}this.exportsInProgress++,this.focusedCell=i.focusSvc.getFocusedCell(),await this.doShowOverlay(o),await new Promise(n=>setTimeout(()=>n()));const s=Date.now();try{e()}finally{const n=Date.now()-s,r=Math.max(0,300-n),l=()=>{this.exportsInProgress--,this.exportsInProgress===0&&(this.updateOverlay(!1),ou(i,this.focusedCell),this.focusedCell=null)};r>0?setTimeout(()=>l(),r):l()}}hideOverlay(){const e=this.gos;this.showInitialOverlay=!1;const t=this.userForcedNoRows;if(this.userForcedNoRows=!1,e.get("loading")){F(99);return}if(e.get("activeOverlay")){F(296);return}if(this.currentDef===Vl){F(297);return}this.doHideOverlay(),t&&this.getOverlayDef()!==Ui&&this.updateOverlay(!1)}getOverlayWrapperSelector(){return l2}getOverlayWrapperCompClass(){return Tg}onPropChange(e){const t=e.has("activeOverlay");if((t||e.has("loading"))&&this.updateOverlay(t))return;const i=this.currentDef,o=this.eWrapper?.activeOverlay;if(o&&i){const s=e.has("activeOverlayParams");if(i===dn)s&&o.refresh?.(this.makeCompParams(!0));else{const n=i.paramsKey;(e.has("overlayComponentParams")||n&&e.has(n))&&o.refresh?.(this.makeCompParams(!1,n,i.overlayType))}}}updateOverlay(e){const t=this.eWrapper;if(!t)return this.currentDef=null,!1;const i=this.getDesiredDefWithOverride(),o=this.currentDef,s=i===dn&&e;return i!==o?i?(this.doShowOverlay(i),!0):(this.disableInitialOverlay(),this.doHideOverlay()):s&&i?(t.hideOverlay(),this.doShowOverlay(i),!0):(i||this.disableInitialOverlay(),!1)}getDesiredDefWithOverride(e){const{gos:t}=this;let i=d2(t.get("activeOverlay"));return i||(i=e??this.getOverlayDef(),i&&this.isDisabled(i)&&(i=null)),i}getOverlayDef(){const{gos:e,beans:t}=this,{rowModel:i}=t,o=e.get("loading");if(o!==void 0){if(this.disableInitialOverlay(),o)return gi}else if(this.showInitialOverlay){if(!this.isDisabled(gi)&&(!e.get("columnDefs")||!e.get("rowData")))return gi;this.disableInitialOverlay()}else this.disableInitialOverlay();const n=i.getOverlayType();return c2(n)}disableInitialOverlay(){this.showInitialOverlay=!1,this.newColumnsLoadedCleanup?.(),this.newColumnsLoadedCleanup=null}doShowOverlay(e){const{gos:t,beans:i}=this,{userCompFactory:o}=i;this.currentDef=e;const s=e!==dn,n=!!e.exclusive;this.exclusive=n;let r;(e.paramsKey&&t.get(e.paramsKey)||e.compKey&&t.get(e.compKey))&&(r=e.paramsKey);let l;s&&(t.get("overlayComponent")||t.get("overlayComponentSelector"))&&(l=o.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),l??(l=o.getCompDetailsFromGridOptions(e.comp,s?e.id:void 0,this.makeCompParams(!s,r,e.overlayType),!1));const a=l?.newAgStackInstance()??null,d=this.eWrapper?this.eWrapper.showOverlay(a,e.wrapperCls,n):Y.resolve();return this.eWrapper?.refreshWrapperPadding(),this.setExclusive(n),d}makeCompParams(e,t,i){const{gos:o}=this,s=e?o.get("activeOverlayParams"):{...o.get("overlayComponentParams"),...t&&o.get(t)||null,overlayType:i};return k(o,s??{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;const t=this.eWrapper;return t&&(t.hideOverlay(),t.refreshWrapperPadding(),this.setExclusive(!1)),e}setExclusive(e){this.oldExclusive!==e&&(this.oldExclusive=e,this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"}))}isDisabled(e){const{gos:t}=this;return e.overlayType&&t.get("suppressOverlays")?.includes(e.overlayType)||e.isSuppressed?.(t)===!0}},h2={moduleName:"Overlay",version:P,userComponents:{agLoadingOverlay:Z3,agNoRowsOverlay:t2,agNoMatchingRowsOverlay:J3,agExportingOverlay:Y3},apiFunctions:{showLoadingOverlay:i2,showNoRowsOverlay:o2,hideOverlay:s2},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[u2]},g2=class extends S{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=xv(),Rt(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;Rt(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),i=e/t;return this.maxScrollY*i}},p2=400,f2=class extends S{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{for(const n of this.getAllCellCtrls())n.onCellSelectionChanged()},t=()=>{for(const n of this.getAllCellCtrls())n.updateRangeBordersIfRangeCount()},i=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},o=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>o()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{Ze(this.gos)?i():o()}),Ze(this.gos)&&i()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",o=>this.onSuppressCellFocusChanged(o.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:o,previousValue:s})=>{(!s&&o||s&&!o)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:i}=this.beans;if(i&&this.addManagedPropertyListener("showOpenedGroup",()=>{const o=i.columns;o.length&&this.refreshCells({columns:o,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const o=this.gridBodyCtrl;o.setStickyTopHeight(0),o.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=ae(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new m2(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),i=this.cachedRowCtrls?.getEntries()??[];t.length>0||i.length>0?this.allRowCtrls=[...e,...t,...i]:this.allRowCtrls=e}isCellBeingRendered(e,t){const i=this.rowCtrlsByRowIndex[e];return!t||!i?!!i:i.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!i.getCellCtrl(t)||!i.isRowRendered()}updateCellFocus(e){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(e?.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t)for(const i of this.getAllCellCtrls())t.onFlashCells(i,e)},columnHoverChanged:()=>{for(const e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(const e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.getCols();for(const t of e){const i=a=>{for(const d of this.getAllCellCtrls())d.column===t&&a(d)},o=()=>{i(a=>a.onLeftChanged())},s=()=>{i(a=>a.onWidthChanged())},n=()=>{i(a=>a.onFirstRightPinnedChanged())},r=()=>{i(a=>a.onLastLeftPinnedChanged())},l=()=>{i(a=>a.onColDefChanged())};t.__addEventListener("leftChanged",o),t.__addEventListener("widthChanged",s),t.__addEventListener("firstRightPinnedChanged",n),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",l),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",o),t.__removeEventListener("widthChanged",s),t.__removeEventListener("firstRightPinnedChanged",n),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",l)})}}onDomLayoutChanged(){const e=ae(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),i=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];for(const i of this.getAllRowCtrls()){const o=i.getCellCtrl(e,!0)?.eGui;o&&t.push(o)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,i){const{pinnedRowModel:o,beans:s,printLayout:n}=this,r=Object.fromEntries(e.map(a=>[a.rowNode.id,a]));o?.forEachPinnedRow(t,(a,d)=>{const c=e[d];c&&o.getPinnedRowById(c.rowNode.id,t)===void 0&&(c.destroyFirstPass(),c.destroySecondPass()),a.id in r&&i?(e[d]=r[a.id],delete r[a.id]):e[d]=new rn(a,s,!1,!1,n)});const l=(t==="top"?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount())??0;e.length=l}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const i=o=>{const s=o[e.rowIndex];s&&s.rowNode===e&&(s.destroyFirstPass(),s.destroySecondPass(),o[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":i(this.topRowCtrls);break;case"bottom":i(this.bottomRowCtrls);break;default:i(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(const o of e??[])this.redrawRow(o,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const i=!e.domLayoutChanged&&!!e.recycleRows,o=e.animate&&ei(this.gos),s=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n,gos:r}=this;if(n){n.checkStickyRows();const l=n.extraTopHeight+n.extraBottomHeight;l&&this.updateContainerHeights(l)}this.recycleRows(s,o),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?i:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,i=this.gos.get("suppressScrollOnNewData");t&&!i&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let i=this.pageBounds.getCurrentPageHeight();i===0&&(i=1),t.setModelHeight(i+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(Ne(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,i=this.findPositionToFocus(e);if(!i){t.focusHeaderPosition({headerPosition:{headerRowIndex:Be(this.beans)-1,column:e.column}});return}if(e.rowIndex!==i.rowIndex||e.rowPinned!=i.rowPinned){t.setFocusedCell({...i,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(k(this.gos,{...i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:i}=this.beans;let o=e;for(o.rowPinned==null&&t&&i&&!t.isRowInPage(o.rowIndex)&&(o={rowPinned:null,rowIndex:i.getFirstRow()});o;){if(o.rowPinned==null&&i)if(o.rowIndexi.getLastRow()&&(o={rowPinned:null,rowIndex:i.getLastRow()});const s=this.getRowByPosition(o);if(s?.isAlive())return{...s.getRowPosition(),column:e.column};o=yo(this.beans,o)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),i=t.length;for(let o=0;o{const s=o.rowNode;return zl(s,t)})}getCellCtrls(e,t){let i;M(t)&&(i={},t.forEach(s=>{const n=this.colModel.getCol(s);M(n)&&(i[n.getId()]=!0)}));const o=[];for(const s of this.getRowCtrls(e))for(const n of s.getAllCellCtrls()){const r=n.column.getId();i&&!i[r]||o.push(n)}return o}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const i of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[i].rowNode.id==null&&e.push(i);this.removeRowCtrls(e);const t={};for(const i of Object.values(this.rowCtrlsByRowIndex)){const o=i.rowNode;t[o.id]=i}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const i of e){const o=this.rowCtrlsByRowIndex[i];o&&(o.destroyFirstPass(t),o.destroySecondPass()),delete this.rowCtrlsByRowIndex[i]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:i}=this.beans,{afterScroll:o}=e;let s;const n=this.stickyRowFeature;n&&(s=t?.getFocusCellToUseAfterRefresh()||void 0);const r=this.firstRenderedRow,l=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let a=!1;if(n){a=n.checkStickyRows();const c=n.extraTopHeight+n.extraBottomHeight;c&&this.updateContainerHeights(c)}const d=this.firstRenderedRow!==r||this.lastRenderedRow!==l;if(!(o&&!a&&!d)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,o),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(o&&!a),s!=null)){const c=t?.getFocusCellToUseAfterRefresh();s!=null&&c==null&&(i?.flushAllFrames(),this.restoreFocusedCell(s))}}removeRowCompsNotToDraw(e,t){const i={};for(const n of e)i[n]=!0;const s=Object.keys(this.rowCtrlsByRowIndex).filter(n=>!i[n]);this.removeRowCtrls(s,t)}calculateIndexesToDraw(e){const t=[];for(let r=this.firstRenderedRow;r<=this.lastRenderedRow;r++)t.push(r);const i=this.beans.pagination,o=this.beans.focusSvc?.getFocusedCell()?.rowIndex;o!=null&&(othis.lastRenderedRow)&&(!i||i.isRowInPage(o))&&o{const l=r.rowNode.rowIndex;l==null||l===o||(lthis.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(l)};for(const r of Object.values(this.rowCtrlsByRowIndex))s(r);if(e)for(const r of Object.values(e))s(r);t.sort((r,l)=>r-l);const n=[];for(let r=0;r{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),i=e.isPinningRight();(this.pinningLeft!==t||i!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=i,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];for(const t of this.getFullWidthRowCtrls()){const i=t.rowNode.rowIndex;e.push(i.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=Nl(e);return this.getAllRowCtrls().filter(i=>{if(!i.isFullWidth())return!1;const o=i.rowNode;return!(t!=null&&!zl(o,t))})}createOrUpdateRowCtrl(e,t,i,o){let s,n=this.rowCtrlsByRowIndex[e];if(n||(s=this.rowModel.getRow(e),M(s)&&M(t)&&t[s.id]&&s.alreadyRendered&&(n=t[s.id],t[s.id]=null)),!n)if(s||(s=this.rowModel.getRow(e)),M(s))n=this.createRowCon(s,i,o);else return;s&&(s.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=n}destroyRowCtrls(e,t){const i=[];if(e){for(const o of Object.values(e))if(o){if(this.cachedRowCtrls&&o.isCacheable()){this.cachedRowCtrls.addRow(o);continue}if(o.destroyFirstPass(!t),t){const s=o.instanceId;this.zombieRowCtrls[s]=o,i.push(()=>{o.destroySecondPass(),delete this.zombieRowCtrls[s]})}else o.destroySecondPass()}}t&&(i.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const o of i)o()},p2))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=Ft(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:i}=this;e.updateOffset();let o,s;if(!i.isRowsToRender())o=0,s=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),o=t.getFirstRow(),s=t.getLastRow();else{const c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),h=this.gos.get("suppressRowVirtualisation");let g=!1,p,f;do{const y=t.getPixelOffset(),{pageFirstPixel:R,pageLastPixel:E}=t.getCurrentPagePixelRange(),D=e.divStretchOffset,B=u.getVScrollPosition(),O=B.top,G=B.bottom;h?(p=R+D,f=E+D):(p=Math.max(O+y-c,R)+D,f=Math.min(G+y+c,E)+D),this.firstVisibleVPixel=Math.max(O+y,R)+D,this.lastVisibleVPixel=Math.min(G+y,E)+D,g=this.ensureAllRowsInRangeHaveHeightsCalculated(p,f)}while(g);let m=i.getRowIndexAtPixel(p),C=i.getRowIndexAtPixel(f);const v=t.getFirstRow(),w=t.getLastRow();mw&&(C=w),o=m,s=C}const n=ae(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),l=Math.max(this.getRowBuffer(),500);n&&!r&&s-o>l&&(s=o+l);const a=o!==this.firstRenderedRow,d=s!==this.lastRenderedRow;(a||d)&&(this.firstRenderedRow=o,this.lastRenderedRow=s,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:o,lastRow:s}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,Ye(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const i=this.pinnedRowModel?.ensureRowHeightsValid(),o=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:s,rowModel:n}=this,r=n.ensureRowHeightsValid(e,t,s.getFirstRow(),s.getLastRow());return(r||o)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),o||r||i?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const o=e.rowNode,s=this.focusSvc.isRowFocused(o.rowIndex,o.rowPinned),n=this.editSvc?.isEditing(e),r=o.detail;return s||n||r?!!this.isRowPresent(o):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,i){const o=this.cachedRowCtrls?.getRow(e)??null;if(o)return o;const s=i&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new rn(e,this.beans,t,s,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(o=>o.rowNode),t=this.getStickyTopRowCtrls().map(o=>o.rowNode),i=this.getStickyBottomRowCtrls().map(o=>o.rowNode);return[...t,...e,...i]}getRowByPosition(e){let t;const{rowIndex:i}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[i];break;case"bottom":t=this.bottomRowCtrls[i];break;default:t=this.rowCtrlsByRowIndex[i],t||(t=this.getStickyTopRowCtrls().find(o=>o.rowNode.rowIndex===i)||null,t||(t=this.getStickyBottomRowCtrls().find(o=>o.rowNode.rowIndex===i)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const o=e>this.lastRenderedRow;return!(tthis.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e?.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],Ie(this.entriesList,i)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],Ie(this.entriesList,e)}getEntries(){return this.entriesList}};function Nl(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const i of e){const o=i.id;switch(i.rowPinned){case"top":t.top[o]=i;break;case"bottom":t.bottom[o]=i;break;default:t.normal[o]=i;break}}return t}function zl(e,t){const i=e.id;switch(e.rowPinned){case"top":return t.top[i]!=null;case"bottom":return t.bottom[i]!=null;default:return t.normal[i]!=null}}var C2=class extends S{constructor(){super(...arguments),this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=J(this.gos)?Mo:v2,this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],this.updateOptions.bind(this));const e=this.updatePivotModeState.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),this.updateOptions(),e()}updateOptions(){this.accentedSort=!!this.gos.get("accentedSort"),this.primaryColumnsSortGroups=Qe(this.gos)}updatePivotModeState(){this.pivotActive=this.beans.colModel.isPivotActive()}doFullSortInPlace(e,t){return e.sort((i,o)=>this.compareRowNodes(t,i,o))}compareRowNodes(e,t,i){if(t===i)return 0;const o=this.accentedSort;for(let s=0,n=e.length;s{if(e.data)return e;let t=e.childrenAfterGroup;for(;t?.length;){const i=t[0];if(i.data)return i;t=i.childrenAfterGroup}},Ag=e=>{if(!e)return e;if(typeof e=="bigint")return e<0n?-e:e;const t=Number(e);return isNaN(t)?e:Math.abs(t)};function w2(e){e.sortSvc?.onSortChanged("api")}var pi=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),b2={tag:"span",cls:"ag-sort-indicator-container",children:[pi("Order","order"),pi("Asc","ascending-icon"),pi("Desc","descending-icon"),pi("Mixed","mixed-icon"),pi("AbsoluteAsc","absolute-ascending-icon"),pi("AbsoluteDesc","absolute-descending-icon"),pi("None","none-icon")]},Wl=class extends U{constructor(e){super(),this.eSortOrder=x,this.eSortAsc=x,this.eSortDesc=x,this.eSortMixed=x,this.eSortNone=x,this.eSortAbsoluteAsc=x,this.eSortAbsoluteDesc=x,e||this.setTemplate(b2)}attachCustomElements(e,t,i,o,s,n,r){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=o,this.eSortNone=s,this.eSortAbsoluteAsc=n,this.eSortAbsoluteDesc=r}setupSort(e,t=!1,i){if(this.column=e,this.suppressOrder=t,this.getSortDefOverride=i,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("sortAbsoluteAscending",this.eSortAbsoluteAsc,e),this.addInIcon("sortAbsoluteDescending",this.eSortAbsoluteDesc,e);const o=this.updateIcons.bind(this),s=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",o),this.addManagedEventListeners({newColumnsLoaded:o,sortChanged:s,columnRowGroupChanged:s}),this.onSortChanged()}addInIcon(e,t,i){if(t==null)return;const o=Se(e,this.beans,i);o&&t.appendChild(o)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortAbsoluteAsc:i,eSortAbsoluteDesc:o,eSortNone:s,column:n,gos:r,beans:l}=this,a=tc(n,l,this.getSortDefOverride),d=a.isDefaultSortAllowed,c=a.isAbsoluteSortAllowed,{isAbsoluteSort:u,isDefaultSort:h,isAscending:g,isDescending:p,direction:f}=a;if(e&&_(e,g&&h&&d,{skipAriaHidden:!0}),t&&_(t,p&&h&&d,{skipAriaHidden:!0}),s){const m=!n.getColDef().unSortIcon&&!r.get("unSortIcon");_(s,!m&&!f,{skipAriaHidden:!0})}i&&_(i,g&&u&&c,{skipAriaHidden:!0}),o&&_(o,p&&u&&c,{skipAriaHidden:!0})}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:i}=this;this.addInIcon("sortUnSort",e,t);const o=t.getColDef().showRowGroup;Qe(i)&&o&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:i}=this;if(e){const o=t.sortSvc.getDisplaySortForColumn(i)?.direction==="mixed";_(e,o,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:i}}=this;if(!e)return;const o=i.getColumnsWithSortingOrdered(),s=i.getDisplaySortIndexForColumn(t)??-1,n=o.some(l=>i.getDisplaySortIndexForColumn(l)??-1>=1),r=s>=0&&n;_(e,r,{skipAriaHidden:!0}),s>=0?e.textContent=(s+1).toString():le(e)}refresh(){this.onSortChanged()}},S2={selector:"AG-SORT-INDICATOR",component:Wl},y2=class extends S{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,i){const o=this.getNextSortDirection(e);this.setSortForColumn(e,o,t,i)}progressSortFromEvent(e,t){const o=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,o,"uiColumnSorted")}setSortForColumn(e,t,i,o){const{gos:s,showRowGroupCols:n}=this.beans,r=Qe(s);let l=[e];if(r&&e.getColDef().showRowGroup){const u=n?.getSourceColumnsForGroupColumn?.(e)?.filter(h=>h.isSortable());u&&(l=[e,...u])}for(const c of l)this.setColSort(c,t,o);const a=(i||s.get("alwaysMultiSort"))&&!s.get("suppressMultiSort"),d=[];if(!a){const c=this.clearSortBarTheseColumns(l,o);d.push(...c)}this.updateSortIndex(e),d.push(...l),this.dispatchSortChangedEvents(o,d)}updateSortIndex(e){const{gos:t,colModel:i,showRowGroupCols:o}=this.beans,s=Qe(t),n=o?.getShowRowGroupCol(e.getId()),r=s&&n||e,l=this.getColumnsWithSortingOrdered();i.forAllCols(c=>this.setColSortIndex(c,null));const a=l.filter(c=>s&&c.getColDef().showRowGroup?!1:c!==r);(r.getSortDef()?[...a,r]:a).forEach((c,u)=>this.setColSortIndex(c,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{if(t.getSortDef())return e=!0,!0}),e}dispatchSortChangedEvents(e,t){const i={type:"sortChanged",source:e};t&&(i.columns=t),this.eventSvc.dispatchEvent(i)}clearSortBarTheseColumns(e,t){const i=[];return this.beans.colModel.forAllCols(o=>{e.includes(o)||(o.getSortDef()&&i.push(o),this.setColSort(o,void 0,t))}),i}getNextSortDirection(e,t){const i=e.getSortingOrder(),o=t===void 0?e.getSortDef():Me(t);let n=i.findIndex(r=>go(r,o))+1;return n>=i.length&&(n=0),Me(i[n])}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:i,rowGroupColsSvc:o}=this.beans;let s=[];if(t.forAllCols(d=>{d.getSortDef()&&s.push(d)}),t.isPivotMode()){const d=Qe(e);s=s.filter(c=>{const u=!!c.getAggFunc(),h=!c.isPrimary(),g=d?i?.getShowRowGroupCol(c.getId()):c.getColDef().showRowGroup;return u||h||g})}const n=o?.columns.filter(d=>!!d.getSortDef())??[],r={};s.forEach((d,c)=>r[d.getId()]=c),s.sort((d,c)=>{const u=d.getSortIndex(),h=c.getSortIndex();if(u!=null&&h!=null)return u-h;if(u==null&&h==null){const g=r[d.getId()],p=r[c.getId()];return g>p?1:-1}else return h==null?-1:1});const l=Qe(e)&&!!n.length;l&&(s=[...new Set(s.map(d=>i?.getShowRowGroupCol(d.getId())??d))]);const a=new Map;if(s.forEach((d,c)=>a.set(d,c)),l)for(const d of n){const c=i.getShowRowGroupCol(d.getId());a.set(d,a.get(c))}return a}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}collectSortItems(e=!1){const t=[],i=this.getColumnsWithSortingOrdered();for(const o of i){const s=o.getSortDef()?.direction;if(!s)continue;const n=Xe(o.getSortDef()?.type),r={sort:s,type:n};e?r.colId=o.getId():r.column=o,t.push(r)}return t}getSortModel(){return this.collectSortItems(!0)}getSortOptions(){return this.collectSortItems()}canColumnDisplayMixedSort(e){const t=Qe(this.gos),i=!!e.getColDef().showRowGroup;return t&&i}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSortDef();const o=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,s=o[0].getSortDef();return o.every(r=>go(r.getSortDef(),s))?s:{type:Xe(e.getSortDef()?.type),direction:"mixed"}}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t){const i=()=>{const{type:o,direction:s}=Me(t.getSortDef());if(e.toggleCss("ag-header-cell-sorted-asc",s==="asc"),e.toggleCss("ag-header-cell-sorted-desc",s==="desc"),e.toggleCss("ag-header-cell-sorted-abs-asc",o==="absolute"&&s==="asc"),e.toggleCss("ag-header-cell-sorted-abs-desc",o==="absolute"&&s==="desc"),e.toggleCss("ag-header-cell-sorted-none",!s),t.getColDef().showRowGroup){const l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(a=>s==a.getSortDef()?.direction);e.toggleCss("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:i,columnPinned:i,columnRowGroupChanged:i,displayedColumnsChanged:i})}initCol(e){const{sortIndex:t,initialSortIndex:i}=e.colDef,o=ir(e.colDef);o&&e.setSortDef(o,!0),t!==void 0?t!==null&&(e.sortIndex=t):i!==null&&(e.sortIndex=i)}updateColSort(e,t,i){t!==void 0&&this.setColSort(e,Me(t),i)}setColSort(e,t,i){go(e.getSortDef(),t)||(e.setSortDef(Me(t),t===void 0),e.dispatchColEvent("sortChanged",i)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new Wl(e)}getSortIndicatorSelector(){return S2}},_l={moduleName:"Sort",version:P,beans:[y2,C2],apiFunctions:{onSortChanged:w2},userComponents:{agSortIndicator:Wl},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}},R2=class extends S{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:i}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),i.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Rt(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,si(e.source))}}};function E2(e){e.valueCache?.expire()}function F2(e,t){const{colKey:i,rowNode:o,useFormatter:s,from:n="edit"}=t,r=e.colModel.getColDefCol(i)??e.colModel.getCol(i);if(!r)return null;const l=e.valueSvc.getValueForDisplay({column:r,node:o,includeValueFormatted:s,from:n});return s?l.valueFormatted??$t(l.value):l.value}var x2="paste",P2=class extends S{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.deferredDepth=0,this.batchedPath=null,this.batchedNodes=null}destroy(){super.destroy(),this.batchedPath=null,this.batchedNodes=null}postConstruct(){this.csrm=ze(this.beans),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}beginDeferred(){this.deferredDepth++}endDeferred(){if(this.deferredDepth===0||--this.deferredDepth>0)return;const e=this.batchedPath,t=this.batchedNodes;this.batchedPath=null,this.batchedNodes=null,e&&this.csrm?.doAggregate(e);const{rowRenderer:i}=this.beans;if(t)for(const o of t)Ig(i,o);if(e){const o=e.getSortedRows();for(let s=0,n=o.length;s{const{sibling:i,pinnedSibling:o}=t;e.refreshRowByNode(t),e.refreshRowByNode(i),e.refreshRowByNode(o),e.refreshRowByNode(i?.pinnedSibling),e.refreshRowByNode(o?.sibling)},D2=class extends S{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);z(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(i){return z(16,{expression:e,params:t,e:i}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const i=this.createFunctionBody(e),o=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",i);return t[e]=o,o}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},M2=class extends S{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,i){if(this.active){const o=this.cacheVersion;e.__cacheVersion!==o&&(e.__cacheVersion=o,e.__cacheData={}),e.__cacheData[t]=i}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},kg={moduleName:"ValueCache",version:P,beans:[M2],apiFunctions:{expireValueCache:E2}},T2={moduleName:"Expression",version:P,beans:[D2]},A2={moduleName:"ChangeDetection",version:P,beans:[P2]},Lg={moduleName:"CellApi",version:P,apiFunctions:{getCellValue:F2}},I2=class extends S{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.formulaDataSvc=e.formulaDataSvc,this.rowGroupColsSvc=e.rowGroupColsSvc}postConstruct(){this.initialised||this.init()}init(){const{gos:e,valueCache:t}=this;this.executeValueGetter=t?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=Pi(e),this.cellExpressions=e.get("enableCellExpressions"),this.isTreeData=e.get("treeData"),this.initialised=!0;const i=o=>this.callColumnCellValueChangedHandler(o);this.eventSvc.addListener("cellValueChanged",i,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",i,!0)),this.addManagedPropertyListener("treeData",o=>this.isTreeData=o.currentValue)}getValueForDisplay(e){const t=this.beans,i=e.column,o=e.node,s=t.showRowGroupColValueSvc,n=!i&&o.group,r=i?.colDef.showRowGroup,l=!this.isTreeData||o.footer;if(s&&l&&(n||r)){const h=s.getGroupValue(o,i,this.displayIgnoresAggData(o));return h==null?{value:null,valueFormatted:null}:{value:h.value,valueFormatted:e.includeValueFormatted?s.formatAndPrefixGroupColValue(h,i,e.exporting):null}}if(!i)return{value:o.key,valueFormatted:null};let a=this.getValue(i,o,e.from,this.displayIgnoresAggData(o)),d=a;const c=t.formula;i.isAllowFormula()&&c?.isFormula(a)&&(e.useRawFormula?(a=c.normaliseFormula(a,!0),d=c.resolveValue(i,o)):(a=c.resolveValue(i,o),d=a));const u=e.includeValueFormatted&&!(e.exporting&&i.colDef.useValueFormatterForExport===!1);return{value:a,valueFormatted:u?this.formatValue(i,o,d):null}}getValue(e,t,i,o=!1){if(this.initialised||this.init(),!t)return;const s=e.colDef,n=t.group;if(!n){const a=s.pivotValueColumn;a&&(e=a)}const r=this.editSvc?.getPendingEditValue(t,e,i);if(r!==void 0)return r;let l=this.resolveValue(e,t,o,n);if(l===void 0){if(n){const a=s.showRowGroup;if(typeof a=="string"){const d=this.rowGroupColsSvc?.getColumnIndex(a);if(d!=null&&d>t.level)return null}}return}if(this.cellExpressions&&Dn(l)){const a=l.substring(1);l=this.executeValueGetter(a,t.data,e,t)}return l}displayIgnoresAggData(e){return!e.group||e.footer||e.level===-1||!e.sibling||this.gos.get("groupSuppressBlankHeader")||e.leafGroup&&this.colModel.isPivotMode()?!1:!!e.expanded}resolveValue(e,t,i,o){const s=e.colDef,n=e.colId,r=!o&&this.formulaDataSvc;if(r&&r.hasDataSource()&&s.allowFormula===!0){const v=r.getFormula({column:e,rowNode:t});if(Dn(v))return v}const l=o&&!i?t.aggData:void 0,a=this.isTreeData;if(a&&l?.[n]!==void 0)return l[n];const d=t.data,c=s.field,u=s.valueGetter;if(a){if(u)return this.executeValueGetter(u,d,e,t);if(c&&d)return ko(d,c,e.isFieldContainsDots())}const h=t.groupData;if(h&&n in h)return h[n];if(l?.[n]!==void 0)return l[n];const g=s.showRowGroup,p=typeof g!="string"||!o,f=this.isSsrm,m=f&&i&&!!s.aggFunc;if(u&&!m)return p?this.executeValueGetter(u,d,e,t):void 0;if(f&&t.footer&&t.field&&(g===!0||g===t.field))return ko(d,t.field,e.isFieldContainsDots());if(c&&d&&!m)return p?ko(d,c,e.isFieldContainsDots()):void 0}parseValue(e,t,i,o){const s=e.getColDef();if(s.allowFormula&&this.beans.formula?.isFormula(i))return i;const n=s.valueParser;if(M(n)){const r=k(this.gos,{node:t,data:t?.data,oldValue:o,newValue:i,colDef:s,column:e});return typeof n=="function"?n(r):this.expressionSvc?.evaluate(n,r)}return i}getDeleteValue(e,t){return M(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay({column:e,node:t,from:"edit"}).value)??null:null}formatValue(e,t,i,o,s=!0){const{expressionSvc:n}=this.beans;let r=null,l;const a=e.getColDef();if(o?l=o:s&&(l=a.valueFormatter),l){const d=t?t.data:null,c=k(this.gos,{value:i,node:t,data:d,colDef:a,column:e});typeof l=="function"?r=l(c):r=n?n.evaluate(l,c):null}else if(a.refData)return a.refData[i]||"";return r==null&&Array.isArray(i)&&(r=i.join(", ")),r}setValue(e,t,i,o){const s=t.getColDef();if(!e.data&&this.canCreateRowNodeData(e,s)&&(e.data={}),!this.isSetValueSupported(t,e,i,s))return!1;const n=this.getValue(t,e,"data"),r=k(this.gos,{node:e,data:e.data,oldValue:n,newValue:i,colDef:s,column:t});let l=!1;if(e.data){const d=this.handleExternalFormulaChange({column:t,eventSource:o,newValue:i,setterParams:r,rowNode:e});if(d!==null)return d;l=this.computeValueChange({column:t,rowNode:e,newValue:i,params:r,rowData:e.data,valueSetter:s.valueSetter,field:s.field})??!0}const a=this.beans.changeDetectionSvc;a?.beginDeferred();try{if(e.group){const d=this.beans.rowGroupingEditValueSvc?.setGroupDataValue(e,t,i,n,o,l||i!==n);if(d!==void 0)return!l&&!d?!1:this.finishValueChange(e,t,r,o,i)}return l?this.finishValueChange(e,t,r,o):!1}finally{a?.endDeferred()}}canCreateRowNodeData(e,t){return e.group?!(t.groupRowValueSetter!=null||t.groupRowEditable!=null||t.pivotValueColumn):!0}finishValueChange(e,t,i,o,s){e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const n=s===void 0?this.getValue(t,e,"data"):s;return this.dispatchCellValueChangedEvent(e,i,n,o),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,i,n,o),!0}isSetValueSupported(e,t,i,o){const{field:s,valueSetter:n}=o,r=this.beans.formula,l=e.isAllowFormula()&&r?.isFormula(i),a=!!this.formulaDataSvc?.hasDataSource();return K(s)&&K(n)&&!(a&&l)?t.group&&(o.groupRowValueSetter||o.groupRowEditable)?!0:(F(17),!1):this.dataTypeSvc&&!this.dataTypeSvc.checkType(e,i)?(F(135),!1):!0}handleExternalFormulaChange(e){const{column:t,rowNode:i,newValue:o,eventSource:s,setterParams:n}=e,r=this.beans.formula,l=this.formulaDataSvc;if(!l?.hasDataSource()||!t.isAllowFormula())return null;const a=r?.isFormula(o),d=l.getFormula({column:t,rowNode:i});if(a){if(!(d!==o))return!1;l.setFormula({column:t,rowNode:i,formula:o});const u=r?.resolveValue(t,i),h=t.getColDef();if(M(h.valueSetter)||!K(h.field)){const g={...n,newValue:u};this.computeValueChange({column:t,rowNode:i,newValue:u,params:g,rowData:i.data,valueSetter:h.valueSetter,field:h.field})}return this.finishValueChange(i,t,n,s)}return d!==void 0&&l.setFormula({column:t,rowNode:i,formula:void 0}),null}computeValueChange(e){const{valueSetter:t,params:i,rowData:o,field:s,column:n,newValue:r}=e;return M(t)?typeof t=="function"?t(i):this.expressionSvc?.evaluate(t,i):!!o&&this.setValueUsingField(o,s,r,n.isFieldContainsDots())}dispatchCellValueChangedEvent(e,t,i,o){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:i,newRawValue:t.newValue,value:i,source:o})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t(e)})}setValueUsingField(e,t,i,o){if(!t)return!1;let s=!1;if(!o)s=e[t]===i,s||(e[t]=i);else{const n=t.split(".");let r=e;for(;n.length>0&&r;){const l=n.shift();n.length===0?(s=r[l]===i,s||(r[l]=i)):r=r[l]}}return!s}executeValueGetterWithValueCache(e,t,i,o){const s=i.getColId(),n=this.valueCache.getValue(o,s);if(n!==void 0)return n;const r=this.executeValueGetterWithoutValueCache(e,t,i,o);return this.valueCache.setValue(o,s,r),r}executeValueGetterWithoutValueCache(e,t,i,o){const s=k(this.gos,{data:t,node:o,column:i,colDef:i.getColDef(),getValue:r=>this.getValueCallback(o,r)});let n;return typeof e=="function"?n=e(s):n=this.expressionSvc?.evaluate(e,s),n}getValueCallback(e,t){const i=this.colModel.getColDefCol(t);return i?this.getValue(i,e,"data"):null}getKeyForNode(e,t){const i=this.getValue(e,t,"data"),o=e.getColDef().keyCreator;let s=i;if(o){const n=k(this.gos,{value:i,colDef:e.getColDef(),column:e,node:t,data:t.data});s=o(n)}return typeof s=="string"||s==null||(s=String(s),s==="[object Object]"&&F(121)),s}},k2={moduleName:"CommunityCore",version:P,beans:[wy,a0,Ab,$C,g2,P1,gy,Gy,I1,O3,H3,f2,I2,Cy,hy,vy,kb,R2,Fb,xb,Yy],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:Vu,destroy:d0,isDestroyed:c0,getGridOption:u0,setGridOption:h0,updateGridOptions:Nu,isModuleRegistered:g0},dependsOn:[Rb,rh,h1,_l,qy,uh,$y,h2,A2,jy,Dg,z3,U3,Xy,Mb,Eb,T2,z1,K3]};function cn(e){const{inputValue:t,allSuggestions:i,hideIrrelevant:o,filterByPercentageOfBestMatch:s}=e;let n=(i??[]).map((a,d)=>({value:a,relevance:L2(t,a),idx:d}));if(n.sort((a,d)=>a.relevance-d.relevance),o&&(n=n.filter(a=>a.relevance0&&s&&s>0){const d=n[0].relevance*s;n=n.filter(c=>d-c.relevance<0)}const r=[],l=[];for(const a of n)r.push(a.value),l.push(a.idx);return{values:r,indices:l}}function L2(e,t){const i=e.length,o=t.length;if(o===0)return i||0;let s=e.toLocaleLowerCase(),n=t.toLocaleLowerCase(),r;e.length1&&p>1){const C=e[u-2],v=s[u-2],w=t[p-2],y=n[p-2];v===y&&(d++,C===w&&d++)}u`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule: import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community'; ModuleRegistry.registerModules([ AllCommunityModule ]); `,G2=e=>{const t=e.map(o=>`import { ${_o(o)} } from '${Bg[o]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(o=>o==="IntegratedCharts"||o==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community'; ${t.join(` `)} ModuleRegistry.registerModules([ ${e.map(o=>_o(o,!0)).join(", ")} ]); For more info see: ${xi}/modules/`};function _o(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function V2(e,t){const i=t.filter(n=>n==="IntegratedCharts"||n==="Sparklines");let o="";return!globalThis?.agCharts&&i.length>0?o=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise. `:t.some(n=>Bg[n])&&(o=o+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included. `),o}function Og({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var Gg=({reasonOrId:e,moduleName:t,gridScoped:i,gridId:o,rowModelType:s,additionalText:n,isUmd:r})=>{const l=O2(t,s),a=typeof e=="string"?e:_2[e];if(r)return V2(a,l);const d=l.filter(h=>h==="IntegratedCharts"||h==="Sparklines"),c=d.length>0?`${d.map(h=>_o(h)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${a} as ${l.length>1?"one of "+l.map(h=>_o(h)).join(", "):_o(l[0])} is not registered${i?" for gridId: "+o:""}. ${c} Check if you have registered the module: `} ${G2(l)}`+(n?` ${n}`:"")},Vg=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'. import { AgChartsEnterpriseModule } from 'ag-charts-enterprise'; import { ModuleRegistry } from 'ag-grid-community'; import { ${e} } from 'ag-grid-enterprise'; ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]); `,N2=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,z2={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:i})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",i],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions: "alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed. Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid. To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e} ${N2(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e,inferred:t,colId:i})=>{const o=t?" (inferred)":"",s=i?` for column "${i}"`:"";return`Cell data type is "object"${o} but no Value ${e} has been provided${s}. Please either provide an object data type definition with a Value ${e}, or set: - "colDef.value${e}"${t&&e==="Parser"?` - "colDef.cellDataType = 'object'"`:""}`},49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:i,pageSizeOptions:o})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${i?"":" the default"} paginationPageSizeSelector=[${o?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:i,jsComps:o})=>{const s=[],n=[...Object.keys(i??[]).filter(l=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(l)),...Object.keys(o??[]).filter(l=>!!o[l])],r=cn({inputValue:t,allSuggestions:n,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return s.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components. `),r.length>0&&s.push(` Did you mean: [${r.slice(0,3)}]? `),s.push("If using a custom component check it has been registered correctly."),s},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${xi}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{const i=cn({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,i.length>0?` Did you mean: [${i.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join(` `)},110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables. Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:i})=>["duplicate group keys for row data, keys should be unique",e,t,...i??[]],187:({rowId:e,firstData:t,secondData:i})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",i],188:e=>`getRowId callback must be provided for Server Side Row Model ${e?.feature||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:Gg,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${xi}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule. Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>Vg("IntegratedChartsModule"),258:()=>Vg("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:i,gridId:o,rowModelType:s})=>Gg({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Ni[t],gridId:o,gridScoped:i,rowModelType:s}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${xi}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>Hg(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:Og,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`,293:()=>"The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the themeStyleContainer grid option to let the grid know where in the document to insert theme CSS.",294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:e})=>`colDef.allowFormula is not supported with ${e}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.',298:()=>"Columns Tool Panel 'buttons' requires 'apply' to enable Deferred Updates."};function W2(e,t){const i=z2[e];if(!i)return[`Missing error text for error id ${e}!`];const o=i(t),n=` See ${Od(e,t)}`;return Array.isArray(o)?o.concat(n):[o,n]}var _2={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},Ng=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${Rd}/${this.frameworkName}-data-grid`,sC(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},ql=new WeakMap,$l=new WeakMap;function U2(e,t,i){if(!t)return z(11),{};const o=i;let s;if(!o?.setThemeOnGridDiv){const r=se({tag:"div"});r.style.height="100%",e.appendChild(r),e=r,s=()=>e.remove()}return new zg().create(e,t,r=>{const l=new r0(e);r.createBean(l)},void 0,i,s)}var q2=1,zg=class{create(e,t,i,o,s,n){const r=no.applyGlobalGridOptions(t),l=r.gridId??String(q2++),a=this.getRegisteredModules(s,l,r.rowModelType),d=this.createBeansList(r.rowModelType,a,l),c=this.createProvidedBeans(e,r,s);if(!d)return;const h={providedBeanInstances:c,beanClasses:d,id:l,beanInitComparator:Kv,beanDestroyComparator:jv,derivedBeans:[qv],destroyCallback:()=>{$l.delete(p),ql.delete(e),Xm(l),n?.()}},g=new Yc(h);this.registerModuleFeatures(g,a),i(g),g.getBean("syncSvc").start(),o?.(g);const p=g.getBean("gridApi");return ql.set(e,p),$l.set(p,e),p}getRegisteredModules(e,t,i){return Fi(k2,void 0,!0),e?.modules?.forEach(o=>Fi(o,t)),Jm(t,Wg(i))}registerModuleFeatures(e,t){const i=e.getBean("registry"),o=e.getBean("apiFunctionSvc");for(const s of t){i.registerModule(s);const n=s.apiFunctions;if(n){const r=Object.keys(n);for(const l of r)o?.addFunction(l,n[l])}}}createProvidedBeans(e,t,i){let o=i?i.frameworkOverrides:null;K(o)&&(o=new Ng);const s={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:i?i.globalListener:null,globalSyncListener:i?i.globalSyncListener:null,frameworkOverrides:o,withinStudio:i?.withinStudio};return i?.providedBeanInstances&&Object.assign(s,i.providedBeanInstances),s}createBeansList(e,t,i){const o={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},s=Wg(e),n=o[s];if(!n){ro(201,{rowModelType:s},`Unknown rowModelType ${s}.`);return}if(!iC()){ro(272,void 0,Hg());return}if(!e){const l=Object.entries(o).filter(([a,d])=>zn(d,i,a));if(l.length==1){const[a,d]=l[0];if(a!==s){const c={moduleName:d,rowModelType:a};ro(275,c,Og(c));return}}}if(!zn(n,i,s)){const l=_n(),a=`rowModelType = '${s}'`,d=l?`Unable to use ${a} as that requires the ag-grid-enterprise script to be included. `:`Missing module ${n}Module for rowModelType ${s}.`;ro(200,{reasonOrId:a,moduleName:n,gridScoped:Wn(),gridId:i,rowModelType:s,isUmd:l},d);return}const r=new Set;for(const l of t)for(const a of l.beans??[])r.add(a);return Array.from(r)}};function Wg(e){return e??"clientSide"}function $2(e){if(typeof e=="string")try{e=document.querySelector(`[grid-id="${e}"]`)?.parentElement??document.querySelector(e)?.firstElementChild??document.getElementById(e)?.firstElementChild}catch{e=null}return e?ql.get(e):void 0}function K2(e){return $l.get(e)}function _g(e,t=!1){const i=[],o=[],s=[],n=[],r=[],l=[],a=[],d=[],c=[];let u=0;for(let h=0;ht!=null)}function Ug(e){const t=[];for(const{groupId:i,open:o}of e)o&&t.push(i);return t.length?{openColumnGroupIds:t}:void 0}function j2(e){return{columnGroup:Ug(e)}}var Y2=class extends S{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(o=>{if(!o){z(18),t||z(20);return}if(this.isGridApi(o))return o;const s=o;return"current"in s?s.current?.api:(s.api||z(19),s.api)}).filter(o=>!!o&&!o.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const i=[];return e.columns?e.columns.forEach(o=>{i.push(t(o))}):e.column&&i.push(t(e.column)),i}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":F(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const i of e.columnGroups){let o=null;i&&(o=t.getProvidedColGroup(i.getGroupId())),!(i&&!o)&&t.setColumnGroupOpened(o,i.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let i=null;const o=this.beans,{colResize:s,ctrlsSvc:n,colModel:r}=o;if(t&&(i=r.getColDefCol(t.getColId())),t&&!i)return;const l=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const u=e.api.getColumnState().map(h=>({colId:h.colId}));He(o,{state:u,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const u=e.api.getColumnState().map(h=>({colId:h.colId,hide:h.hide}));He(o,{state:u},"alignedGridChanged")}break;case"columnPinned":{const u=e.api.getColumnState().map(h=>({colId:h.colId,pinned:h.pinned}));He(o,{state:u},"alignedGridChanged")}break;case"columnResized":{const c=e,u={};for(const h of l)u[h.getId()]={key:h.getColId(),newWidth:h.getActualWidth()};for(const h of c.flexColumns??[])u[h.getId()]&&delete u[h.getId()];s?.setColumnWidths(Object.values(u),!1,c.finished,"alignedGridChanged");break}}const d=n.getGridBodyCtrl().isVerticalScrollShowing();for(const c of this.getAlignedGridApis())c.setGridOption("alwaysShowVerticalScroll",d)}},qg={moduleName:"AlignedGrids",version:P,beans:[Y2],dependsOn:[Cl]};function Q2(e,t={}){const i=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(i))}function $g(e,t,i,o,s){t&&(o&&t.parent&&t.parent.level!==-1&&$g(e,t.parent,i,o,s),t.setExpanded(i,void 0,s))}function Z2(e,t){return e.rowModel.getRowNode(t)}function X2(e,t,i,o){e.rowRenderer.addRenderedRowListener(t,i,o)}function J2(e){return e.rowRenderer.getRenderedNodes()}function eR(e,t,i){e.rowModel.forEachNode(t,i)}function tR(e){return e.rowRenderer.firstRenderedRow}function iR(e){return e.rowRenderer.lastRenderedRow}function oR(e,t){return e.rowModel.getRow(t)}function sR(e){return e.rowModel.getRowCount()}function nR(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function rR(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function Kg(e,t,i="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,i),"ensureVisible")}function jg(e,t,i){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,i),"ensureVisible")}function lR(e,t,i=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,i),"ensureVisible")}var Yg={moduleName:"RowApi",version:P,apiFunctions:{redrawRows:Q2,setRowNodeExpanded:$g,getRowNode:Z2,addRenderedRowListener:X2,getRenderedNodes:J2,forEachNode:eR,getFirstDisplayedRowIndex:tR,getLastDisplayedRowIndex:iR,getDisplayedRowAtIndex:oR,getDisplayedRowCount:sR}},Qg={moduleName:"ScrollApi",version:P,apiFunctions:{getVerticalPixelRange:nR,getHorizontalPixelRange:rR,ensureColumnVisible:Kg,ensureIndexVisible:jg,ensureNodeVisible:lR}};function aR(e){e.expansionSvc?.expandAll(!0)}function dR(e){e.expansionSvc?.expandAll(!1)}function jl(e){e.rowModel?.onRowHeightChanged()}function Yl(e){if(e.rowAutoHeight?.active){F(3);return}e.rowModel?.resetRowHeights()}function cR(e){e.expansionSvc?.resetExpansion()}function uR(e,t,i){const o=Hc(e);if(o){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){z(238);return}o.setRowCount(t,i);return}z(28);return}Ds(e)?.setRowCount(t,i)}function hR(e){return Pi(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function gR(e){return e.rowModel.isLastRowIndexKnown()}var Zg={moduleName:"CsrmSsrmSharedApi",version:P,apiFunctions:{expandAll:aR,collapseAll:dR,resetRowGroupExpansion:cR}},Xg={moduleName:"RowModelSharedApi",version:P,apiFunctions:{onRowHeightChanged:jl,resetRowHeights:Yl}},Jg={moduleName:"SsrmInfiniteSharedApi",version:P,apiFunctions:{setRowCount:uR,getCacheBlockState:hR,isLastRowIndexKnown:gR}},ep=(e,t)=>{for(let i=0,o=e.length;i{if(i!=null){const n=i.getSortedRows();for(let r=0,l=n.length;r{const d=l.level+1;for(let c=0,u=a.length;c{if(!u&&u!==void 0){const w=C.sourceRowIndex;u=w<=h,h=w}C.data!==v&&(C.updateData(v),r.has(C)||l.add(C),!C.selectable&&C.isSelected()&&d.push(C))},f=(C,v,w)=>{for(let y=0,R=v.length;y0;if(m){const C=i._leafs??(i._leafs=[]);u===void 0?wR(C,a,n):vR(C,a)&&(n.reordered=!0)}(m||g||l.size)&&(e.rowDataUpdated=!0,this.deselect(d))}deleteUnusedNodes(e,{removals:t},i,o){const s=this.rootNode._leafs;for(let n=0,r=s.length;n0}updateRowData(e,t,i){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return F(268),{remove:[],update:[],add:[]};const o=[],s=ti(this.gos),n=this.executeRemove(s,e,t,o,i),r=this.executeUpdate(s,e,t,o),l=this.executeAdd(e,t);return this.deselect(o),{remove:n,update:r,add:l}}executeRemove(e,{remove:t},{adds:i,updates:o,removals:s},n,r){const l=this.rootNode._leafs,a=l?.length,d=t?.length;if(!d||!a)return[];let c=0,u=a,h=0;const g=new Array(d);for(let p=0;ph&&(h=m),g[c++]=f,this.destroyNode(f,r)&&(f.isSelected()&&n.push(f),i.delete(f)||(o.delete(f),s.push(f)))}return g.length=c,c&&CR(l,u,h),g}executeUpdate(e,{update:t},{adds:i,updates:o},s){const n=t?.length;if(!n)return[];const r=new Array(n);let l=0;for(let a=0;a=a;--u){const g=o[u];g.sourceRowIndex=h,o[h--]=g}t.reordered=!0}o.length=l;const d=new Array(r),c=t.adds;for(let u=0;u=i||Number.isNaN(t))return i;t=Math.ceil(t);const o=this.gos;return t>0&&o.get("treeData")&&o.get("getDataPath")&&(t=fR(e,t)),t}},fR=(e,t)=>{for(let i=0,o=e.length;i{e.group=!0,e.level=-1,e._expanded=!0,e.id="ROOT_NODE_ID",e._leafs?.length!==0&&(e._leafs=[]);const t=[],i=[],o=[],s=[];e.childrenAfterGroup=t,e.childrenAfterSort=i,e.childrenAfterAggFilter=o,e.childrenAfterFilter=s;const n=e.sibling;return n&&(n.childrenAfterGroup=t,n.childrenAfterSort=i,n.childrenAfterAggFilter=o,n.childrenAfterFilter=s,n.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},mR=(e,t)=>{if(e)for(let i=0,o=e.length;i{t=Math.max(0,t);for(let o=t,s=e.length;o{const i=t.size;e.length=i;let o=0,s=!1,n=!1;for(const r of t){const l=r.sourceRowIndex;l===o?n||(n=s):(l>=0?n=!0:s=!0,r.sourceRowIndex=o,e[o]=r),++o}return n},wR=(e,t,{adds:i})=>{const o=e.length,s=t.size;s>o&&(e.length=s);let n=0;for(let r=0;r{o.hasChildren()&&e&&!s?o.childrenAfterFilter=o.childrenAfterGroup.filter(n=>{const r=n.childrenAfterFilter&&n.childrenAfterFilter.length>0,l=n.data&&this.filterManager.doesRowPassFilter({rowNode:n});return r||l}):o.childrenAfterFilter=o.childrenAfterGroup,Ql(o)};if(this.doingTreeDataFiltering()){const o=(s,n)=>{if(s.childrenAfterGroup)for(let r=0;ri(s,!1);Wt(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,t,o)}}softFilter(e,t){const i=s=>{if(s.childrenAfterFilter=s.childrenAfterGroup,s.hasChildren())for(const n of s.childrenAfterGroup)n.softFiltered=e&&!(n.data&&this.filterManager.doesRowPassFilter({rowNode:n}));Ql(s)},o=this.beans.rowModel;Wt(o.rootNode,o.hierarchical,t,i)}doingTreeDataFiltering(){const{gos:e}=this;return!!this.beans.groupStage?.treeData&&!e.get("excludeChildrenWhenTreeDataFiltering")}},SR=4,yR=(e,t,i,o,s)=>{const n=t.childrenAfterSort,r=t.childrenAfterAggFilter;if(!r)return n&&n.length>0?n:[];const l=r.length;if(l<=1)return n?.length===l&&(l===0||n[0]===r[0])?n:r.slice();if(!n||l<=SR)return e.doFullSortInPlace(r.slice(),s);const a=new Map,{updates:d,adds:c}=i,u=[];for(let g=0;ge.compareRowNodes(s,g,p)||~a.get(g)-~a.get(p)),h===l?u:RR(e,s,u,n,a,l))},RR=(e,t,i,o,s,n)=>{const r=new Array(n);let l=0,a=i[l],d,c=-1,u=0,h=0;const g=i.length,p=o.length;for(;;){if(c<0){if(u>=p)break;if(d=o[u++],c=s.get(d)??-1,c<0)continue}if((e.compareRowNodes(t,a,d)||~s.get(a)-c)<0){if(r[h++]=a,++l>=g)break;a=i[l]}else r[h++]=d,c=-1}for(;l=0&&(r[h++]=f)}return r},ER=(e,t,i)=>{let o=0;i.length=t.size;for(let s=0,n=e.length;s{const t=e.childrenAfterSort,i=e.sibling;if(i&&(i.childrenAfterSort=t),!!t)for(let o=0,s=t.length-1;o<=s;o++){const n=t[o],r=o===0,l=o===s;n.firstChild!==r&&(n.firstChild=r,n.dispatchRowEvent("firstChildChanged")),n.lastChild!==l&&(n.lastChild=l,n.dispatchRowEvent("lastChildChanged")),n.childIndex!==o&&(n.childIndex=o,n.dispatchRowEvent("childIndexChanged"))}},FR=class extends S{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e,t){const i=this.beans.sortSvc.getSortOptions(),o=i.length>0&&!!t&&this.gos.get("deltaSort"),{gos:s,colModel:n,rowGroupColsSvc:r,rowNodeSorter:l,rowRenderer:a,showRowGroupCols:d}=this.beans,c=s.get("groupMaintainOrder"),u=n.getCols().some(v=>v.isRowGroupActive()),h=r?.columns,g=n.isPivotMode(),p=s.getCallback("postSortRows");let f=!1,m;const C=v=>{const w=g&&v.leafGroup;let y=c&&u&&!v.leafGroup;y&&(m??(m=this.shouldSortContainsGroupCols(i)),y&&(y=!m));let R=null;if(y){let E=!1;if(h){const D=v.level+1;D{const t=e.childrenAfterSort,i=e.childrenAfterAggFilter,o=t?.length,s=i?.length;if(!o||!s)return null;const n=new Array(s),r=new Set;for(let a=0;a{this.beans.groupStage?.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:i,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:()=>this.refreshModel({step:"pivot"}),columnPivotModeChanged:()=>this.refreshModel({step:"group"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),stylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,i=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(o=>!!o);this.stages=i;for(let o=i.length-1;o>=0;--o){const s=i[o];for(const n of s.refreshProps)t.set(n,o)}this.addManagedPropertyListeners([...t.keys(),"rowData"],o=>{const s=o.changeSet?.properties;s&&this.onPropChange(s)}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,i,o){let s,n=!1;do{s=!1;const r=this.getRowIndexAtPixel(e),l=this.getRowIndexAtPixel(t),a=Math.max(r,i),d=Math.min(l,o);for(let c=a;c<=d;c++){const u=this.getRow(c);if(u.rowHeightEstimated){const h=dt(this.beans,u);u.setRowHeight(h.height),s=!0,n=!0}}s&&this.setRowTopAndRowIndex()}while(s);return n}onPropChange(e){const{nodeManager:t,gos:i,beans:o}=this,s=o.groupStage;if(!t)return;const n=new Set(e),r=s?.onPropChange(n);let l;n.has("rowData")?l=i.get("rowData"):r&&(l=s?.extractData()),l&&!Array.isArray(l)&&(l=null,F(1));const a={step:"nothing",changedProps:n};if(l){const c=!r&&!this.isEmpty()&&l.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate");this.refreshingData=!0,c?(a.keepRenderedRows=!0,a.animate=!i.get("suppressAnimationFrame"),a.changedRowNodes=new Do,t.setImmutableRowData(a,l)):(a.rowDataUpdated=!0,a.newData=!0,t.setNewRowData(l),this.rowNodesCountReady=!0)}const d=a.rowDataUpdated?"group":this.getRefreshedStage(e);d&&(a.step=d,this.refreshModel(a))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:i}=this;if(!t)return null;const o=t.length;let s=o;for(let n=0,r=e.length;n{n?.id!=null&&!t.has(n.id)&&n.clearRowTopAndRowIndex()},o=n=>{i(n),i(n.detailNode),i(n.sibling);const r=n.childrenAfterGroup;if(!(!n.hasChildren()||!r)&&!(e&&n.level!==-1&&!n.expanded))for(let l=0,a=r.length;l{let d=n[a];if(this.gos.get("groupHideOpenParents"))for(;d.expanded&&d.childrenAfterSort&&d.childrenAfterSort.length>0;)d=d.childrenAfterSort[0];return d.rowIndex},l=t.footerSvc;return l?l?.getTopDisplayIndex(o,e,n,r):r(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:i}=this;if(!t||!i.length||i[0]===t)return e;let s=this.getRow(e);s.footer&&(s=s.sibling);let n=s.parent;for(;n&&n!==t;)s=n,n=s.parent;const r=t.childrenAfterSort?.indexOf(s)??-1;return r>=0?r:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:ei(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const o=t.length===0||t.some(s=>s.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:o,keepRenderedRows:!0,animate:ei(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:ei(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:i,rowDataUpdated:o}=e;return!(!t||i||!o||t.removals.length||t.adds.size)}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){const{nodeManager:t,eventSvc:i,started:o}=this;if(!t)return;const s=!!e.rowDataUpdated;if(o&&s&&i.dispatchEvent({type:"rowDataUpdated"}),this.deferRefresh(e)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=s);return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let n=!1;this.refreshingModel=!0;try{this.executeRefresh(e,s),n=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,n||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),i.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t){const{beans:i,rootNode:o}=this;i.masterDetailSvc?.refreshModel(e),t&&e.step!=="group"&&i.colFilter?.refreshModel();let s=e.changedPath;switch(s?.addRow(o),e.step==="group"&&(this.doGrouping(o,e),s??(s=e.changedPath)),s??(s=i.changedPathFactory?.ensureRowsPath(e,o)),e.step){case"group":case"filter":this.doFilter(s);case"pivot":this.doPivot(s)&&(s=void 0,e.changedPath=void 0);case"aggregate":this.doAggregate(s);case"filter_aggregates":this.doFilterAggregates(s);case"sort":this.doSort(s,e.changedRowNodes);case"map":this.doRowsToDisplay()}const n=new Set;this.setRowTopAndRowIndex(n),this.clearRowTopAndRowIndex(s,n),this.updateRefreshParams(e)}deferRefresh(e){return this.refreshingModel||this.beans.colModel.changeEventsDispatching?!0:this.isSuppressModelUpdateAfterUpdateTransaction(e)?(this.started&&(this.refreshingData=!1),!0):!this.started}setPendingRefreshFlags(e){this.pendingNewData||(this.pendingNewData=!!e.newData),this.noKeepRenderedRows||(this.noKeepRenderedRows=!e.keepRenderedRows),this.noKeepUndoRedoStack||(this.noKeepUndoRedoStack=!e.keepUndoRedoStack),this.noAnimate||(this.noAnimate=!e.animate)}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(e){e.newData=this.pendingNewData||!!e.newData,e.keepRenderedRows=!this.noKeepRenderedRows&&!!e.keepRenderedRows,e.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!e.keepUndoRedoStack,e.animate=!this.noAnimate&&!!e.animate}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){const{beans:e,gos:t}=this;if(this.rootNode?._leafs?.length){if(e.filterManager?.isAnyFilterPresent()&&this.getRowCount()===0)return"noMatchingRows"}else if(this.rowCountReady||(t.get("rowData")?.length??0)==0)return"noRows";return null}getNodesInRangeForSelection(e,t){let i=!1,o=!1;const s=[],n=Mi(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(o)return;if(i&&(r===t||r===e)&&(o=!0,n&&r.group)){op(s,r);return}if(!i){if(r!==t&&r!==e)return;i=!0,t===e&&(o=!0)}(!r.group||!n)&&s.push(r)}),s}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,i=t.length;if(this.isEmpty()||i===0)return-1;let o=0,s=i-1;if(e<=0)return 0;if(t[s].rowTop<=e)return s;let r=-1,l=-1;for(;;){const a=Math.floor((o+s)/2),d=t[a];if(this.isRowInPixel(d,e)||(d.rowTope&&(s=a-1),r===o&&l===s))return a;r=o,l=s}}isRowInPixel(e,t){const i=e.rowTop,o=i+e.rowHeight;return i<=t&&o>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let i=0,o=t.length;ii.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,i=>i.childrenAfterSort)}forEachPivotNode(e,t,i){const{colModel:o,rowGroupColsSvc:s}=this.beans;if(!o.isPivotMode())return;if(!s?.columns.length){e(this.rootNode,0);return}const n=i?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,r=>r.leafGroup?null:r[n])}depthFirstSearchRowNodes(e,t=!1,i=n=>n.childrenAfterGroup,o=this.rootNode,s=0){let n=s;if(!o)return n;const r=o===this.rootNode;if(r||e(o,n++),o.hasChildren()&&!o.footer){const l=r||this.hierarchical?i(o):null;if(l){const a=this.beans.footerSvc;n=a?.addTotalRows(n,o,e,t,r,"top")??n;for(const d of l)n=this.depthFirstSearchRowNodes(e,t,i,d,n);return a?.addTotalRows(n,o,e,t,r,"bottom")??n}}return n}doAggregate(e){this.rootNode&&this.beans.aggStage?.execute(e)}doFilterAggregates(e){const t=this.rootNode,i=this.beans.filterAggStage;if(i&&this.hierarchical){i.execute(e);return}t.childrenAfterAggFilter=t.childrenAfterFilter;const o=t.sibling;o&&(o.childrenAfterAggFilter=t.childrenAfterFilter)}doSort(e,t){const i=this.beans.sortStage;if(i){i.execute(e,t);return}Wt(this.rootNode,this.hierarchical,e,o=>{o.childrenAfterSort=o.childrenAfterAggFilter.slice(0),ip(o)})}doGrouping(e,t){const o=this.beans.groupStage?.execute(t);if(o===void 0){const s=e._leafs;e.childrenAfterGroup=s,e.updateHasChildren();const n=e.sibling;n&&(n.childrenAfterGroup=s)}(o||t.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute(e);return}Wt(this.rootNode,this.hierarchical,e,i=>{i.childrenAfterFilter=i.childrenAfterGroup,Ql(i)})}doPivot(e){return this.beans.pivotStage?.execute(e)??!1}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return typeof t=="object"?t:this.beans.groupStage?.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const i=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),i)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:i,asyncTransactions:o}=this;if(!e)return;t.valueCache?.onDataChanged();const s=[],n=[],r=new Do,l=!this.gos.get("suppressAnimationFrame");for(const{rowDataTransaction:a,callback:d}of o??[]){this.rowNodesCountReady=!0,this.refreshingData=!0;const c=e.updateRowData(a,r,l);s.push(c),d&&n.push(d.bind(null,c))}this.commitTransactions(r,l),n.length>0&&setTimeout(()=>{for(let a=0,d=n.length;a0&&i.dispatchEvent({type:"asyncTransactionsFlushed",results:s}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const i=new Do,o=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;const s=t.updateRowData(e,i,o);return this.commitTransactions(i,o),s}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e})}doRowsToDisplay(){const{rootNode:e,beans:t}=this;if(t.formula?.active){const s=e?.childrenAfterSort??[];this.formulaRows=s,this.rowsToDisplay=s.filter(n=>!n.softFiltered);for(const n of this.rowsToDisplay)n.setUiLevel(0);return}const i=t.flattenStage;if(i){this.rowsToDisplay=i.execute();return}const o=this.rootNode.childrenAfterSort??[];for(const s of o)s.setUiLevel(0);this.rowsToDisplay=o}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const i=e.sibling;i?.setRowHeight(i.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const i=t.detailNode;i?.setRowHeight(i.rowHeight,!0);const o=t.sibling;o?.setRowHeight(o.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},op=(e,t)=>{const i=t.childrenAfterGroup;if(i)for(let o=0,s=i.length;oze(e)?.updateRowData(t))}function BR(e,t,i){e.frameworkOverrides.wrapIncoming(()=>ze(e)?.batchUpdateRowData(t,i))}function HR(e){e.frameworkOverrides.wrapIncoming(()=>ze(e)?.flushAsyncTransactions())}function OR(e){return e.selectionSvc?.getBestCostNodeSelection()}var sp={moduleName:"ClientSideRowModel",version:P,rowModels:["clientSide"],beans:[PR,FR],dependsOn:[_l]},np={moduleName:"ClientSideRowModelApi",version:P,apiFunctions:{onGroupExpandedOrCollapsed:DR,refreshClientSideRowModel:MR,isRowDataEmpty:TR,forEachLeafNode:AR,forEachNodeAfterFilter:IR,forEachNodeAfterFilterAndSort:kR,applyTransaction:LR,applyTransactionAsync:BR,flushAsyncTransactions:HR,getBestCostNodeSelection:OR,resetRowHeights:Yl,onRowHeightChanged:jl},dependsOn:[Zg,Xg]},GR=":where(.ag-ltr) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,left .2s ease-in-out}}:where(.ag-rtl) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,right .2s ease-in-out}}";function VR(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function rp({colAutosize:e,visibleCols:t},i,o){Array.isArray(i)?e?.autoSizeCols({colKeys:i,skipHeader:o,source:"api"}):e?.autoSizeCols({...i,colKeys:i.colIds??t.allCols,source:"api"})}function NR(e,t){t&&typeof t=="object"?rp(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}var zR=class extends S{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let i=!1;const o=t.type;if(o==="fitGridWidth"||o==="fitProvidedWidth")i=!0;else if(o==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const s=e.get("rowData");i=s!=null&&s.length>0&&J(e)}i&&this.beans.colDelayRenderSvc?.hideColumns(o)}}autoSizeCols(e){const{eventSvc:t,visibleCols:i,colModel:o}=this.beans;Uo(this.beans,!0),this.innerAutoSizeCols(e).then(s=>{const n=c=>Gi(t,Array.from(c),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return Uo(this.beans,!1),n(s);const r=lp(this.beans),l=c=>i.leftCols.some(u=>Ii(u,c)),a=c=>i.rightCols.some(u=>Ii(u,c)),d=e.colKeys.filter(c=>!o.getCol(c)?.getColDef().suppressAutoSize&&!pe(c)&&!l(c)&&!a(c));this.sizeColumnsToFit(r,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(c=>({...c,key:c.colId})),colKeys:d,onlyScaleUp:!0,animate:!1}),Uo(this.beans,!1),n(s)})}innerAutoSizeCols(e){return new Promise((t,i)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,i));const{colKeys:o,skipHeader:s,skipHeaderGroups:n,stopAtGroup:r,defaultMaxWidth:l,defaultMinWidth:a,columnLimits:d=[],source:c="api"}=e,{animationFrameSvc:u,renderStatus:h,colModel:g,autoWidthCalc:p,visibleCols:f}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&h&&(!h.areHeaderCellsRendered()||!h.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,i)});return}this.timesDelayed=0;const m=new Set;let C=-1;const v=Object.fromEntries(d.map(({colId:R,...E})=>[R,E])),w=s??this.gos.get("skipHeaderOnAutoSize"),y=n??w;for(;C!==0;){C=0;const R=[];for(const E of o){if(!E||dc(E))continue;const D=g.getCol(E);if(!D||m.has(D)||D.getColDef().suppressAutoSize)continue;const B=p.getPreferredWidthForColumn(D,w);if(B>0){const O=v[D.colId]??{};O.minWidth??(O.minWidth=a),O.maxWidth??(O.maxWidth=l);const G=WR(D,B,O);D.setActualWidth(G,c),m.add(D),C++}R.push(D)}R.length&&f.refresh(c)}y||this.autoSizeColumnGroupsByColumns(o,c,r),t(m)})}autoSizeColumn(e,t,i){this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const{colModel:o,ctrlsSvc:s}=this.beans,n=new Set,r=o.getColsForKeys(e);for(const a of r){let d=a.getParent();for(;d&&d!=i;)d.isPadding()||n.add(d),d=d.getParent()}let l;for(const a of n){for(const d of s.getHeaderRowContainerCtrls())if(l=d.getHeaderCtrlForColumn(a),l)break;l?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const i=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",i)};e.addEventListener("dblclick",o);const s=new It(e);return s.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),s.destroy()}}addColumnGroupResize(e,t,i){const o=this.gos.get("skipHeaderOnAutoSize"),s=()=>{const n=[],r=t.getDisplayedLeafColumns();for(const l of r)l.getColDef().suppressAutoSize||n.push(l.getColId());n.length>0&&this.autoSizeCols({colKeys:n,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),i()};return e.addEventListener("dblclick",s),()=>e.removeEventListener("dblclick",s)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const i=lp(this.beans);if(i>0){this.sizeColumnsToFit(i,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):F(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",i,o){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,o));return}const{beans:s}=this,n=o?.animate??!0;n&&Uo(s,!0);const r={};for(const{key:C,...v}of o?.columnLimits??[])r[typeof C=="string"?C:C.getColId()]=v;const l=s.visibleCols.allCols;if(e<=0||!l.length)return;const a=pt(l);if(o?.onlyScaleUp&&a>e||e===a&&l.every(v=>{if(v.colDef.suppressSizeToFit)return!0;const w=r?.[v.getId()],y=w?.minWidth??o?.defaultMinWidth,R=w?.maxWidth??o?.defaultMaxWidth,E=v.getActualWidth();return(y==null||E>=y)&&(R==null||E<=R)}))return;const c=[],u=[];for(const C of l){const v=o?.colKeys?.some(w=>Ii(C,w))??!0;C.getColDef().suppressSizeToFit||!v?u.push(C):c.push(C)}const h=c.slice(0);let g=!1;const p=C=>{Ie(c,C),u.push(C)},f={};for(const C of c){o?.onlyScaleUp&&(f[C.getColId()]=C.getActualWidth()),C.resetActualWidth(t);const v=r?.[C.getId()],w=v?.minWidth??o?.defaultMinWidth??-1/0,y=v?.maxWidth??o?.defaultMaxWidth??1/0,R=C.getActualWidth(),E=Math.max(Math.min(R,y),w);E!=R&&C.setActualWidth(E,t,!0)}for(;!g;){g=!0;const C=e-pt(u);if(C<=0)for(const v of c){const w=r?.[v.getId()]?.minWidth??o?.defaultMinWidth??v.minWidth;v.setActualWidth(w,t,!0)}else{const v=C/pt(c);let w=C;for(let y=c.length-1;y>=0;y--){const R=c[y],E=R.getColId(),D=f[E],B=r?.[E],O=B?.minWidth??o?.defaultMinWidth??D,G=B?.maxWidth??o?.defaultMaxWidth,H=Math.max(O??-1/0,R.getMinWidth()),$=Math.min(G??1/0,R.getMaxWidth());let W=Math.round(R.getActualWidth()*v);W$?(W=$,p(R),g=!1):y===0&&(W=w),R.setActualWidth(W,t,!0),w-=W}}}for(const C of h)C.fireColumnWidthChangedEvent(t);const m=s.visibleCols;m.setLeftValues(t),m.updateBodyWidths(),!i&&(Gi(this.eventSvc,h,!0,t),n&&Uo(s,!1))}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,i=e.get("autoSizeStrategy");i?.type!=="fitGridWidth"&&i?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const o=i.type;if(o==="fitGridWidth"){const{columnLimits:s,defaultMinWidth:n,defaultMaxWidth:r}=i,l=s?.map(({colId:a,minWidth:d,maxWidth:c})=>({key:a,minWidth:d,maxWidth:c}));this.sizeColumnsToFitGridBody({defaultMinWidth:n,defaultMaxWidth:r,columnLimits:l})}else o==="fitProvidedWidth"&&this.sizeColumnsToFit(i.width,"sizeColumnsToFit");t?.revealColumns(o)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const i="autosizeColumns";e?this.autoSizeCols({...t,source:i,colKeys:e}):this.autoSizeAllColumns({...t,source:i}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function WR(e,t,i={}){const o=i.minWidth??e.getMinWidth();ts&&(t=s),t}function lp({ctrlsSvc:e,scrollVisibleSvc:t}){const i=e.getGridBodyCtrl(),s=i.isVerticalScrollShowing()?t.getScrollbarWidth():0;return yi(i.eGridBody)-s}var ap="ag-animate-autosize";function Uo({ctrlsSvc:e,gos:t},i){if(!t.get("animateColumnResizing")||t.get("enableRtl")||!e.isAlive())return;const o=e.getGridBodyCtrl().eGridBody.classList;i?o.add(ap):o.remove(ap)}var dp={moduleName:"ColumnAutoSize",version:P,beans:[zR],apiFunctions:{sizeColumnsToFit:VR,autoSizeColumns:rp,autoSizeAllColumns:NR},dependsOn:[lh],css:[GR]};function _R(e,t){return!!e.colHover?.isHovered(t)}var UR=class extends S{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=i=>{const{beans:o,gos:s,element:n,columns:r}=this,l=o.colHover;if(i??!!s.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(n,{mouseover:l.setMouseOver.bind(l,r),mouseout:l.clearMouseOver.bind(l)});else{for(const d of this.destroyManagedListeners)d();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},qR="ag-column-hover",$R=class extends S{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,i){const o=()=>{const s=this.isHovered(i);t.toggleCss("ag-column-hover",s)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;const i=this.isHovered(e);t.toggleCss(qR,i)}addHeaderFilterColumnHoverListener(e,t,i,o){this.createHoverFeature(e,[i],o);const s=()=>{const n=this.isHovered(i);t.toggleCss("ag-column-hover",n)};e.addManagedEventListeners({columnHoverChanged:s}),s()}createHoverFeature(e,t,i){e.createManagedBean(new UR(t,i))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},cp={moduleName:"ColumnHover",version:P,beans:[$R],apiFunctions:{isColumnHovered:_R}},KR=class extends S{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:i,columnKeys:o,skipRowGroups:s,exportRowNumbers:n}=t,r=this.getColumnsToExport({allColumns:i,skipRowGroups:s,columnKeys:o,exportRowNumbers:n});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce((l,a)=>a(l),e).parse()}processRow(e,t,i,o){const s=t.shouldRowBeSkipped||(()=>!1),r=t.rowPositions!=null||!!t.onlySelected,l=this.gos.get("groupHideOpenParents")&&!r,a=this.colModel.isPivotMode()?o.leafGroup:!o.group,d=!!o.footer,c=o.allChildrenCount===1&&o.childrenAfterGroup?.length===1&&Ud(this.gos,o);if(!a&&!d&&(t.skipRowGroups||c||l)||t.onlySelected&&!o.isSelected()||t.skipPinnedTop&&o.rowPinned==="top"||t.skipPinnedBottom&&o.rowPinned==="bottom"||o.stub||o.level===-1&&!a&&!d||s(k(this.gos,{node:o})))return;const g=e.onNewBodyRow(o);if(i.forEach((p,f)=>{g.onColumn(p,f,o)}),t.getCustomContentBelowRow){const p=t.getCustomContentBelowRow(k(this.gos,{node:o}));p&&e.addCustomContent(p)}}appendContent(e){return t=>{const i=e.appendContent;return i&&t.addCustomContent(i),t}}prependContent(e){return t=>{const i=e.prependContent;return i&&t.addCustomContent(i),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return i=>{if(!e.skipColumnGroupHeaders){const o=new al,{colGroupSvc:s}=this.beans,n=s?s.createColumnGroups({columns:t,idCreator:o,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(n,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){const o=i.onNewHeaderRow();t.forEach((s,n)=>{o.onColumn(s,n,void 0)})}return i}}processPinnedTopRows(e,t){return i=>{const o=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="top").sort((s,n)=>s.rowIndex-n.rowIndex).map(s=>this.pinnedRowModel?.getPinnedTopRow(s.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",o),i}}processRows(e,t){return i=>{const o=this.rowModel,s=J(this.gos,o),n=Pi(this.gos,o),r=!s&&e.onlySelected,l=this.processRow.bind(this,i,e,t),{exportedRows:a="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(d=>d.rowPinned==null).sort((d,c)=>d.rowIndex-c.rowIndex).map(d=>o.getRow(d.rowIndex)).forEach(l);else if(this.colModel.isPivotMode())s?o.forEachPivotNode(l,!0,a==="filteredAndSorted"):n?o.forEachNodeAfterFilterAndSort(l,!0):o.forEachNode(l);else if(e.onlySelectedAllPages||r){const d=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(d),d.forEach(l)}else a==="all"?o.forEachNode(l):s||n?o.forEachNodeAfterFilterAndSort(l,!0):o.forEachNode(l);return i}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:i}=this.beans;if(!t||!i)return;const o=t.getSortOptions(),s=(n,r)=>n.rowIndex!=null&&r.rowIndex!=null?n.rowIndex-r.rowIndex:n.level===r.level?n.parent?.id===r.parent?.id?i.compareRowNodes(o,n,r)||(n.rowIndex??-1)-(r.rowIndex??-1):s(n.parent,r.parent):n.level>r.level?s(n.parent,r):s(n,r.parent);e.sort(s)}processPinnedBottomRows(e,t){return i=>{const o=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(s=>s.rowPinned==="bottom").sort((s,n)=>s.rowIndex-n.rowIndex).map(s=>this.pinnedRowModel?.getPinnedBottomRow(s.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",o),i}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:i=!1,exportRowNumbers:o=!1,columnKeys:s}=e,{colModel:n,gos:r,visibleCols:l}=this,a=n.isPivotMode(),d=h=>ft(h)?!1:!pe(h)||o;if(s?.length)return n.getColsForKeys(s).filter(d);const c=r.get("treeData");let u=[];return t&&!a?u=n.getCols():u=l.allCols,u=u.filter(h=>d(h)&&(i&&!c?!Rs(h):!0)),u}recursivelyAddHeaderGroups(e,t,i){const o=[];for(const s of e){const n=s;if(n.getChildren)for(const r of n.getChildren()??[])o.push(r)}e.length>0&&ee(e[0])&&this.doAddHeaderHeader(t,e,i),o&&o.length>0&&this.recursivelyAddHeaderGroups(o,t,i)}doAddHeaderHeader(e,t,i){const o=e.onNewHeaderGroupingRow();let s=0;for(const n of t){const r=n;let l;i?l=i(k(this.gos,{columnGroup:r})):l=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const d=(r.isExpandable()?r.getLeafColumns():[]).reduce((c,u,h,g)=>{let p=q(c);return u.getColumnGroupShow()==="open"?(!p||p[1]!=null)&&(p=[h],c.push(p)):p&&p[1]==null&&(p[1]=h-1),h===g.length-1&&p&&p[1]==null&&(p[1]=h),c},[]);o.onColumn(r,l||"",s++,r.getLeafColumns().length-1,d)}}},up={moduleName:"SharedExport",version:P,beans:[KR]},hp=class extends S{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}};function gp(e,t){const i=document.defaultView||window;if(!i){F(52);return}const o=document.createElement("a"),s=i.URL.createObjectURL(t);o.setAttribute("href",s),o.setAttribute("download",e),o.style.display="none",document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),o.remove(),i.setTimeout(()=>{i.URL.revokeObjectURL(s)},0)}var pp=class{constructor(e){this.valueFrom="data";const{colModel:t,rowGroupColsSvc:i,colNames:o,valueSvc:s,gos:n,processCellCallback:r,processHeaderCallback:l,processGroupHeaderCallback:a,processRowGroupCallback:d,valueFrom:c}=e;this.colModel=t,this.rowGroupColsSvc=i,this.colNames=o,this.valueSvc=s,this.gos=n,this.processCellCallback=r,this.processHeaderCallback=l,this.processGroupHeaderCallback=a,this.processRowGroupCallback=d,c&&(this.valueFrom=c)}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e){const{column:t,node:i,currentColumnIndex:o,accumulatedRowIndex:s,type:n,useRawFormula:r}=e,l=o===0&&Zn(this.gos,i,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||i.group)&&(t.isRowGroupDisplayed(i.rowGroupColumn?.getColId()??"")||l))return{value:this.processRowGroupCallback(k(this.gos,{column:t,node:i}))??""};if(this.processCellCallback)return{value:this.processCellCallback(k(this.gos,{accumulatedRowIndex:s,column:t,node:i,value:this.valueSvc.getValueForDisplay({column:t,node:i,from:this.valueFrom}).value,type:n,parseValue:p=>this.valueSvc.parseValue(t,i,p,this.valueSvc.getValue(t,i,this.valueFrom)),formatValue:p=>this.valueSvc.formatValue(t,i,p)??p}))??""};const a=this.gos.get("treeData"),d=this.valueSvc,c=i.level===-1&&i.footer,u=t.colDef.showRowGroup===!0&&(i.group||a);if(!c&&(l||u)){let p="",f=i;for(;f&&f.level!==-1;){const{value:m,valueFormatted:C}=d.getValueForDisplay({column:l?void 0:t,node:f,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});p=` -> ${C??m??""}${p}`,f=f.parent}return{value:p,valueFormatted:p}}const{value:h,valueFormatted:g}=d.getValueForDisplay({column:t,node:i,includeValueFormatted:!0,exporting:!0,useRawFormula:r,from:this.valueFrom});return{value:h??"",valueFormatted:g}}getHeaderName(e,t){return e?e(k(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},fp=`\r `,jR=class extends pp{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,fp),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((i,o)=>{o!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(i.data.value||""),i.mergeAcross&&this.appendEmptyCells(i.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,i,o){i!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){t!=0&&(this.result+=this.columnSeparator);const o=this.extractRowCellValue({column:e,node:i,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(o.valueFormatted??o.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(F(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=fp),this.isFirstLine=!1}},YR=class extends hp{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){F(51);return}const t=()=>{const o=this.getMergedParams(e),s=this.getData(o),n=new Blob(["\uFEFF",s],{type:"text/plain"}),r=o.fileName,l=typeof r=="function"?r(k(this.gos,{})):r;gp(this.getFileName(l),n)},{overlays:i}=this.beans;i?i.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const i=t?Object.assign({},e):this.getMergedParams(e);return this.getData(i)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:i,rowGroupColsSvc:o,valueSvc:s,gos:n}=this.beans,{processCellCallback:r,processHeaderCallback:l,processGroupHeaderCallback:a,processRowGroupCallback:d,suppressQuotes:c,columnSeparator:u,valueFrom:h}=e;return new jR({colModel:t,colNames:i,valueSvc:s,gos:n,processCellCallback:r||void 0,processHeaderCallback:l||void 0,processGroupHeaderCallback:a||void 0,processRowGroupCallback:d||void 0,suppressQuotes:c||!1,columnSeparator:u||",",rowGroupColsSvc:o,valueFrom:h})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function QR(e,t){return e.csvCreator?.getDataAsCsv(t)}function ZR(e,t){e.csvCreator?.exportDataAsCsv(t)}var mp={moduleName:"CsvExport",version:P,beans:[YR],apiFunctions:{getDataAsCsv:QR,exportDataAsCsv:ZR},dependsOn:[up]},Zl=class extends he{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const i="title",o=this.ctrl.getGui();o&&(e!=null&&(e!=""||t)?o.setAttribute(i,e):o.removeAttribute(i))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},XR=1e3,JR=1e3,Cp=100,vp,un=!1,wp=class extends he{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return this.tooltipCtrl[`getTooltip${e}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Pt()&&(un?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},Cp):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,i=this.tooltipCtrl.getGui(),o=this.tooltipComp?.getGui();this.isInteractingWithTooltip||i.contains(t)||this.interactionEnabled&&o?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||un)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-vpthis.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const o=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(i,o)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),vp=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const o=t.getGui();this.tooltipComp=t,o.classList.contains("ag-tooltip")||o.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&o.classList.add("ag-tooltip-animate"),this.interactionEnabled&&o.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({eChild:o,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(n&&(this.tooltipPopupDestroyFunc=n.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:r}),this.setEventHandlers(r)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(o,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(oe(this.beans),{keydown:r=>{o.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(o,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:o,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=j(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,i=this.tooltipTrigger===0?JR:0;window.setTimeout(()=>{e(),this.destroyBean(t)},i),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){un=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Cp)}unlockService(){un=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("Hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}},eE=class extends Zl{constructor(e,t,i){super(e,i),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=e==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},bp=class extends Ps{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,i=this.getGui();i.textContent=$t(t);const o=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();i.classList.add(`ag-${o}-tooltip`)}},tE=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip),&:where(.ag-cell-formula-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",hn=0,iE=200,Sp=class extends he{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:i,nudgeY:o,skipObserver:s}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:o,keepWithinBounds:!0,skipObserver:s,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:i,nudgeY:o,keepWithinBounds:s,eventSource:n,alignSide:r="left",position:l="over",type:a}=e,d=n.getBoundingClientRect(),c=this.getParentRect();this.setAlignedTo(n,t);const u=()=>{let h=d.left-c.left;r==="right"&&(h-=t.offsetWidth-d.width);let g;return l==="over"?(g=d.top-c.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,d,c,e.nudgeY||0)==="under"?g=d.top-c.top+d.height:g=d.top-t.offsetHeight-(o||0)*2-c.top),{x:h,y:g}};this.positionPopup({ePopup:t,nudgeX:i,nudgeY:o,keepWithinBounds:s,updatePosition:u,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,a,t,n,null)})}positionPopupForMenu(e){const{eventSource:t,ePopup:i,event:o}=e,s=t.getBoundingClientRect(),n=this.getParentRect();this.setAlignedTo(t,i);let r=!1;const l=()=>{const a=this.keepXYWithinBounds(i,s.top-n.top,0),d=i.clientWidth>0?i.clientWidth:200;r||(i.style.minWidth=`${d}px`,r=!0);const u=n.right-n.left-d;let h;return this.gos.get("enableRtl")?(h=p(),h<0&&(h=g(),this.setAlignedStyles(i,"left")),h>u&&(h=0,this.setAlignedStyles(i,"right"))):(h=g(),h>u&&(h=p(),this.setAlignedStyles(i,"right")),h<0&&(h=0,this.setAlignedStyles(i,"left"))),{x:h,y:a};function g(){return s.right-n.left-2}function p(){return s.left-n.left-d}};this.positionPopup({ePopup:i,keepWithinBounds:!0,updatePosition:l,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",i,t,o instanceof MouseEvent?o:void 0)})}shouldRenderUnderOrAbove(e,t,i,o){const s=i.bottom-t.bottom,n=t.top-i.top,r=e.offsetHeight+o;return s>r?"under":n>r||n>s?"above":"under"}setAlignedStyles(e,t){const i=this.getPopupIndex(e);if(i===-1)return;const o=this.popupList[i],{alignedToElement:s}=o;if(!s)return;const n=["right","left","over","above","under"];for(const r of n)s.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`);t&&(s.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const i=this.getPopupIndex(t);if(i!==-1){const o=this.popupList[i];o.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:i,nudgeX:o,nudgeY:s,skipObserver:n,updatePosition:r}=e,l={width:0,height:0},a=(d=!1)=>{let{x:c,y:u}=r();d&&t.clientWidth===l.width&&t.clientHeight===l.height||(l.width=t.clientWidth,l.height=t.clientHeight,o&&(c+=o),s&&(u+=s),i&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!n){const d=at(this.beans,t,()=>a(!0));setTimeout(()=>d(),iE)}}getParentRect(){const e=oe(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),sd(t)}keepXYWithinBounds(e,t,i){const o=i===0,s=o?"clientHeight":"clientWidth",n=o?"top":"left",r=o?"height":"width",l=o?"scrollTop":"scrollLeft",a=oe(this.beans),d=a.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),h=c.getBoundingClientRect(),g=a.documentElement.getBoundingClientRect(),p=c===a.body,f=Math.ceil(u[r]);let C=p?(o?In:Ji)(d)+d[l]:c[s];p&&(C-=Math.abs(g[n]-h[n]));const v=C-f;return Math.min(Math.max(t,0),Math.max(v,0))}addPopup(e){const{eChild:t,ariaLabel:i,ariaOwns:o,alwaysOnTop:s,positionCallback:n,anchorToElement:r}=e,l=this.getPopupIndex(t);if(l!==-1)return{hideFunc:this.popupList[l].hideFunc};this.initialisePopupPosition(t);const a=this.createPopupWrapper(t,!!s,i,o),d=this.addEventListenersToPopup({...e,wrapperEl:a});return n&&n(),this.addPopupToPopupList(t,a,d,r),{hideFunc:d}}initialisePopupPosition(e){const i=this.getPopupParent().getBoundingClientRect();M(e.style.top)||(e.style.top=`${i.top*-1}px`),M(e.style.left)||(e.style.left=`${i.left*-1}px`)}createPopupWrapper(e,t,i,o){const s=this.getPopupParent(),{environment:n,gos:r}=this.beans,l=St({tag:"div"});return n.applyThemeClasses(l),l.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||je(e,"dialog"),i?Kt(e,i):o&&(e.id||(e.id=`popup-component-${hn}`),td(o,e.id)),l.appendChild(e),s.appendChild(l),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),l}addEventListenersToPopup(e){const t=this.beans,i=oe(t),{wrapperEl:o,eChild:s,closedCallback:n,afterGuiAttached:r,closeOnEsc:l,modal:a,ariaOwns:d}=e;let c=!1;const u=f=>{if(!o.contains(j(t)))return;f.key===b.ESCAPE&&!this.isStopPropagation(f)&&p({keyboardEvent:f})},h=f=>p({mouseEvent:f}),g=f=>p({touchEvent:f}),p=(f={})=>{const{mouseEvent:m,touchEvent:C,keyboardEvent:v,forceHide:w}=f;!w&&(this.isEventFromCurrentPopup({mouseEvent:m,touchEvent:C},s)||c)||(c=!0,o.remove(),i.removeEventListener("keydown",u),i.removeEventListener("mousedown",h),i.removeEventListener("touchstart",g),i.removeEventListener("contextmenu",h),this.eventSvc.removeListener("dragStarted",h),n&&n(m||C||v),this.removePopupFromPopupList(s,d))};return r&&r({hidePopup:p}),window.setTimeout(()=>{l&&i.addEventListener("keydown",u),a&&(i.addEventListener("mousedown",h),this.eventSvc.addListener("dragStarted",h),i.addEventListener("touchstart",g),i.addEventListener("contextmenu",h))},0),p}addPopupToPopupList(e,t,i,o){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:hn,isAnchored:!!o}),o&&this.setPopupPositionRelatedToElement(e,o),hn=hn+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const i=this.getPopupIndex(e);if(i===-1)return;const o=this.popupList[i];if(o.stopAnchoringPromise&&o.stopAnchoringPromise.then(n=>n&&n()),o.stopAnchoringPromise=void 0,o.isAnchored=!1,!t)return;const s=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:o.hideFunc});return o.stopAnchoringPromise=s,o.isAnchored=!0,s}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&td(t,null),this.popupList=this.popupList.filter(i=>i.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:o,ePopup:s}=e,n=o.getBoundingClientRect(),r=u=>Number.parseInt(u.substring(0,u.length-1),10),l=(u,h)=>{const g=i[u]-n[u],p=r(s.style[u]);return{initialDiff:g,lastDiff:g,initial:p,last:p,direction:h}},a=l("top",0),d=l("left",1),c=this.beans.frameworkOverrides;return new Y(u=>{c.wrapIncoming(()=>{UC(()=>{const h=t.getBoundingClientRect(),g=o.getBoundingClientRect();if(g.top==0&&g.left==0&&g.height==0&&g.width==0){e.hidePopup();return}const f=(m,C)=>{const v=r(s.style[C]);m.last!==v&&(m.initial=v,m.last=v);const w=h[C]-g[C];if(w!=m.lastDiff){const y=this.keepXYWithinBounds(s,m.initial+m.initialDiff-w,m.direction);s.style[C]=`${y}px`,m.last=y}m.lastDiff=w};f(a,"top"),f(d,"left")},200).then(h=>{u(()=>{h!=null&&window.clearInterval(h)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:i,touchEvent:o}=e,s=i||o;if(!s)return!1;const n=this.getPopupIndex(t);if(n===-1)return!1;for(let r=n;re.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return et(e)}},qo={moduleName:"Popup",version:P,beans:[oE]};function $o(e){return e.get("tooltipShowMode")==="whenTruncated"}function sE(e,t){return $o(e)?Qt(t):void 0}var nE=(e,t)=>{const i=e;return typeof i.getTranslatedMessage=="function"?i.getTranslatedMessage(t):e.message},Xl=(e,t,i)=>{const{editModelSvc:o}=e,s=o?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,n=o?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=s||n;return r?.length?r.join(i("tooltipValidationErrorSeparator",". ")):void 0},rE=(e,t)=>{if($o(e.gos)){if(t.isCellRenderer()){const o=t.column.getColDef();return!!o.showRowGroup||o.cellRenderer==="agGroupCellRenderer"?Qt(()=>{const n=t.eGui;return n.querySelector(".ag-group-value")||n.querySelector(".ag-cell-value")||n}):void 0}return Qt(()=>{const o=t.eGui;return o.children.length===0?o:o.querySelector(".ag-cell-value")})}},lE=(e,t,i)=>{const{editSvc:o}=e,{column:s}=t,n=rE(e,t),r=()=>o?.isEditing(t)?!1:n?s.isTooltipEnabled()?n():!1:!0;return{shouldDisplayDefault:r,shouldDisplayColumnTooltip:r,shouldDisplayCustomTooltip:i??r}},aE=({beans:e,ctrl:t,value:i,displayFunctions:o,translate:s})=>{const{editSvc:n,formula:r,gos:l}=e,{column:a,rowNode:d}=t;if(r?.active&&a.isAllowFormula()){const m=r.getFormulaError(a,d);if(m)return{value:nE(m,s),location:"cellFormula",shouldDisplay:()=>!!r?.getFormulaError(a,d)}}if(!!!n?.isEditing(t)){const m=Xl(e,t,s);if(m)return{value:m,location:"cellEditor",shouldDisplay:()=>!n?.isEditing(t)&&!!Xl(e,t,s)}}const{shouldDisplayCustomTooltip:u,shouldDisplayColumnTooltip:h}=o;if(i!=null)return{value:i,location:"cell",shouldDisplay:u};const g=a.getColDef(),p=d.data;if(g.tooltipField&&M(p))return{value:ko(p,g.tooltipField,a.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:h};const f=g.tooltipValueGetter;return f?{value:f(k(l,{location:"cell",colDef:a.getColDef(),column:a,rowIndex:t.cellPosition.rowIndex,node:d,data:d.data,value:t.value,valueFormatted:t.valueFormatted})),location:"cell",shouldDisplay:h}:null},dE=class extends S{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,i,o){e&&t.destroyBean(e);const s=this.gos,n=$o(s),{column:r,eGui:l}=t,a=r.getColDef();!o&&n&&!a.headerComponent&&(o=Qt(()=>l.querySelector(".ag-header-cell-text")));const d="header",u=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),h=i??u,g={getGui:()=>l,getLocation:()=>d,getTooltipValue:()=>i??a?.headerTooltipValueGetter?.(k(s,{location:d,colDef:a,column:r,value:h,valueFormatted:u}))??a?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})};let p=this.createTooltipFeature(g);return p&&(p=t.createBean(p),t.setRefreshFunction("tooltip",()=>p.refreshTooltip())),p}setupHeaderGroupTooltip(e,t,i,o){e&&t.destroyBean(e);const s=this.gos,n=$o(s),{column:r,eGui:l}=t,a=r.getColGroupDef();!o&&n&&!a?.headerGroupComponent&&(o=Qt(()=>l.querySelector(".ag-header-group-text")));const d="headerGroup",u=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),h=i??u,g={getGui:()=>l,getLocation:()=>d,getTooltipValue:()=>i??a?.headerTooltipValueGetter?.(k(s,{location:d,colDef:a,column:r,value:h,valueFormatted:u}))??a?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>{const f={column:r};return a&&(f.colDef=a),f}},p=this.createTooltipFeature(g);return p&&t.createBean(p)}enableCellTooltipFeature(e,t,i){const{beans:o}=this,{column:s,rowNode:n}=e,r=lE(o,e,i),l=this.getLocaleTextFunc();let a=null;const d=()=>(a=aE({beans:o,ctrl:e,value:t,displayFunctions:r,translate:l}),a),u={getGui:()=>e.eGui,getLocation:()=>a?.location??"cell",getTooltipValue:()=>d()?.value,shouldDisplayTooltip:()=>{const h=a??d();return h?h.shouldDisplay?h.shouldDisplay():!0:!1},getAdditionalParams:()=>({column:s,colDef:s.getColDef(),rowIndex:e.cellPosition.rowIndex,node:n,data:n.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(u,o)}setupFullWidthRowTooltip(e,t,i,o){const s={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>i,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:o},n=this.beans,r=n.context;e&&t.destroyBean(e,r);const l=this.createTooltipFeature(s,n);if(l)return t.createBean(l,r)}setupCellEditorTooltip(e,t){const{beans:i}=this,{context:o}=i,s=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!s)return;const n={getGui:()=>s,getTooltipValue:()=>Xl(i,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:l}=i,a=l?.getRowValidationModel()?.getRowValidationMap(),d=l?.getCellValidationModel()?.getCellValidationMap(),c=!!a&&a.size>0,u=!!d&&d.size>0;return c||u}},r=this.createTooltipFeature(n,i);if(r)return e.createBean(r,o)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=M(t.tooltipField)||M(t.tooltipValueGetter)||M(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},cE=class extends wp{createTooltipComp(e,t){yv(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},Jl={moduleName:"Tooltip",version:P,beans:[dE],dynamicBeans:{tooltipFeature:Zl,highlightTooltipFeature:eE,tooltipStateManager:cE},userComponents:{agTooltipComponent:bp},dependsOn:[qo],css:[tE]},qi=class{constructor(e){this.cellValueChanges=e}},ea=class extends qi{constructor(e,t,i,o){super(e),this.initialRange=t,this.finalRange=i,this.ranges=o}},uE=10,yp=class{constructor(e){this.actionStack=[],this.maxStackSize=e||uE,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},hE=class extends S{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},i=this.activeCellEdit!==null&&ks(this.activeCellEdit,t),o=this.activeRowEdit!==null&&Jc(this.activeRowEdit,t);if(!(i||o||this.isPasting||this.isRangeInAction))return;const{rowPinned:n,rowIndex:r,column:l,oldValue:a,value:d}=e,c={rowPinned:n,rowIndex:r,columnId:l.getColId(),newValue:d,oldValue:a};this.cellValueChanges.push(c)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const i=e.get("undoRedoCellEditingLimit");if(i<=0)return;this.undoStack=new yp(i),this.redoStack=new yp(i),this.addListeners();const o=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:s=>{s.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:o,newColumnsLoaded:o,columnGroupOpened:o,columnRowGroupChanged:o,columnMoved:o,columnPinned:o,columnVisible:o,rowDragEnd:o}),t.whenReady(this,s=>{this.gridBodyCtrl=s.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:i,redoStack:o}=this;t.dispatchEvent({type:"undoStarted",source:e});const s=this.undoRedo(i,o,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:s})}redo(e){const{eventSvc:t,undoStack:i,redoStack:o}=this;t.dispatchEvent({type:"redoStarted",source:e});const s=this.undoRedo(o,i,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:s})}undoRedo(e,t,i,o,s){if(!e)return!1;const n=e.pop();return n?.cellValueChanges?(this.processAction(n,r=>r[o],s),n instanceof ea?this.processRange(n.ranges||[n[i]]):this.processCell(n.cellValueChanges),t.push(n),!0):!1}processAction(e,t,i){const{changeDetectionSvc:o}=this.beans;o?.beginDeferred();try{for(const s of e.cellValueChanges){const{rowIndex:n,rowPinned:r,columnId:l}=s,a={rowIndex:n,rowPinned:r},d=We(this.beans,a);d?.displayed&&d.setDataValue(l,t(s),i)}}finally{o?.endDeferred()}}processRange(e){let t;const i=this.beans.rangeSvc;i.removeAllCellRanges(!0),e.forEach((o,s)=>{if(!o)return;const n=o.startRow,r=o.endRow;s===e.length-1&&(t={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:o.startColumn.getColId()},this.setLastFocusedCell(t));const l={rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:o.startColumn,columns:o.columns};i.addCellRange(l)})}processCell(e){const t=e[0],{rowIndex:i,rowPinned:o}=t,s={rowIndex:i,rowPinned:o},n=We(this.beans,s),r={rowPinned:t.rowPinned,rowIndex:n.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:i,rowPinned:o}=e,{colModel:s,focusSvc:n,rangeSvc:r}=this.beans,l=s.getCol(i);if(!l)return;const{scrollFeature:a}=this.gridBodyCtrl;a.ensureIndexVisible(t),a.ensureColumnVisible(l);const d={rowIndex:t,column:l,rowPinned:o};n.setFocusedCell({...d,forceBrowserFocus:!0}),r?.setRangeToCell(d)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new qi(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const i=new qi(this.cellValueChanges);this.pushActionsToUndoStack(i)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new qi(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new ea(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:i}=this.beans;t&&Ze(i)?e=new ea(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new qi(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;const i=new qi(t??[]);this.pushActionsToUndoStack(i),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},gE=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) .ag-text-area-input{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",pE={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},fE=class extends wo{constructor(){super(pE,[qs]),this.eEditor=x}initialiseEditor(e){this.agSetEditValue(e.value),this.eEditor.getInputElement().setAttribute("tabindex","-1"),this.addManagedListeners(this.eEditor,{fieldValueChanged:i=>this.setAriaLabel(i.selected)})}agSetEditValue(e){this.params.value=e;const t=e??void 0;this.eEditor.setValue(t,!0),this.setAriaLabel(t)}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),i=rs(t,e),o=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${o} (${i})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,i=this.getValue();return t?t({value:i,internalErrors:null,cellEditorParams:e}):null}},rt=class extends Bt{constructor(e,t="ag-text-field",i="text"){super(e,t,i)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const i=this.eInput;return i.value!==e&&(i.value=M(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){const t=this.eInput,i=e.length>0;t.setCustomValidity(e),i&&t.reportValidity(),ss(t,i)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=i=>{_r(i)&&i.key&&!e.test(i.key)&&i.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:i=>{i.clipboardData?.getData("text")?.split("").some(s=>!e.test(s))&&i.preventDefault()}})}},Ko={selector:"AG-INPUT-TEXT-FIELD",component:rt},Rp=class extends rt{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=mt();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){j(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?fe(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,we(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?fe(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,we(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,we(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return me(this.getValue())??void 0}setDate(e,t){this.setValue(fe(e??null,this.includeTime),t)}},Ep={selector:"AG-INPUT-DATE-FIELD",component:Rp},gn=class extends wo{constructor(e){super(),this.cellEditorInput=e,this.eEditor=x}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:i}=this,{cellStartedEdit:o,eventKey:s,suppressPreventDefault:n}=e;i.getInputElement().setAttribute("title",""),t.init(i,e);let r,l=!0;o?(this.focusAfterAttached=!0,s===b.BACKSPACE||s===b.DELETE?r="":s&&s.length===1?n?l=!1:r=s:(r=t.getStartValue(),s!==b.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),l&&r!=null&&i.setStartValue(r),this.addGuiEventListener("keydown",a=>{const{key:d}=a;(d===b.PAGE_UP||d===b.PAGE_DOWN)&&a.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;mt()||t.getFocusableElement().focus();const i=t.getInputElement();this.highlightAllOnFocus?i.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;const t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t??null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},mE={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},CE=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return mE}getAgComponents(){return[Ep]}init(e,t){this.eEditor=e,this.params=t;const{min:i,max:o,step:s,colDef:n}=t;i!=null&&e.setMin(i),o!=null&&e.setMax(o),s!=null&&e.setStep(s),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:i}=this,{min:o,max:s,getValidationErrors:n}=i;let r=[];const l=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(o){const a=o instanceof Date?o:new Date(o);if(ta){const d=a.toLocaleDateString();r.push(l("maxDateValidation",`Date must be before ${d}`,[d]))}}}return r.length||(r=null),n?n({value:t,cellEditorParams:i,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,i=e.getDate();return!M(i)&&!M(t.value)?t.value:i??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return fe(e,this.includeTime??!1)}},vE=class extends gn{constructor(){super(new CE(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},wE={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},bE=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return wE}getAgComponents(){return[Ep]}init(e,t){this.eEditor=e,this.params=t;const{min:i,max:o,step:s,colDef:n}=t;i!=null&&e.setMin(i),o!=null&&e.setMax(o),s!=null&&e.setStep(s),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,i=e.getInputElement().value,o=this.formatDate(this.parseDate(i??void 0)),{min:s,max:n,getValidationErrors:r}=t;let l=[];if(o){const a=new Date(o),d=this.getLocaleTextFunc();if(s){const c=new Date(s);if(ac){const u=c.toLocaleDateString();l.push(d("maxDateValidation",`Date must be before ${u}`,[u]))}}}return l.length||(l=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:l}):l}getValue(){const{params:e,eEditor:t}=this,i=this.formatDate(t.getDate());return!M(i)&&!M(e.value)?e.value:e.parseValue(i??"")}getStartValue(){return fe(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):me(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):fe(e??null,this.includeTime??!1)??void 0}},SE=class extends gn{constructor(){super(new bE(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},Fp=class extends Bt{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const i=super.setValue(e,t);return this.eInput.value=e,i}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},yE={selector:"AG-INPUT-TEXT-AREA",component:Fp},RE={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},EE=class extends wo{constructor(){super(RE,[yE]),this.eEditor=x}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:i,eventKey:o,maxLength:s,cols:n,rows:r}=e;this.focusAfterAttached=i,t.getInputElement().setAttribute("title",""),t.setMaxLength(s||200).setCols(n||60).setRows(r||10);let l;i?(this.focusAfterAttached=!0,o===b.BACKSPACE||o===b.DELETE?l="":o&&o.length===1?l=o:(l=this.getStartValue(e),o!==b.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,l=this.getStartValue(e)),l!=null&&t.setValue(l,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}agSetEditValue(e){this.params.value=e;const t=this.getStartValue(this.params);this.eEditor.setValue(t??"",!0)}onKeyDown(e){const t=e.key;(t===b.LEFT||t===b.UP||t===b.RIGHT||t===b.DOWN||e.shiftKey&&t===b.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:i}=this,o=this.getLocaleTextFunc();e.setInputAriaLabel(o("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),i&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:i}=t,o=e.getValue();return!M(o)&&!M(i)?i:t.parseValue(o)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:i}=e,o=this.getLocaleTextFunc(),s=this.getValue();let n=[];return typeof s=="string"&&t!=null&&s.length>t&&n.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),i?i({value:s,internalErrors:n,cellEditorParams:e}):n}},pn=class extends rt{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const n=Number.parseFloat(e.value),r=isNaN(n)?"":this.normalizeValue(n.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:i,max:o,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof i=="number"&&this.setMin(i),typeof o=="number"&&this.setMax(o),typeof s=="number"&&this.setStep(s)}onWheel(e){j(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const i=this.precision;if(i==null)return e;if(t){const s=Number.parseFloat(e).toFixed(i);return Number.parseFloat(s).toString()}const o=String(e).split(".");if(o.length>1){if(o[1].length<=i)return e;if(i>0)return`${o[0]}.${o[1].slice(0,i)}`}return o[0]}setMin(e){return this.min===e?this:(this.min=e,we(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,we(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,we(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(i=>super.setValue(i,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,i){if(M(i)){let o=this.isScientificNotation(i);if(o&&this.eInput.validity.valid)return e(i);if(!o){i=this.adjustPrecision(i);const s=this.normalizeValue(i);o=i!=s}if(o)return t(i)}return e(i)}getValue(e=!1){const t=this.eInput;if(!t.validity.valid&&!e)return;const i=t.value;return this.isScientificNotation(i)?this.adjustPrecision(i,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},xp={selector:"AG-INPUT-NUMBER-FIELD",component:pn},FE={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},xE=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return FE}getAgComponents(){return[xp]}init(e,t){this.eEditor=e,this.params=t;const{max:i,min:o,precision:s,step:n}=t;i!=null&&e.setMax(i),o!=null&&e.setMin(o),s!=null&&e.setPrecision(s),n!=null&&e.setStep(n);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:i,getValidationErrors:o}=e,n=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let l=[];return typeof n=="number"&&(t!=null&&ni&&l.push(r("maxValueValidation",`Must be less than or equal to ${i}.`,[String(i)]))),l.length||(l=null),o?o({value:n,cellEditorParams:e,internalErrors:l}):l}preventStepping(e){(e.key===b.UP||e.key===b.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,i=e.getValue();if(!M(i)&&!M(t.value))return t.value;let o=t.parseValue(i);if(o==null)return o;if(typeof o=="string"){if(o==="")return null;o=Number(o)}return isNaN(o)?null:o}getStartValue(){return this.params.value}setCaret(){mt()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},PE=class extends gn{constructor(){super(new xE(()=>this.getLocaleTextFunc()))}},DE=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",ME="ag-active-item",TE=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${e}-list-item-text`,ref:"eText",children:t}]}),AE=class extends ni{constructor(e,t,i){super(TE(e,t)),this.label=t,this.value=i,this.eText=x}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(ME,e),An(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const i=this.getGui();Ka(i,e),$a(i,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>ad(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},IE=class extends ni{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(DE)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case b.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const i=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(i)}break;case b.DOWN:case b.UP:e.preventDefault(),this.navigate(t);break;case b.PAGE_DOWN:case b.PAGE_UP:case b.PAGE_HOME:case b.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:i}=e,o=i??t;return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();le(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){const t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const i=this.options.findIndex(o=>o.value===e);if(i!==-1){const o=this.options[i];this.value=o.value,this.displayValue=o.text,this.highlightItem(this.listItems[i]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!De(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const i=this.getGui(),{scrollTop:o,clientHeight:s}=i,{offsetTop:n,offsetHeight:r}=t;(n+r>o+s||n{i.setIndex(o+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},kE=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}.ag-picker-field-wrapper:disabled{opacity:.5}",LE={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},Pp=class extends cl{constructor(e){if(super(e,e?.template||LE,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=x,this.eWrapper=x,this.eDisplayField=x,this.eIcon=x,this.registerCSS(kE),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:i,variableWidth:o,minPickerWidth:s,maxPickerWidth:n}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!o,i!=null&&this.setPickerMaxHeight(i),s!=null&&this.setPickerMinWidth(s),n!=null&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:i,inputWidth:o}=this.config;if(i){const s=this.beans.iconSvc.createIconNoSpan(i);s&&this.eIcon.appendChild(s)}o!=null&&this.setInputWidth(o)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),ns(e,!1),this.ariaRole&&je(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case b.UP:case b.DOWN:case b.ENTER:case b.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case b.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:i,pickerAriaLabelValue:o,modalPicker:s=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:l,variableWidth:a,beans:d,eWrapper:c}=this,u={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const f=es(d);this.beforeHidePicker(),f&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(i,o),anchorToElement:c};e.style.position="absolute";const h=d.popupSvc,g=h.addPopup(u);a?(r&&(e.style.minWidth=r),e.style.width=kn(Ji(c)),l&&(e.style.maxWidth=l)):cs(e,l??Ji(c));const p=n??`${ls(h.getPopupParent())}px`;return e.style.setProperty("max-height",p),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:i,gos:o},eWrapper:s,pickerComponent:n}=this,r=o.get("enableRtl")?"right":"left";i.positionPopupByComponent({type:t,eventSource:s,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();ns(t,e);const i=this.eWrapper.classList;i.toggle("ag-picker-expanded",e),i.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return cs(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},BE=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",fn=class extends Pp{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(BE)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Qt(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:i}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),i&&t==null&&(this.eDisplayField.textContent=i),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new IE("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),i=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",i),ed(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:o=>{o?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch(t===b.TAB&&this.hidePicker(),t){case b.ENTER:case b.UP:case b.DOWN:case b.PAGE_UP:case b.PAGE_DOWN:case b.PAGE_HOME:case b.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case b.ESCAPE:super.onKeyDown(e);break;case b.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,i){const{listComponent:o,config:{placeholder:s},eDisplayField:n,tooltipFeature:r}=this;if(this.value===e||!o)return this;if(i||o.setValue(e,!0),o.getValue()===this.getValue())return this;let a=o.getDisplayValue();return a==null&&s&&(a=s),n.textContent=a,r?.setTooltipAndRefresh(a??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},Dp={selector:"AG-SELECT",component:fn},HE={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},OE=class extends wo{constructor(){super(HE,[Dp]),this.eEditor=x,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:i,gos:o}=this,{values:s,value:n,eventKey:r}=e;if(K(s)){F(58);return}this.startedByEnter=r!=null?r===b.ENTER:!1;let l=!1;s.forEach(u=>{const h={value:u},g=i.formatValue(e.column,null,u),p=g!=null;h.text=p?g:u,t.addOption(h),l=l||n===u}),l?t.setValue(e.value??void 0,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:a,valueListMaxWidth:d,valueListMaxHeight:c}=e;a!=null&&t.setPickerGap(a),c!=null&&t.setPickerMaxHeight(c),d!=null&&t.setPickerMaxWidth(d),o.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e??void 0,!0)}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:i}=e,o=this.getValue();let s=[];if(t&&o!=null&&!t.includes(o)){const n=this.getLocaleTextFunc();s.push(n("invalidSelectionValidation","Invalid selection."))}else s=null;return i?i({value:o,internalErrors:s,cellEditorParams:e}):s}},GE={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},VE=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return GE}getAgComponents(){return[Ko]}init(e,t){this.eEditor=e,this.params=t;const i=t.maxLength;i!=null&&e.setMaxLength(i)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:i}=e,o=this.getValue(),s=this.getLocaleTextFunc();let n=[];return t!=null&&typeof o=="string"&&o.length>t&&n.push(s("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),n.length||(n=null),i?i({value:o,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:e,params:t}=this,i=e.getValue();return!M(i)&&!M(t.value)?t.value:t.parseValue(i)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){mt()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),i=M(t)&&t.length||0;i&&e.getInputElement().setSelectionRange(i,i)}},Mp=class extends gn{constructor(){super(new VE(()=>this.getLocaleTextFunc()))}};function NE(e){e.undoRedo?.undo("api")}function zE(e){e.undoRedo?.redo("api")}function WE(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function _E(e){const t=e.editModelSvc?.getEditMap(),i=[];return t?.forEach((o,s)=>{const{rowIndex:n,rowPinned:r}=s;o.forEach((l,a)=>{const{editorValue:d,pendingValue:c,sourceValue:u,state:h}=l,g=qe(l);let p=d??c;p===de&&(p=void 0);const f={newValue:p,oldValue:u,state:h,column:a,colId:a.getColId(),colKey:a.getColId(),rowIndex:n,rowPinned:r},m=h==="editing";(m||!m&&g)&&i.push(f)})}),i}function UE(e,t=!1){const{editSvc:i}=e;if(i?.isBatchEditing()){if(t)for(const o of e.editModelSvc?.getEditPositions()??[])o.state==="editing"&&i.revertSingleCellEdit(o);else Vt(e,{persist:!0});Nt(e,void 0,{cancel:t})}else i?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function qE(e,t){const i=V(e,t);return!!e.editSvc?.isEditing(i)}function $E(e,t){const{key:i,colKey:o,rowIndex:s,rowPinned:n}=t,{editSvc:r,colModel:l}=e,a=l.getCol(o);if(!a){F(12,{colKey:o});return}const c=We(e,{rowIndex:s,rowPinned:n||null,column:a});if(!c){F(290,{rowIndex:s,rowPinned:n});return}if(!r?.isCellEditable({rowNode:c,column:a},"api"))return;n==null&&jg(e,s),Kg(e,o),r?.startEditing({rowNode:c,column:a},{event:i?new KeyboardEvent("keydown",{key:i}):void 0,source:"api",editable:!0})}function KE(e){return e.editSvc?.validateEdit()||null}function jE(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function YE(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var QE={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},ZE=class extends Ps{constructor(e){super(QE),this.params=e}postConstruct(){Jt(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,i=o=>{Ur(this.gos,o,t.node,t.column,!0)||t.onKeyDown(o)};this.addManagedElementListeners(e,{keydown:i})}};function XE(e,{column:t},i,o,s="ui"){if(i instanceof KeyboardEvent&&(i.key===b.TAB||i.key===b.ENTER||i.key===b.F2||i.key===b.BACKSPACE&&o))return!0;if(i?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const r=t?.getColDef(),l=JE(e.gos,r),a=i?.type;return a==="click"&&i?.detail===1&&l===1||a==="dblclick"&&i?.detail===2&&l===2?!0:s==="api"?!!o:!1}function JE(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function ta(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function ia(e,t){const i=t.column,o=t.rowNode,s=i.getColDef();if(!o)return ta(e,t);const n=s.editable;return o.group&&s.groupRowEditable!=null?e.rowGroupingEditValueSvc?.isGroupCellEditable(o,i)?!0:ta(e,t):i.isColumnFunc(o,n)?!0:ta(e,t)}function eF(e,t,i="ui"){const o=ia(e,t);if(o||i==="ui")return o;const{rowNode:s,column:n}=t;for(const r of e.colModel.getCols())if(r!==n&&ia(e,{rowNode:s,column:r}))return!0;return!1}var mn=(e,t=!1)=>{if(e!==void 0)return qe(e)||t&&e.state==="editing"};function Tp(e,t,i=!1){return mn(e.editModelSvc?.getEdit(t),i)}var Ap=(e,t,i)=>{if(e)for(let o=0,s=e.length;o{const a={rowNode:o,column:l};return Tp(i,a,!0)||Ip(i,a)||kp(i,a)});this.applyStyle(n,r);return}this.applyStyle(n)}applyStyle(e=!1,t=!1){const i=!!this.editSvc?.isBatchEditing(),o=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:s})=>{s.toggleCss("ag-row-editing",o&&t),s.toggleCss("ag-row-batch-edit",o&&t&&i),s.toggleCss("ag-row-inline-editing",t),s.toggleCss("ag-row-not-inline-editing",!t),s.toggleCss("ag-row-editing-invalid",o&&t&&e)})}},oF=({rowModel:e,pinnedRowModel:t,editModelSvc:i},o)=>{const s=new Set;e.forEachNode(n=>o.has(n)&&s.add(n)),t?.forEachPinnedRow("top",n=>o.has(n)&&s.add(n)),t?.forEachPinnedRow("bottom",n=>o.has(n)&&s.add(n));for(const n of o)s.has(n)||i.removeEdits({rowNode:n});return s},sF=({editModelSvc:e},t,i)=>{for(const o of t)e?.getEditRow(o)?.forEach((s,n)=>!i.has(n)&&e.removeEdits({rowNode:o,column:n}))},nF=e=>()=>{const t=new Set(e.colModel.getCols()),i=e.editModelSvc.getEditMap(!0),o=new Set(i.keys());sF(e,oF(e,o),t)},rF=new Set(["undo","redo","paste","bulk","rangeSvc"]),lF=new Set(["ui","api"]),Lp={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},aF=new Set(Object.keys(Lp)),dF=new Set(["paste","rangeSvc","cellClear","redo","undo"]),oa={cancel:!0,source:"api"},cF={cancel:!1,source:"api"},fi={checkSiblings:!0},_t={force:!0,suppressFlash:!0},uF={force:!0},hF=class extends S{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:o})=>{this.stopEditing(void 0,oa),this.createStrategy(o)});const t=nF(e),i=()=>{const o=this.model.getCellValidationModel().getCellValidationMap().size>0,s=this.model.getRowValidationModel().getRowValidationMap().size>0;return o||s?this.stopEditing(void 0,oa):this.isEditing()&&(this.batch?Nt(e,this.model.getEditPositions()):this.stopEditing(void 0,cF)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:i,filterChanged:i,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,oa))}stopBatchEditing(e){this.batch&&(e&&this.stopEditing(void 0,e),this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1)}ensureBatchStarted(){!this.batch||this.batchStartDispatched||(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){const{beans:t,gos:i,strategy:o}=this,s=Bp(i,e);if(o){if(o.beanName===s)return o;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(s,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,i,o="ui"){const s=XE(this.beans,e,t,i,o);return s&&(this.strategy??(this.strategy=this.createStrategy())),s}shouldStopEditing(e,t,i="ui"){return this.strategy?.shouldStop(e,t,i)??null}shouldCancelEditing(e,t,i="ui"){return this.strategy?.shouldCancel(e,t,i)??null}validateEdit(){return v3(this.beans)}isEditing(e,t){return this.model.hasEdits(e??void 0,t??fi)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get("cellSelection")&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){const{startedEdit:i=!0,event:o=null,source:s="ui",ignoreEventKey:n=!1,silent:r}=t;if(this.strategy??(this.strategy=this.createStrategy()),!(t.editable??this.isCellEditable(e,"api")))return;const a=V(this.beans,e);if(a&&!a.comp){t.editable=void 0,a.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const d=this.shouldStartEditing(e,o,i,s);if(d===!1&&s!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,s)&&!t.continueEditing&&this.stopEditing(void 0,{source:s}),d&&this.ensureBatchStarted(),this.strategy.start({position:e,event:o,source:s,ignoreEventKey:n,startedEdit:i,silent:r})}stopEditing(e,t){const i=this.prepareStopContext(e,t);if(!i)return!1;this.stopping=!0;let o=!1,{edits:s}=i;try{const n=this.processStopRequest(i);return o||(o=n.res),s=n.edits,this.finishStopEditing({...i,edits:s,params:t,position:e,res:o}),o}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:i=null,cancel:o=!1,source:s="ui",forceCancel:n=!1,forceStop:r=!1,commit:l=!1}=t||{};if(aF.has(s)&&this.batch)return e?.rowNode&&e?.column&&this.bulkRefreshCell(e),null;const a=this.committing?Lp[s]:s;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,fi))||!this.strategy||this.stopping)return null;const c=V(this.beans,e);c&&(c.onEditorAttachedFuncs=[]);const u=!o&&(!!this.shouldStopEditing(e,i,a)||(this.committing||s==="paste")&&!this.batch)||r,h=o&&!!this.shouldCancelEditing(e,i,a)||n;return{cancel:o,cellCtrl:c,edits:this.model.getEditMap(!0),event:i??null,forceCancel:n,forceStop:r,commit:l,position:e,source:s,treatAsSource:a,willCancel:h,willStop:u}}processStopRequest(e){const{event:t,position:i,willCancel:o,willStop:s}=e;return s||o?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,i)?{res:!1,edits:this.handleMidBatchKey(t,i,e)}:(Vt(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(i),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){const{beans:t,model:i}=this,{cancel:o,commit:s,edits:n,event:r,source:l,willCancel:a,willStop:d}=e,c=!this.batch||!a;Vt(t,{persist:c,isCancelling:a||o,isStopping:d});const u=i.getEditMap(),g=!a&&(!this.batch||s)?this.processEdits(u,l):[];o?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(r,s),this.clearValidationIfNoOpenEditors();for(const p of g)i.clearEditValue(p);this.bulkRefreshMap(n);for(const p of i.getEditPositions(u)){const f=V(t,p),m=qe(p);f?.refreshCell({force:!0,suppressFlash:!m})}return{res:d,edits:u}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,i){const{beans:o,model:s}=this,{cellCtrl:n,edits:r}=i,{key:l}=e,a=l===b.ENTER,d=l===b.ESCAPE,c=l===b.TAB;if(a||c||d){if(a||c)Vt(o,{persist:!0});else if(d&&n){const{rowNode:u,column:h}=n;if(this.batch&&u&&h){const g={rowNode:u,column:h};Nt(o,[g],{silent:!0}),this.model.stop(g,!0,!0),V(o,g)?.refreshCell(_t)}else this.revertSingleCellEdit(n)}return this.batch?this.strategy?.cleanupEditors():Nt(o,s.getEditPositions(),{event:e,cancel:d}),e.preventDefault(),this.bulkRefreshMap(r,{suppressFlash:!0}),s.getEditMap()}return r}finishStopEditing({cellCtrl:e,edits:t,params:i,position:o,res:s,commit:n,forceCancel:r,willCancel:l,willStop:a}){const d=this.beans;s&&o&&(!this.batch||n)&&this.model.removeEdits(o),this.navigateAfterEdit(i,e?.cellPosition),No(d),this.clearValidationIfNoOpenEditors();const{rowRenderer:c,formula:u}=d;if(l&&c.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){u?u.refreshFormulas(!0):c.refreshRows({suppressFlash:!0,force:!0});const h=a&&n;(h||l&&r)&&this.dispatchBatchStopped(t,h)}}dispatchBatchStopped(e,t){let i;t&&(i=c3(e),i.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",i??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;const{event:i,suppressNavigateAfterEdit:o}=e;if(!(i instanceof KeyboardEvent)||o)return;const{key:n,shiftKey:r}=i,l=this.gos.get("enterNavigatesVerticallyAfterEdit");if(n!==b.ENTER||!l)return;const a=r?b.UP:b.DOWN;this.beans.navigation?.navigateToNextCell(null,a,t,!1)}processEdits(e,t){const i=Array.from(e.keys()),o=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,s=[],{changeDetectionSvc:n}=this.beans;n?.beginDeferred();try{for(const r of i){const l=e.get(r);for(const a of l.keys()){const d=l.get(a),c={rowNode:r,column:a};if(qe(d)&&!o){const u=V(this.beans,c);this.setNodeDataValue(r,a,d.pendingValue,u,t)||s.push(c)}}}}finally{n?.endDeferred()}return s}setNodeDataValue(e,t,i,o,s="edit"){const n=lF.has(s)?"edit":s;o&&(o.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,i,n)}finally{this.committing=!1,o&&(o.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){const i=this.model.getEdit(e);i&&i.state!=="editing"&&(t?this.beans.editModelSvc?.setEdit(e,{sourceValue:i.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefreshMap(e);let i=_t;t?.forceRefreshOfEditCellsOnly&&(i={...gF(e),..._t}),this.beans.rowRenderer.refreshCells(i)}dispatchEditValuesChanged({rowNode:e,column:t},i={}){if(!e||!t||!i)return;const{pendingValue:o,sourceValue:s}=i,{rowIndex:n,rowPinned:r,data:l}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:n,rowPinned:r,column:t,source:"api",data:l,newValue:o,oldValue:s,value:o,colDef:t.getColDef()})}bulkRefreshCell(e,t){J(this.gos,this.beans.rowModel)&&this.refCell(e,this.model.getEdit(e),t)}bulkRefreshMap(e,t){J(this.gos,this.beans.rowModel)&&e.forEach((i,o)=>{for(const s of i.keys())this.refCell({rowNode:o,column:s},i.get(s),t)})}refCell({rowNode:e,column:t},i,o={}){const{beans:s,gos:n}=this,r=new Set([e]),l=new Set,a=e.pinnedSibling;a&&r.add(a);const d=e.sibling;d&&l.add(d);let c=e.parent;for(;c;)c.sibling?.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?l.add(c.sibling):l.add(c),c=c.parent;for(const u of r)this.dispatchEditValuesChanged({rowNode:u,column:t},i);for(const u of r)V(s,{rowNode:u,column:t})?.refreshCell(o);for(const u of l){const h=V(s,{rowNode:u,column:t});h&&(h.refreshCell(o),!o.force&&this.batch&&h.editStyleFeature?.applyCellStyles?.())}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{gos:i,beans:o}=this,s=e.rowNode;if(s.group&&e.column.getColDef().groupRowEditable==null){if(i.get("treeData")){if(!s.data&&!i.get("enableGroupEdit"))return!1}else if(!i.get("enableGroupEdit"))return!1}const n=Bp(i)==="fullRow"?eF(o,e,t):ia(o,e);return n&&(this.strategy??(this.strategy=this.createStrategy())),n}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,i=!0){if(this.hasValidationErrors(e)){const o=V(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),i&&(o&&!o.hasBrowserFocus()&&o.focusCell(),o?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(o&&this.revertSingleCellEdit(o),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const i=V(this.beans,e);i?.comp?.getCellEditor()&&(Nt(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),hi(this.beans,e,{silent:!0}),zt(this.beans),i?.refreshCell(_t),t&&(i?.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){zt(this.beans);const t=V(this.beans,e);t&&(t.refreshCell(_t),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let i=!1;return e?.rowNode?(i||(i=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(i||(i=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(i||(i=this.model.getCellValidationModel().getCellValidationMap().size>0),i||(i=this.model.getRowValidationModel().getRowValidationMap().size>0)),i}moveToNextCell(e,t,i,o="ui"){let s;const n=this.isEditing(),r=n&&this.checkNavWithValidation(void 0,i)==="block-stop";return e instanceof _i&&n&&(s=this.strategy?.moveToNextEditingCell(e,t,i,o,r)),s===null||(s=s||!!this.beans.focusSvc.focusedHeader,s===!1&&!r&&this.stopEditing()),s}getPendingEditValue(e,t,i){if(i==="data"||i==="batch"&&!this.batch)return;const o=this.model.getEdit({rowNode:e,column:t},fi);if(!o||this.stopping&&!this.batch&&!o.editorState?.cellStartedEditing)return;if(i==="edit"){const n=o.editorValue;if(n!=null&&n!==de)return n}const s=o.pendingValue;if(s!==de)return s}getCellDataValue(e){const t=this.model.getEdit(e,fi);if(t){const i=t.pendingValue;if(i!==de)return i;const o=t.sourceValue;if(o!=null)return o}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){l3(this,this.beans,e)}createPopupEditorWrapper(e){return new ZE(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:i,sourceValue:o,state:s}=t;return i===o||s==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:o}),this.beans.editModelSvc?.removeEdits(e),V(this.beans,e)?.refreshCell(_t),!0)}setDataValue(e,t,i){try{const o=this.batch,s=this.isEditing(o?void 0:e);if((!s||this.committing)&&!o&&!dF.has(i)||!s&&!o&&i==="paste"||i==="batch"&&!o)return;if(i==="edit"){if(s&&this.applyEditorValue(e,t))return!0;if(!o)return}if(this.strategy??(this.strategy=this.createStrategy()),i==="batch"||i==="edit")return this.applyDirectValue(e,t,i);const n=this.beans;let r;if(o?r="ui":this.committing?r=i??"api":r="api",!i||rF.has(i))return this.applyDirectValue(e,t,i);const l=this.applyExistingEdit(e,t,i,r);return l!==void 0?l:(zi(n,e,t,i,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,i,o){const s=this.model.getEdit(e);if(s)return s.pendingValue===t?!1:s.sourceValue!==t?(zi(this.beans,e,t,i,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:o,suppressNavigateAfterEdit:!0}),!0):(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...s,pendingValue:t}),!0)}applyEditorValue(e,t){const i=this.beans,o=V(i,e),s=o?.comp?.getCellEditor();return!o||!s?!1:(zi(i,e,t,"edit",void 0,{persist:!0}),o.editStyleFeature?.applyCellStyles?.(),"agSetEditValue"in s?(s.agSetEditValue(t),!0):s.refresh&&o.editCompDetails?(s.refresh({...o.editCompDetails.params,value:t}),!0):(o.hasBrowserFocus()&&o.onEditorAttachedFuncs.push(()=>{const r=V(this.beans,e);r?.focusCell(!0),r?.comp?.getCellEditor()?.focusIn?.()}),Nt(i,[e],{silent:!0,cancel:!0}),hi(i,e,{silent:!0}),zt(i),V(i,e)?.refreshCell(_t),!0))}applyDirectValue(e,t,i){const o=this.beans;if(this.batch){if(i==="batch"&&V(o,e)?.comp?.getCellEditor()){const{editModelSvc:r,valueSvc:l}=o,{rowNode:a,column:d}=e;r?.getEdit(e)?.sourceValue===void 0&&r?.setEdit(e,{sourceValue:l.getValue(d,a,"data")}),r?.setEdit(e,{pendingValue:t})}else zi(o,e,t,i,void 0,{persist:!0}),i!=="batch"&&this.cleanupEditors();return No(o),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}zi(o,e,t,i,void 0,{persist:!0});const s=V(o,e),n=this.setNodeDataValue(e.rowNode,e.column,t,s,i);return this.syncEditAfterCommit(e,n),No(o),V(o,e)?.refreshCell(n?uF:_t),n}handleColDefChanged(e){h3(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){const{model:i}=this;if(!this.batch||!i.hasRowEdits(e.rowNode,fi))return;const{rowNode:s}=e,{compDetails:n,valueToDisplay:r}=t;if(n){const{params:l}=n;return l.data=i.getEditRowDataValue(s,fi),{compDetails:n}}return{valueToDisplay:r}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,i,o){this.strategy?.dispatchCellEvent(e,t,i,o)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return k(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},i){if(!i||i.length===0)return;const{beans:o,rangeSvc:s,valueSvc:n}=this,{formula:r}=o;Vt(o,{persist:!0});const l=this.model.getEditMap(!0);let a=l.get(e)?.get(t)?.pendingValue,d=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),d=!0);const c=r?.isFormula(a)??!1;i.forEach(h=>{const g=h.columns.some(p=>p?.isAllowFormula());if(s?.forEachRowInRange(h,p=>{const f=We(o,p);if(f===void 0)return;const m=l.get(f)??new Map;let C=a;for(const v of h.columns){if(!v)continue;const w=!!c&&v.isAllowFormula();if(this.isCellEditable({rowNode:f,column:v},"api")){const y=n.getValue(v,f,"data",!0);let R=n.parseValue(v,f??null,C,y);Number.isNaN(R)&&(R=null),m.set(v,{editorValue:void 0,pendingValue:R,sourceValue:y,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}w&&(C=r?.updateFormulaByOffset({value:C,columnDelta:1}))}m.size>0&&l.set(f,m),c&&g&&(a=r?.updateFormulaByOffset({value:a,rowDelta:1}))}),this.setEditMap(l),this.batch){this.cleanupEditors(),No(o),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,d&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(l)})}});const u=V(o,{rowNode:e,column:t});u&&u.focusCell(!0)}createCellStyleFeature(e){return new tF(e,this.beans)}createRowStyleFeature(e){return new iF(e,this.beans)}setEditingCells(e,t){const{beans:i}=this,{colModel:o,valueSvc:s}=i,n=new Map;for(let{colId:r,column:l,colKey:a,rowIndex:d,rowPinned:c,newValue:u,state:h}of e){const g=r?o.getCol(r):a?o.getCol(a):l;if(!g)continue;const p=We(i,{rowIndex:d,rowPinned:c});if(!p)continue;const f=s.getValue(g,p,"data",!0);if(!t?.forceRefreshOfEditCellsOnly&&!qe({pendingValue:u,sourceValue:f})&&h!=="editing")continue;let m=n.get(p);m||(m=new Map,n.set(p,m)),u===void 0&&(u=de),m.set(g,{editorValue:void 0,pendingValue:u,sourceValue:f,state:h??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(n,t)}onCellFocused(e){const t=V(this.beans,e);if(!t||!this.isEditing(t,fi))return;const i=this.model.getEdit(t);if(!i||!qe(i))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(e){return V(this.beans,e)}};function gF(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function Bp(e,t){return t??e.get("editType")??"singleCell"}var Hp=class extends S{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const i=e.previousParams,{editSvc:o,beans:s}=this,n=e.type==="cellFocused"?e.sourceEvent:null;i&&(t=V(s,i));const{gos:r,editModelSvc:l}=s,a=e.type==="cellFocusCleared";if(o.isEditing(void 0,{withOpenEditor:!0})){const{column:d,rowIndex:c,rowPinned:u}=e,h={column:d,rowNode:We(s,{rowIndex:c,rowPinned:u})},g=r.get("invalidEditValueMode")==="block";if(g)return;const p=!g,f=!!l?.getCellValidationModel().hasCellValidation(h),m=p&&f;(i||a?o.stopEditing(void 0,{cancel:m,source:a&&p?"api":void 0,event:n}):!0)||(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){const t=this.editSvc.isBatchEditing()&&!e;for(const i of this.model.getEditPositions())zo(this.beans,i,{cancel:!0},V(this.beans,i)),this.model.stop(i,t,!0);return!0}stopCommitted(e,t){const i=this.model.getEditPositions(),o={all:[],pass:[],fail:[]};for(const r of i)o.all.push(r),(this.model.getCellValidationModel().getCellValidation(r)?.errorMessages?.length??0)>0?o.fail.push(r):o.pass.push(r);const s=this.processValidationResults(o),n=this.editSvc.isBatchEditing()&&!t;for(const r of s.destroy)zo(this.beans,r,{event:e},V(this.beans,r)),this.model.stop(r,n,!1);for(const r of s.keep){const l=V(this.beans,r);!this.editSvc.cellEditingInvalidCommitBlocks()&&l&&this.editSvc.revertSingleCellEdit(l)}return!0}cleanupEditors({rowNode:e}={},t){Vt(this.beans,{persist:!1});const i=this.model.getEditPositions(),o=[];if(e)for(const s of i)s.rowNode!==e&&o.push(s);else for(const s of i)o.push(s);Nt(this.beans,o),No(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,i=t?.getCellEditor();if(i?.focusIn)i.focusIn();else{const o=this.beans.gos.get("editType")==="fullRow";e.focusCell(o),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:i=!1,startedEdit:o,position:s,cells:n=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!i&&t.key||void 0;d3(this.beans,n,s,r,t,o)}dispatchCellEvent(e,t,i,o){const s=V(this.beans,e);s&&this.eventSvc.dispatchEvent({...s.createEvent(t??null,i),...o})}dispatchRowEvent(e,t,i){if(i)return;const o=sn(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStop(e,t,i="ui"){const o=this.editSvc.isBatchEditing();return o&&i==="api"?!0:o&&(i==="ui"||i==="edit")?!1:i==="api"?!0:t instanceof KeyboardEvent&&!o?t.key===b.ENTER:null}shouldCancel(e,t,i="ui"){const o=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!o&&t.key===b.ESCAPE||o&&i==="api"||i==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const i=[];if(e.forEach((o,s)=>{o.forEach((n,r)=>{n.state==="editing"&&i.push({...n,rowNode:s,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),i.length>0){const o=i.at(-1),s=o.pendingValue===de?void 0:o.pendingValue;this.start({position:o,event:new KeyboardEvent("keydown",{key:s}),source:"api"});const n=V(this.beans,o);n&&this.setFocusInOnEditor(n)}}destroy(){this.cleanupEditors(),super.destroy()}},pF=class extends Hp{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,i="ui"){const{rowNode:o,beans:s}=this,{rowNode:n}=e||{};if(!sn(s,{rowNode:o}))return!0;const l=super.shouldStop({rowNode:o},t,i);return l!==null?l:o?n!==o:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:i,startedEdit:o,event:s,ignoreEventKey:n}=e,{rowNode:r}=t,{beans:l,model:a,startedRows:d}=this;this.rowNode!==r&&super.cleanupEditors(t);const c=l.visibleCols.allCols,u=[],h=[];for(const g of c)g.isCellEditable(r)&&h.push(g);if(h.length!=0){d.has(r)||(this.dispatchRowEvent({rowNode:r},"rowEditingStarted",i),d.add(r));for(const g of h){const p={rowNode:r,column:g};u.push(p),a.start(p)}this.rowNode=r,this.setupEditors({cells:u,position:t,startedEdit:o,event:s,ignoreEventKey:n})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){const{rowNode:t,model:i}=this;return t&&!i.hasRowEdits(t)?!1:(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){const{rowNode:i,beans:o,model:s,editSvc:n}=this;if(i&&!s.hasRowEdits(i))return!1;const r=[];if(s.getEditMap().forEach((l,a)=>{if(!(!l||l.size===0)){for(const d of l.values())if(qe(d)){r.push(a);break}}}),zt(o),n.checkNavWithValidation({rowNode:i})==="block-stop")return!1;if(super.stopCommitted(e,t),t||!n.isBatchEditing())for(const l of r)this.dispatchRowEvent({rowNode:l},"rowValueChanged");return this.cleanupEditors({rowNode:i},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,i=e.previousParams;if(i?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const{beans:o,gos:s,model:n}=this;if(o.editSvc?.isRangeSelectionEnabledWhileEditing())return;const r=V(o,i);s.get("invalidEditValueMode")==="block"&&r&&(n.getCellValidationModel().getCellValidation(r)||n.getRowValidationModel().getRowValidation(r))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);const{startedRows:i}=this;for(const o of i)this.dispatchRowEvent({rowNode:o},"rowEditingStopped"),this.destroyEditorsForRow(o);i.clear()}destroyEditorsForRow(e){const t=sn(this.beans,{rowNode:e});if(!t)return;const i={};for(const o of t.getAllCellCtrls())o.comp?.getCellEditor()&&zo(this.beans,o,i,o)}moveToNextEditingCell(e,t,i,o="ui",s=!1){const{beans:n,model:r,gos:l,editSvc:a}=this,d=e.cellPosition;let c;r.suspend(!0);try{c=n.navigation?.findNextCellToFocusOn(d,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{r.suspend(!1)}if(c===!1)return null;if(c==null)return!1;const u=c.cellPosition,h=e.isCellEditable(),g=c.isCellEditable(),p=u&&d.rowIndex===u.rowIndex&&d.rowPinned===u.rowPinned;h&&this.setFocusOutOnEditor(e),this.restoreEditors();const f=l.get("suppressStartEditOnTab");return g&&!s?f?c.focusCell(!0,i):(c.comp?.getCellEditor()||hi(n,c,{event:i,cellStartedEdit:!0}),this.setFocusInOnEditor(c),c.focusCell(!1,i)):(g&&s&&this.setFocusInOnEditor(c),c.focusCell(!0,i)),!p&&!s&&(a?.stopEditing({rowNode:e.rowNode},{event:i,forceStop:!0}),a?.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(c,!0),f?c.focusCell(!0,i):a.startEditing(c,{startedEdit:!0,event:i,source:o,ignoreEventKey:!0,editable:g||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){const{beans:e,model:t}=this;t.getEditMap().forEach((i,o)=>i.forEach(({state:s},n)=>{if(s!=="editing")return;const r=V(e,{rowNode:o,column:n});r&&!r.comp?.getCellEditor()&&hi(e,r,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},fF=class extends Hp{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,i="ui"){const o=super.shouldStop(e,t,i);if(o!==null)return o;const s=e?.rowNode,n=e?.column,r=this.rowNode,l=this.column;return(!r||!l)&&s&&n?null:r!==s||l!==n?!0:!r&&!l?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:i,event:o,ignoreEventKey:s}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:i,event:o,ignoreEventKey:s})}dispatchRowEvent(e,t,i){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){return super.stopCancelled(e),this.clearPosition()}stopCommitted(e,t){return super.stopCommitted(e,t),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:i}=this.beans,{rowIndex:o,column:s,rowPinned:n}=e,r=We(this.beans,{rowIndex:o,rowPinned:n}),l=Bl(s),a=t.getCol(l),d=e.previousParams;if(d){const c=Bl(d.column);if(d?.rowIndex===o&&c===l&&d?.rowPinned===n)return}e.type=="cellFocused"&&(i?.isRangeSelectionEnabledWhileEditing()||i?.isEditing({rowNode:r,column:a},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,i,o="ui",s=!1){const n=this.beans.focusSvc.getFocusedCell();n&&(e=li(this.beans,n)??e);const r=e.cellPosition;let l;const a=this.beans.gos.get("editType")==="fullRow";a&&this.model.suspend(!0),s||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:i}));try{l=this.beans.navigation?.findNextCellToFocusOn(r,{backwards:t,startEditing:!0})}finally{a&&this.model.suspend(!1)}if(l===!1)return null;if(l==null)return!1;const d=l.cellPosition,c=e.isCellEditable(),u=l.isCellEditable(),h=d&&r.rowIndex===d.rowIndex&&r.rowPinned===d.rowPinned;c&&!s&&this.setFocusOutOnEditor(e);const g=this.gos.get("suppressStartEditOnTab");let p=!1;if(!h&&!s&&(super.cleanupEditors(l,!0),g?l.focusCell(!0,i):(p=!0,this.editSvc.startEditing(l,{startedEdit:!0,event:i,source:o,ignoreEventKey:!0,editable:u}))),u&&!s){if(l.focusCell(!1,i),g)l.focusCell(!0,i);else if(!l.comp?.getCellEditor()){if(!p){const f=this.editSvc?.isEditing(l,{withOpenEditor:!0});hi(this.beans,l,{event:i,cellStartedEdit:!0,silent:f})}this.setFocusInOnEditor(l),this.cleanupEditors(l)}}else u&&s&&this.setFocusInOnEditor(l),l.focusCell(!0,i);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},vt={moduleName:"EditCore",version:P,beans:[r3,hF],apiFunctions:{getEditingCells:_E,getEditRowValues:WE,getCellEditorInstances:a3,startEditingCell:$E,stopEditing:UE,isEditing:qE,validateEdit:KE},dynamicBeans:{singleCell:fF,fullRow:pF},dependsOn:[qo,Jl],css:[gE]},Op={moduleName:"UndoRedoEdit",version:P,beans:[hE],apiFunctions:{undoCellEditing:NE,redoCellEditing:zE,getCurrentUndoSize:jE,getCurrentRedoSize:YE},dependsOn:[vt]},Gp={moduleName:"TextEditor",version:P,userComponents:{agCellEditor:Mp,agTextCellEditor:Mp},dependsOn:[vt]},Vp={moduleName:"NumberEditor",version:P,userComponents:{agNumberCellEditor:{classImp:PE}},dependsOn:[vt]},Np={moduleName:"DateEditor",version:P,userComponents:{agDateCellEditor:vE,agDateStringCellEditor:SE},dependsOn:[vt]},zp={moduleName:"CheckboxEditor",version:P,userComponents:{agCheckboxCellEditor:fE},dependsOn:[vt]},Wp={moduleName:"SelectEditor",version:P,userComponents:{agSelectCellEditor:OE},dependsOn:[vt]},_p={moduleName:"LargeTextEditor",version:P,userComponents:{agLargeTextCellEditor:EE},dependsOn:[vt]},Up={moduleName:"CustomEditor",version:P,dependsOn:[vt]},qp={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},mF=new Set(Object.values(qp));function Ut(e,t){const i=e.filterUi;if(!i)return null;if(i.created)return i.promise;if(t)return null;const o=i.create(i.refreshed),s=i;return s.created=!0,s.promise=o,o}function $p(e,t,i,o,s,n,r){return t.refresh?.({...i,model:o,source:n,additionalEventAttributes:r}),e().then(l=>{if(l){const{filter:a,filterParams:d}=l;sa(a,d,o,s,n,r)}})}function sa(e,t,i,o,s,n){e?.refresh?.({...t,model:i,state:o,source:s,additionalEventAttributes:n})}function Kp(e,t,i,o){const s=e();s?.created&&s.promise.then(n=>{const r=t();sa(n,s.filterParams,r,i()??{model:r},"ui",o)})}function na(e){let t,i=!1,o;const{action:s,filterParams:n,getFilterUi:r,getModel:l,getState:a,updateState:d,updateModel:c,processModelToApply:u}=e;switch(s){case"apply":{const h=a();o=h?.model??null,u&&(o=u(o)),t={state:h?.state,model:o},i=!0;break}case"clear":{t={model:null},n?.buttons?.includes("apply")||(i=!0,o=null);break}case"reset":{t={model:null},i=!0,o=null;break}case"cancel":{t={model:l()};break}}d(t),i?c(o):Kp(r,l,a,{fromAction:s})}function re(e,t){return e[t]??null}var CF=class extends Or{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,i,o,s){this.comp=e;const n=Fo(this,this.beans.context,s);this.eButtonShowMainFilter=i,this.eFloatingFilterBody=o,this.setGui(t,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n);const r=()=>this.onColDefChanged(n);n.addManagedListeners(this.column,{colDefChanged:r}),n.addManagedEventListeners({filterSwitched:({column:l})=>{l===this.column&&r()}}),n.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,i=e.colDef;return k(t.gos,{colDef:i,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,i=!!e.floatingFilter;this.active=t&&i}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=Se("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new Li(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();Kt(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(j(t)===this.eGui)return;const s=Tt(t,this.eGui,null,e.shiftKey);if(s){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),s.focus();return}const n=this.findNextColumnWithFloatingFilter(e.shiftKey);n&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:n},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let i=this.column;do if(i=e?t.getColBefore(i):t.getColAfter(i),!i)break;while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case b.UP:case b.DOWN:case b.LEFT:case b.RIGHT:if(t)return;At(e);case b.ENTER:t&&Mt(this.eGui)&&e.preventDefault();break;case b.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const i=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),o=!!e.relatedTarget&&jt(e.relatedTarget,"ag-floating-filter");if(i&&o&&e.target===this.eGui){const s=this.lastFocusEvent,n=!!(s&&s.key===b.TAB);if(s&&n){const r=s.shiftKey;Mt(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new Br(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!be(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:i,gos:o}=this,s=n=>{if(n?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const r=this.comp.getFloatingFilterComp();r&&r.then(l=>{if(l){if(o.get("enableFilterHandlers")){const c=n;let u="filter";c?.afterFloatingFilter?u="ui":c?.afterDataChange?u="dataChanged":n?.source==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}const a=t?.getCurrentFloatingFilterParentModel(i),d=n?{...n,columns:n.columns??[],source:n.source==="api"?"api":"columnFilter"}:null;l.onParentModelChanged(a,d)}})};[this.destroySyncListener]=e.addManagedListeners(i,{filterChanged:s}),t?.isFilterActive(i)&&s(null)}setupWidth(e){const t=()=>{const i=`${this.column.getActualWidth()}px`;this.comp.setWidth(i)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const i=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const o=this.beans.colFilter,s=this.active?o?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,n=this.comp.getFloatingFilterComp();!n||!s?this.updateCompDetails(e,s,i):n.then(r=>{!r||o?.areFilterCompsDifferent(this.userCompDetails??null,s)?this.updateCompDetails(e,s,i):this.updateFloatingFilterParams(s,"colDef")})}updateCompDetails(e,t,i){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),i&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let i=e.params;this.comp.getFloatingFilterComp()?.then(o=>{typeof o?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(i={...i,model:re(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),o.refresh(i))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function vF(e,t){const i=e.colModel.getCol(t);if(!i){z(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:i,positionBy:"auto"})}function wF(e){e.menuSvc?.hidePopupMenu()}var bF=class extends S{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(jp(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,i)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){jp(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(be(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&ct(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Pt()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!be(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!be(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return be(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,i,o){const{positionBy:s,onClosedCallback:n}=t,r=t.column;if(s==="button"){const{buttonElement:l}=t;e?.showMenuAfterButtonClick(r,l,i,n,o)}else if(s==="mouse"){const{mouseEvent:l}=t;e?.showMenuAfterMouseEvent(r,l,i,n,o)}else if(r){const l=this.beans,a=l.ctrlsSvc;a.getScrollFeature().ensureColumnVisible(r,"auto"),Ye(l,()=>{const d=a.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);d&&e?.showMenuAfterButtonClick(r,d.getAnchorElementForMenu(o),i,n,o)})}}};function ra(e,t,i){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",i))}function jp(e){const{enterpriseMenuFactory:t,filterMenuFactory:i,gos:o}=e;return t&&be(o)?t:i}var Yp={moduleName:"SharedMenu",version:P,beans:[bF],apiFunctions:{showColumnMenu:vF,hidePopupMenu:wF}},SF=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper{min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(.ag-input-field-input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:var(--ag-widget-container-vertical-padding);:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function yF(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function RF(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function EF(e,t){const i=e.colModel.getColDefCol(t);if(i)return e.colFilter?.destroyFilter(i,"api")}function FF(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function xF(e){return e.filterManager?.getFilterModel()??{}}function PF(e,t,i){const{gos:o,colModel:s,colFilter:n}=e;i&&!o.get("enableFilterHandlers")&&(F(288),i=!1);const r=s.getColDefCol(t);return r?n?.getModelForColumn(r,i)??null:null}function DF(e,t,i){return e.filterManager?.setColumnFilterModel(t,i)??Promise.resolve()}function MF(e,t){const i=e.colModel.getCol(t);if(!i){z(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:i,containerType:"columnFilter",positionBy:"auto"})}function TF(e){e.menuSvc?.hideFilterMenu()}function AF(e,t){const i=e.colModel.getCol(t);if(!i){z(12,{colKey:t});return}return e.colFilter?.getHandler(i,!0)}function IF(e,t){const{colModel:i,colFilter:o,gos:s}=e;if(!s.get("enableFilterHandlers")){F(287);return}const{colId:n,action:r}=t;if(n){const l=i.getColById(n);l&&o?.updateModel(l,r)}else o?.updateAllModels(r)}var Qp={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Zp=["january","february","march","april","may","june","july","august","september","october","november","december"];function kF(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function LF(e,t){if(e==null)return-1;if(t==null)return 1;const i=ye(e),o=ye(t);return i!=null&&o!=null?i===o?0:i>o?1:-1:String(e).localeCompare(String(t))}function Xp(e){return e instanceof Date&&!isNaN(e.getTime())}var la={number:()=>{},bigint:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:Xp}),dateString:({dataTypeDefinition:e})=>({comparator:(t,i)=>{const o=e.dateParser(i);return i==null||ot?1:0},isValidDate:t=>typeof t=="string"&&Xp(e.dateParser(t))}),dateTime:e=>la.date(e),dateTimeString:e=>la.dateString(e),object:()=>{},text:()=>{}},aa={number:()=>({comparator:kF}),bigint:()=>({comparator:LF}),boolean:({t:e})=>({valueFormatter:t=>M(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:i=>{const o=e(i);return M(o)?o:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(i,o)=>{if(i==="NaN")return t("invalidDate","Invalid Date");if(o===1&&i!=null){const s=Zp[Number(i)-1];return t(s,Qp[s])}return i??t("blanks","(Blanks)")},treeListPathGetter:i=>Io(i,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:i})=>({valueFormatter:o=>{const s=e(o);return M(s)?s:i("blanks","(Blanks)")},treeList:!0,treeListPathGetter:o=>Io(t.dateParser(o??void 0),!1),treeListFormatter:(o,s)=>{if(s===1&&o!=null){const n=Zp[Number(o)-1];return i(n,Qp[n])}return o??i("blanks","(Blanks)")}}),dateTime:e=>{const t=aa.date(e);return t.treeListPathGetter=Io,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,i=aa.dateString(e);return i.treeListPathGetter=o=>Io(t(o??void 0)),i},object:({formatValue:e,t})=>({valueFormatter:i=>{const o=e(i);return M(o)?o:t("blanks","(Blanks)")}}),text:()=>{}};function Jp(e,t,i,o,s,n,r){let l=t,a=i;const d=e==="agSetColumnFilter";!a&&o.baseDataType==="object"&&!d&&(a=({column:g,node:p})=>s({column:g,node:p,value:n.valueSvc.getValue(g,p,"data")}));const u=(d?aa:la)[o.baseDataType],h=u({dataTypeDefinition:o,formatValue:s,t:r});return l=typeof t=="object"?{...h,...t}:h,{filterParams:l,filterValueGetter:a}}var BF={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},HF={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function ef(e,t=!1){return(t?HF:BF)[e??"text"]}function tf(e,t,i){if(t==null)return null;let o=null;const{compName:s,jsComp:n,fwComp:r}=yc(e,t);return s?o={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[s]:n==null&&r==null&&t.filter===!0&&(o=i()),o}var OF={filterHandler:()=>({doesFilterPass:()=>!0})};function of(e,t,i,o){if(!e.isPrimary())return!0;const n=!i;return!e.isValueActive()||!n?!1:t?!0:o}var GF=class extends S{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...qp},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",i){const{colModel:o,dataTypeSvc:s,filterManager:n}=this.beans;if(s?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const r=[],l=this.getModel(!0);if(e){const a=new Set(Object.keys(e));this.allColumnFilters.forEach((d,c)=>{const u=e[c];r.push(this.setModelOnFilterWrapper(d,u)),a.delete(c)}),a.forEach(d=>{const c=o.getColDefCol(d)||o.getCol(d);if(!c){F(62,{colId:d});return}if(!c.isFilterAllowed()){F(63,{colId:d});return}const u=this.getOrCreateFilterWrapper(c,!0);if(!u){F(64,{colId:d});return}r.push(this.setModelOnFilterWrapper(u,e[d],!0))})}else this.model={},this.allColumnFilters.forEach(a=>{r.push(this.setModelOnFilterWrapper(a,null))});Y.all(r).then(()=>{const a=this.getModel(!0),d=[];this.allColumnFilters.forEach((c,u)=>{const h=l?l[u]:null,g=a?a[u]:null;mi(h,g)||d.push(c.column)}),d.length>0?n?.onFilterChanged({columns:d,source:t}):i&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:i,initialModel:o,beans:{colModel:s}}=this;if(i.forEach((n,r)=>{const l=this.getModelFromFilterWrapper(n);M(l)&&(t[r]=l)}),!e)for(const n of Object.keys(o)){const r=o[n];M(r)&&!i.has(n)&&s.getCol(n)?.isFilterAllowed()&&(t[n]=r)}return t}setState(e,t,i="api"){if(this.state.clear(),t)for(const o of Object.keys(t)){const s=t[o];this.state.set(o,{model:re(this.model,o),state:s})}this.setModel(e,i,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let i=!1;return e.forEach((o,s)=>{const n=o.state;n!=null&&(i=!0,t[s]=n)}),i?t:void 0}getModelFromFilterWrapper(e){const i=e.column.getColId();if(e.isHandler)return re(this.model,i);const o=e.filter;return o?typeof o.getModel!="function"?(F(66),null):o.getModel():re(this.initialModel,i)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=a=>a?a.isFilterActive?a.isFilterActive():(F(67),!1):!1,{colModel:t,gos:i}=this.beans,o=!!lo(i),s=[],n=[],r=(a,d,c)=>{d&&(of(a,t.isPivotMode(),t.isPivotActive(),o)?s.push(c):n.push(c))},l=[];return this.allColumnFilters.forEach(a=>{const d=a.column,c=d.getColId();if(a.isHandler)l.push(Y.resolve().then(()=>{r(d,this.isHandlerActive(d),{colId:c,isHandler:!0,handler:a.handler,handlerParams:a.handlerParams})}));else{const u=Ut(a);u&&l.push(u.then(h=>{r(d,e(h),{colId:c,isHandler:!1,comp:h})}))}}),Y.all(l).then(()=>{this.activeAggregateFilters=s,this.activeColumnFilters=n})}updateFilterFlagInColumns(e,t){const i=[];return this.allColumnFilters.forEach(o=>{const s=o.column;if(o.isHandler)i.push(Y.resolve().then(()=>{this.setColFilterActive(s,this.isHandlerActive(s),e,t)}));else{const n=Ut(o);n&&i.push(n.then(r=>{this.setColFilterActive(s,r.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),Y.all(i)}doFiltersPass(e,t,i){const{data:o,aggData:s}=e,n=i?this.activeAggregateFilters:this.activeColumnFilters,r=i?s:o,l=this.model;for(let a=0;a{this.isAlive()&&i?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(o,0):o()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:i}=e,o=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",i).then(()=>{this.allColumnFilters.forEach(s=>{const{column:n,isHandler:r}=s;o!==n.getColId()&&(r&&s.handler.onAnyFilterChanged?.(),Ut(s,r)?.then(l=>{typeof l?.onAnyFilterChanged=="function"&&l.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(i=>{const o=i.isHandler;o&&i.handler.onNewRowsLoaded?.();const s=Ut(i,o);s&&t.push(s.then(n=>{n.onNewRowsLoaded?.()}))}),Y.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:i,colModel:o}=this.beans;return(s,n)=>{const r=n?o.getCol(n):e;return r?i.getValue(r,s,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const i=t?.filter;return i?i.isFilterActive():re(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=M(re(this.model,e.getColId()));if(t)return t;const i=this.beans.groupFilter;return i?.isGroupFilter(e)?i.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?Ut(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const i=Ut(t);return i?i.then(o=>({comp:o,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const i=this.getOrCreateFilterWrapper(e,t);return i?.isHandler?i.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let i=this.cachedFilter(e);return!i&&t&&(i=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,i)),i}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return Qd(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":ef(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,i,o,s,n){const r=()=>{const d=this.createFilterCompParams(e,s,n),c=o(d,s);return bc(this.beans.userCompFactory,t,c,i)},l=r();return l?{compDetails:l,createFilterUi:d=>(d?r():l).newAgStackInstance()}:null}createFilterInstance(e,t,i,o){const s=this.beans.selectableFilter;s?.isSelectable(t)&&(t=s.getFilterDef(e,t));const{handler:n,handlerParams:r,handlerGenerator:l}=this.createHandler(e,t,i)??{},a=this.createFilterComp(e,t,i,o,!!n,"init");if(!a)return{compDetails:null,createFilterUi:null,handler:n,handlerGenerator:l,handlerParams:r};const{compDetails:d,createFilterUi:c}=a;return this.isGlobalButtons&&(d.params?.buttons?.length||F(281,{colId:e.getColId()})),{compDetails:d,handler:n,handlerGenerator:l,handlerParams:r,createFilterUi:c}}createBaseFilterParams(e,t){const{filterManager:i,rowModel:o}=this.beans;return k(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:s=>i?.doesRowPassOtherFilters(e.getColId(),s)??!0,rowModel:o})}createFilterCompParams(e,t,i,o){const s=this.filterChangedCallbackFactory(e),n=this.createBaseFilterParams(e,o);if(n.filterChangedCallback=s,n.filterModifiedCallback=o?()=>{}:r=>this.filterModified(e,r),t){const r=n,l=e.getColId(),a=re(this.model,l);r.model=a,r.state=this.state.get(l)??{model:a},r.onModelChange=(d,c)=>{this.updateStoredModel(l,d),this.refreshHandlerAndUi(e,d,"ui",!1,c).then(()=>{s({...c,source:"columnFilter"})})},r.onStateChange=d=>{this.updateState(e,d),this.updateOrRefreshFilterUi(e)},r.onAction=(d,c,u)=>{this.updateModel(e,d,c),this.dispatchLocalEvent({type:"filterAction",column:e,action:d,event:u})},r.getHandler=()=>this.getHandler(e,!0),r.onUiChange=d=>this.filterUiChanged(e,d),r.source=i}return n}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,i){const o=t(),s={created:!0,create:t,filterParams:e.params,compDetails:e,promise:o};return o.then(i),s}createFilterWrapper(e){const{compDetails:t,handler:i,handlerGenerator:o,handlerParams:s,createFilterUi:n}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),l=>l),r=e.getColId();if(i)return delete this.initialModel[r],i.init?.({...s,source:"init",model:re(this.model,r)}),{column:e,isHandler:!0,handler:i,handlerGenerator:o,handlerParams:s,filterUi:this.createFilterUiForHandler(t,n)};if(n){const l={column:e,filterUi:null,isHandler:!1};return l.filterUi=this.createFilterUiLegacy(t,n,a=>{l.filter=a??void 0}),l}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,i){const{gos:o,frameworkOverrides:s,registry:n}=this.beans;let r;const l=g=>{const p=g.filter;if(mc(p)){const f=p.handler;return f||(r=p.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return typeof p=="string"?p:void 0},a=o.get("enableFilterHandlers"),d=a?l(t):void 0,c=g=>()=>this.createBean(n.createDynamicBean(g,!0));let u,h;if(typeof d=="string"){const g=o.get("filterHandlers")?.[d];g!=null?u=g:mF.has(d)&&(u=c(d),h=d)}else u=d;if(!u){let g;const{compName:p,jsComp:f,fwComp:m}=yc(s,t);p?g=p:f==null&&m==null&&t.filter===!0&&(g=i),h=this.handlerMap[g],h&&(u=c(h))}return u?{filterHandler:u,handlerNameOrCallback:r??h}:a?(J(o)&&F(277,{colId:e.getColId()}),OF):void 0}createHandler(e,t,i){const o=this.createHandlerFunc(e,t,i);if(!o)return;const s=nr(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:n,filterHandler:r}=o,{handler:l,handlerParams:a}=this.createHandlerFromFunc(e,r,s);return{handler:l,handlerParams:a,handlerGenerator:n??r}}createHandlerFromFunc(e,t,i){const o=e.getColDef(),s=t(k(this.gos,{column:e,colDef:o})),n=this.createHandlerParams(e,i);return{handler:s,handlerParams:n}}createHandlerParams(e,t){const i=e.getColDef(),o=e.getColId(),s=this.filterChangedCallbackFactory(e);return k(this.gos,{colDef:i,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:n=>this.beans.filterManager?.doesRowPassOtherFilters(o,n)??!0,onModelChange:(n,r)=>{this.updateStoredModel(o,n),this.refreshHandlerAndUi(e,n,"handler",!1,r).then(()=>{s({...r,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:i,groupFilter:o}=this.beans;this.allColumnFilters.forEach((n,r)=>{let l;n.column.isPrimary()?l=t.getColDefCol(r):l=t.getCol(r),!(l&&l===n.column)&&(e.push(n.column),this.disposeFilterWrapper(n,"columnChanged"),this.disposeColumnListener(r))});const s=o&&e.every(n=>o.isGroupFilter(n));e.length>0&&!s&&i?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const i=this.beans.groupFilter;return i?.isGroupFilter(e)?i.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:i,frameworkOverrides:o,selectableFilter:s,gos:n}=this.beans,r=g=>{this.getOrCreateFilterUi(e)?.then(f=>{g(Gt(f))})},l=e.getColDef(),a=s?.isSelectable(l)?s.getFilterDef(e,l):l,d=tf(o,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",c=n.get("enableFilterHandlers"),u=nr(i,a,this.createFilterCompParams(e,c,"init",!0)),h=k(n,{column:e,filterParams:u,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:r,showParentFilter:t});if(c){const g=h,p=e.getColId(),f=this.filterChangedCallbackFactory(e);g.onUiChange=m=>this.floatingFilterUiChanged(e,m),g.model=re(this.model,p),g.onModelChange=(m,C)=>{this.updateStoredModel(p,m),this.refreshHandlerAndUi(e,m,"floating",!0,C).then(()=>{f({...C,source:"columnFilter"})})},g.getHandler=()=>this.getHandler(e,!0),g.source="init"}return Sc(i,l,h,d)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,i,o){const s="paramsUpdated";if(e.isHandler){const n=t.getColId();delete this.initialModel[n],this.state.delete(n);const r=e.filterUi,l=this.createFilterUiForHandler(i,o);e.filterUi=l;const a=this.eventSvc;r?.created?r.promise.then(d=>{this.destroyBean(d),a.dispatchEvent({type:"filterDestroyed",source:s,column:t})}):a.dispatchEvent({type:"filterHandlerDestroyed",source:s,column:t})}else this.destroyFilter(t,s)}destroyFilter(e,t="api"){const i=e.getColId(),o=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialModel[i],o&&this.disposeFilterWrapper(o,t).then(s=>{s&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let i=!1;const{column:o,isHandler:s,filterUi:n}=e,r=o.getColId();s&&(i=this.isHandlerActive(o),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const l=()=>{this.setColFilterActive(o,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:o})};if(n){if(n.created)return n.promise.then(a=>(i=s?i:!!a?.isFilterActive(),this.destroyBean(a),l(),i));l()}return Y.resolve(i)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const i=this.allColumnFilters.get(e);if(!i)return;const o=this.beans,s=i.column,n=s.getColDef(),r=s.isFilterAllowed(),l=this.getDefaultFilter(s),a=o.selectableFilter,d=a?.isSelectable(n)?a.getFilterDef(s,n):n,c=r?this.createHandlerFunc(s,d,this.getDefaultFilter(s)):void 0,u=!!c,h=i.isHandler;if(h!=u){this.destroyFilter(s,"paramsUpdated");return}const{compDetails:g,createFilterUi:p}=(r?this.createFilterComp(s,d,l,m=>m,u,"colDef"):null)??{compDetails:null,createFilterUi:null},f=g?.params??nr(o.userCompFactory,d,this.createFilterCompParams(s,u,"colDef"));if(h){const m=c?.handlerNameOrCallback??c?.filterHandler,C=re(this.model,e);if(i.handlerGenerator!=m){const v=i.handler,{handler:w,handlerParams:y}=this.createHandlerFromFunc(s,c.filterHandler,f);i.handler=w,i.handlerParams=y,i.handlerGenerator=m,delete this.model[e],w.init?.({...y,source:"init",model:null}),this.destroyBean(v),C!=null&&this.beans.filterManager?.onFilterChanged({columns:[s],source:t})}else{const v=this.createHandlerParams(s,g?.params);i.handlerParams=v,i.handler.refresh?.({...v,source:"colDef",model:C})}}if(this.areFilterCompsDifferent(i.filterUi?.compDetails??null,g)||!i.filterUi||!g){this.destroyFilterUi(i,s,g,p);return}i.filterUi.filterParams=f,Ut(i,h)?.then(m=>{(m?.refresh?m.refresh(f):!0)===!1?this.destroyFilterUi(i,s,g,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:s,params:f})})}refreshHandlerAndUi(e,t,i,o,s){const n=this.cachedFilter(e);if(!n)return o&&this.getOrCreateFilterWrapper(e,!0),Y.resolve();if(!n.isHandler)return Y.resolve();const{filterUi:r,handler:l,handlerParams:a}=n;return $p(()=>{if(r){const{created:d,filterParams:c}=r;if(d)return r.promise.then(u=>u?{filter:u,filterParams:c}:void 0);r.refreshed=!0}return Y.resolve(void 0)},l,a,t,this.state.get(e.getColId())??{model:t},i,s)}setColumnFilterWrapper(e,t){const i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(i)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:i}=e,{componentClass:o}=t;return!(i===o||i?.render&&o?.render&&i.render===o.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const i=this.getOrCreateFilterUi(t);return i?new Promise(o=>{i.then(s=>{o(Gt(s))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:i})=>{this.setModelForColumn(e,t).then(()=>i())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:o,model:s}=this,n=e.getColId(),r=o.get(n);return r?r.model??null:re(s,n)}const i=this.cachedFilter(e);return i?this.getModelFromFilterWrapper(i):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let i=()=>{};const o=new Promise(s=>{i=s});return this.columnModelUpdates.push({key:e,model:t,resolve:i}),o}return new Promise(i=>{this.setModelForColumnLegacy(e,t).then(o=>i(o))})}getStateForColumn(e){return this.state.get(e)??{model:re(this.model,e)}}setModelForColumnLegacy(e,t){const i=this.beans.colModel.getColDefCol(e),o=i?this.getOrCreateFilterWrapper(i,!0):null;return o?this.setModelOnFilterWrapper(o,t):Y.resolve()}setColDefPropsForDataType(e,t,i){const o=e.filter,s=o===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):o;if(typeof s!="string")return;let n,r;const l=this.beans,{filterParams:a,filterValueGetter:d}=e;s==="agMultiColumnFilter"?{filterParams:n,filterValueGetter:r}=l.multiFilter?.getParamsForDataType(a,d,t,i)??{}:{filterParams:n,filterValueGetter:r}=Jp(s,a,d,t,i,l,this.getLocaleTextFunc()),e.filterParams=n,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,i,o){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",i)),e.dispatchColEvent("filterChanged",i,o)}setModelOnFilterWrapper(e,t,i){return new Y(o=>{if(e.isHandler){const n=e.column,r=n.getColId(),l=this.model[r];if(this.updateStoredModel(r,t),i&&t===l){o();return}this.refreshHandlerAndUi(n,t,"api").then(()=>o());return}const s=Ut(e);if(s){s.then(n=>{if(typeof n?.setModel!="function"){F(65),o();return}(n.setModel(t)||Y.resolve()).then(()=>o())});return}o()})}updateStoredModel(e,t){M(t)?this.model[e]=t:delete this.model[e];const i=this.state.get(e),o={model:t,state:i?.state};this.state.set(e,o)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(i=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:i,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,i){const o=e.getColId(),s=this.cachedFilter(e),n=()=>s?.filterUi;na({action:t,filterParams:s?.filterUi?.filterParams,getFilterUi:n,getModel:()=>re(this.model,o),getState:()=>this.state.get(o),updateState:r=>this.updateState(e,r),updateModel:r=>n()?.filterParams?.onModelChange(r,{...i,fromAction:t}),processModelToApply:s?.isHandler?s.handler.processModelToApply?.bind(s.handler):void 0})}updateAllModels(e,t){const i=[];this.allColumnFilters.forEach((o,s)=>{const n=this.beans.colModel.getColDefCol(s);n&&na({action:e,filterParams:o.filterUi?.filterParams,getFilterUi:()=>o.filterUi,getModel:()=>re(this.model,s),getState:()=>this.state.get(s),updateState:r=>this.updateState(n,r),updateModel:r=>{this.updateStoredModel(s,r),this.dispatchLocalEvent({type:"filterAction",column:n,action:e}),i.push(this.refreshHandlerAndUi(n,r,"ui"))},processModelToApply:o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0})}),i.length&&Y.all(i).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();Kp(()=>this.cachedFilter(e)?.filterUi,()=>re(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:i}=this;for(const s of i)if(s.source==="COLUMN_MENU")return!1;let o=!1;for(const s of e.keys()){const n=e.get(s);if(n.valid===!1)return!1;(n.model??null)!==re(t,s)&&(o=!0)}return o}hasUnappliedModel(e){const{model:t,state:i}=this;return(i.get(e)?.model??null)!==re(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const i=this.beans.filterPanelSvc;return i?.isActive?!!i.getState(e.getColId()):!1}onPivotModeChanged(e){const{colModel:t,pivotColsSvc:i}=this.beans,o=!!lo(this.gos),s=e.currentValue,n=s?this.activeColumnFilters:this.activeAggregateFilters,r=s?this.activeAggregateFilters:this.activeColumnFilters,l=[];for(const a of n){const d=t.getColById(a.colId),c=s&&!!i?.columns.length;d&&s===of(d,s,c,o)&&(r.push(a),l.push(a))}Va(n,l)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function VF(e){return!!e.filterManager?.isAnyFilterPresent()}function NF(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var zF=class extends S{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:o})=>this.onAdvFilterEnabledChanged(o),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:i}=this;this.alwaysPassFilter=i.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=i.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,i="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,i)}setFilterModel(e,t="api",i){if(this.isAdvFilterEnabled()){i||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){lo(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:i,columns:o=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):Y.resolve()).then(()=>{const s={source:t,type:"filterChanged",columns:o};i&&ge(s,i),this.eventSvc.dispatchEvent(s),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!lo(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){F(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}};function WF(e){return{tag:"div",cls:e}}var da=class extends U{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(WF(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const i=this.buttons;if(this.buttons=e,i===e)return;const o=this.getGui();le(o);let s;this.destroyListeners();const n=document.createDocumentFragment(),r=this.className,l=({type:d,label:c})=>{const u=C=>{this.dispatchLocalEvent({type:d,event:C})};["apply","clear","reset","cancel"].includes(d)||F(75);const h=d==="apply",p=se({tag:"button",attrs:{type:h&&t?"submit":"button"},ref:`${d}FilterButton`,cls:`ag-button ag-standard-button ${r}-button${h?" "+r+"-apply-button":""}`,children:c});this.activateTabIndex([p]),h&&(s=p);const f=C=>{C.key===b.ENTER&&(C.preventDefault(),u(C))},m=this.listeners;p.addEventListener("click",u),m.push(()=>p.removeEventListener("click",u)),p.addEventListener("keydown",f),m.push(()=>p.removeEventListener("keydown",f)),n.append(p)};for(const d of e)l(d);this.eApply=s;const a=this.validationTooltipFeature;s&&!a?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!s&&a&&(this.validationTooltipFeature=this.destroyBean(a)),o.append(n)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const i=this.eApply;i&&(Si(i,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},_F={selector:"AG-FILTER-BUTTON",component:da},sf=class extends U{constructor(e,t,i,o,s,n){super(),this.column=e,this.wrapper=t,this.eventParent=i,this.updateModel=o,this.isGlobalButtons=s,this.enableGlobalButtonCheck=n,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,i=t,o=i.useForm,s=o?"form":"div";this.setTemplate({tag:s,cls:"ag-filter-wrapper"}),o&&this.addManagedElementListeners(this.getGui(),{submit:n=>{n?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=i,this.resetButtonsPanel(i),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:n,params:r})=>{n===this.column&&this.resetButtonsPanel(r,this.params)},filterStateChanged:({column:n,state:r})=>{n===this.column&&this.eButtons?.updateValidity(r.valid!==!1)},filterAction:({column:n,action:r,event:l})=>{n===this.column&&this.afterAction(r,l)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:n})=>{if(n!==this.isGlobalButtons){this.isGlobalButtons=n;const r=this.params;this.resetButtonsPanel(r,r,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,i){const{buttons:o,readOnly:s}=t??{},{buttons:n,readOnly:r,useForm:l}=e;if(!i&&s===r&&mi(o,n))return;const a=n&&n.length>0&&!e.readOnly&&!this.isGlobalButtons;let d=this.eButtons;if(a){const c=n.map(u=>{const h=`${u}Filter`;return{type:u,label:Le(this,h)}});if(this.applyActive=vo(this.params),!d){d=this.createBean(new da),this.appendChild(d.getGui());const u=this.column,h=g=>({event:p})=>{this.updateModel(u,g,{fromButtons:!0}),this.afterAction(g,p)};d?.addManagedListeners(d,{apply:h("apply"),clear:h("clear"),reset:h("reset"),cancel:h("cancel")}),this.eButtons=d}d.updateButtons(c,l)}else this.applyActive=!1,d&&(Pe(d.getGui()),this.eButtons=this.destroyBean(d))}close(e){const t=this.hidePopup;if(!t)return;const i=e,o=i?.key;let s;(o===b.ENTER||o===b.SPACE)&&(s={keyboardEvent:i}),t(s),this.hidePopup=null}afterAction(e,t){const{params:i,applyActive:o}=this,s=i?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),s&&o&&this.close(t);break}case"reset":{s&&o&&this.close();break}case"cancel":{s&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===b.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},UF=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",qF={tag:"div",cls:"ag-filter"},nf=class extends U{constructor(e,t,i){super(qF),this.column=e,this.source=t,this.enableGlobalButtonCheck=i,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??Y.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:i,beans:{colFilter:o}}=this,s=o.getFilterUiForDisplay(t)??null;this.wrapper=s,s?.then(n=>{if(!n)return;const{isHandler:r,comp:l}=n;let a;if(r){const d=!!this.enableGlobalButtonCheck,c=this.createBean(new sf(t,n,o,o.updateModel.bind(o),d&&o.isGlobalButtons,d));this.comp=c,a=c.getGui()}else this.registerCSS(UF),a=l.getGui(),M(a)||F(69,{guiFromFilter:a});this.appendChild(a),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:i,eGui:this.getGui()}):l.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:i}=e;(t==="api"||t==="paramsUpdated")&&i.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(le(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},$F=class extends S{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,i,o){e&&!e.isColumn||this.showPopup(e,s=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:i,mouseEvent:t,ePopup:s})},i,t.target,be(this.gos),o)}showMenuAfterButtonClick(e,t,i,o){if(e&&!e.isColumn)return;let s=-1,n="left";const r=be(this.gos);!r&&this.gos.get("enableRtl")&&(s=1,n="right");const l=r?void 0:4*s,a=r?void 0:4;this.showPopup(e,d=>{this.popupSvc?.positionPopupByComponent({type:i,eventSource:t,ePopup:d,nudgeX:l,nudgeY:a,alignSide:n,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},i,t,r,o)}showPopup(e,t,i,o,s,n){const r=e?this.createBean(new nf(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){z(57);return}const l=se({tag:"div",cls:`ag-menu${s?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(l,{keydown:f=>this.trapFocusWithin(f,l)}),l.appendChild(r?.getGui());let a;const d=()=>r?.afterGuiDetached(),c=Zd(this.gos)?o??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=f=>{ra(e,!1,"contextMenu");const m=f instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),m&&o&&De(o)&&br(o)?.focus({preventScroll:!0}),d(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e),n?.()},h=this.getLocaleTextFunc(),g=s&&i!=="columnFilter"?h("ariaLabelColumnMenu","Column Menu"):h("ariaLabelColumnFilter","Column Filter"),p=this.popupSvc?.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(l),anchorToElement:c,ariaLabel:g});p&&(this.hidePopup=a=p.hideFunc),r.afterInit().then(()=>{t(l),r.afterGuiAttached({container:i,hidePopup:a})}),ra(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){e.key!==b.TAB||e.defaultPrevented||Tt(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Mt(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,i){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:i??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},KF=class extends S{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,i){if(!t)return;const o=e.getColDef(),{selectableFilter:s,valueSvc:n,formula:r}=this.beans,l=i??s?.getFilterValueGetter(e.getColId())??o.filterValueGetter;if(l)return this.executeFilterValueGetter(l,t.data,e,t,o);const a=n.getValue(e,t,"data");return e.isAllowFormula()&&r?.isFormula(a)?r.resolveValue(e,t):a}executeFilterValueGetter(e,t,i,o,s){const{expressionSvc:n,valueSvc:r}=this.beans,l=k(this.gos,{data:t,node:o,column:i,colDef:s,getValue:r.getValueCallback.bind(r,o)});return typeof e=="function"?e(l):n?.evaluate(e,l)}},jF={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},YF=class extends U{constructor(){super(jF,[Ko]),this.eFloatingFilterText=x}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const i=e,o=i.getHandler();if(o.getModelAsString){const s=o.getModelAsString(i.model);this.eFloatingFilterText.setValue(s)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}})}refresh(e){this.init(e)}},ca=class extends Ao{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},QF={selector:"AG-RADIO-BUTTON",component:ca},ua=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const i=e.filterOptions??t;this.filterOptions!==i&&(this.filterOptions=i,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const i=[["displayKey"],["displayName"],["predicate","test"]],o=s=>s.some(n=>t[n]!=null)?!0:(F(72,{keys:s}),!1);if(!i.every(o)){this.filterOptions=e.filter(s=>s===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const i=t[0];if(typeof i=="string")return i;if(i.displayKey)return i.displayKey;F(73)}else F(74)}getCustomOption(e){return this.customFilterOptions[e]}};function jo(e,t,i){return i==null?e.splice(t):e.splice(t,i)}function Cn(e){return e==null||typeof e=="string"&&e.trim().length===0}function ZF(e){return e==="AND"||e==="OR"?e:"AND"}function XF(e,t,i){if(e==null)return;const{predicate:o}=e;if(o!=null&&!t.some(s=>s==null))return o(t,i)}function JF(e,t){let i=e.length;return i>t&&(e.splice(t),F(78),i=t),i}var ex=new Set(["empty","notBlank","blank","today","yesterday","tomorrow","thisWeek","lastWeek","nextWeek","thisMonth","lastMonth","nextMonth","thisQuarter","lastQuarter","nextQuarter","thisYear","lastYear","nextYear","yearToDate","last7Days","last30Days","last90Days","last6Months","last12Months","last24Months"]);function qt(e,t){const i=t.getCustomOption(e);if(i){const{numberOfInputs:o}=i;return o??1}return e&&ex.has(e)?0:e==="inRange"?2:1}var vn=class extends Bc{constructor(e,t,i){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=i,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new ua;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=ZF(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),we(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,i)=>{const o=i===0?e:this.optionsFactory.defaultOption;t.setValue(o,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const i=!e.operator,o=!t.operator;if(!i&&o||i&&!o)return!1;let n;if(i){const r=e,l=t;n=this.areSimpleModelsEqual(r,l)}else{const r=e,l=t;n=r.operator===l.operator&<(r.conditions,l.conditions,(a,d)=>this.areSimpleModelsEqual(a,d))}return n}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),Y.resolve();if(e.operator){const o=e;let s=o.conditions;s==null&&(s=[],F(77));const n=JF(s,this.maxNumConditions),r=this.getNumConditions();if(nr)for(let a=r;aa.setValue(!l,!0)),this.eJoinOrs.forEach(a=>a.setValue(l,!0)),s.forEach((a,d)=>{this.eTypes[d].setValue(a.type,!0),this.setConditionIntoUi(a,d)})}else{const o=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(o.type,!0),this.setConditionIntoUi(o,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),Y.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(F(79),t=1),this.maxNumConditions=t;let i=e.numAlwaysVisibleConditions??1;i<1&&(F(80),i=1),i>t&&(F(81),i=t),this.numAlwaysVisibleConditions=i}createOption(){const e=this.getGui(),t=this.createManagedBean(new fn);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const i=this.createEValue();this.eConditionBodies.push(i),e.appendChild(i),this.putOptionsIntoDropdown(t),this.resetType(t);const o=this.getNumConditions()-1;this.forEachPositionInput(o,s=>this.resetInput(s)),this.addChangedListeners(t,o)}createJoinOperatorPanel(){const e=se({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),i=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const o=this.eJoinPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,o,s),this.resetJoinOperatorOr(i,o,s),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){const o=this.createManagedBean(new ca);e.push(o);const s="ag-filter-condition-operator";return o.addCss(s),o.addCss(`${s}-${i}`),t.appendChild(o.getGui()),o}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const i of t)e.addOption(i);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,i=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:i?this.getLocaleTextFunc()(i.displayKey,i.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let i=0;i0&&this.removeConditionsAndOperators(o,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((o,s)=>{const n=this.isConditionDisabled(s,e);o.setDisabled(n||this.filterListOptions.length<=1),s===1&&(Si(this.eJoinPanels[0],n),this.eJoinAnds[0].setDisabled(n),this.eJoinOrs[0].setDisabled(n))}),this.eConditionBodies.forEach((o,s)=>{_(o,this.isConditionBodyVisible(s))});const i=(t??this.getJoinOperator())==="OR";for(const o of this.eJoinAnds)o.setValue(!i,!0);for(const o of this.eJoinOrs)o.setValue(i,!0);this.forEachInput((o,s,n,r)=>{this.setElementDisplayed(o,s=this.getNumConditions())return;const{eTypes:i,eConditionBodies:o,eJoinPanels:s,eJoinAnds:n,eJoinOrs:r}=this;this.removeComponents(i,e,t),this.removeElements(o,e,t),this.removeEValues(e,t);const l=Math.max(e-1,0);this.removeElements(s,l,t),this.removeComponents(n,l,t),this.removeComponents(r,l,t)}removeElements(e,t,i){const o=jo(e,t,i);for(const s of o)Pe(s)}removeComponents(e,t,i){const o=jo(e,t,i);for(const s of o)Pe(s.getGui()),this.destroyBean(s)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const i=this.getInputs(0)[0];i instanceof Bt&&this.isConditionBodyVisible(0)?t=i.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,i=-1,o=!1;const s=this.getJoinOperator();for(let r=this.getNumConditions()-1;r>=0;r--)if(this.isConditionUiComplete(r))t===-1&&(t=r,i=r);else{const l=r>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(r-1),a=r{if(!(o instanceof Bt))return;const l=s===0&&r>1?"inRangeStart":s===0?"filterOoo":"inRangeEnd",a=s===0&&r>1?e("ariaFilterFromValue","Filter from value"):s===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),d=i[n].getValue(),c=Lc(this,t,l,d);o.setInputPlaceholder(c),o.setInputAriaLabel(a)})}setElementValue(e,t,i){e instanceof Bt&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){lr(e)&&_(e.getGui(),t)}setElementDisabled(e,t){lr(e)&&Si(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Bt&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,i)=>{this.forEachPositionTypeInput(i,t,e)})}forEachPositionInput(e,t){const i=this.getConditionType(e);this.forEachPositionTypeInput(e,i,t)}forEachPositionTypeInput(e,t,i){const o=qt(t,this.optionsFactory),s=this.getInputs(e);for(let n=0;nt+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return qt(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(i=>i==null)||this.positionHasInvalidInputs(e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;tthis.resetType(t)),this.eJoinAnds.forEach((t,i)=>this.resetJoinOperatorAnd(t,i,this.joinOperatorId+i)),this.eJoinOrs.forEach((t,i)=>this.resetJoinOperatorOr(t,i,this.joinOperatorId+i)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const i=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(i).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),i)}resetJoinOperator(e,t,i,o,s){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${s}`).setLabel(o),t)}updateJoinOperatorsDisabled(){const e=(t,i)=>this.updateJoinOperatorDisabled(t,i);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const i=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((o,s,n)=>{n===t&&this.setElementValue(o,i[s]!=null?i[s]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,i,o)=>{this.setElementValue(t,i===0&&o===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,i=>{this.attachElementOnChange(i,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},ha=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function ga(e){return e?.allowedCharPattern??null}function rf(e,t){const{filter:i,filterTo:o,type:s}=e||{};return[ye(i),ye(o)].slice(0,qt(s,t))}var tx=class extends vn{constructor(){super("bigintFilter",rf,ha),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!ri()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e0&&this.beans.ariaAnnounce.announceValue(h,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:i,additionalEventAttributes:o}=e,s=this.state,n=o?.fromAction;return(n&&n!="apply"||i.model!==s.model||!this.areStatesEqual(i.state,s.state))&&this.refreshInputValidation(),t}setElementValue(e,t,i){super.setElementValue(e,t,i),t===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:i}=this,o=ga(e),s=se({tag:"div",cls:"ag-filter-body",role:"presentation"}),n=this.createFromToElement(s,t,"from",o),r=this.createFromToElement(s,i,"to",o),l=(c,u,h)=>()=>this.refreshInputPairValidation(c,u,h),a=l(n,r,!0);n.onValueChange(a),n.addGuiEventListener("focusin",a);const d=l(n,r,!1);return r.onValueChange(d),r.addGuiEventListener("focusin",d),s}createFromToElement(e,t,i,o){const s=this.createManagedBean(o?new rt({allowedCharPattern:o}):new rt);return s.addCss(`ag-filter-${i}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui()),s}removeEValues(e,t){const i=o=>this.removeComponents(o,e,t);i(this.eValuesFrom),i(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,n)=>{o0&&(i.filter=String(o[0])),o.length>1&&(i.filterTo=String(o[1])),i}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,i=>t||(t=!i.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){const i=e.getValue();return i==null||typeof i=="string"&&i.trim()===""?null:t?t(i):ye(i)}isInvalidValue(e,t){const i=e.getValue();return i!=null&&String(i).trim()!==""&&t===null}};function ix(e,t,i){return e!=null&&t!=null&&e>=t?`strict${i?"Max":"Min"}ValueValidation`:null}var lf=class extends S{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,i=new ua;this.optionsFactory=i,i.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(i,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,i=this.optionsFactory;i.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:i,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:i}=t,o=[];if(i){const r=t;o.push(...r.conditions??[])}else o.push(t);const s=i&&i==="OR"?"some":"every",n=this.params.getValue(e.node);return o[s](r=>this.individualConditionPasses(e,r,n))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:i,maxNumConditions:o}}=e;if(t==null)return;let n=rr(t)?t.conditions:[t];const r=i?.map(c=>typeof c=="string"?c:c.displayKey)??this.defaultOptions;if(!(!n||n.every(c=>r.find(u=>u===c.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let a=!1;const d=this.filterType;if((n&&!n.every(c=>c.filterType===d)||t.filterType!==d)&&(n=n.map(c=>({...c,filterType:d})),a=!0),typeof o=="number"&&n&&n.length>o&&(n=n.slice(0,o),a=!0),a){const c=n.length>1?{...t,filterType:d,conditions:n}:{...n[0],filterType:d};this.params={...e,model:c},e.onModelChange(c)}}individualConditionPasses(e,t,i){const o=this.optionsFactory,s=this.mapValuesFromModel(t,o),n=o.getCustomOption(t.type),r=XF(n,s,i);return r??(i==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(s,i,t,e))}},pa=class extends lf{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:i,includeBlanksInGreaterThan:o,includeBlanksInLessThan:s,includeBlanksInRange:n}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(i)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(o)return!0;break;case"lessThan":case"lessThanOrEqual":if(s)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,i){const o=i.type;if(!this.isValid(t))return o==="notEqual"||o==="notBlank";const s=this.comparator(),n=e[0]!=null?s(e[0],t):0;switch(o){case"equals":return n===0;case"notEqual":return n!==0;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const r=s(e[1],t);return this.params.filterParams.inRangeInclusive?n>=0&&r<=0:n>0&&r<0}case"blank":return Cn(t);case"notBlank":return!Cn(t);default:return F(76,{filterModelType:o}),!0}}},fa={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},ox={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},wn=class extends S{constructor(e,t,i){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=i}getModelAsString(e,t){const i=this.getLocaleTextFunc(),o=t==="filterToolPanel";if(!e)return o?Le(this,"filterSummaryInactive"):null;if(e.operator!=null){const n=e,l=(n.conditions??[]).map(d=>this.getModelAsString(d,t)),a=n.operator==="AND"?"andCondition":"orCondition";return l.join(` ${Le(this,a)} `)}else{if(e.type==="blank"||e.type==="notBlank")return o?Le(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):i(e.type,e.type);{const n=e,r=this.optionsFactory.getCustomOption(n.type),{displayKey:l,displayName:a,numberOfInputs:d}=r||{};return l&&a&&d===0?i(l,a):this.conditionToString(n,o,n.type==="inRange"||d===2,l,a)}}}updateParams(e){const{optionsFactory:t,filterParams:i}=e;this.optionsFactory=t,this.filterParams=i}conditionForToolPanel(e,t,i,o,s,n){let r;const l=this.getTypeKey(e);return l&&(r=Le(this,l)),s&&n&&(r=this.getLocaleTextFunc()(s,n)),r!=null?t?`${r} ${Le(this,"filterSummaryInRangeValues",[i(),o()])}`:`${r} ${i()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},af=class extends wn{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=fa}conditionToString(e,t,i,o,s){const{filter:n,filterTo:r,type:l}=e,a=this.formatValue.bind(this),d=ye(n),c=ye(r);if(t){const u=this.conditionForToolPanel(l,i,()=>a(d),()=>a(c),o,s);if(u!=null)return u}return i?`${a(d)}-${a(c)}`:n!=null?a(d):`${l}`}},sx=class extends pa{constructor(){super(rf,ha),this.filterType="bigint",this.FilterModelFormatterClass=af}comparator(){return(e,t)=>e===t?0:e{}}setupGui(e){this.eInput=this.createManagedBean(new rt(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const i=o=>this.onValueChanged(o);this.addManagedListeners(t,{input:i,keydown:i})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t,placeholder:i}){const{eInput:o}=this;o.setInputAriaLabel(e),t!==void 0&&o.setAutoComplete(t),o.toggleCss("ag-floating-filter-search-icon",!!i),o.setInputPlaceholder(i)}};function Ca(e){const t=e?.trim();return t===""?e:t}function df(e,t){const{filter:i,filterTo:o,type:s}=e||{};return[i||null,o||null].slice(0,qt(s,t))}var cf=class extends U{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let i;t?i=e.conditions[0]:i=e,this.lastType=i.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const i=e;return this.isTypeEditable(i.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const i=e;this.onModelUpdated(i.model)}}setParams(e){const t=new ua;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const i=this.optionsFactory.defaultOption;t||(this.lastType=i),this.readOnly=!!e.filterParams.readOnly;const o=this.isTypeEditable(i);this.setEditable(o)}refresh(e){this.params=e;const t=e,i=this.reactive;if((!i||t.source==="colDef")&&this.updateParams(e),i){const{source:o,model:s}=t;if(o==="dataChanged"||o==="ui")return;this.onModelUpdated(s)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&qt(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},nx={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},va=class extends cf{constructor(){super(...arguments),this.eFloatingFilterInputContainer=x,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(nx)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const{inputSvc:t,defaultDebounceMs:i,readOnly:o}=this,{filterPlaceholder:s,column:n,browserAutoComplete:r,filterParams:l}=e,a=this.lastType??this.optionsFactory.defaultOption,d=e.filterParams.filterPlaceholder,c=s===!0?Lc(this,d,"filterOoo",a):s||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(n),autoComplete:r??!1,placeholder:c}),this.applyActive=vo(l),!o){const u=Sr(l,i);t.setValueChangedListener(te(this,this.syncUpWithParentFilter.bind(this),u))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,i=t.getValue();le(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(i,!0)}syncUpWithParentFilter(e){const t=e.key===b.ENTER,i=this.reactive;if(i&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:o,params:s,lastType:n}=this;let r=o.getValue();if(s.filterParams.trimInput&&(r=Ca(r),o.setValue(r,!0)),i){const l=s,a=l.model,d=this.convertValue(r),c=d==null?null:{...a??{filterType:this.filterType,type:n??this.optionsFactory.defaultOption},filter:d};l.onModelChange(c,{afterFloatingFilter:!0})}else s.parentFilterInstance(l=>{l?.onFloatingFilterChanged(n||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},rx=class extends va{constructor(){super(...arguments),this.FilterModelFormatterClass=af,this.filterType="bigint",this.defaultOptions=ha}updateParams(e){const t=e.filterParams;ga(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams;this.allowedCharPattern=ga(t),this.bigintParser=t?.bigintParser;const i=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new ma({config:i}))}convertValue(e){return e==null||e===""?null:this.bigintParser?this.bigintParser(e):ye(e)}},uf=".ag-input-field-input",hf=class{constructor(e,t,i,o,s,n){this.context=e,this.eParent=s,this.alive=!0,this.debouncedReport=te({isAlive:()=>this.alive},gf,500),this.timeoutHandle=null,Sv(t,i,o)?.newAgStackInstance().then(l=>{if(!this.alive){e.destroyBean(l);return}if(this.dateComp=l,!l)return;s.appendChild(l.getGui()),l?.afterGuiAttached?.();const{tempValue:a,disabled:d}=this;a&&l.setDate(a),d!=null&&l.setDisabled?.(d),n?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){_(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}setCustomValidity(e,t=!1){const i=this.dateComp?.getGui().querySelector(uf);if(i&&"setCustomValidity"in i){const o=e.length>0;i.setCustomValidity(e),o?t?this.timeoutHandle=this.debouncedReport(i):gf(i):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),ss(i,o)}}getValidity(){return this.dateComp?.getGui().querySelector(uf)?.validity}};function gf(e){e.reportValidity()}var wa=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function pf(e,t){const{dateFrom:i,dateTo:o,type:s}=e||{};return[i&&me(i,void 0,!0)||null,o&&me(o,void 0,!0)||null].slice(0,qt(s,t))}var ff=1e3,mf=1/0,lx=class extends vn{constructor(){super("dateFilter",pf,wa),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=ff,this.maxValidYear=mf,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!ri()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(a,d)=>{const c=e[a];if(c!=null)if(isNaN(c))F(82,{param:a});else return c==null?d:Number(c);return d},i=t("minValidYear",ff),o=t("maxValidYear",mf);this.minValidYear=i,this.maxValidYear=o,i>o&&F(83);const{minValidDate:s,maxValidDate:n}=e,r=s instanceof Date?s:me(s);this.minValidDate=r;const l=n instanceof Date?n:me(n);this.maxValidDate=l,r&&l&&r>l&&F(84)}refreshInputValidation(){for(let e=0;e=2?ax(d,c,t):null,h=u?this.translate(u,[String(t?c:d)]):"",g=!ri()&&!i;(t?r:l).setCustomValidity(h,g),(t?l:r).setCustomValidity("",g),h.length>0&&n.ariaAnnounce.announceValue(h,"dateFilter")}createDateCompWrapper(e,t,i){const{beans:{userCompFactory:o,context:s,gos:n},params:r}=this,l=i==="from",a=new hf(s,o,r.colDef,k(n,{onDateChanged:()=>{this.refreshInputPairValidation(t,l),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,l),filterParams:r,location:"filter"}),e);return this.addDestroyFunc(()=>a.destroy()),a}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=se({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,i,o){const s=se({tag:"div",cls:`ag-filter-${o} ag-filter-date-${o}`});t.push(s),e.appendChild(s),i.push(this.createDateCompWrapper(s,t.length-1,o))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),jo(this.eConditionPanelsFrom,e,t),jo(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){const o=jo(e,t,i);for(const s of o)s.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:i,minValidYear:o,maxValidYear:s}=this;if(t){if(ei)return!1}else if(e.getUTCFullYear()>s)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=t.getDate()!=null&&!(t.getValidity()?.valid??!0))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,i=>t||(t=!(i.getValidity()?.valid??!0))),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(i,o,s,n)=>{!t||o>=n||t&&(t=this.isValidDateValue(i.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),i={},{params:o,filterType:s}=this,n=this.getValues(e),r=o.useIsoSeparator?"T":" ";return n.length>0&&(i.dateFrom=fe(n[0],!0,r)),n.length>1&&(i.dateTo=fe(n[1],!0,r)),{dateFrom:null,dateTo:null,filterType:s,type:t,...i}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(o=>{o.setInputPlaceholder(t),o.setInputAriaLabel(i)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,n)=>{o=t?`${i?"max":"min"}DateValidation`:null}var Cf=class extends wn{constructor(e,t){super(e,t,i=>{const{dataTypeSvc:o,valueSvc:s}=this.beans,n=t.column,r=o?.getDateFormatterFunction(n),l=r?r(i??void 0):i;return s.formatValue(n,null,l)}),this.filterTypeKeys=fa}conditionToString(e,t,i,o,s){const{type:n}=e,r=me(e.dateFrom),l=me(e.dateTo),a=this.filterParams.inRangeFloatingFilterDateFormat,d=t?this.formatValue.bind(this):h=>gb(h,a),c=()=>r!==null?d(r):"null",u=()=>l!==null?d(l):"null";if(r==null&&l==null)return Le(this,n);if(t){const h=this.conditionForToolPanel(n,i,c,u,o,s);if(h!=null)return h}return i?`${c()}-${u()}`:r!=null?d(r):`${n}`}};function dx(e,t){const i=t;return ie?1:0}var cx=class extends pa{constructor(){super(pf,wa),this.filterType="date",this.FilterModelFormatterClass=Cf,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){const{filterTypeToRangeCache:i}=this,o=Date.now();let s=i.get(e);if(s&&s.expires=0&&s(a,t)<0}return super.evaluateNonNullValue(e,t,i)}},ux=1,bn=null,hx=()=>{if(bn!=null)return bn;let e;const t=typeof navigator>"u"?void 0:navigator.languages?.[0]??navigator.language;if(t&&typeof Intl<"u"&&typeof Intl.Locale=="function")try{e=new Intl.Locale(t).getWeekInfo?.()?.firstDay}catch{e=void 0}return bn=e==null?ux:e%7,bn},Ae=e=>(e.setHours(0,0,0,0),e),Sn=e=>{const t=e.getDay(),i=hx(),o=(t-i+7)%7;return e.setDate(e.getDate()-o),Ae(e)},yn=(e,t=1)=>(e.setDate(e.getDate()-t),e),Ge=e=>(e.setDate(e.getDate()+1),Ae(e)),vf=e=>(Sn(e),e.setDate(e.getDate()+6),Ge(e)),Rn=e=>(e.setDate(1),Ae(e)),ba=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),Ae(e)),Sa=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),Rn(e)},wf=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),ba(e)},ya=e=>(e.setMonth(0,1),Ae(e)),bf=e=>(e.setMonth(12,0),Ge(e)),$i=e=>yn(e),Ra=e=>$i(Sn(e)),Ea=e=>$i(Rn(e)),Fa=e=>$i(Sa(e)),xa=(e,t)=>[Ae(e),Ge(t)],gx=(e,t)=>xa($i(e),$i(t)),Pa=(e,t)=>[Sn(e),vf(t)],px=(e,t)=>Pa(Ra(e),Ra(t)),Da=(e,t)=>[Rn(e),ba(t)],fx=(e,t)=>Da(Ea(e),Ea(t)),Ma=(e,t)=>[Sa(e),wf(t)],mx=(e,t)=>Ma(Fa(e),Fa(t)),Ta=(e,t)=>[ya(e),bf(t)],Cx=(e,t)=>[ya(e),Ge(t)],vx=(e,t)=>[Ae(yn(e,7)),Ge(t)],wx=(e,t)=>[Ae(yn(e,30)),Ge(t)],bx=(e,t)=>[Ae(yn(e,90)),Ge(t)],Sx=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[Ae(e),Ge(t)]),yx=(e,t)=>(e.setFullYear(e.getFullYear()-1),[Ae(e),Ge(t)]),Rx=(e,t)=>(e.setFullYear(e.getFullYear()-2),[Ae(e),Ge(t)]),Ex=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),Ta(e,t)),Fx=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),Ta(e,t)),xx=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),Ma(e,t)),Px=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),Da(e,t)),Dx=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),Pa(e,t)),Mx=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),xa(e,t)),Tx={today:xa,yesterday:gx,tomorrow:Mx,thisWeek:Pa,lastWeek:px,nextWeek:Dx,thisMonth:Da,lastMonth:fx,nextMonth:Px,thisQuarter:Ma,lastQuarter:mx,nextQuarter:xx,thisYear:Ta,lastYear:Ex,nextYear:Fx,yearToDate:Cx,last7Days:vx,last30Days:wx,last90Days:bx,last6Months:Sx,last12Months:yx,last24Months:Rx,setStartOfDay:Ae,setStartOfWeek:Sn,setStartOfNextDay:Ge,setStartOfNextWeek:vf,setStartOfMonth:Rn,setStartOfNextMonth:ba,setStartOfQuarter:Sa,setStartOfNextQuarter:wf,setStartOfYear:ya,setStartOfNextYear:bf,setPreviousDay:$i,setPreviousWeek:Ra,setPreviousMonth:Ea,setPreviousQuarter:Fa},Ax={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},Ix=class extends cf{constructor(){super(Ax,[Ko]),this.eReadOnlyText=x,this.eDateWrapper=x,this.FilterModelFormatterClass=Cf,this.filterType="date",this.defaultOptions=wa}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const i=e?me(e.dateFrom):null;this.dateComp.setDate(i),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){_(this.eDateWrapper,e),_(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const i=t.model,o=fe(e),s=o==null?null:{...i??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:o};t.onModelChange(s,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=Sr(e,this.defaultDebounceMs);return k(this.gos,{onDateChanged:te(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:i,params:{column:o}}=this;this.dateComp=new hf(e,t,o.getColDef(),this.getDateComponentParams(),i,s=>{s.setInputAriaLabel(this.getAriaLabel(o))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},kx={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},Lx=class extends U{constructor(){super(kx,[Ko]),this.eDateInput=x,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this),focusin:this.handleFocusIn.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){const t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&mt();const{minValidYear:o,maxValidYear:s,minValidDate:n,maxValidDate:r,buttons:l,includeTime:a,colDef:d}=e.filterParams||{},c=this.beans.dataTypeSvc,u=a??c?.getDateIncludesTimeFlag?.(d.cellDataType)??!1;i?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";const h=Sf(n,o,!0),g=Sf(r,s,!1);h&&g&&h.getTime()>g.getTime()&&F(87),h&&(t.min=fe(h,u)),g&&(t.max=fe(g,u)),this.isApply=e.location==="floatingFilter"&&!!l?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return me(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,i=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(fe(e,i))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}};function Sf(e,t,i){return e&&t&&F(i?85:86),e instanceof Date?e:e?me(e):t?me(`${t}-${i?"01-01":"12-31"}`):null}var Aa=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function Ia(e){return e?.allowedCharPattern??null}function En(e){return e==null||isNaN(e)?null:e}function yf(e,t){const{filter:i,filterTo:o,type:s}=e||{};return[En(i),En(o)].slice(0,qt(s,t))}var Bx=class extends vn{constructor(){super("numberFilter",yf,Aa),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!ri()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e0&&this.beans.ariaAnnounce.announceValue(l,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:i,additionalEventAttributes:o}=e,s=this.state,n=o?.fromAction;return(n&&n!="apply"||i.model!==s.model||!this.areStatesEqual(i.state,s.state))&&this.refreshInputValidation(),t}setElementValue(e,t,i){const{numberFormatter:o}=this.params,s=!i&&o?o(t??null):t;super.setElementValue(e,s),s===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:i}=this,o=Ia(e),s=se({tag:"div",cls:"ag-filter-body",role:"presentation"}),n=this.createFromToElement(s,t,"from",o),r=this.createFromToElement(s,i,"to",o),l=(c,u,h)=>()=>this.refreshInputPairValidation(c,u,h),a=l(n,r,!0);n.onValueChange(a),n.addGuiEventListener("focusin",a);const d=l(n,r,!1);return r.onValueChange(d),r.addGuiEventListener("focusin",d),s}createFromToElement(e,t,i,o){const s=this.createManagedBean(o?new rt({allowedCharPattern:o}):new pn);return s.addCss(`ag-filter-${i}`),s.addCss("ag-filter-filter"),t.push(s),e.appendChild(s.getGui()),s}removeEValues(e,t){const i=o=>this.removeComponents(o,e,t);i(this.eValuesFrom),i(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,n)=>{o0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[1]),i}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,i=>t||(t=!i.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}};function Rf(e,t){if(typeof t=="number")return t;let i=Ke(t);return i!=null&&i.trim()===""&&(i=null),e?e(i):i==null||i.trim()==="-"?null:Number.parseFloat(i)}function Ef(e,t){return En(Rf(e,t.getValue(!0)))}function Hx(e,t,i){return e!=null&&t!=null&&e>=t?`strict${i?"Max":"Min"}ValueValidation`:null}var Ff=class extends wn{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=fa}conditionToString(e,t,i,o,s){const{filter:n,filterTo:r,type:l}=e,a=this.formatValue.bind(this);if(t){const d=this.conditionForToolPanel(l,i,()=>a(n),()=>a(r),o,s);if(d!=null)return d}return i?`${a(n)}-${a(r)}`:n!=null?a(n):`${l}`}},Ox=class extends pa{constructor(){super(yf,Aa),this.filterType="number",this.FilterModelFormatterClass=Ff}comparator(){return(e,t)=>e===t?0:e{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new pn),this.eTextInput=this.createManagedBean(new rt),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),i=this.eTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,o=>this.onValueChanged(o)),this.setupListeners(i,o=>this.onValueChanged(o))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:i}){this.setAriaLabel(e),t!==void 0&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,i),this.setPlaceholder(this.eTextInput,i)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},Vx=class extends va{constructor(){super(...arguments),this.FilterModelFormatterClass=Ff,this.filterType="number",this.defaultOptions=Aa}updateParams(e){Ia(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=Ia(e.filterParams),this.allowedCharPattern?this.createManagedBean(new ma({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new Gx)}convertValue(e){return e?Number(e):null}},ka=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],Nx=class extends vn{constructor(){super("textFilter",df,ka),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[1]),i}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(i,o,s,n)=>{othis.removeComponents(n,e,t),{eValuesFrom:o,eValuesTo:s}=this;i(o),i(s)}},xf=class extends wn{constructor(){super(...arguments),this.filterTypeKeys=ox}conditionToString(e,t,i,o,s){const{filter:n,filterTo:r,type:l}=e;if(t){const a=c=>()=>Le(this,"filterSummaryTextQuote",[c]),d=this.conditionForToolPanel(l,i,a(n),a(r),o,s);if(d!=null)return d}return i?`${n}-${r}`:n!=null?`${n}`:`${l}`}},zx=({filterOption:e,value:t,filterText:i})=>{if(i==null)return!1;switch(e){case"contains":return t.includes(i);case"notContains":return!t.includes(i);case"equals":return t===i;case"notEqual":return t!=i;case"startsWith":return t.indexOf(i)===0;case"endsWith":{const o=t.lastIndexOf(i);return o>=0&&o===t.length-i.length}default:return!1}},Wx=e=>e,_x=e=>e==null?null:e.toString().toLowerCase(),Ux=class extends lf{constructor(){super(df,ka),this.filterType="text",this.FilterModelFormatterClass=xf}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??zx,this.formatter=t.textFormatter??(t.caseSensitive?Wx:_x)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,i,o){const s=e.map(h=>this.formatter(h))||[],n=this.formatter(t),{api:r,colDef:l,column:a,context:d,filterParams:{textFormatter:c}}=this.params;if(i.type==="blank")return Cn(t);if(i.type==="notBlank")return!Cn(t);const u={api:r,colDef:l,column:a,context:d,node:o.node,data:o.data,filterOption:i.type,value:n,textFormatter:c};return s.some(h=>this.matcher({...u,filterText:h}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=i=>{const o={...i},{filter:s,filterTo:n}=i;return s&&(o.filter=Ca(s)??null),n&&(o.filterTo=Ca(n)??null),o};return rr(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},qx=class extends va{constructor(){super(...arguments),this.FilterModelFormatterClass=xf,this.filterType="text",this.defaultOptions=ka}createFloatingFilterInputService(){return this.createManagedBean(new ma)}};function $x(e){return!!e.quickFilter?.isFilterPresent()}function Kx(e){return e.quickFilter?.getText()}function jx(e){e.quickFilter?.resetCache()}var Yx=class extends S{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",i=>this.setFilter(i.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:i,pivotResultCols:o}=this.beans,s=t.isPivotMode(),n=e?.getColumns(),r=t.getColDefCols();let l=(s&&!i.get("applyQuickFilterBeforePivotOrAgg")?o?.getPivotResultCols()?.list:r)??[];n&&(l=l.concat(n)),this.colsToUse=i.get("includeHiddenColumnsInQuickFilter")?l:l.filter(a=>a.isVisible()||a.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(i=>t?this.doesRowPassCache(e,i):this.doesRowPassNoCache(e,i))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return M(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){F(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),i=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,i&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(i=>{const o=this.getTextForColumn(i,e);return M(o)&&o.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let i;e?(this.checkGenerateAggText(t),i=t.quickFilterAggregateText):i=this.getAggText(t);const{quickFilterParts:o,matcher:s}=this;return s(o,i)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let i=this.beans.filterValueSvc.getValue(e,t);const o=e.getColDef();if(o.getQuickFilterText){const s=k(this.gos,{value:i,node:t,data:t.data,column:e,colDef:o});i=o.getQuickFilterText(s)}return M(i)?i.toString().toUpperCase():null}getAggText(e){const t=[];for(const i of this.colsToUse){const o=this.getTextForColumn(i,e);M(o)&&t.push(o)}return t.join(` `)}},Qx={moduleName:"ClientSideRowModelFilter",version:P,rowModels:["clientSide"],beans:[bR]},Fn={moduleName:"FilterCore",version:P,beans:[zF],apiFunctions:{isAnyFilterPresent:VF,onFilterChanged:NF},css:[SF],dependsOn:[Qx]},La={moduleName:"FilterValue",version:P,beans:[KF]},Ki={moduleName:"ColumnFilter",version:P,beans:[GF,$F],dynamicBeans:{headerFilterCellCtrl:CF},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:yF,getColumnFilterInstance:RF,destroyFilter:EF,setFilterModel:FF,getFilterModel:xF,getColumnFilterModel:PF,setColumnFilterModel:DF,showColumnFilter:MF,hideColumnFilter:TF,getColumnFilterHandler:AF,doFilterAction:IF},dependsOn:[Fn,qo,La,Yp]},Pf={moduleName:"CustomFilter",version:P,userComponents:{agReadOnlyFloatingFilter:YF},dependsOn:[Ki]},Df={moduleName:"TextFilter",version:P,dependsOn:[Ki],userComponents:{agTextColumnFilter:{classImp:Nx,params:{useForm:!0}},agTextColumnFloatingFilter:qx},dynamicBeans:{agTextColumnFilterHandler:Ux}},Mf={moduleName:"NumberFilter",version:P,dependsOn:[Ki],userComponents:{agNumberColumnFilter:{classImp:Bx,params:{useForm:!0}},agNumberColumnFloatingFilter:Vx},dynamicBeans:{agNumberColumnFilterHandler:Ox}},Tf={moduleName:"BigIntFilter",version:P,dependsOn:[Ki],userComponents:{agBigIntColumnFilter:{classImp:tx,params:{useForm:!0}},agBigIntColumnFloatingFilter:rx},dynamicBeans:{agBigIntColumnFilterHandler:sx}},Af={moduleName:"DateFilter",version:P,dependsOn:[Ki],userComponents:{agDateColumnFilter:{classImp:lx,params:{useForm:!0}},agDateInput:Lx,agDateColumnFloatingFilter:Ix},dynamicBeans:{agDateColumnFilterHandler:cx}},Zx={moduleName:"QuickFilterCore",version:P,rowModels:["clientSide"],beans:[Yx],dependsOn:[Fn,La]},If={moduleName:"QuickFilter",version:P,apiFunctions:{isQuickFilterPresent:$x,getQuickFilter:Kx,resetQuickFilter:jx},dependsOn:[Zx]},kf={moduleName:"ExternalFilter",version:P,dependsOn:[Fn]},Xx=class extends S{constructor(e,t,i){super(),this.id=e,this.parentCache=t,this.params=i,this.state="needsLoading",this.version=0,this.startRow=e*i.blockSize,this.endRow=this.startRow+i.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,i){this.successCommon(e,{rowData:t,rowCount:i})}isRequestMostRecentAndLive(e){const t=e===this.version,i=this.isAlive();return t&&i}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:i,beans:o,rowNodes:s}=this;for(let n=0;n{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:i,params:{sortModel:o,filterModel:s},gos:n}=this;return k(n,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,i),failCallback:this.pageLoadFailed.bind(this,i),sortModel:o,filterModel:s})}forEachNode(e,t,i){this.rowNodes.forEach((o,s)=>{this.startRow+s{const r=e.rowData?e.rowData[n]:void 0;!s.id&&s.alreadyRendered&&r&&(t[n]=new Ct(i),t[n].setRowIndex(s.rowIndex),t[n].setRowTop(s.rowTop),t[n].setRowHeight(s.rowHeight),s._destroy(!0)),this.setDataAndId(t[n],r,this.startRow+n)});const o=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){const e=this.rowNodes;for(let t=0,i=e.length;tr!=e),i=(r,l)=>l.lastAccessed-r.lastAccessed;t.sort(i);const o=this.params.maxBlocksInCache>0,s=o?this.params.maxBlocksInCache-1:null,n=Jx-1;t.forEach((r,l)=>{const a=r.state==="needsLoading"&&l>=n,d=o?l>=s:!1;if(a||d){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:i,endRow:o}=e;return t.rowIndex>=i&&t.rowIndex=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:i,overflowSize:o}=this.params,n=(e.id+1)*i+o;this.rowCounti.id-o.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const i=[];let o=-1,s=!1;const n={value:0};let r=!1;for(const a of this.getBlocksInOrder())if(!r){if(s&&o+1!==a.id){r=!0;continue}o=a.id,a.forEachNode(d=>{const c=d===e||d===t;(s||c)&&i.push(d),c&&(s=!s)},n,this.rowCount)}return r||s?[]:i}},t6=class extends S{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.hierarchical=!1}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new Ct(e);this.rootNode=t,t.level=-1,this.rowHeight=Ft(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=Ft(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!mi(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getOverlayType(){return this.infiniteCache?.getRowCount()===0?this.beans.filterManager?.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;ti(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:i,rowNodeBlockLoader:o,eventSvc:s,gos:n}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:i?.getSortModel()??[],rowNodeBlockLoader:o,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:Ft(e),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new e6(this.cacheParams)),s.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(i=>{i.id===e&&(t=i)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),i=this.getRowCount()-1;return t>i?i:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function i6(e){Ds(e)?.refreshCache()}function o6(e){Ds(e)?.purgeCache()}function s6(e){return Ds(e)?.getRowCount()}var n6=class extends S{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=qd(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=te(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){Ie(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){Rt(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(i=>i.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const i of t)i.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:i,state:o}=t.getBlockStateJson();e[i]=o}),e}printCacheStatus(){Rt(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},r6={moduleName:"InfiniteRowModelCore",version:P,rowModels:["infinite"],beans:[t6,n6]},Lf={moduleName:"InfiniteRowModel",version:P,apiFunctions:{refreshInfiniteCache:i6,purgeInfiniteCache:o6,getInfiniteRowCount:s6},dependsOn:[r6,Jg]},l6=class extends S{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const i=this.wrapSvc?.wrap(e,t)??t,o=!Vo.has(e),s=o?this.asyncListeners:this.syncListeners;s.has(e)||s.set(e,new Set),s.get(e).add(i),this.eventSvc.addListener(e,i,o)}removeListener(e,t){const i=this.wrapSvc?.unwrap(e,t)??t,s=!!this.asyncListeners.get(e)?.delete(i);s||this.syncListeners.get(e)?.delete(i),this.eventSvc.removeListener(e,i,s)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,i=(n,r)=>{Vo.has(n)&&t(n,r)},o=(n,r)=>{Vo.has(n)||t(n,r)};this.globalListenerPairs.set(e,{syncListener:i,asyncListener:o});const s=this.eventSvc;s.addGlobalListener(i,!1),s.addGlobalListener(o,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:i,globalListenerPairs:o}=this,s=i?.unwrapGlobal(e)??e;if(o.has(s)){const{syncListener:r,asyncListener:l}=o.get(s);t.removeGlobalListener(r,!1),t.removeGlobalListener(l,!0),o.delete(e)}else this.syncGlobalListeners.delete(s),t.removeGlobalListener(s,!1)}destroyEventListeners(e,t){e.forEach((i,o)=>{i.forEach(s=>this.eventSvc.removeListener(o,s,t)),i.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const i of e)this.eventSvc.removeGlobalListener(i,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:i,asyncListener:o})=>{t.removeGlobalListener(i,!1),t.removeGlobalListener(o,!0)}),e.clear()}};function a6(e,t,i){e.apiEventSvc?.addListener(t,i)}function d6(e,t,i){e.apiEventSvc?.removeListener(t,i)}function c6(e,t){e.apiEventSvc?.addGlobalListener(t)}function u6(e,t){e.apiEventSvc?.removeGlobalListener(t)}var Bf={moduleName:"EventApi",version:P,apiFunctions:{addEventListener:a6,addGlobalListener:c6,removeEventListener:d6,removeGlobalListener:u6},beans:[l6]},Hf=class extends S{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?md(t):Cd(e.get("localeText"))}},Of={moduleName:"Locale",version:P,beans:[Hf]};function h6(e){return e.stateSvc?.getState()??{}}function g6(e,t,i){return e.stateSvc?.setState(t,i)}function Gf(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=p6(e)),e.version=P,e}function p6(e){return e.cellSelection=f6(e,"rangeSelection"),e}function f6(e,t){if(e&&typeof e=="object")return e[t]}var m6=class extends S{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=te(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=te(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=te(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:i}=this.beans;this.isClientSideRowModel=J(e);const o=Gf(e.get("initialState")??{}),s=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;const n=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>n(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&i?.hideColumns("columnState");const[r,l,a]=this.addManagedEventListeners({newColumnsLoaded:({source:d})=>{d==="gridInitializing"&&(r(),n(()=>{this.setupStateOnColumnsInitialised(o,!!s),i?.revealColumns("columnState")}))},rowCountReady:()=>{l?.(),n(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{a?.(),n(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const i=Gf(e);delete i.partialColumnState,this.cachedState=i,this.startSuppressEvents();const o="api",s=t?new Set(t):void 0;this.setGridReadyState(i,o,s),this.setColumnsInitialisedState(i,o,!!s,s),this.setRowCountState(i,o,s),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(i,o,s),this.stopSuppressEvents(o)})}setGridReadyState(e,t,i){t==="api"&&!i?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,i,o){this.setColumnState(e,t,i,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const i=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:i("aggregation"),columnMoved:i("columnOrder"),columnPinned:i("columnPinning"),columnResized:i("columnSizing"),columnVisible:i("columnVisibility"),columnPivotChanged:i("pivot"),columnPivotModeChanged:i("pivot"),columnRowGroupChanged:i("rowGroup"),sortChanged:i("sort"),newColumnsLoaded:({source:o})=>{this.updateColumnAndGroupState(),o!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,i){const{filter:o,rowGroupExpansion:s,ssrmRowGroupExpansion:n,rowSelection:r,pagination:l,rowPinning:a}=e,d=(u,h)=>!i?.has(u)&&(h||t==="api");d("filter",o)&&this.setFilterState(o),(d("rowGroupExpansion",s)||d("ssrmRowGroupExpansion",n))&&this.setRowGroupExpansionState(n,s,t),d("rowSelection",r)&&this.setRowSelectionState(r,t),d("pagination",l)&&this.setPaginationState(l,t),d("rowPinning",a)&&this.setRowPinningState(a);const c=this.updateCachedState.bind(this);c("filter",this.getFilterState()),this.updateGroupExpansionState(),c("rowSelection",this.getRowSelectionState()),c("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),i=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},o=()=>t("filter",this.getFilterState()),{gos:s,colFilter:n,selectableFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:i,columnRowGroupChanged:i,rowDataUpdated:()=>{(s.get("groupDefaultExpanded")!==0||s.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(i)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:l=>{(l.newPage||l.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),n&&this.addManagedListeners(n,{filterStateChanged:o}),r&&this.addManagedListeners(r,{selectedFilterChanged:o})}setFirstDataRenderedState(e,t,i){const{scroll:o,cellSelection:s,focusedCell:n,columnOrder:r}=e,l=(c,u)=>!i?.has(c)&&(u||t==="api");l("focusedCell",n)&&this.setFocusedCellState(n),l("cellSelection",s)&&this.setCellSelectionState(s),l("scroll",o)&&this.setScrollState(o),this.setColumnPivotState(!!r?.orderedColIds,t);const a=this.updateCachedState.bind(this);a("sideBar",this.getSideBarState()),a("focusedCell",this.getFocusedCellState());const d=this.getRangeSelectionState();a("rangeSelection",d),a("cellSelection",d),a("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),i=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:i,cellFocusCleared:i,cellSelectionChanged:o=>{if(o.finished){const s=this.getRangeSelectionState();t("rangeSelection",s),t("cellSelection",s)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){const e=this.beans;return _g(To(e),e.colModel.isPivotMode())}setColumnState(e,t,i,o){const{sort:s,rowGroup:n,aggregation:r,pivot:l,columnPinning:a,columnVisibility:d,columnSizing:c,columnOrder:u}=e;let h=!1;const g=(H,$)=>{const W=!o?.has(H)&&!!($||t==="api");return h||(h=W),W},p={},f=H=>{let $=p[H];return $||($={colId:H},p[H]=$,$)},m={},C=g("sort",s);C&&s?.sortModel.forEach(({colId:H,sort:$,type:W},ue)=>{const ne=f(H);ne.sort=$,ne.sortIndex=ue,ne.sortType=W}),(C||!i)&&(m.sort=null,m.sortIndex=null);const v=g("rowGroup",n);v&&n?.groupColIds.forEach((H,$)=>{const W=f(H);W.rowGroup=!0,W.rowGroupIndex=$}),(v||!i)&&(m.rowGroup=null,m.rowGroupIndex=null);const w=g("aggregation",r);w&&r?.aggregationModel.forEach(({colId:H,aggFunc:$})=>{f(H).aggFunc=$}),(w||!i)&&(m.aggFunc=null);const y=g("pivot",l);y&&(l?.pivotColIds.forEach((H,$)=>{const W=f(H);W.pivot=!0,W.pivotIndex=$}),this.gos.updateGridOptions({options:{pivotMode:!!l?.pivotMode},source:t})),(y||!i)&&(m.pivot=null,m.pivotIndex=null);const R=g("columnPinning",a);if(R){for(const H of a?.leftColIds??[])f(H).pinned="left";for(const H of a?.rightColIds??[])f(H).pinned="right"}(R||!i)&&(m.pinned=null);const E=g("columnVisibility",d);if(E)for(const H of d?.hiddenColIds??[])f(H).hide=!0;(E||!i)&&(m.hide=null);const D=g("columnSizing",c);if(D)for(const{colId:H,flex:$,width:W}of c?.columnSizingModel??[]){const ue=f(H);ue.flex=$??null,ue.width=W}(D||!i)&&(m.flex=null);const B=u?.orderedColIds,O=!!B?.length&&!o?.has("columnOrder"),G=O?B.map(H=>f(H)):Object.values(p);(G.length||h)&&(this.columnStates=G,He(this.beans,{state:G,applyOrder:O,defaultState:m},t))}setColumnPivotState(e,t){const i=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const s=this.beans,{pivotResultCols:n,colGroupSvc:r}=s;if(n?.isPivotResultColsPresent()){if(i){const l=[];for(const a of i)n.getPivotResultCol(a.colId)&&l.push(a);He(s,{state:l,applyOrder:e},t)}o&&r?.setColumnGroupState(o,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return Ug(t)}setColumnGroupState(e,t,i){const o=this.beans.colGroupSvc;if(!o||i?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const s=new Set(e.columnGroup?.openColumnGroupIds),r=o.getColumnGroupState().map(({groupId:l})=>{const a=s.has(l);return a&&s.delete(l),{groupId:l,open:a}});for(const l of s)r.push({groupId:l,open:!0});r.length&&(this.columnGroupStates=r),o.setColumnGroupState(r,t)}getFilterState(){const{filterManager:e,selectableFilter:t}=this.beans;let i=e?.getFilterModel();i&&Object.keys(i).length===0&&(i=void 0);const o=e?.getFilterState(),s=e?.getAdvFilterModel()??void 0,n=t?.getState();return i||s||o||n?{filterModel:i,columnFilterState:o,advancedFilterModel:s,selectableFilters:n}:void 0}setFilterState(e){const{filterManager:t,selectableFilter:i}=this.beans,{filterModel:o,columnFilterState:s,advancedFilterModel:n,selectableFilters:r}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};r!==void 0&&i?.setState(r??{}),(o!==void 0||s!==void 0)&&t?.setFilterState(o??null,s??null,"columnFilter"),n!==void 0&&t?.setAdvFilterModel(n??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:i,type:o,startRow:s,endRow:n,columns:r,startColumn:l}=t;return{id:i,type:o,startRow:s,endRow:n,colIds:r.map(a=>a.getColId()),startColId:l.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:i,colModel:o,visibleCols:s}=this.beans;if(!Ze(t)||!i)return;const n=[];for(const r of e?.cellRanges??[]){const l=[];for(const d of r.colIds){const c=o.getCol(d);c&&l.push(c)}if(!l.length)continue;let a=o.getCol(r.startColId);if(!a){const d=s.allCols,c=new Set(l);a=d.find(u=>c.has(u))}n.push({...r,columns:l,startColumn:a})}i.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:i}=e?.getVScrollPosition()??{top:0};return i||t?{top:i,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:i}=e??{top:0,left:0},{frameworkOverrides:o,rowRenderer:s,animationFrameSvc:n,ctrlsSvc:r}=this.beans;o.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(i),r.getScrollFeature()?.setVerticalScrollPosition(t),s.redraw({afterScroll:!0}),n?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:i,rowPinned:o}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:i}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:o,rowIndex:s,rowPinned:n}=e;t.setFocusedCell({column:i.getCol(o),rowIndex:s,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const i=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!i&&!o))return{page:i,pageSize:o}}setPaginationState(e,t){const{pagination:i,gos:o}=this.beans;if(!i)return;const{pageSize:s,page:n}=e??{page:0,pageSize:o.get("paginationPageSize")},r=t==="gridInitializing";s&&!o.get("paginationAutoPageSize")&&i.setPageSize(s,r?"initialState":"pageSizeSelector"),typeof n=="number"&&(r?i.setPage(n):i.goToPage(n))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}updateGroupExpansionState(){const{expansionSvc:e,gos:t}=this.beans,i=e?.getExpansionState(),o=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",o?i:void 0),this.updateCachedState("rowGroupExpansion",o?void 0:i)}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,i){const o=e??t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};this.beans.expansionSvc?.setExpansionState(o,i)}updateColumnState(e){const t=this.getColumnState();let i=!1;const o=this.cachedState;for(const s of Object.keys(t)){const n=t[s];mi(n,o[s])||(i=!0)}this.cachedState={...o,...t},i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const i=this.cachedState[e];this.setCachedStateValue(e,t),mi(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},Vf={moduleName:"GridState",version:P,beans:[m6],apiFunctions:{getState:h6,setState:g6}};function C6(e){return e.rowModel.isLastRowIndexKnown()}function v6(e){return e.pagination?.getPageSize()??100}function w6(e){return e.pagination?.getCurrentPage()??0}function b6(e){return e.pagination?.getTotalPages()??1}function S6(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function y6(e){e.pagination?.goToNextPage()}function R6(e){e.pagination?.goToPreviousPage()}function E6(e){e.pagination?.goToFirstPage()}function F6(e){e.pagination?.goToLastPage()}function x6(e,t){e.pagination?.goToPage(t)}var P6=class extends S{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,i=()=>{const o=Math.max(Ft(t),1),s=Math.floor(e/o);t.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?te(this,i,50)():(i(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function Nf(e,t){if(typeof e!="number")return"";const i=t(),o=i("thousandSeparator",","),s=i("decimalSeparator",".");return e.toString().replace(".",s).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${o}`)}var Yo="paginationPageSizeSelector",D6={tag:"span",cls:"ag-paging-page-size"},M6=class extends U{constructor(){super(D6),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(Yo,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){le(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(Yo)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),i=!t||!e.includes(t);if(i){const s=this.gos.exists("paginationPageSize"),n=this.gos.get(Yo)!==!0;F(94,{pageSizeSet:s,pageSizesSet:n,pageSizeOptions:e,paginationPageSizeOption:t}),n||F(95,{paginationPageSizeOption:t,paginationPageSizeSelector:Yo}),e.unshift("")}const o=String(i?"":t);this.selectPageSizeComp?(lt(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=i}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const i=this.getLocaleTextFunc(),o=i("pageSizeSelectorLabel","Page Size:"),s=i("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new fn).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(s).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(Yo);return!Array.isArray(t)||!t?.length?e:[...t].sort((i,o)=>i-o)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},T6={selector:"AG-PAGE-SIZE-SELECTOR",component:M6},A6=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;flex-wrap:wrap-reverse;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-height:var(--ag-pagination-panel-height);padding:calc(var(--ag-spacing)*.5) var(--ag-cell-horizontal-padding);row-gap:calc(var(--ag-spacing)*.5);@container (width < 600px){justify-content:center}}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel,.ag-paging-row-summary-panel{margin:calc(var(--ag-spacing)*.5)}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-paging-description{line-height:0}",I6=class extends Zr{constructor(){super(),this.btFirst=x,this.btPrevious=x,this.btNext=x,this.btLast=x,this.lbRecordCount=x,this.lbFirstRowOnPage=x,this.lbLastRowOnPage=x,this.lbCurrent=x,this.lbTotal=x,this.pageSizeComp=x,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(A6)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[T6]);const{btFirst:t,btPrevious:i,btNext:o,btLast:s}=this;this.activateTabIndex([t,i,o,s]),t.insertAdjacentElement("afterbegin",Se(e?"last":"first",this.beans)),i.insertAdjacentElement("afterbegin",Se(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",Se(e?"previous":"next",this.beans)),s.insertAdjacentElement("afterbegin",Se(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:n=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(n):iu(this.beans,n),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:i}=e;this.addManagedListeners(t,{click:i,keydown:o=>{(o.key===b.ENTER||o.key===b.SPACE)&&(o.preventDefault(),i())}})}tu(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):Nf(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),i=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const o=this.isZeroPagesToDisplay(),s=e===i-1;this.nextButtonDisabled=s||o,this.lastButtonDisabled=!t||o||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){qa(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),i=this.pagination.getMasterRowCount(),o=e?i:null,s=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,l;this.isZeroPagesToDisplay()?r=l=0:(r=n*s+1,l=r+n-1,e&&l>o&&(l=o));const a=r+n-1,d=!e&&i0?s+1:0,f=this.formatNumber(p);this.lbCurrent.textContent=f;let m,C;if(e)m=this.formatNumber(t),C=this.formatNumber(o);else{const v=h("more","more");m=v,C=v}this.lbTotal.textContent=m,this.lbRecordCount.textContent=C,this.announceAriaStatus(c,u,C,f,m)}announceAriaStatus(e,t,i,o,s){const n=this.getLocaleTextFunc(),r=n("page","Page"),l=n("to","to"),a=n("of","of"),d=`${e} ${l} ${t} ${a} ${i}`,c=`${r} ${o} ${a} ${s}`;d!==this.ariaRowStatus&&(this.ariaRowStatus=d,this.ariaAnnounce?.announceValue(d,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,this.ariaAnnounce?.announceValue(c,"paginationPage"))}},k6={selector:"AG-PAGINATION",component:I6},L6=100,B6=class extends S{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return k6}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:i}=this.beans;i?.isEditing()&&(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return M(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:M(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:M(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:M(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:L6}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const i=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}i!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const i=this.pageSize,o=t-1;this.totalPages=Math.floor(o/i)+1,this.adjustCurrentPageIfInvalid();const s=this.currentPage,n=i*s;let r=i*(s+1)-1;if(r>o&&(r=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(n),r===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const l=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=l-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:i}=this,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*i,this.bottomDisplayedRowIndex=t*(i+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:i=!1,newPageSize:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:i,newPageSize:o,keepRenderedRows:t})}},zf={moduleName:"Pagination",version:P,beans:[B6,P6],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:C6,paginationGetPageSize:v6,paginationGetCurrentPage:w6,paginationGetTotalPages:b6,paginationGetRowCount:S6,paginationGoToNextPage:y6,paginationGoToPreviousPage:R6,paginationGoToFirstPage:E6,paginationGoToLastPage:F6,paginationGoToPage:x6},dependsOn:[qo]},H6=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function O6(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function G6(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function V6(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function N6(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function z6(e,t,i){return e.pinnedRowModel?.forEachPinnedRow(t,i)}var Wf={moduleName:"PinnedRow",version:P,beans:[$c],css:[H6],apiFunctions:{getPinnedTopRowCount:O6,getPinnedBottomRowCount:G6,getPinnedTopRow:V6,getPinnedBottomRow:N6,forEachPinnedRow:z6},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},W6="\u2191",_6="\u2193",U6={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},q6=class extends U{constructor(){super(U6),this.eValue=x,this.eDelta=x,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const i=Math.abs(t),o=e.formatValue(i),s=M(o)?o:i,n=t>=0,r=this.eDelta;n?r.textContent=W6+s:r.textContent=_6+s,r.classList.toggle("ag-value-change-delta-up",n),r.classList.toggle("ag-value-change-delta-down",!n)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),le(this.eDelta)}refresh(e,t=!1){const{value:i,valueFormatted:o}=e,{eValue:s,lastValue:n,beans:r}=this;if(i===n||(M(o)?s.textContent=o:M(i)?s.textContent=i:le(s),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const l=i&&typeof i=="object"&&"toNumber"in i?i.toNumber():i,a=n&&typeof n=="object"&&"toNumber"in n?n.toNumber():n;if(l===a)return!1;if(typeof l=="number"&&typeof a=="number"){const d=l-a;this.showDelta(e,d)}return n&&s.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0}},$6=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",K6={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},j6=class extends U{constructor(){super(K6),this.eCurrent=x,this.refreshCount=0,this.registerCSS($6)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:i}=this,o=se({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=i.textContent,this.getGui().insertBefore(o,i),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let i=e.value;if(K(i)&&(i=""),i===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=i;const o=this.eCurrent;return M(e.valueFormatted)?o.textContent=e.valueFormatted:M(e.value)?o.textContent=i:le(o),!0}},Y6=class extends S{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,i=this.beans.gos.get("cellFlashDuration"),o=this.beans.gos.get("cellFadeDuration")){const s=this.animations[t];s.delete(e);const n=Date.now(),r=n+i,l=n+i+o,a={phase:"flash",flashEndTime:r,fadeEndTime:l};s.set(e,a);const d=`ag-cell-${t}`,c=`${d}-animation`,{comp:u,eGui:{style:h}}=e;u.toggleCss(d,!0),u.toggleCss(c,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&r+15{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),i)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const i of Object.keys(this.animations)){const o=this.animations[i],s=`ag-cell-${i}`,n=`${s}-animation`;for(const[r,l]of o){if(!r.isAlive()||!r.comp){o.delete(r);continue}const{phase:a,flashEndTime:d,fadeEndTime:c}=l,u=a==="flash"?d:c;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:g,eGui:{style:p}}=r;switch(a){case"flash":g.toggleCss(s,!1),g.toggleCss(n,!0),p.transition=`background-color ${c-d}ms`,p.transitionDelay=`${d-e}ms`,t=Math.min(c,t??1/0),l.phase="fade";break;case"fade":g.toggleCss(s,!1),g.toggleCss(n,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),o.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const i=Zc(e.cellPosition);t.cells[i]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function Q6(e,t={}){const{cellFlashSvc:i}=e;i&&e.frameworkOverrides.wrapIncoming(()=>{for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))i.flashCell(o,t)})}var _f={moduleName:"HighlightChanges",version:P,beans:[Y6],userComponents:{agAnimateShowChangeCellRenderer:q6,agAnimateSlideCellRenderer:j6},apiFunctions:{flashCells:Q6}};function Z6(e,t,i){if(!t)return;const o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,s=`aria-${t}`;i===null?o.removeAttribute(s):o.setAttribute(s,i)}function X6(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function J6(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function eP(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function tP(e){e.animationFrameSvc?.flushAllFrames()}function iP(e){return{rowHeight:Ft(e),headerHeight:Eo(e)}}function oP(e,t={}){const i=[];for(const n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const r=n.getCellRenderer();r!=null&&i.push(Gt(r))}if(t.columns?.length)return i;const o=[],s=Nl(t.rowNodes);for(const n of e.rowRenderer.getAllRowCtrls()){if(s&&!zl(n.rowNode,s)||!n.isFullWidth())continue;const r=n.getFullWidthCellRenderers();for(let l=0;l{const a=l.__autoHeights;let d=dt(this.beans,l).height;for(const c of s){let u=a?.[c.getColId()];const h=i?.getCellSpan(c,l);if(h){if(h.getLastNode()!==l)continue;if(u=i?.getCellSpan(c,l)?.getLastNodeAutoHeight(),!u)return}if(u==null){if(this.colSpanSkipCell(c,l))continue;return}d=Math.max(u,d)}d!==l.rowHeight&&(l.setRowHeight(d),n=!0)};o?.forEachPinnedRow?.("top",r),o?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),n&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,i){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[i.getId()];return}const o=e.__autoHeights[i.getId()];e.__autoHeights[i.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:i,colViewport:o,visibleCols:s}=this.beans;if(!i.colSpanActive)return!1;let n=[];switch(e.getPinned()){case"left":n=s.getLeftColsForRow(t);break;case"right":n=s.getRightColsForRow(t);break;case null:n=o.getColsWithinViewport(t);break}return!n.includes(e)}setupCellAutoHeight(e,t,i){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const o=t.parentElement,{rowNode:s,column:n}=e,r=this.beans,l=c=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!i.isAlive())return;const{paddingTop:u,paddingBottom:h,borderBottomWidth:g,borderTopWidth:p}=Yt(o),f=u+h+g+p,C=t.offsetHeight+f;if(c<5){const w=!oe(r)?.contains(t),y=C==0;if(w||y){window.setTimeout(()=>l(c+1),0);return}}this.setRowAutoHeight(s,C,n)},a=()=>l(0);a();const d=at(r,t,a);return i.addDestroyFunc(()=>{d(),this.setRowAutoHeight(s,void 0,n)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:i}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(i).filter(s=>s.isAutoHeight())),t.length!==0){if(!i.__autoHeights)return!1;for(const o of t){const s=i.__autoHeights[o.getColId()];if(!s||i.rowHeight{p=w,f=null,m=y},v=w=>{const y=!w.isExpandable()&&!w.group&&!w.detail&&(c?!c({rowNode:w}):!0);if(w.rowIndex==null||!y){C(null,null);return}if(p==null||w.level!==p.level||w.footer||f&&w.rowIndex-1!==f?.getLastNode().rowIndex){C(w,n.getValue(t,w,"data"));return}const R=n.getValue(t,w,"data");if(g){const E=k(i,{valueA:m,nodeA:p,valueB:R,nodeB:w,column:t,colDef:l});if(!h(E)){C(w,R);return}}else if(u?!u(m,R):m!==R){C(w,R);return}if(!f){const E=a?.get(p);E?.firstNode===p?(E.reset(),f=E):f=new nP(t,p),d.set(p,f)}f.addSpannedNode(w),d.set(w,f)};switch(e){case"center":s.forEachDisplayedNode?.(w=>{(!r||r.isRowInPage(w.rowIndex))&&v(w)}),this.centerValueNodeMap=d;break;case"top":o?.forEachPinnedRow("top",v),this.topValueNodeMap=d;break;case"bottom":o?.forEachPinnedRow("bottom",v),this.bottomValueNodeMap=d;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},lP=class extends S{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=te(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=te(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const i=this.createManagedBean(new rP(e));this.spanningColumns.set(e,i),i.buildCache("top"),i.buildCache("bottom"),i.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const i=this.spanningColumns.get(e);return i?i.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:i}=this.beans,o=e.column,s=e.rowIndex,n=this.spanningColumns.get(o);if(!n)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(s);break;case"bottom":r=t?.getPinnedBottomRow(s);break;default:r=i.getRow(s)}if(r)return n.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const i=this.spanningColumns.get(e);if(i)return i.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[i,o]of this.spanningColumns)if(o.isCellSpanning(e)){const s=o.getCellSpan(e);t(i,s)}}destroy(){super.destroy(),this.spanningColumns.clear()}},aP=class extends _i{constructor(e,t,i){super(e.col,e.firstNode,i,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,i,o,s,n,r){this.eWrapper=i,super.setComp(e,t,i,o,s,n,r),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||wi(e,t.rowIndex)}setAriaRowSpan(){Mm(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(Ro(t)){this.focusedCellPosition=void 0;return}const i=this.isCellFocused();i||(this.focusedCellPosition=void 0),e&&i&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},dP=class extends rn{getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new aP(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},cP=class extends S{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,i=this.getCtrlsMap(e),o=i.size,s=this.getAllRelevantRowControls(e),n=new Map;let r=!1;for(const a of s)a.isAlive()&&t?.forEachSpannedColumn(a.rowNode,(d,c)=>{if(n.has(c.firstNode))return;const u=i.get(c.firstNode);if(u){n.set(c.firstNode,u),i.delete(c.firstNode);return}r=!0;const h=new dP(c.firstNode,this.beans,!1,!1,!1);n.set(c.firstNode,h)});this.setCtrlsMap(e,n);const l=n.size===o;if(!(!r&&l)){for(const a of i.values())a.destroyFirstPass(!0),a.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,i=t?.getCellSpanByPosition(e);if(!i)return;const o=this.getCtrlsMap(e.rowPinned).get(i.firstNode);if(o)return o.getAllCellCtrls().find(s=>s.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},$f={moduleName:"CellSpan",version:P,beans:[lP,cP]},uP=class extends S{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,si(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),uc(e))}createColumns(e,t){const i=()=>{mo(this.beans,this.columns?.tree),this.columns=null},o=e.treeDepth,n=(this.columns?.treeDepth??-1)==o,r=this.generateSelectionCols();if(cc(r,this.columns?.list??[])&&n)return;i();const{colGroupSvc:a}=this.beans,d=a?.findDepth(e.tree)??0,c=a?.balanceTreeForAutoCols(r,d)??[];this.columns={list:r,tree:c,treeDepth:d,map:{}},t(h=>{if(!h)return null;const g=h.filter(p=>!ft(p));return[...r,...g]})}updateColumns(e){const t=si(e.source),{beans:i}=this;for(const o of this.columns?.list??[]){const s=this.createSelectionColDef(e.currentValue);o.setColDef(s,null,t),He(i,{state:[hc(s,o.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>Ii(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,i=e.get("rowSelection");if(typeof i!="object"||!Et(e))return!1;const o=(t.autoColSvc?.getColumns()?.length??0)>0;if(i.checkboxLocation==="autoGroupColumn"&&o)return!1;const s=!!ii(i),n=ao(i);return s||n}createSelectionColDef(e){const{gos:t}=this,i=e??t.get("selectionColumnDef"),o=t.get("enableRtl"),{rowSpan:s,spanRows:n,...r}=i??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:o?"right":"left",comparator(l,a,d,c){const u=d.isSelected(),h=c.isSelected();return u===h?0:u?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...r,colId:Ss,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const i=new ut(e,null,t,!1);return this.createBean(i),[i]}onSelectionOptionsChanged(e,t,i){const o=t&&typeof t!="string"?ii(t):void 0,s=e&&typeof e!="string"?ii(e):void 0,n=o!==s,r=t&&typeof t!="string"?ao(t):void 0,l=e&&typeof e!="string"?ao(e):void 0,a=r!==l,d=co(e),c=co(t);(n||a||d!==c)&&this.beans.colModel.refreshAll(i)}destroy(){mo(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,i){if(!this.columns?.list.length)return;const o=e.length+t.length+i.length;if(o===0)return;const s=this.columns.list[0];if(!s.isVisible())return;const n=()=>{let a;switch(s.pinned){case"left":case!0:a=e;break;case"right":a=i;break;default:a=t}a&&Ie(a,s)};(this.beans.rowNumbersSvc?.getColumn(ys)?2:1)===o&&n()}},hP=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function gP(e,t){if(!t.nodes.every(r=>r.rowPinned&&!nn(r)?(F(59),!1):r.id===void 0?(F(60),!1):!0))return;const{nodes:o,source:s,newValue:n}=t;e.selectionSvc?.setNodesSelected({nodes:o,source:s??"api",newValue:n})}function pP(e,t,i="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:i,selectAll:t})}function fP(e,t,i="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:i,selectAll:t})}function mP(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function CP(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function vP(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function wP(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function bP(e){return e.selectionSvc?.getSelectedNodes()??[]}function SP(e){return e.selectionSvc?.getSelectedRows()??[]}var yP={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},RP=class extends U{constructor(){super(yP,[qs]),this.eCheckbox=x}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:i}=this,o=t.isSelected(),s=rs(e,o),[n,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],l=e(n,r);i.setValue(o,!0),i.setInputAriaLabel(`${l} (${s})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:At,click:o=>{At(o),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(o,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:s})=>{const n=typeof o=="object"?Xn(o):void 0,r=typeof s=="object"?Xn(s):void 0;n!==r&&this.onSelectableChanged()}),ws(this.gos)||typeof this.getIsVisible()=="function"){const o=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:o}),this.addManagedListeners(this.rowNode,{dataChanged:o,cellChanged:o}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:i,gos:o}=this,s=t.selectable,n=this.getIsVisible();let r;if(typeof n=="function"){const u=i?.callbackParams;if(!e)r=n({...u,node:t,data:t.data});else{const h=e.createColumnFunctionCallbackParams(t);r=n({...u,...h})}}else r=n??!1;const l=s&&!r||!s&&r,a=s||r,d=o.get("rowSelection"),c=d&&typeof d!="string"?!Xn(d):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(a&&(l?c:!0)),this.setDisplayed(a&&(l?c:!0)),a&&this.eCheckbox.setDisabled(l),i?.removeHidden&&this.setDisplayed(a)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?ii(t):this.column?.getColDef()?.checkboxSelection}},EP=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:i,pinnedRowModel:o}=this;return t??(t=i.getRowNode(e)),o?.isManual()&&(t??(t=o.getPinnedRowById(e,"top")),t??(t=o.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const i=t[0].id===this.rootId,o=t.findIndex(s=>s.id===e.id);if(o>-1){const s=t.slice(0,o),n=t.slice(o+1);return this.setEndRange(e),i?{keep:s,discard:n}:{keep:n,discard:s}}else return{keep:t,discard:[]}}extend(e,t=!1){const i=this.getRoot();if(i==null){const s=this.getRange().slice();return t&&e.depthFirstSearch(n=>!n.group&&s.push(n)),s.push(e),this.setRoot(e),{keep:s,discard:[]}}const o=this.getNodesInRange(i,e);if(!o)return this.setRoot(e),{keep:[e],discard:[]};if(o.find(s=>s.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const s=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:s}}}getNodesInRange(e,t){const{pinnedRowModel:i,rowModel:o}=this;if(!i?.isManual())return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return Oe(i,"top",e,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const s=Oe(i,"bottom",void 0,e),n=o.getRowCount(),r=o.getRow(n-1);return(o.getNodesInRangeForSelection(t,r)??[]).concat(s)}if(!e.rowPinned&&!t.rowPinned)return o.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return Oe(i,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const s=Oe(i,"top",t,void 0),n=Oe(i,"bottom",void 0,e),r=o.getRow(0),l=o.getRow(o.getRowCount()-1);return s.concat(o.getNodesInRangeForSelection(r,l)??[]).concat(n)}if(!e.rowPinned&&t.rowPinned==="top")return Oe(i,"top",t,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const s=Oe(i,"top",e,void 0),n=Oe(i,"bottom",void 0,t),r=o.getRow(0),l=o.getRow(o.getRowCount()-1);return s.concat(o.getNodesInRangeForSelection(r,l)??[]).concat(n)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return Oe(i,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const s=Oe(i,"bottom",void 0,t),n=o.getRow(o.getRowCount());return(o.getNodesInRangeForSelection(e,n)??[]).concat(s)}return null}},FP=class extends S{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(j(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new Ao);this.cbSelectAll=t,t.addCss("ag-header-select-all"),je(t.getGui(),"presentation"),this.showOrHideSelectAll();const i=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:i,paginationChanged:i,modelUpdated:i}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:s})=>{const n=r=>typeof r=="string"||!r||r.mode==="singleRow"?void 0:r.selectAll;n(o)!==n(s)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,i=this.cbSelectAll,o=t.getSelectAllState(e);i.setValue(o);const s=t.hasNodesToSelect(e);i.setDisabled(!s),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:i,cbSelectAll:o,cbSelectAllVisible:s}=this,n=o.getValue(),r=rs(t,n),l=t("ariaRowSelectAll","Press Space to toggle all rows selection");i.setAriaDescriptionProperty("selectAll",s?`${l} (${r})`:null),o.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||i.announceAriaDescription()}checkSelectionType(e){return Di(this.gos)?!0:(F(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:i}=this.beans;return J(t)||Pi(t)?!0:(F(129,{feature:e,rowModel:i.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let i="uiSelectAll";t==="currentPage"?i="uiSelectAllCurrentPage":t==="filtered"&&(i="uiSelectAllFiltered");const o={source:i,selectAll:t},s=this.beans.selectionSvc;e?s.selectAllRowNodes(o):s.deselectAllRowNodes(o)}isCheckboxSelection(){const{column:e,gos:t,beans:i}=this,n=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return Kf(i,e)&&this.checkRightRowModelType(n)&&this.checkSelectionType(n)}getSelectAllMode(){const e=jd(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:i}=this.column.getColDef();return t?"currentPage":i?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function Kf({gos:e,selectionColSvc:t},i){const o=e.get("rowSelection"),s=i.getColDef(),{headerCheckboxSelection:n}=s;let r=!1;if(typeof o=="object"){const a=ft(i),d=Rs(i);(co(o)==="autoGroupColumn"&&d||a&&t?.isSelectionColumnEnabled())&&(r=ao(o))}else typeof n=="function"?r=n(k(e,{column:i,colDef:s})):r=!!n;return r}var jf=class extends S{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new EP(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const i=ws(e);i!==this.isRowSelectable&&(this.isRowSelectable=i,this.updateSelectable())}),this.isRowSelectable=ws(e),this.addManagedEventListeners({cellValueChanged:i=>this.updateRowSelectable(i.node),rowNodeDataChanged:i=>this.updateRowSelectable(i.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new RP}createSelectAllFeature(e){if(Kf(this.beans,e))return new FP(e)}isMultiSelect(){return Di(this.gos)}onRowCtrlSelected(e,t,i){const o=!!e.rowNode.isSelected();e.forEachGui(i,s=>{s.rowComp.toggleCss("ag-row-selected",o);const n=s.element;An(n,o),n.contains(j(this.beans))&&t(s)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),i=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||i)return;const s=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(s,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!nn(e)||!Et(this.gos)}updateRowSelectable(e,t){const i=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,i,t),i}setRowSelectable(e,t,i){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),i)return;if(Mi(this.gos)){const s=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:s??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,i=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let o=0;o{const t=Mi(e),i=uo(e),o=ho(e)==="filteredDescendants";this.masterSelectsDetail=Yd(e)==="detail",(t!==this.groupSelectsDescendants||o!==this.groupSelectsFiltered||i!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=o,this.mode=i)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,i){if(this.isRowSelectionBlocked(t))return 0;const o=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,i);if(o==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in o)return o.reset?this.resetNodes():this.selectRange(o.deselect,!1,i),this.selectRange(o.select,!0,i);{const s=o.checkFilteredNodes?Qf(o.node):o.newValue;return this.setNodesSelected({nodes:[o.node],newValue:s,clearSelection:o.clearSelection,keepDescendants:o.keepDescendants,event:e,source:i})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:i,nodes:o,event:s,source:n,keepDescendants:r=!1}){if(o.length===0)return 0;const{gos:l}=this;if(!Et(l)&&e)return F(132),0;if(o.length>1&&!this.isMultiSelect())return F(130),0;let a=0;for(let d=0;d0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),a}selectRange(e,t,i){let o=0;return e.forEach(s=>{const n=s.primaryRow;if(n.group&&this.groupSelectsDescendants)return;this.selectRowNode(n,t,void 0,i)&&o++}),o>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)),o}selectChildren(e,t,i){const o=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return o?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:i,nodes:o}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((i,o)=>{e(i)&&t.set(o,i)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:i,rowModel:o}=this.beans;if(!J(i,o))return!1;const s=o.rootNode;if(!s)return!1;let n=!1;const r=l=>{if(l!==s){const a=this.calculateSelectedFromChildren(l);n=this.selectRowNode(l,a===null?!1:a,void 0,e)||n}};return Wt(s,this.beans.rowModel.hierarchical,t,r),n}clearOtherNodes(e,t,i){const o=new Map;let s=0;return this.selectedNodes.forEach(n=>{const r=n.id==e.id;if((t?!DP(e,n):!0)&&!r){const a=this.selectedNodes.get(n.id);s+=this.setNodesSelected({nodes:[a],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:i}),this.groupSelectsDescendants&&n.parent&&o.set(n.parent.id,n.parent)}}),o.forEach(n=>{const r=this.calculateSelectedFromChildren(n);this.selectRowNode(n,r===null?!1:r,void 0,i)}),s}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new Ct(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!J(e,t))return;const i=t.getTopLevelNodes();if(i===null)return;const o=[];function s(n){for(let r=0,l=n.length;r{const r=this.selectRowNode(n.primaryRow,!1,void 0,e);o||(o=r)};if(t==="currentPage"||t==="filtered"){if(!i){z(102);return}this.getNodesToSelect(t).forEach(s)}else this.selectedNodes.forEach(s),this.reset(e);if(this.selectionCtx.selectAll=!1,i&&this.groupSelectsDescendants){const n=this.updateGroupsFromChildrenSelections(e);o||(o=n)}o&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,i=0;return this.getNodesToSelect(e).forEach(o=>{this.groupSelectsDescendants&&o.group||(o.isSelected()?t++:o.selectable&&i++)}),{selectedCount:t,notSelectedCount:i}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:i}=this.getSelectedCounts(e);return Yf(t,i)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],i=s=>t.push(s);if(e==="currentPage")return this.forEachNodeOnPage(s=>{if(!s.group){i(s);return}if(!s.footer&&!s.expanded){const n=r=>{i(r);const l=r.childrenAfterFilter;if(l)for(let a=0,d=l.length;a{const l=this.selectRowNode(r.primaryRow,!0,void 0,o);n||(n=l)}),i.selectAll=!0,J(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(o);n||(n=r)}n&&this.dispatchSelectionChanged(o)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,i){if(e||(e=[]),!Array.isArray(e)){z(103);return}const o=new Set(e),s=[];this.beans.rowModel.forEachNode(n=>{o.has(n.id)&&s.push(n)}),i&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:s,source:t})}canSelectAll(){return J(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:i}=this.beans;if(!Et(t))return;const o="selectableChanged",s=J(t)&&this.groupSelectsDescendants,n=[];if(s){const r=i.rootNode;r&&Wt(r,i.hierarchical,e,l=>{let a=!1;for(const d of l.childrenAfterGroup)a||(a=d.selectable),!d.group&&!this.updateRowSelectable(d,!0)&&d.isSelected()&&n.push(d);this.setRowSelectable(l,a,!0)})}else i.forEachNode(r=>{!this.updateRowSelectable(r,!0)&&r.isSelected()&&n.push(r)});n.length&&this.setNodesSelected({nodes:n,newValue:!1,source:o}),!e&&s&&this.updateGroupsFromChildrenSelections?.(o)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const i=e.detailNode?.detailGridInfo?.api;if(!i)return;const o=PP(i);e.isSelected()!==o&&this.selectRowNode(e,o,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),o||this.detailSelection.set(e.id,new Set(i.getSelectedNodes().map(n=>n.id)))}setDetailSelectionState(e,t,i){if(this.masterSelectsDetail){if(!Di(t)){F(269);return}switch(e.isSelected()){case!0:{i.selectAll();break}case!1:{i.deselectAll();break}case void 0:{const o=this.detailSelection.get(e.id);if(o){const s=[];for(const n of o){const r=i.getRowNode(n);r&&s.push(r)}i.setNodesSelected({nodes:s,newValue:!0,source:"masterDetail"})}break}default:break}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function PP(e){let t=0,i=0;return e.forEachNode(o=>{o.isSelected()?t++:o.selectable&&i++}),Yf(t,i)}function Yf(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function DP(e,t){let i=t.parent;for(;i;){if(i===e)return!0;i=i.parent}return!1}function Qf(e){const t=e.isSelected()===!1,i=e.childrenAfterFilter?.some(Qf)??!1;return t||i}var Zf={moduleName:"SharedRowSelection",version:P,beans:[uP],css:[hP],apiFunctions:{setNodesSelected:gP,selectAll:pP,deselectAll:fP,selectAllFiltered:mP,deselectAllFiltered:CP,selectAllOnCurrentPage:vP,deselectAllOnCurrentPage:wP,getSelectedNodes:bP,getSelectedRows:SP}},Xf={moduleName:"RowSelection",version:P,rowModels:["clientSide","infinite","viewport"],beans:[xP],dependsOn:[Zf]},MP=class extends S{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,i=e.colDef,o=i.cellClassRules,s=this.getCellClassParams(e,i);Ol(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,s,n=>t.toggleCss(n,!0),n=>t.toggleCss(n,!1)),this.cellClassRules=o}applyUserStyles(){const e=this.column,t=e.colDef,i=t.cellStyle;if(!i)return;let o;if(typeof i=="function"){const s=this.getCellClassParams(e,t);o=i(s)}else o=i;o&&this.cellComp.setUserStyles(o)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,i=e.colDef,o=this.getCellClassParams(e,i);for(const n of this.staticClasses)t.toggleCss(n,!1);const s=this.beans.cellStyles.getStaticCellClasses(i,o);this.staticClasses=s;for(const n of s)t.toggleCss(n,!0)}getCellClassParams(e,t){const{value:i,rowNode:o}=this.cellCtrl;return k(this.beans.gos,{value:i,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},TP=class extends S{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,i,o){Ol(this.beans.expressionSvc,void 0,e.cellClassRules,t,i,o),this.processStaticCellClasses(e,t,i)}getStaticCellClasses(e,t){const{cellClass:i}=e;if(!i)return[];let o;return typeof i=="function"?o=i(t):o=i,typeof o=="string"&&(o=[o]),o||[]}createCellCustomStyleFeature(e){return new MP(e,this.beans)}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(s=>{i(s)})}},Jf={moduleName:"CellStyle",version:P,beans:[TP]},em={moduleName:"RowStyle",version:P,beans:[k3]},AP={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,overlayComponent:!0,suppressOverlays:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},xe="clientSide",Ce="serverSide",ji="infinite",IP={onGroupExpandedOrCollapsed:[xe],refreshClientSideRowModel:[xe],isRowDataEmpty:[xe],forEachLeafNode:[xe],forEachNodeAfterFilter:[xe],forEachNodeAfterFilterAndSort:[xe],resetRowHeights:[xe,Ce],applyTransaction:[xe],applyTransactionAsync:[xe],flushAsyncTransactions:[xe],getBestCostNodeSelection:[xe],getServerSideSelectionState:[Ce],setServerSideSelectionState:[Ce],applyServerSideTransaction:[Ce],applyServerSideTransactionAsync:[Ce],applyServerSideRowData:[Ce],retryServerSideLoads:[Ce],flushServerSideAsyncTransactions:[Ce],refreshServerSide:[Ce],getServerSideGroupLevelState:[Ce],refreshInfiniteCache:[ji],purgeInfiniteCache:[ji],getInfiniteRowCount:[ji],isLastRowIndexKnown:[ji,Ce],expandAll:[xe,Ce],collapseAll:[xe,Ce],onRowHeightChanged:[xe,Ce],setRowCount:[ji,Ce],getCacheBlockState:[ji,Ce]},kP={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function LP(e,t,i){const o=kP[e];if(o){const{version:n,new:r,old:l,message:a}=o,d=l??e;return(...c)=>{const u=r?`Please use ${r} instead. `:"";return Zt(`Since ${n} api.${d} is deprecated. ${u}${a??""}`),t.apply(t,c)}}const s=IP[e];return s?(...n)=>{const r=i.rowModel.getType();if(!s.includes(r)){Ei(`api.${e} can only be called when gridOptions.rowModelType is ${s.join(" or ")}`);return}return t.apply(t,n)}:t}var BP={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},HP={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,aasc:1,adesc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},OP={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",overlayLoading:"Overlay",overlayExporting:"Overlay",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},GP=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),VP=class extends S{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,oC(W2)}warnOnInitialPropertyUpdate(e,t){e==="api"&&AP[t]&&F(22,{key:t})}processGridOptions(e){this.processOptions(e,By())}validateApiFunction(e,t){return LP(e,t,this.beans)}missingUserComponent(e,t,i,o){const s=Ni[t];s?this.gos.assertModuleRegistered(s,`AG Grid '${e}' component: ${t}`):F(101,{propertyName:e,componentName:t,agGridDefaults:i,jsComps:o})}missingDynamicBean(e){const t=BP[e];return t?Ne(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){zP.has(e)&&F(10,{eventType:e})}validateIcon(e){if(GP.has(e)&&F(43,{iconName:e}),HP[e])return;const t=OP[e];if(t){z(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:Wn(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}F(134,{iconName:e})}isProvidedUserComp(e){return!!Ni[e]}validateColDef(e){this.processOptions(e,Py())}processOptions(e,t){const{validations:i,deprecations:o,allProperties:s,propertyExceptions:n,objectName:r,docsUrl:l}=t;s&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...n??[],...Object.keys(o)],s,r,l);const a=new Set;if(Object.keys(e).forEach(c=>{const u=o[c];if(u){const{message:v,version:w}=u;a.add(`As of v${w}, ${String(c)} is deprecated. ${v??""}`)}const h=e[c];if(h==null||h===!1)return;const g=i[c];if(!g)return;const{dependencies:p,validate:f,supportedRowModels:m,expectedType:C}=g;if(C){const v=typeof h;if(v!==C){a.add(`${String(c)} should be of type '${C}' but received '${v}' (${h}).`);return}}if(m){const v=this.gridOptions.rowModelType??"clientSide";if(!m.includes(v)){a.add(`${String(c)} is not supported with the '${v}' row model. It is only valid with: ${m.join(", ")}.`);return}}if(p){const v=this.checkForRequiredDependencies(c,p,e);if(v){a.add(v);return}}if(f){const v=f(e,this.gridOptions,this.beans);if(v){a.add(v);return}}}),a.size>0)for(const c of a)Zt(c)}checkForRequiredDependencies(e,t,i){const s=Object.entries(t).filter(([n,r])=>{const l=i[n];return!r.required.includes(l)});return s.length===0?null:s.map(([n,r])=>`'${String(e)}' requires '${n}' to be one of [${r.required.map(l=>l===null?"null":l===void 0?"undefined":l).join(", ")}]. ${r.reason??""}`).join(` `)}checkProperties(e,t,i,o,s){const n=["__ob__","__v_skip","__metadata__"],r=NP(Object.getOwnPropertyNames(e),[...n,...t,...i],i),l=Object.keys(r);for(const a of l){const d=r[a];let c=`invalid ${o} property '${a}' did you mean any of these: ${d.slice(0,8).join(", ")}.`;i.includes("context")&&(c+=` If you are trying to annotate ${o} with application data, use the '${o}.context' property instead.`),Zt(c)}if(l.length>0&&s){const a=this.beans.frameworkOverrides.getDocLink(s);Zt(`to see all the valid ${o} properties please check: ${a}`)}}};function NP(e,t,i){const o={},s=e.filter(n=>!t.some(r=>r===n));if(s.length>0)for(const n of s)o[n]=cn({inputValue:n,allSuggestions:i}).values;return o}var zP=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),tm={moduleName:"Validation",version:P,beans:[VP]},im={moduleName:"AllCommunity",version:P,dependsOn:[sp,mp,Lf,tm,Gp,Vp,Np,zp,Wp,_p,Up,Op,Df,Mf,Tf,Af,Pf,If,kf,Vf,qg,zf,Cl,Yg,Qg,Uf,dp,Xu,Wf,Xf,kg,Jf,cp,em,Bf,Lg,_f,Jl,Of,qf,Zu,np,$f]};function A(e,t={}){const i=Object.keys(t).map(o=>{const s=t[o];return s!=null?`${o}=${s}`:null}).filter(Boolean).join(";");return[e,i].filter(o=>o.length>0).join(":")}var T={grid(e){return A("ag-grid-root",{gridId:e})},headerGroupCell(e){return A("ag-header-group-cell",{colId:e})},headerCell(e){return A("ag-header-cell",{colId:e})},headerCheckbox(e){return A("ag-header-selection-checkbox",{colId:e})},headerFilterButton(e){return A("ag-header-cell-filter-button",{colId:e})},floatingFilter(e){return A("ag-floating-filter",{colId:e})},floatingFilterButton(e){return A("ag-floating-filter-button",{colId:e})},headerCellMenuButton(e){return A("ag-header-cell-menu-button",{colId:e})},headerResizeHandle(e){return A("ag-header-cell-resize",{colId:e})},filterInstancePickerDisplay(e){return A(`ag-${e.source}-picker-display`,xn(e))},numberFilterInstanceInput(e){return A(`ag-${e.source}-number-input`,xn(e))},textFilterInstanceInput(e){return A(`ag-${e.source}-text-input`,xn(e))},dateFilterInstanceInput(e){return A(`ag-${e.source}-date-input`,xn(e))},setFilterInstanceMiniFilterInput(e){return A(`ag-${e.source}-set-filter-mini-filter-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceItem(e,t){return A(`ag-${e.source}-set-filter-item`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,itemLabel:t}:{colId:e.colId,itemLabel:t})},setFilterApplyPanelButton(e,t){return A(`ag-${e.source}-set-filter-apply-panel-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},filterConditionRadioButton(e,t){return A(`ag-${e.source}-filter-condition-radio-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},advancedFilterInput(){return A("ag-advanced-filter-input")},advancedFilterButton(e){return A("ag-advanced-filter-button",{label:e})},advancedFilterBuilderButton(){return A("ag-advanced-filter-builder-button")},advancedFilterPanelMaximiseButton(){return A("ag-advanced-filter-builder-panel-maximise")},advancedFilterPanelCloseButton(){return A("ag-advanced-filter-builder-panel-close")},advancedFilterPill(e){return A("ag-advanced-filter-builder-pill",{label:e})},advancedFilterBuilderAddItemButton(){return A("ag-advanced-filter-builder-add-item-button")},rowNode(e){return A("ag-row",{"row-id":e})},cell(e,t){return A("ag-cell",{"row-id":e,colId:t})},autoGroupCell(e){return T.cell(e,gt)},checkbox(e,t){return A("ag-selection-checkbox",{"row-id":e,colId:t})},selectionColumnCheckbox(e){return T.checkbox(e,Ss)},autoGroupColumnCheckbox(e){return T.checkbox(e,gt)},dragHandle(e,t){return A("ag-drag-handle",{"row-id":e,colId:t})},groupContracted(e,t){return A("ag-group-contracted",{"row-id":e,colId:t})},groupExpanded(e,t){return A("ag-group-expanded",{"row-id":e,colId:t})},autoGroupContracted(e){return T.groupContracted(e,gt)},autoGroupExpanded(e){return T.groupExpanded(e,gt)},rowNumber(e){return T.cell(e,ys)},menu(){return A("ag-menu")},menuOption(e){return A("ag-menu-option",{option:e})},sideBar(){return A("ag-side-bar")},sideBarButton(e){return A("ag-side-button",{label:e})},columnToolPanel(){return A("ag-column-panel")},pivotModeSelect(){return A("ag-pivot-mode-select")},columnPanelSelectHeaderCheckbox(){return A("ag-column-panel-select-header-checkbox")},columnPanelSelectHeaderFilter(){return A("ag-column-panel-select-header-filter")},columnSelectListItemGroupClosedIcon(e){return A("ag-column-select-list-item-group-closed-icon",{label:e})},columnSelectListItemCheckbox(e){return A("ag-column-select-list-item-checkbox",{label:e})},columnSelectListItemDragHandle(e){return A("ag-column-select-list-item-drag-handle",{label:e})},columnDropCellDragHandle(e,t,i){return A("ag-column-drop-cell-drag-handle",{source:e,area:t,label:i})},columnDropCellCancelButton(e,t,i){return A("ag-column-drop-cell-cancel",{source:e,area:t,label:i})},columnDropArea(e,t){return A("ag-column-drop-area",{source:e,name:t})},filterToolPanel(){return A("ag-filter-panel")},filterToolPanelAddFilterButton(){return A("ag-filter-panel-add-filter-button")},filterToolPanelFilterTypeSelector(e){return A("ag-filter-panel-filter-type-selector",{colLabel:e})},filterToolPanelSearchInput(){return A("ag-filter-toolpanel-search-input")},filterToolPanelGroup(e){return A("ag-filter-toolpanel-group",{title:e})},filterToolPanelGroupCollapsedIcon(e){return A("ag-filter-toolpanel-group-collapsed-icon",{title:e})},statusBarTotalAndFilteredRowCount(){return A("ag-status-bar-total-and-filtered-row-count")},statusBarTotalRowCount(){return A("ag-status-bar-total-row-count")},statusBarFilteredRowCount(){return A("ag-status-bar-filtered-row-count")},statusBarSelectedRowCount(){return A("ag-status-bar-selected-row-count")},statusBarAggregations(){return A("ag-status-bar-aggregations")},paginationPanelSizePickerDisplay(e){return A("ag-pagination-page-size-picker-field-display",{value:e})},paginationPanelFirstRowOnPage(e){return A("ag-paging-row-summary-panel-first-row-on-page",{value:e})},paginationPanelLastRowOnPage(e){return A("ag-paging-row-summary-panel-last-row-on-page",{value:e})},paginationPanelRecordCount(e){return A("ag-paging-row-summary-panel-record-count",{value:e})},paginationSummaryPanelButton(e){return A("ag-paging-page-summary-panel-btn",{label:e})},paginationSummaryPanelCurrentPage(e){return A("ag-paging-page-summary-panel-current-page",{value:e})},paginationSummaryPanelTotalPage(e){return A("ag-paging-page-summary-panel-total-page",{value:e})},fillHandle(){return A("ag-fill-handle")},columnChooserCloseButton(){return A("ag-column-chooser-close-button")},columnChooserSearchBarCheckbox(){return A("ag-column-chooser-header-checkbox")},columnChooserSearchBarFilter(){return A("ag-column-chooser-searchbar-filter")},columnChooserListItemGroupClosedIcon(e){return A("ag-column-chooser-list-item-group-closed-icon",{label:e})},columnChooserListItemCheckbox(e){return A("ag-column-chooser-list-item-checkbox",{label:e})},columnChooserListItemDragHandle(e){return A("ag-column-chooser-list-item-drag-handle",{label:e})},overlay(){return A("ag-overlay")}},WP=e=>{const t={},i=Object.keys(T);for(const o of i)t[o]=(...s)=>e(T[o](...s));return t};function _P(e,t){const i={};for(const o of Object.keys(e))t[o]!==null&&(i[t[o]??o]=e[o]);return i}function UP(e){return e.source!=="floating-filter"?{index:0,...e}:e}function xn(e){return _P(UP(e),{colLabel:"label"})}var om="data-testid";function I(e,t){e?.setAttribute(om,t)}function qP(e){om=e}var $P=class extends S{constructor(){super(...arguments),this.beanName="testIdSvc"}postConstruct(){const e=te(this,()=>this.setupAllTestIds(),500),t=te(this,()=>{this.setupAllTestIds(),e()},0);this.addManagedEventListeners({firstDataRendered:t,displayedRowsChanged:t,displayedColumnsChanged:t,displayedColumnsWidthChanged:t,virtualColumnsChanged:t,columnMenuVisibleChanged:t,contextMenuVisibleChanged:t,advancedFilterBuilderVisibleChanged:t,fieldPickerValueSelected:t,modelUpdated:t,sideBarUpdated:t,pinnedHeightChanged:t,gridReady:t,overlayExclusiveChanged:t,rowGroupOpened:t,scrollVisibilityChanged:t,gridSizeChanged:t,filterOpened:t,filterChanged:t,cellSelectionChanged:t})}setupAllTestIds(){const e=ke(this.beans),t=Vu(this.beans),i=e.querySelector(`[grid-id="${t}"]`);I(i,T.grid(t)),e.querySelectorAll(".ag-header-group-cell").forEach(n=>{I(n,T.headerGroupCell(n.getAttribute("col-id")))}),e.querySelectorAll(".ag-header-cell").forEach(n=>{const r=n.getAttribute("col-id"),a=n.classList.contains("ag-floating-filter")?T.floatingFilter(r):T.headerCell(r);I(n,a),I(n.querySelector(".ag-header-cell-filter-button"),T.headerFilterButton(r)),I(n.querySelector(".ag-header-cell-menu-button"),T.headerCellMenuButton(r)),I(n.querySelector(".ag-header-cell-resize"),T.headerResizeHandle(r)),I(n.querySelector(".ag-checkbox input[type=checkbox]"),T.headerCheckbox(r)),I(n.querySelector(".ag-floating-filter-button button"),T.floatingFilterButton(r)),this.setupFilterInstance(n.querySelector(".ag-floating-filter-body"),{source:"floating-filter",colId:r})});const o=e.querySelector(".ag-filter-menu");this.setupFilterInstance(o,{source:"column-filter"}),I(e.querySelector(".ag-advanced-filter input[type=text]"),T.advancedFilterInput()),e.querySelectorAll(".ag-advanced-filter-buttons button").forEach(n=>{I(n,T.advancedFilterButton(n.textContent))}),I(e.querySelector("button.ag-advanced-filter-builder-button"),T.advancedFilterBuilderButton()),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-panel-title-bar-button').forEach((n,r)=>{I(n,r===0?T.advancedFilterPanelMaximiseButton():T.advancedFilterPanelCloseButton())}),e.querySelectorAll('.ag-panel[aria-lable="Advanced Filter"] .ag-advanced-filter-builder-pill').forEach(n=>{I(n,T.advancedFilterPill(n.querySelector(".ag-picker-field-display")?.textContent))}),I(e.querySelector('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-item-button'),T.advancedFilterBuilderAddItemButton()),e.querySelectorAll(".ag-row").forEach(n=>{const r=n.getAttribute("row-id");I(n,T.rowNode(r)),n.querySelectorAll(".ag-cell").forEach(l=>{const a=l.getAttribute("col-id");I(l,T.cell(r,a)),I(l.querySelector(".ag-selection-checkbox input[type=checkbox]"),T.checkbox(r,a)),I(l.querySelector(".ag-drag-handle"),T.dragHandle(r,a)),I(l.querySelector(".ag-group-contracted"),T.groupContracted(r,a)),I(l.querySelector(".ag-group-expanded"),T.groupExpanded(r,a))})}),e.querySelectorAll(".ag-menu-list").forEach(n=>{I(n,T.menu()),n.querySelectorAll(".ag-menu-option").forEach(r=>{I(r,T.menuOption(r.querySelector(".ag-menu-option-text")?.textContent))})}),e.querySelectorAll(".ag-side-bar").forEach(n=>{I(n,T.sideBar()),n.querySelectorAll(".ag-side-button button").forEach(r=>{I(r,T.sideBarButton(r.querySelector(".ag-side-button-label")?.textContent))}),n.querySelectorAll(".ag-column-panel").forEach(r=>{I(r,T.columnToolPanel()),I(r.querySelector(".ag-pivot-mode-select input[type=checkbox]"),T.pivotModeSelect()),I(r.querySelector(".ag-column-select-header-checkbox input[type=checkbox]"),T.columnPanelSelectHeaderCheckbox()),I(r.querySelector(".ag-column-select-header-filter-wrapper input[type=text]"),T.columnPanelSelectHeaderFilter()),r.querySelectorAll(".ag-column-select-list").forEach(l=>{l.querySelectorAll(".ag-column-select-virtual-list-item").forEach(a=>{const d=a.getAttribute("aria-label");I(a.querySelector(".ag-column-group-closed-icon"),T.columnSelectListItemGroupClosedIcon(d)),I(a.querySelector(".ag-column-select-checkbox input[type=checkbox]"),T.columnSelectListItemCheckbox(d)),I(a.querySelector(".ag-drag-handle"),T.columnSelectListItemDragHandle(d))})}),this.setupColumnDropArea(r,"toolbar")}),n.querySelectorAll(".ag-filter-panel").forEach(r=>{I(r,T.filterToolPanel()),I(r.querySelector("button.ag-filter-add-button"),T.filterToolPanelAddFilterButton()),r.querySelectorAll(".ag-filter-card").forEach(l=>{const a=l.querySelector(".ag-filter-card-title")?.textContent,d=l.querySelector(".ag-filter-type-select");I(d,T.filterToolPanelFilterTypeSelector(a)),l.querySelectorAll(".ag-filter").forEach(c=>this.setupFilterInstance(c,{source:"filter-toolpanel",colLabel:a}))})}),n.querySelectorAll(".ag-filter-toolpanel").forEach(r=>{I(r.querySelector(".ag-filter-toolpanel-search-input input[type=text]"),T.filterToolPanelSearchInput()),r.querySelectorAll(".ag-filter-toolpanel-group").forEach(l=>{const a=l.querySelector(".ag-filter-toolpanel-group-title")?.textContent;I(l,T.filterToolPanelGroup(a)),I(l.querySelector(".ag-filter-toolpanel-group-title-bar-icon .ag-icon-tree-closed"),T.filterToolPanelGroupCollapsedIcon(a));const d=l.querySelector(".ag-filter-toolpanel-instance-filter");d&&this.setupFilterInstance(d,{source:"filter-toolpanel",colLabel:a})})})}),I(e.querySelector(".ag-status-bar .ag-status-panel-total-and-filtered-row-count"),T.statusBarTotalAndFilteredRowCount()),I(e.querySelector(".ag-status-bar .ag-status-panel-total-row-count"),T.statusBarTotalRowCount()),I(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),T.statusBarFilteredRowCount()),I(e.querySelector(".ag-status-bar .ag-status-panel-selected-row-count"),T.statusBarSelectedRowCount()),I(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),T.statusBarAggregations()),e.querySelectorAll(".ag-paging-panel").forEach(n=>{I(n.querySelector(".ag-paging-page-size .ag-picker-field-display"),T.paginationPanelSizePickerDisplay(n.querySelector(".ag-paging-page-size .ag-picker-field-display")?.textContent)),n.querySelectorAll(".ag-paging-row-summary-panel-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbFirstRowOnPage":I(r,T.paginationPanelFirstRowOnPage(r.textContent));break;case"lbLastRowOnPage":I(r,T.paginationPanelLastRowOnPage(r.textContent));break;case"lbRecordCount":I(r,T.paginationPanelRecordCount(r.textContent));break}}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-button").forEach(r=>{I(r,T.paginationSummaryPanelButton(r.getAttribute("aria-label")?.toLowerCase()))}),n.querySelectorAll(".ag-paging-page-summary-panel .ag-paging-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbCurrent":I(r,T.paginationSummaryPanelCurrentPage(r.textContent));break;case"lbTotal":I(r,T.paginationSummaryPanelTotalPage(r.textContent));break}})}),I(e.querySelector(".ag-fill-handle"),T.fillHandle()),e.querySelectorAll('.ag-panel[aria-label="Choose Columns"]').forEach(n=>{I(n.querySelector(".ag-panel-title-bar-button-icon"),T.columnChooserCloseButton()),I(n.querySelector('.ag-column-select-header-checkbox input[type="checkbox"]'),T.columnChooserSearchBarCheckbox()),I(n.querySelector('.ag-column-select-header-filter-wrapper input[type="text"]'),T.columnChooserSearchBarFilter()),n.querySelectorAll(".ag-column-select-list").forEach(r=>{r.querySelectorAll(".ag-column-select-virtual-list-item").forEach(l=>{const a=l.getAttribute("aria-label");I(l.querySelector(".ag-column-group-closed-icon"),T.columnChooserListItemGroupClosedIcon(a)),I(l.querySelector(".ag-column-select-checkbox input[type=checkbox]"),T.columnChooserListItemCheckbox(a)),I(l.querySelector(".ag-drag-handle"),T.columnChooserListItemDragHandle(a))})})}),I(e.querySelector(".ag-overlay-wrapper"),T.overlay());const s=e.querySelector(".ag-column-drop-wrapper");s&&this.setupColumnDropArea(s,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(s=>{I(s,T.filterInstancePickerDisplay(t))});const i=t.source==="floating-filter"?".ag-floating-filter-body":".ag-filter-body";e.querySelectorAll(`${i} .ag-input-field:not(.ag-hidden) input[type="number"]`).forEach((s,n,r)=>{const a=r.length>1?{...t,index:n}:t;I(s,T.numberFilterInstanceInput(a))}),e.querySelectorAll(`${i} .ag-input-field:not(.ag-hidden) input[type="text"]`).forEach((s,n,r)=>{const a=r.length>1?{...t,index:n}:t;I(s,T.textFilterInstanceInput(a))}),e.querySelectorAll(`${i} .ag-input-field:not(.ag-hidden) input[type="date"]`).forEach((s,n,r)=>{const a=r.length>1?{...t,index:n}:t;I(s,T.dateFilterInstanceInput(a))});const o=e.querySelector('.ag-mini-filter input[type="text"]');I(o,T.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(s=>{const n=s.querySelector(".ag-checkbox-label")?.textContent,r=s.querySelector('input[type="checkbox"]');I(r,T.setFilterInstanceItem(t,n))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(s=>{I(s,T.setFilterApplyPanelButton(t,s.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(s=>{const n=s.querySelector(".ag-radio-button-label")?.textContent;I(s.querySelector("input[type=radio]"),T.filterConditionRadioButton(t,n))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(i=>{const o=i.querySelector(".ag-column-drop-list")?.getAttribute("aria-label");I(i,T.columnDropArea(t,o)),i.querySelectorAll(".ag-column-drop-cell").forEach(s=>{const n=s.querySelector(".ag-column-drop-cell-text")?.textContent;I(s.querySelector(".ag-drag-handle"),T.columnDropCellDragHandle(t,o,n)),I(s.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),T.columnDropCellCancelButton(t,o,n))})})}},KP={moduleName:"Testing",version:P,beans:[$P]};function jP({testIdAttribute:e}={}){e&&qP(e),Un.registerModules([KP])}var YP=class extends S{constructor(){super(...arguments),this.dispatchColumnChangedEvent=ch,this.columns=[],this.columnIndexMap={},this.updateIndexMap=()=>{this.columnIndexMap={},this.columns.forEach((e,t)=>this.columnIndexMap[e.getId()]=t)}}wireBeans(e){this.colModel=e.colModel,this.aggFuncSvc=e.aggFuncSvc,this.visibleCols=e.visibleCols,this.groupHierarchCols=e.groupHierarchyColSvc}sortColumns(e){const{groupHierarchCols:t}=this;this.columns.sort((i,o)=>t?.compareVirtualColumns(i,o)??e(i,o)),this.updateIndexMap()}setColumns(e,t){this.setColList(e,this.columns,this.eventName,!0,!0,this.columnProcessors.set,t)}addColumns(e,t){this.updateColList(e,this.columns,!0,!0,this.columnProcessors.add,this.eventName,t)}removeColumns(e,t){this.updateColList(e,this.columns,!1,!0,this.columnProcessors.remove,this.eventName,t)}getColumnIndex(e){return this.columnIndexMap[e]}setColList(e=[],t,i,o,s,n,r){const l=this.colModel.getCols();if(!l||l.length===0)return;const a=new Map;t.forEach((c,u)=>a.set(c,u)),t.length=0;for(const c of e){const u=this.colModel.getColDefCol(c);u&&t.push(u)}t.forEach((c,u)=>{const h=a.get(c);if(h===void 0){a.set(c,0);return}o&&h!==u||a.delete(c)}),this.updateIndexMap();const d=this.colModel.getColDefCols();for(const c of d??[]){const u=t.indexOf(c)>=0;n(c,u,r)}s&&this.colModel.refreshCols(!1,r),this.visibleCols.refresh(r),this.dispatchColumnChangedEvent(this.eventSvc,i,[...a.keys()],r)}updateColList(e=[],t,i,o,s,n,r){if(!e||e.length===0)return;let l=!1;const a=new Set;for(const c of e){if(!c)continue;const u=this.colModel.getColDefCol(c);if(u){if(a.add(u),i){if(t.indexOf(u)>=0)continue;t.push(u)}else{const h=t.indexOf(u);if(h<0)continue;for(let g=h+1;g=0:m?w!==void 0?E=w:R!==void 0?E=R!=null&&R>=0:E=!1:E=i.indexOf(f)>=0,E&&((m?y!=null||R!=null:y!=null)?o.push(f):s.push(f))}const u=f=>{const m=f.getColDef();return r(m)??l(m)};o.sort((f,m)=>u(f)-u(m));const h=[],g=this.groupHierarchCols,p=f=>{g?g.expandColumnInto(h,f):h.push(f)};o.forEach(p);for(const f of i)s.indexOf(f)>=0&&p(f);for(const f of s)h.indexOf(f)<0&&p(f);for(const f of i)h.indexOf(f)<0&&n(f,!1,e);for(const f of h)i.indexOf(f)<0&&n(f,!0,e);return this.columns=h,this.updateIndexMap(),this.columns}restoreColumnOrder(e,t){const i=this.columns,o=this.colModel.getColDefCols();if(!i.length||!o)return e;const s=Object.keys(t),n=new Set(s),r=new Set(s),l=new Set(i.map(w=>{const y=w.getColId();return r.delete(y),y}).concat(s)),a=[],d={};let c=0;for(let w=0;w{const y=d[w];for(let R=g;Rthis.syncValueFromDom(),blur:()=>this.syncValueFromDom(!0)}),this.renderValueToElement&&this.value!=null&&this.refreshDisplayedValue(this.value)}setupAria(){const e=this.getAriaElement();je(e,this.config.ariaRole??"textbox"),e.setAttribute("tabindex",this.gos.get("tabIndex").toString())}setupEditable(){const e=this.config.contentEditable??"plaintext-only";e===!1?this.eWrapper.removeAttribute("contenteditable"):e===!0?this.eWrapper.setAttribute("contenteditable","true"):this.eWrapper.setAttribute("contenteditable",e)}setValue(e,t){const i=super.setValue(e,t);return this.renderValueToElement&&!t&&this.refreshDisplayedValue(e),i}setRenderValueToElement(e){this.renderValueToElement=e}setDisplayedValue(e){this.refreshDisplayedValue(e??"")}getContentElement(){return this.eWrapper}refreshDisplayedValue(e){this.eWrapper.textContent=e??""}syncValueFromDom(e){super.setValue(this.eWrapper.textContent??"",e)}getFocusableElement(){return this.eWrapper}},tD={selector:"AG-CONTENT-EDITABLE-FIELD",component:sm},iD='.ag-toggle-button{flex:none;min-width:unset;width:unset}.ag-toggle-button-input-wrapper{background-color:var(--ag-toggle-button-off-background-color);border-radius:calc(var(--ag-toggle-button-height)*.5);flex:none;height:var(--ag-toggle-button-height);max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);position:relative;transition:background-color .1s;:where(.ag-toggle-button-input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-toggle-button-height);margin:0;max-width:var(--ag-toggle-button-width);min-width:var(--ag-toggle-button-width);opacity:0}&.ag-checked{background-color:var(--ag-toggle-button-on-background-color)}&.ag-disabled{opacity:.5}}.ag-toggle-button-input-wrapper:before{background-color:var(--ag-toggle-button-switch-background-color);border-radius:100%;content:"";display:block;height:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2);left:var(--ag-toggle-button-switch-inset);pointer-events:none;position:absolute;top:var(--ag-toggle-button-switch-inset);transition:left .1s;width:calc(var(--ag-toggle-button-height) - var(--ag-toggle-button-switch-inset)*2)}.ag-toggle-button-input-wrapper.ag-checked:before{left:calc(100% - var(--ag-toggle-button-height) + var(--ag-toggle-button-switch-inset))}.ag-toggle-button-input-wrapper:focus-within{box-shadow:var(--ag-focus-shadow)}',nm=class extends Ao{constructor(e){super(e,"ag-toggle-button"),this.registerCSS(iD)}setValue(e,t){return super.setValue(e,t),this.toggleCss("ag-selected",this.getValue()),this}},oD={selector:"AG-TOGGLE-BUTTON",component:nm};if(Td(),Un.registerModules([im]),typeof $e.exports=="object"&&typeof Zi=="object"){var sD=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Object.getOwnPropertyNames(t))!Object.prototype.hasOwnProperty.call(e,s)&&s!==i&&Object.defineProperty(e,s,{get:()=>t[s],enumerable:!(o=Object.getOwnPropertyDescriptor(t,s))||o.enumerable});return e};$e.exports=sD($e.exports,Zi)}return $e.exports});